|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JdbcControl
Simplifies access to a relational database from your Java code using SQL commands. The Jdbc Control handles the work of connecting to, sending queries to, and ResultSet mapping from the database. You don't need to know how to use JDBC in order to use the Jdbc Control, just basic SQL.
To use a Jdbc Control create a .jcx file (java file with a .jcx extension) which extends this interface. Add annotations to the jcx to tell the Jdbc Control how to connect to your database instance (either ConnectionDataSource or ConnectionDriver), then add methods which include SQL annotations to access the database.
Nested Class Summary | |
---|---|
static class |
JdbcControl.ComplexSqlFragment
A ComplexSqlFragment can be used as a return value from a parameter reflection operation for return values which contain BOTH SQL text and parameters. |
static interface |
JdbcControl.ConnectionDataSource
Class-level annotation for making a DataSource available for use with the Jdbc Control. |
static interface |
JdbcControl.ConnectionDriver
Class-level annotation for making a ConnectionDriver available for use with the Jdbc Control. |
static interface |
JdbcControl.ConnectionOptions
Class level annotation used to set options on the JDBC connnection. |
static class |
JdbcControl.FetchDirection
Enumeration of supported fetch directions. |
static class |
JdbcControl.HoldabilityType
Enumeration of supported fetch directions. |
static class |
JdbcControl.JndiContextFactory
Abstract base class for a user defined Jndi Context factory which can be used as a value for the jndiContextFactory member of the ConnectionDataSource annotation. |
static class |
JdbcControl.ScrollType
Enumeration of supported types of scrolling ResultSets |
static interface |
JdbcControl.SQL
Method-level annotation for methods in a jcx which wish to access a database instance. |
static class |
JdbcControl.SQLParameter
Nested class used for specifing parameters for a callable statement. |
static interface |
JdbcControl.TypeMapper
Class / method level annotation for mapping SQL user defined types (UDTs) to and from java objects. |
static interface |
JdbcControl.UndefinedIteratorType
Default value for the iteratorElementType element of the SQL annotation. |
static interface |
JdbcControl.UndefinedResultSetMapper
Default value for the resultSetMapper element of the SQL annotation. |
Field Summary | |
---|---|
static int |
DEFAULT_FETCH_SIZE
The default fetch size for result sets, indicates the database should determine the fetch size. |
static int |
MAXROWS_ALL
This constant can be used as the value for the maxRows element of the SQL annotation. |
Method Summary | |
---|---|
Connection |
getConnection()
Returns a database connection to the server associated with the control. |
Calendar |
getDataSourceCalendar()
Gets the Calendar instance used when setting and getting Date , Time , and
Timestamp values. |
void |
setDataSourceCalendar(Calendar cal)
Sets the Calendar instance that should be used when setting and getting Date , Time , and
Timestamp values. |
Field Detail |
---|
static final int MAXROWS_ALL
static final int DEFAULT_FETCH_SIZE
Method Detail |
---|
Connection getConnection() throws SQLException
SQLException
void setDataSourceCalendar(Calendar cal)
Date
, Time
, and
Timestamp
values.
java.sql.ResultSet#getDate(int, Calendar)
,
java.sql.ResultSet#getTime(int, Calendar)
,
java.sql.ResultSet#getTimestamp(int, Calendar)
,
java.sql.PreparedStatement#setDate(int, Date, Calendar)
,
java.sql.PreparedStatement#setTime(int, Time, Calendar)
,
java.sql.PreparedStatement#setTimestamp(int, Timestamp, Calendar)
Calendar getDataSourceCalendar()
Date
, Time
, and
Timestamp
values. This is the Calendar
set by the setDataSourceCalendar method.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |