|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.is.jrf.PostgreSQLDatabasePolicy
Instances of this class perform PostgreSQL-specific logic and return PostgreSQL-specific information.
Constructor Summary | |
PostgreSQLDatabasePolicy()
|
Method Summary | |
java.lang.String |
autoIncrementIdentifier()
PostgreSQL has Sequences for generating an arbitrary integer primary key so AUTO INCREMENT is not needed here. |
void |
createSequence(AbstractDomain domain,
JDBCHelper aJDBCHelper)
This is called when creating a table that has a SEQUENCED_PRIMARY_KEY. |
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)
This method throws an exception since it should never be called. |
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 result of this is used in SQL. |
java.lang.String |
outerWhereJoin(java.lang.String mainTableColumn,
java.lang.String joinTableColumn)
Return a string with a name-value pair that represents an SQL outer join in PostgreSQL. |
java.lang.String |
sequenceSQL(java.lang.String tableName)
This assumes there is a PostgreSQL SEQUENCE object created with name of seq_tableNameHere When executed, this SQL should return a one row, one column result set with an Integer in it that column. |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PostgreSQLDatabasePolicy()
Method Detail |
public java.lang.String sequenceSQL(java.lang.String tableName)
sequenceSQL
in interface DatabasePolicy
tableName
- a value of type 'String'public java.lang.String timestampFunction()
timestampFunction
in interface DatabasePolicy
public java.lang.String formatTimestamp(java.sql.Timestamp ts)
formatTimestamp
in interface DatabasePolicy
ts
- a value of type 'Timestamp'public java.lang.String formatDate(java.sql.Date sqlDate)
formatDate
in interface DatabasePolicy
sqlDate
- a value of type 'java.sql.Date'public java.lang.String currentTimestampSQL()
currentTimestampSQL
in interface DatabasePolicy
public java.lang.String autoIncrementIdentifier()
autoIncrementIdentifier
in interface DatabasePolicy
public java.lang.Long findAutoIncrementId(java.lang.String tableName, java.lang.String columnName, JDBCHelper aJDBCHelper)
findAutoIncrementId
in interface DatabasePolicy
tableName
- a value of type 'String'columnName
- a value of type 'String'aJDBCHelper
- a value of type 'JDBCHelper'public void createSequence(AbstractDomain domain, JDBCHelper aJDBCHelper) throws java.sql.SQLException
createSequence
in interface DatabasePolicy
domain
- a value of type 'AbstractDomain'aJDBCHelper
- a value of type 'JDBCHelper'public java.lang.String outerWhereJoin(java.lang.String mainTableColumn, java.lang.String joinTableColumn)
outerWhereJoin
in interface DatabasePolicy
mainTableColumn
- a value of type 'String'joinTableColumn
- a value of type 'String'public java.lang.String timestampColumnType()
timestampColumnType
in interface DatabasePolicy
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |