org.ujorm.orm.dialect
Class FirebirdDialect

java.lang.Object
  extended by org.ujorm.orm.SqlDialect
      extended by org.ujorm.orm.dialect.FirebirdDialect

public class FirebirdDialect
extends SqlDialect


Field Summary
 
Fields inherited from class org.ujorm.orm.SqlDialect
COMMON_SEQ_TABLE_KEY, DEFAULT_SCHEMA_SYMBOL, ormHandler
 
Constructor Summary
FirebirdDialect()
           
 
Method Summary
 String getJdbcDriver()
          Returns a JDBC driver class name.
 String getJdbcUrl()
          Returns a default JDBC URL
 boolean isMultiRowInsertSupported()
          Multi row INSERT is not implemented in this dialect yet due:
Caused by: org.firebirdsql.jdbc.FBSQLException: GDS Exception.
 Appendable printAlterTableAddColumn(MetaColumn column, Appendable out)
          Print a SQL sript to add a new column to the table
The DDL statement does not contains a word COLUMN.
 Appendable printCreateSchema(String schema, Appendable out)
          NO SCHEMA
 Appendable printInsert(List<? extends OrmUjo> bo, int idxFrom, int idxTo, Appendable out)
          Implementation is not working
protected  Appendable printLockForSelect(Query query, Appendable out)
          Print a 'lock clausule' to the end of SQL SELECT statement to use a pessimistic lock.
protected  Appendable printQuotedNameAlways(CharSequence name, Appendable sql)
          This method does not quote due some errors.
 
Methods inherited from class org.ujorm.orm.SqlDialect
createConnection, createJndiInitialContext, createSubQuery, escape, getAliasColumnName, getColumnType, getCriterionTemplate, getExtentedDialect, getKeywordSet, getNameProvider, getQuotedName, getSeqTableModel, isCatalog, isColumnLengthAllowed, isFilled, printAlterTableColumn, printCall, printColumnAlias, printColumnDeclaration, printComment, printComment, printCommit, printCriterion, printCriterionValue, printDefaultConstraint, printDefaultSchema, printDefaultValue, printDelete, printFKColumnsDeclaration, printForeignKey, printForeignKey, printFullTableName, printFullTableName, printIndex, printInsert, printInsertBySelect, println, printNextSequence, printOffset, printQuotedName, printSelect, printSelectOrder, printSelectTable, printSelectTableBase, printSelectView, printSequenceCurrentValue, printSequenceDeleteById, printSequenceInit, printSequenceInitWithValues, printSequenceNextValue, printSequenceTable, printSequenceTableName, printSetMaxSequence, printTable, printTableAliasDefinition, printTableColumns, printUpdate, releaseSavepoint, setHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FirebirdDialect

public FirebirdDialect()
Method Detail

getJdbcDriver

public String getJdbcDriver()
Description copied from class: SqlDialect
Returns a JDBC driver class name.

Specified by:
getJdbcDriver in class SqlDialect

getJdbcUrl

public String getJdbcUrl()
Description copied from class: SqlDialect
Returns a default JDBC URL

Specified by:
getJdbcUrl in class SqlDialect

printCreateSchema

public Appendable printCreateSchema(String schema,
                                    Appendable out)
                             throws IOException
NO SCHEMA

Overrides:
printCreateSchema in class SqlDialect
Throws:
IOException

printLockForSelect

protected Appendable printLockForSelect(Query query,
                                        Appendable out)
                                 throws IOException,
                                        UnsupportedOperationException
Print a 'lock clausule' to the end of SQL SELECT statement to use a pessimistic lock. The current database does not support the feature, throw an exception UnsupportedOperationException.
The method prints a text "FOR UPDATE WITH LOCK".

Overrides:
printLockForSelect in class SqlDialect
Parameters:
query - The UJO query
Throws:
IOException
UnsupportedOperationException

printAlterTableAddColumn

public Appendable printAlterTableAddColumn(MetaColumn column,
                                           Appendable out)
                                    throws IOException
Print a SQL sript to add a new column to the table
The DDL statement does not contains a word COLUMN.

Overrides:
printAlterTableAddColumn in class SqlDialect
Throws:
IOException

isMultiRowInsertSupported

public boolean isMultiRowInsertSupported()
Multi row INSERT is not implemented in this dialect yet due:
Caused by: org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544436. SQL error code = -804

Overrides:
isMultiRowInsertSupported in class SqlDialect
See Also:
Multi row insert

printInsert

public Appendable printInsert(List<? extends OrmUjo> bo,
                              int idxFrom,
                              int idxTo,
                              Appendable out)
                       throws IOException
Implementation is not working

Overrides:
printInsert in class SqlDialect
Parameters:
bo - Business object list
idxFrom - Start index from list
idxTo - Finished index from list (excluded)
Throws:
IOException
See Also:
isMultiRowInsertSupported()

printQuotedNameAlways

protected Appendable printQuotedNameAlways(CharSequence name,
                                           Appendable sql)
                                    throws IOException
This method does not quote due some errors.

Overrides:
printQuotedNameAlways in class SqlDialect
Parameters:
name - Name (identifier) for quoting
sql - Target SQL for printing new quoted name
Returns:
SQL with printed quoted name
Throws:
IOException


Copyright 2013, Pavel Ponec