|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This is an interface used to provide database specific behavior. An implementer of this is referenced by the AbstractDomain.
OracleDatabasePolicy,
SQLServerSybaseDatabasePolicy| Method Summary | |
java.lang.String |
autoIncrementIdentifier()
auto-increment means that upon insertion, the integer column is automatically given a unique id by the dbms. |
void |
createSequence(AbstractDomain domain,
JDBCHelper aJDBCHelper)
This method creates a sequence for the domain object. |
java.lang.String |
currentTimestampSQL()
This should return the the SQL to use to have the database return the current timestamp. |
java.lang.Long |
findAutoIncrementId(java.lang.String tableName,
java.lang.String columnName,
JDBCHelper aJDBCHelper)
|
java.lang.String |
formatDate(java.sql.Date sqlDate)
The result of this is used in SQL. |
java.lang.String |
formatTimestamp(java.sql.Timestamp ts)
The return value should be in the string format that the database recognizes as a timestamp. |
java.lang.String |
outerWhereJoin(java.lang.String mainTableColumn,
java.lang.String joinTableColumn)
Return a string of a name-value pair that represents an SQL outer join that can be used in a WHERE clause. |
java.lang.String |
sequenceSQL(java.lang.String tableName)
Return a SQL string to get the next sequence number for a table. |
java.lang.String |
timestampColumnType()
This method used when building SQL for creating a table. |
java.lang.String |
timestampFunction()
This should return the string value (function name) to put into the SQL to tell the database to insert the current timestamp. |
| Method Detail |
public java.lang.String sequenceSQL(java.lang.String tableName)
tableName - a value of type 'String'
public void createSequence(AbstractDomain domain,
JDBCHelper aJDBCHelper)
throws java.sql.SQLException
domain - a value of type 'AbstractDomain'aJDBCHelper - a value of type 'JDBCHelper'java.sql.SQLException - if an error occurspublic java.lang.String timestampFunction()
public java.lang.String formatTimestamp(java.sql.Timestamp ts)
ts - a value of type 'Timestamp'public java.lang.String formatDate(java.sql.Date sqlDate)
sqlDate - a value of type 'java.sql.Date'public java.lang.String currentTimestampSQL()
public java.lang.String autoIncrementIdentifier()
public java.lang.Long findAutoIncrementId(java.lang.String tableName,
java.lang.String columnName,
JDBCHelper aJDBCHelper)
public java.lang.String outerWhereJoin(java.lang.String mainTableColumn,
java.lang.String joinTableColumn)
mainTableColumn - a value of type 'String'joinTableColumn - a value of type 'String'public java.lang.String timestampColumnType()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||