SolarMetric Kodo JDO 3.1.6 generated on August 25 2004

kodo.jdbc.sql
Class PostgresDictionary

java.lang.Object
  |
  +--kodo.jdbc.sql.DBDictionary
        |
        +--kodo.jdbc.sql.PostgresDictionary
All Implemented Interfaces:
Configurable, ConnectionDecorator

public class PostgresDictionary
extends DBDictionary

Dictionary for Postgres.


Fields inherited from class kodo.jdbc.sql.DBDictionary
CENTI, DECI, MICRO, MILLI, NANO, SCHEMA_CASE_DEFAULT, SCHEMA_CASE_LOWER, SCHEMA_CASE_PRESERVE, SCHEMA_CASE_UPPER, SEC
 
Constructor Summary
PostgresDictionary()
           
 
Method Summary
 Connection decorate(Connection conn)
          Decorate the given connection if needed.
 byte getByte(ResultSet rs, int column)
          PostgreSQL does not perform automatic conversions, so attempting to get a whole number out of a decimal will throw a SQLException.
 Date getDate(ResultSet rs, int column)
          Convert the specified column of the SQL ResultSet to the proper java type.
protected  int getDatePrecision()
          Set to the precision of timestamps in the data store.
 String[] getDropColumnSQL()
           
 int getInt(ResultSet rs, int column)
          PostgreSQL does not perform automatic conversions, so attempting to get a whole number out of a decimal will throw a SQLException.
 long getLong(ResultSet rs, int column)
          PostgreSQL does not perform automatic conversions, so attempting to get a whole number out of a decimal will throw a SQLException.
 int getPreferredType(int type)
          Return the preferred Types type for the given one.
 short getShort(ResultSet rs, int column)
          PostgreSQL does not perform automatic conversions, so attempting to get a whole number out of a decimal will throw a SQLException.
 boolean isSystemIndex(String name, Table table)
          This method is used to filter system indexes from database metadata.
 boolean isSystemTable(String name, String schema, boolean targetSchema)
          This method is used to filter system tables from database metadata.
 void setBoolean(PreparedStatement stmnt, int idx, boolean val)
          Set the given value as a parameter to the statement.
 void setSupportsSetFetchSize(boolean supports)
           
 boolean supportsSetFetchSize()
           
protected  boolean supportsSizeInColumnDefinition(Column col, String name)
          Returns true if a schema definition statement supports appending the size after the column type.
 
Methods inherited from class kodo.jdbc.sql.DBDictionary
addSystemSchema, addSystemTable, afterMetadataOperation, appendSize, assertSelectForUpdate, beforeMetadataOperation, canBatch, canLock, configureReflectedColumn, convertSchemaCase, endConfiguration, getAddColumnSQL, getAddForeignKeySQL, getAddPrimaryKeySQL, getArray, getAsciiStream, getAutoIncrementClause, getAutoIncrementTypeName, getBatchLimit, getBatchParameterLimit, getBigDecimal, getBigInteger, getBigintTypeName, getBinaryStream, getBinaryTypeName, getBitTypeName, getBlob, getBlobObject, getBlobStream, getBlobTypeName, getBoolean, getBytes, getCatalogNameForMetadata, getCatalogSeparator, getChar, getCharacterStream, getCharTypeName, getClob, getClobString, getClobTypeName, getColumnNameForMetadata, getColumns, getConfiguration, getConstraintNameBeforeDeclaration, getCreateIndexSQL, getCreatePrimaryKeys, getCreateTableSQL, getDate, getDateTypeName, getDBMetaData, getDecimalTypeName, getDeclareColumnSQL, getDefaultSchemaName, getDistinctCountColumnSeparator, getDistinctTypeName, getDouble, getDoubleTypeName, getDropColumnSQL, getDropForeignKeySQL, getDropIndexSQL, getDropPrimaryKeySQL, getDropTableSQL, getFloat, getFloatTypeName, getForeignKeyActionName, getForeignKeyConstraintSQL, getForUpdateClause, getFrom, getFullName, getFullName, getFullName, getGeneratedKey, getGeneratedKeySequenceName, getImportedKeys, getIndexInfo, getInitializationSQL, getIntegerTypeName, getJavaObjectTypeName, getJDBCType, getJoinSyntax, getJoinSyntaxConstant, getLastGeneratedKeyQuery, getLastGeneratedKeyQuery, getLocale, getLongVarbinaryTypeName, getLongVarcharTypeName, getMaxCharacterFieldLength, getMaxCharactersInAutoIncrement, getMaxCharactersInTableName, getMaxColumnNameLength, getMaxForeignKeyNameLength, getMaxIndexesPerTable, getMaxIndexNameLength, getMaxKeyNameLength, getMaxPrimaryKeyNameLength, getMaxTableNameLength, getNullColumnName, getNullTableName, getNullTypeName, getNumericTypeName, getObject, getOrderings, getOtherTypeName, getPlatform, getPrimaryKeyConstraintSQL, getPrimaryKeys, getPrimaryKeysFromBestRowIdentifier, getPrimaryKeysFromGetPrimaryKeys, getRealTypeName, getRef, getRefTypeName, getRequiresAliasForSubselect, getRequiresAutoCommitForMetadata, getReservedKeywords, getReservedWords, getSchemaCase, getSchemaNameForMetadata, getSelects, getSimulateLocking, getSizeClause, getSmallintTypeName, getStorageLimitationsFatal, getStoreCharsAsNumbers, getStoreLargeNumbersAsStrings, getString, getStructTypeName, getSupportsDeferredConstraints, getSupportsForeignKeys, getSupportsLockingWithDistinctClause, getSupportsLockingWithInnerJoin, getSupportsLockingWithMultipleTables, getSupportsLockingWithOrderClause, getSupportsLockingWithOuterJoin, getSupportsMultipleNontransactionalResultSets, getSupportsNullTableForGetColumns, getSupportsNullTableForGetImportedKeys, getSupportsNullTableForGetIndexInfo, getSupportsNullTableForGetPrimaryKeys, getSupportsQueryTimeout, getSupportsSchemaForGetColumns, getSupportsSchemaForGetTables, getSupportsSelectForUpdate, getSystemSchemas, getSystemTables, getTableForUpdateClause, getTableNameForMetadata, getTables, getTableTypes, getTime, getTimestamp, getTimestampTypeName, getTimeTypeName, getTinyintTypeName, getTypeName, getUseGetBestRowIdentifierForPrimaryKeys, getUseGetBytesForBlobs, getUseGetObjectForBlobs, getUseSchemaName, getUseSetBytesForBlobs, getUseStringsForClobs, getValidationSQL, getValidColumnName, getValidForeignKeyName, getValidIndexName, getValidPrimaryKeyName, getValidTableName, getVarbinaryTypeName, getVarcharTypeName, getWhere, isReserved, isSupported, makeNameValid, maxKeyNameLength, newColumnInfo, newForeignKeyInfo, newIndexInfo, newPrimaryKeyInfo, newTableInfo, refSchemaComponents, replaceMapping, replaceMapping, replaceMappingFactory, replaceSchemaFactory, replaceSize, serialize, setArray, setAsciiStream, setAutoIncrementClause, setAutoIncrementTypeName, setBatchLimit, setBatchParameterLimit, setBigDecimal, setBigInteger, setBigintTypeName, setBinaryStream, setBinaryTypeName, setBitTypeName, setBlob, setBlobObject, setBlobTypeName, setByte, setBytes, setCatalogSeparator, setChar, setCharacterStream, setCharTypeName, setClob, setClobString, setClobTypeName, setConfiguration, setCreatePrimaryKeys, setDate, setDate, setDateTypeName, setDBMetaData, setDecimalTypeName, setDefaultSchemaName, setDistinctCountColumnSeparator, setDistinctTypeName, setDouble, setDoubleTypeName, setFloat, setFloatTypeName, setForUpdateClause, setInitializationSQL, setInt, setIntegerTypeName, setJavaObjectTypeName, setJoinSyntax, setJoinSyntaxConstant, setLastGeneratedKeyQuery, setLocale, setLong, setLongVarbinaryTypeName, setLongVarcharTypeName, setMaxCharactersInAutoIncrement, setMaxCharactersInTableName, setMaxIndexesPerTable, setMaxKeyNameLength, setNull, setNullColumnName, setNullTableName, setNullTypeName, setNumericTypeName, setObject, setOtherTypeName, setPlatform, setRealTypeName, setRef, setRefTypeName, setRequiresAliasForSubselect, setRequiresAutoCommitForMetadata, setReservedWords, setSchemaCase, setShort, setSimulateLocking, setSmallintTypeName, setStorageLimitationsFatal, setStoreCharsAsNumbers, setStoreLargeNumbersAsStrings, setString, setStructTypeName, setSupportsDeferredConstraints, setSupportsForeignKeys, setSupportsLockingWithDistinctClause, setSupportsLockingWithInnerJoin, setSupportsLockingWithMultipleTables, setSupportsLockingWithOrderClause, setSupportsLockingWithOuterJoin, setSupportsMultipleNontransactionalResultSets, setSupportsNullTableForGetColumns, setSupportsNullTableForGetImportedKeys, setSupportsNullTableForGetIndexInfo, setSupportsNullTableForGetPrimaryKeys, setSupportsQueryTimeout, setSupportsSchemaForGetColumns, setSupportsSchemaForGetTables, setSupportsSelectForUpdate, setSystemSchemas, setSystemTables, setTableForUpdateClause, setTableTypes, setTime, setTimestamp, setTimestampTypeName, setTimeTypeName, setTinyintTypeName, setUseGetBestRowIdentifierForPrimaryKeys, setUseGetBytesForBlobs, setUseGetObjectForBlobs, setUseSchemaName, setUseSetBytesForBlobs, setUseStringsForClobs, setValidationSQL, setVarbinaryTypeName, setVarcharTypeName, startConfiguration, storageWarning, supportsAutoIncrement, supportsForeignKey, supportsRandomAccessResultSet, supportsSelectForUpdate, supportsTotalCountsForBatch, supportsUpdateCountsForBatch, toNativeJoin, toSelect, toSelect, toSelectCount, toSQL92Join, toTraditionalJoin, warnSupportedDictionary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostgresDictionary

public PostgresDictionary()
Method Detail

getDate

public Date getDate(ResultSet rs,
                    int column)
             throws SQLException
Description copied from class: DBDictionary
Convert the specified column of the SQL ResultSet to the proper java type. Converts the date from a Timestamp by default.
Overrides:
getDate in class DBDictionary

getByte

public byte getByte(ResultSet rs,
                    int column)
             throws SQLException
PostgreSQL does not perform automatic conversions, so attempting to get a whole number out of a decimal will throw a SQLException. Fall back to performing manual conversion if the initial get fails.
Overrides:
getByte in class DBDictionary

getShort

public short getShort(ResultSet rs,
                      int column)
               throws SQLException
PostgreSQL does not perform automatic conversions, so attempting to get a whole number out of a decimal will throw a SQLException. Fall back to performing manual conversion if the initial get fails.
Overrides:
getShort in class DBDictionary

getInt

public int getInt(ResultSet rs,
                  int column)
           throws SQLException
PostgreSQL does not perform automatic conversions, so attempting to get a whole number out of a decimal will throw a SQLException. Fall back to performing manual conversion if the initial get fails.
Overrides:
getInt in class DBDictionary

getLong

public long getLong(ResultSet rs,
                    int column)
             throws SQLException
PostgreSQL does not perform automatic conversions, so attempting to get a whole number out of a decimal will throw a SQLException. Fall back to performing manual conversion if the initial get fails.
Overrides:
getLong in class DBDictionary

getDatePrecision

protected int getDatePrecision()
Description copied from class: DBDictionary
Set to the precision of timestamps in the data store. Set to one of: DBDictionary.NANO, DBDictionary.MICRO, DBDictionary.MILLI, DBDictionary.CENTI, DBDictionary.DECI, DBDictionary.SEC. Returns DBDictionary.MILLI by default.
Overrides:
getDatePrecision in class DBDictionary

getDropColumnSQL

public String[] getDropColumnSQL()

getPreferredType

public int getPreferredType(int type)
Description copied from class: DBDictionary
Return the preferred Types type for the given one. Returns the given type by default.
Overrides:
getPreferredType in class DBDictionary

supportsSizeInColumnDefinition

protected boolean supportsSizeInColumnDefinition(Column col,
                                                 String name)
Description copied from class: DBDictionary
Returns true if a schema definition statement supports appending the size after the column type. For example some databases allow FLOAT(20), but other databases disallow INT8(16).
Overrides:
supportsSizeInColumnDefinition in class DBDictionary

setBoolean

public void setBoolean(PreparedStatement stmnt,
                       int idx,
                       boolean val)
                throws SQLException
Description copied from class: DBDictionary
Set the given value as a parameter to the statement.
Overrides:
setBoolean in class DBDictionary

decorate

public Connection decorate(Connection conn)
                    throws SQLException
Description copied from class: DBDictionary
Decorate the given connection if needed. Some databases require special handling for JDBC bugs. This method will also issue any initialization SQL is the DBDictionary.getInitializationSQL() method does not return null.
Overrides:
decorate in class DBDictionary

isSystemTable

public boolean isSystemTable(String name,
                             String schema,
                             boolean targetSchema)
Description copied from class: DBDictionary
This method is used to filter system tables from database metadata. Return true if the given table name represents a system table that should not appear in the schema definition. By default, returns true only if the given table is in the internal list of system tables, or if the given schema is in the list of system schemas and is not the target schema.
Overrides:
isSystemTable in class DBDictionary
Following copied from class: kodo.jdbc.sql.DBDictionary
Parameters:
name - the table name
schema - the table schema; may be null
targetSchema - if true, then the given schema was listed by the user as one of his JDO schemas

isSystemIndex

public boolean isSystemIndex(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
Following copied from class: kodo.jdbc.sql.DBDictionary
Parameters:
name - the index name
table - the index table

supportsSetFetchSize

public boolean supportsSetFetchSize()

setSupportsSetFetchSize

public void setSupportsSetFetchSize(boolean supports)

SolarMetric Kodo JDO 3.1.6 generated on August 25 2004

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.