SolarMetric Kodo JDO 3.1.6 generated on August 25 2004

kodo.jdbc.sql
Class FoxProDictionary

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

public class FoxProDictionary
extends DBDictionary

Dictionary for Visual FoxPro via DataDirect SequeLink and DataDirect ODBC FoxPro driver. This will not work with any other combination of JDBC/ODBC server and ODBC driver.

FoxPro has the following limitations:


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
FoxProDictionary()
           
 
Method Summary
protected  String appendSize(Column col, String typeName)
          FoxPro does not like unsized column declarations.
 void configureReflectedColumn(Column col, String typeName)
          Configure the specified column with the typeName from the DatabaseMetaData.
 ColumnInfo[] getColumns(DatabaseMetaData meta, String catalog, String schemaName, String tableName, String columnName, Connection conn)
          Return a result set in the form expected by DatabaseMetaData.getColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String).
 String[] getCreateIndexSQL(Index index)
          Return a series of SQL statements to create the given index.
 ForeignKeyInfo[] getImportedKeys(DatabaseMetaData meta, String catalog, String schemaName, String tableName, Connection conn)
          Return a result set in the form expected by DatabaseMetaData.getImportedKeys(java.lang.String, java.lang.String, java.lang.String), though only the PKTABLE_SCHEM, PKTABLE_NAME, PKCOLUMN_NAME, FKTABLE_SCHEM, FKTABLE_NAME, FKCOLUMN_NAME, KEY_SEQ, DELETE_RULE, FK_NAME, DEFERRABILITY columns are required.
 int getMaxCharacterFieldLength()
          Returns the maximum number of characters a VARCHAR type field can hold.
 int getMaxPrimaryKeyNameLength()
          Returns the maximum number of characters in a primary key name for this database.
protected  String getPrimaryKeyConstraintSQL(PrimaryKey pk)
          Return the declaration SQL for the given primary key.
 PrimaryKeyInfo[] getPrimaryKeys(DatabaseMetaData meta, String catalog, String schemaName, String tableName, Connection conn)
          Return an array of PrimaryKeyInfo for the specified schema objects.
 String getString(ResultSet rs, int column)
          FoxPro doesn't auto-truncate values.
 void setNull(PreparedStatement stmnt, int idx, int colType)
          Ensure that Blob/Clob is handled with safe methods.
 
Methods inherited from class kodo.jdbc.sql.DBDictionary
addSystemSchema, addSystemTable, afterMetadataOperation, assertSelectForUpdate, beforeMetadataOperation, canBatch, canLock, convertSchemaCase, decorate, endConfiguration, getAddColumnSQL, getAddForeignKeySQL, getAddPrimaryKeySQL, getArray, getAsciiStream, getAutoIncrementClause, getAutoIncrementTypeName, getBatchLimit, getBatchParameterLimit, getBigDecimal, getBigInteger, getBigintTypeName, getBinaryStream, getBinaryTypeName, getBitTypeName, getBlob, getBlobObject, getBlobStream, getBlobTypeName, getBoolean, getByte, getBytes, getCatalogNameForMetadata, getCatalogSeparator, getChar, getCharacterStream, getCharTypeName, getClob, getClobString, getClobTypeName, getColumnNameForMetadata, getConfiguration, getConstraintNameBeforeDeclaration, getCreatePrimaryKeys, getCreateTableSQL, getDate, getDate, getDatePrecision, 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, getIndexInfo, getInitializationSQL, getInt, getIntegerTypeName, getJavaObjectTypeName, getJDBCType, getJoinSyntax, getJoinSyntaxConstant, getLastGeneratedKeyQuery, getLastGeneratedKeyQuery, getLocale, getLong, getLongVarbinaryTypeName, getLongVarcharTypeName, getMaxCharactersInAutoIncrement, getMaxCharactersInTableName, getMaxColumnNameLength, getMaxForeignKeyNameLength, getMaxIndexesPerTable, getMaxIndexNameLength, getMaxKeyNameLength, getMaxTableNameLength, getNullColumnName, getNullTableName, getNullTypeName, getNumericTypeName, getObject, getOrderings, getOtherTypeName, getPlatform, getPreferredType, getPrimaryKeysFromBestRowIdentifier, getPrimaryKeysFromGetPrimaryKeys, getRealTypeName, getRef, getRefTypeName, getRequiresAliasForSubselect, getRequiresAutoCommitForMetadata, getReservedKeywords, getReservedWords, getSchemaCase, getSchemaNameForMetadata, getSelects, getShort, getSimulateLocking, getSizeClause, getSmallintTypeName, getStorageLimitationsFatal, getStoreCharsAsNumbers, getStoreLargeNumbersAsStrings, 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, isSystemIndex, isSystemTable, 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, setBoolean, 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, 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, supportsSizeInColumnDefinition, 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

FoxProDictionary

public FoxProDictionary()
Method Detail

getString

public String getString(ResultSet rs,
                        int column)
                 throws SQLException
FoxPro doesn't auto-truncate values.
Overrides:
getString in class DBDictionary

setNull

public void setNull(PreparedStatement stmnt,
                    int idx,
                    int colType)
             throws SQLException
Ensure that Blob/Clob is handled with safe methods.
Overrides:
setNull in class DBDictionary

configureReflectedColumn

public void configureReflectedColumn(Column col,
                                     String typeName)
Description copied from class: DBDictionary
Configure the specified column with the typeName from the DatabaseMetaData.
Overrides:
configureReflectedColumn in class DBDictionary
Following copied from class: kodo.jdbc.sql.DBDictionary
Parameters:
col - the Column to configure
typeName - the TYPE_NAME as reported by the metadata

appendSize

protected String appendSize(Column col,
                            String typeName)
FoxPro does not like unsized column declarations.
Overrides:
appendSize in class DBDictionary

getColumns

public ColumnInfo[] getColumns(DatabaseMetaData meta,
                               String catalog,
                               String schemaName,
                               String tableName,
                               String columnName,
                               Connection conn)
                        throws SQLException
Description copied from class: DBDictionary
Return a result set in the form expected by DatabaseMetaData.getColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String).
Overrides:
getColumns in class DBDictionary

getPrimaryKeyConstraintSQL

protected String getPrimaryKeyConstraintSQL(PrimaryKey pk)
Description copied from class: DBDictionary
Return the declaration SQL for the given primary key. This method is used from within DBDictionary.getCreateTableSQL(kodo.jdbc.schema.Table) and DBDictionary.getAddPrimaryKeySQL(kodo.jdbc.schema.PrimaryKey). Returns CONSTRAINT <pk name> PRIMARY KEY (<col list>) by default.
Overrides:
getPrimaryKeyConstraintSQL in class DBDictionary

getPrimaryKeys

public PrimaryKeyInfo[] getPrimaryKeys(DatabaseMetaData meta,
                                       String catalog,
                                       String schemaName,
                                       String tableName,
                                       Connection conn)
                                throws SQLException
Description copied from class: DBDictionary
Return an array of PrimaryKeyInfo for the specified schema objects.
Overrides:
getPrimaryKeys in class DBDictionary

getImportedKeys

public ForeignKeyInfo[] getImportedKeys(DatabaseMetaData meta,
                                        String catalog,
                                        String schemaName,
                                        String tableName,
                                        Connection conn)
                                 throws SQLException
Description copied from class: DBDictionary
Return a result set in the form expected by DatabaseMetaData.getImportedKeys(java.lang.String, java.lang.String, java.lang.String), though only the PKTABLE_SCHEM, PKTABLE_NAME, PKCOLUMN_NAME, FKTABLE_SCHEM, FKTABLE_NAME, FKCOLUMN_NAME, KEY_SEQ, DELETE_RULE, FK_NAME, DEFERRABILITY columns are required.
Overrides:
getImportedKeys in class DBDictionary

getMaxPrimaryKeyNameLength

public int getMaxPrimaryKeyNameLength()
Description copied from class: DBDictionary
Returns the maximum number of characters in a primary key name for this database.
Overrides:
getMaxPrimaryKeyNameLength in class DBDictionary

getMaxCharacterFieldLength

public int getMaxCharacterFieldLength()
Description copied from class: DBDictionary
Returns the maximum number of characters a VARCHAR type field can hold.
Overrides:
getMaxCharacterFieldLength in class DBDictionary

getCreateIndexSQL

public String[] getCreateIndexSQL(Index index)
Description copied from class: DBDictionary
Return a series of SQL statements to create the given index. Returns CREATE [UNIQUE] INDEX <index name> ON <table name> (<col list>) by default.
Overrides:
getCreateIndexSQL in class DBDictionary

SolarMetric Kodo JDO 3.1.6 generated on August 25 2004

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