net.sf.hajdbc.dialect
Class DerbyDialect

java.lang.Object
  extended by net.sf.hajdbc.dialect.StandardDialect
      extended by net.sf.hajdbc.dialect.DerbyDialect
All Implemented Interfaces:
Dialect

public class DerbyDialect
extends StandardDialect

Dialect for Apache Derby.

Since:
1.1
Author:
Paul Ferraro

Constructor Summary
DerbyDialect()
           
 
Method Summary
protected  String createForeignKeyConstraintFormat()
          Deferrability clause is not supported.
protected  String currentDatePattern()
           
protected  String currentTimePattern()
           
protected  String currentTimestampPattern()
           
protected  String dateLiteralFormat()
           
protected  String executeFunctionFormat()
           
 Collection<QualifiedName> getSequences(DatabaseMetaData metaData)
          Returns a collection of all sequences in this database.
 boolean isIdentity(ColumnProperties properties)
          Indicates whether or not the specified column is an identity column.
 String parseSequence(String sql)
          Parses a sequence name from the specified SQL statement.
protected  String timeLiteralFormat()
           
protected  String timestampLiteralFormat()
           
 
Methods inherited from class net.sf.hajdbc.dialect.StandardDialect
alterIdentityColumnFormat, alterSequenceFormat, createUniqueConstraintFormat, currentTimestampFunction, dropConstraintFormat, dropForeignKeyConstraintFormat, dropUniqueConstraintFormat, dummyTable, evaluateCurrentDate, evaluateCurrentTime, evaluateCurrentTimestamp, evaluateRand, executeFunction, executeFunctionSQL, executeQuery, getAlterIdentityColumnSQL, getAlterSequenceSQL, getColumnType, getCreateForeignKeyConstraintSQL, getCreateUniqueConstraintSQL, getDefaultSchemas, getDropForeignKeyConstraintSQL, getDropUniqueConstraintSQL, getIdentifierPattern, getNextSequenceValueSQL, getSimpleSQL, getTruncateTableSQL, insertIntoTablePattern, isSelectForUpdate, nextSequenceValueFormat, parse, parseInsertTable, randomPattern, selectForUpdatePattern, sequencePattern, sequenceTableType, truncateTableFormat
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DerbyDialect

public DerbyDialect()
Method Detail

executeFunctionFormat

protected String executeFunctionFormat()
Overrides:
executeFunctionFormat in class StandardDialect
See Also:
StandardDialect.executeFunctionFormat()

isIdentity

public boolean isIdentity(ColumnProperties properties)
Description copied from interface: Dialect
Indicates whether or not the specified column is an identity column.

Specified by:
isIdentity in interface Dialect
Overrides:
isIdentity in class StandardDialect
Parameters:
properties - a table column
Returns:
true, if this column is an identity column, false otherwise
See Also:
StandardDialect.isIdentity(net.sf.hajdbc.ColumnProperties)

parseSequence

public String parseSequence(String sql)
Description copied from interface: Dialect
Parses a sequence name from the specified SQL statement.

Specified by:
parseSequence in interface Dialect
Overrides:
parseSequence in class StandardDialect
Parameters:
sql - a SQL statement
Returns:
the name of a sequence, or null if this SQL statement does not reference a sequence or this dialect does not support sequences
See Also:
StandardDialect.parseSequence(java.lang.String)

getSequences

public Collection<QualifiedName> getSequences(DatabaseMetaData metaData)
                                       throws SQLException
Description copied from interface: Dialect
Returns a collection of all sequences in this database.

Specified by:
getSequences in interface Dialect
Overrides:
getSequences in class StandardDialect
Parameters:
metaData - database meta data
Returns:
a collection of sequence names
Throws:
SQLException
See Also:
StandardDialect.getSequences(java.sql.DatabaseMetaData)

createForeignKeyConstraintFormat

protected String createForeignKeyConstraintFormat()
Deferrability clause is not supported.

Overrides:
createForeignKeyConstraintFormat in class StandardDialect
See Also:
StandardDialect.createForeignKeyConstraintFormat()

currentDatePattern

protected String currentDatePattern()
Overrides:
currentDatePattern in class StandardDialect
See Also:
StandardDialect.currentDatePattern()

currentTimePattern

protected String currentTimePattern()
Overrides:
currentTimePattern in class StandardDialect
See Also:
StandardDialect.currentTimePattern()

currentTimestampPattern

protected String currentTimestampPattern()
Overrides:
currentTimestampPattern in class StandardDialect
See Also:
StandardDialect.currentTimestampPattern()

dateLiteralFormat

protected String dateLiteralFormat()
Overrides:
dateLiteralFormat in class StandardDialect
See Also:
StandardDialect.dateLiteralFormat()

timeLiteralFormat

protected String timeLiteralFormat()
Overrides:
timeLiteralFormat in class StandardDialect
See Also:
StandardDialect.timeLiteralFormat()

timestampLiteralFormat

protected String timestampLiteralFormat()
Overrides:
timestampLiteralFormat in class StandardDialect
See Also:
StandardDialect.timestampLiteralFormat()