Class EmpressDictionary

  • All Implemented Interfaces:
    JoinSyntaxes, Configurable, IdentifierConfiguration, ConnectionDecorator, LoggingConnectionDecorator.SQLWarningHandler

    public class EmpressDictionary
    extends DBDictionary
    Dictionary for Empress using ODBC server combined with their type 2 driver. This dictionary may issues with other driver/topology configurations. Empress does not allow multiple connections to read rows read in a transaction, effectively forcing pessimistic transactions regardless of the Optimistic setting. To allow users to use optimistic transactions in a multi-connection evironment, you must set the AllowConcurrentRead setting to true in addition to standard options. Empress has the following additional limitations:
    • Foreign keys are quite limited in Empress and it is recommended that these be created by hand.
    • Batching can be unreliable. Using BatchLimit=0 is strongly recommended.
    • Using AllowConcurrentRead should be accompanied by SimulateLocking=true
    • Connections should be rolled back on return to ensure locks are released (see OpenJPA default DataSource documentation.
    • Certain outer joins requiring parameters in a subselect is not supported by Empress and may under certain configurations cause size () calls on query results and LRS fields to throw an exception.
    • Certain aggregate functions are not supported.
    • Field Detail

      • allowConcurrentRead

        public boolean allowConcurrentRead
        This setting inserts "BYPASS" after every "SELECT". This allows for multiple transactional reads of the same row from different connections at the expense of loss of pessimistic locking. Defaults to false.
    • Constructor Detail

      • EmpressDictionary

        public EmpressDictionary()
    • Method Detail

      • isSystemIndex

        public boolean isSystemIndex​(java.lang.String name,
                                     Table table)
        Description copied from class: DBDictionary
        This method is used to filter system indexes from database metadata. Return true if the given index name represents a system index that should not appear in the schema definition. Returns false by default.
        Overrides:
        isSystemIndex in class DBDictionary
        Parameters:
        name - the index name
        table - the index table
      • getDropColumnSQL

        public java.lang.String[] getDropColumnSQL​(Column column)
        Description copied from class: DBDictionary
        Return a series of SQL statements to drop the given column from its table. Return an empty array if operation not supported. Returns ALTER TABLE <table name> DROP COLUMN <col name> by default.
        Overrides:
        getDropColumnSQL in class DBDictionary
      • setFloat

        public void setFloat​(java.sql.PreparedStatement stmnt,
                             int idx,
                             float val,
                             Column col)
                      throws java.sql.SQLException
        Description copied from class: DBDictionary
        Set the given value as a parameter to the statement.
        Overrides:
        setFloat in class DBDictionary
        Throws:
        java.sql.SQLException
      • setDouble

        public void setDouble​(java.sql.PreparedStatement stmnt,
                              int idx,
                              double val,
                              Column col)
                       throws java.sql.SQLException
        Description copied from class: DBDictionary
        Set the given value as a parameter to the statement.
        Overrides:
        setDouble in class DBDictionary
        Throws:
        java.sql.SQLException