org.apache.openjpa.jdbc.sql
Class FoxProDictionary

java.lang.Object
  extended by org.apache.openjpa.jdbc.sql.DBDictionary
      extended by org.apache.openjpa.jdbc.sql.FoxProDictionary
All Implemented Interfaces:
JoinSyntaxes, Configurable, ConnectionDecorator, LoggingConnectionDecorator.SQLWarningHandler

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:


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.openjpa.jdbc.sql.DBDictionary
DBDictionary.SerializedData
 
Field Summary
 
Fields inherited from class org.apache.openjpa.jdbc.sql.DBDictionary
allowsAliasInBulkClause, arrayTypeName, autoAssignClause, autoAssignTypeName, bigintTypeName, binaryTypeName, bitLengthFunction, bitTypeName, blobTypeName, booleanTypeName, castFunction, catalogSeparator, CENTI, characterColumnSize, charTypeName, clobTypeName, closePoolSQL, concatenateDelimiter, concatenateFunction, conf, connected, CONS_NAME_AFTER, CONS_NAME_BEFORE, CONS_NAME_MID, constraintNameMode, createPrimaryKeys, crossJoinClause, currentDateFunction, currentTimeFunction, currentTimestampFunction, datePrecision, dateTypeName, DECI, decimalTypeName, distinctCountColumnSeparator, distinctTypeName, doubleTypeName, driverVendor, dropTableSQL, fixedSizeTypeNames, fixedSizeTypeNameSet, floatTypeName, forUpdateClause, getStringVal, inClauseLimit, initializationSQL, innerJoinClause, integerTypeName, javaObjectTypeName, joinSyntax, lastGeneratedKeyQuery, log, longVarbinaryTypeName, longVarcharTypeName, maxAutoAssignNameLength, maxColumnNameLength, maxConstraintNameLength, maxEmbeddedBlobSize, maxEmbeddedClobSize, maxIndexesPerTable, maxIndexNameLength, maxTableNameLength, MICRO, MILLI, NAME_ANY, NAME_SEQUENCE, NAME_TABLE, NANO, nextSequenceQuery, nullTypeName, numericTypeName, otherTypeName, outerJoinClause, platform, RANGE_POST_DISTINCT, RANGE_POST_LOCK, RANGE_POST_SELECT, RANGE_PRE_DISTINCT, rangePosition, realTypeName, refTypeName, requiresAliasForSubselect, requiresAutoCommitForMetaData, requiresCastForComparisons, requiresCastForMathFunctions, requiresConditionForCrossJoin, reservedWords, reservedWordSet, SCHEMA_CASE_LOWER, SCHEMA_CASE_PRESERVE, SCHEMA_CASE_UPPER, schemaCase, searchStringEscape, SEC, selectWordSet, sequenceNameSQL, sequenceSchemaSQL, sequenceSQL, simulateLocking, smallintTypeName, storageLimitationsFatal, storeCharsAsNumbers, storeLargeNumbersAsStrings, stringLengthFunction, structTypeName, substringFunctionName, supportsAlterTableWithAddColumn, supportsAlterTableWithDropColumn, supportsAutoAssign, supportsCascadeDeleteAction, supportsCascadeUpdateAction, supportsCorrelatedSubselect, supportsDefaultDeleteAction, supportsDefaultUpdateAction, supportsDeferredConstraints, supportsForeignKeys, supportsHaving, supportsLockingWithDistinctClause, supportsLockingWithInnerJoin, supportsLockingWithMultipleTables, supportsLockingWithOrderClause, supportsLockingWithOuterJoin, supportsLockingWithSelectRange, supportsModOperator, supportsMultipleNontransactionalResultSets, supportsNullDeleteAction, supportsNullTableForGetColumns, supportsNullTableForGetImportedKeys, supportsNullTableForGetIndexInfo, supportsNullTableForGetPrimaryKeys, supportsNullUpdateAction, supportsQueryTimeout, supportsRestrictDeleteAction, supportsRestrictUpdateAction, supportsSchemaForGetColumns, supportsSchemaForGetTables, supportsSelectEndIndex, supportsSelectForUpdate, supportsSelectStartIndex, supportsSubselect, supportsTimestampNanos, supportsUniqueConstraints, supportsXMLColumn, systemSchemas, systemSchemaSet, systemTables, systemTableSet, tableForUpdateClause, tableTypes, timestampTypeName, timeTypeName, tinyintTypeName, toLowerCaseFunction, toUpperCaseFunction, trimBothFunction, trimLeadingFunction, trimTrailingFunction, useGetBestRowIdentifierForPrimaryKeys, useGetBytesForBlobs, useGetObjectForBlobs, useGetStringForClobs, useSchemaName, useSetBytesForBlobs, useSetStringForClobs, validationSQL, varbinaryTypeName, varcharTypeName, VENDOR_DATADIRECT, VENDOR_OTHER, xmlTypeName
 
Fields inherited from interface org.apache.openjpa.jdbc.sql.JoinSyntaxes
SYNTAX_DATABASE, SYNTAX_SQL92, SYNTAX_TRADITIONAL
 
Constructor Summary
FoxProDictionary()
           
 
Method Summary
protected  String appendSize(Column col, String typeName)
          Helper method to add size properties to the specified type.
 Column[] getColumns(DatabaseMetaData meta, String catalog, String schemaName, String tableName, String columnName, Connection conn)
          Reflect on the schema to find columns matching the given table and column patterns.
 String[] getCreateIndexSQL(Index index)
          Return a series of SQL statements to create the given index.
protected  String getPrimaryKeyConstraintSQL(PrimaryKey pk)
          Return the declaration SQL for the given primary key.
 PrimaryKey[] getPrimaryKeys(DatabaseMetaData meta, String catalog, String schemaName, String tableName, Connection conn)
          Reflect on the schema to find primary keys for the given table pattern.
 String getString(ResultSet rs, int column)
          Convert the specified column of the SQL ResultSet to the proper java type.
 void setNull(PreparedStatement stmnt, int idx, int colType, Column col)
          Set the given value as a parameters to the statement.
 
Methods inherited from class org.apache.openjpa.jdbc.sql.DBDictionary
addCastAsType, appendCast, appendLength, appendNumericCast, appendSelectRange, appendUpdates, appendXmlComparison, assertSupport, canOuterJoin, closeDataSource, comparison, connectedConfiguration, convertSchemaCase, createIndexIfNecessary, decorate, endConfiguration, getAddColumnSQL, getAddForeignKeySQL, getAddPrimaryKeySQL, getArray, getAsciiStream, getBigDecimal, getBigInteger, getBinaryStream, getBlob, getBlobObject, getBoolean, getByte, getBytes, getCalendar, getCastFunction, getCatalogNameForMetadata, getChar, getCharacterStream, getClob, getClobString, getColumnNameForMetadata, getCreateSequenceSQL, getCreateTableSQL, getDate, getDate, getDeclareColumnSQL, getDeleteTableContentsSQL, getDouble, getDropColumnSQL, getDropForeignKeySQL, getDropIndexSQL, getDropPrimaryKeySQL, getDropSequenceSQL, getDropTableSQL, getFloat, getForeignKeyConstraintSQL, getForUpdateClause, getFrom, getFromSelect, getFullName, getFullName, getFullName, getGeneratedKey, getGeneratedKeySequenceName, getImportedKeys, getIndexInfo, getInt, getJDBCType, getLocale, getLong, getNumber, getObject, getPlaceholderValueString, getPreferredType, getPrimaryKeysFromBestRowIdentifier, getPrimaryKeysFromGetPrimaryKeys, getRef, getSchemaCase, getSchemaNameForMetadata, getSelectOperation, getSelects, getSequences, getSequencesSQL, getShort, getTableNameForMetadata, getTables, getTime, getTimestamp, getTypeName, getTypeName, getUniqueConstraintSQL, getValidColumnName, getValidForeignKeyName, getValidIndexName, getValidPrimaryKeyName, getValidSequenceName, getValidTableName, getValidUniqueName, getVersionColumn, getWhere, handleWarning, indexOf, isSelect, isSystemIndex, isSystemSequence, isSystemTable, makeNameValid, mathFunction, newColumn, newForeignKey, newIndex, newPrimaryKey, newSequence, newStoreException, newTable, putBytes, putChars, putString, refSchemaComponents, serialize, setArray, setAsciiStream, setBigDecimal, setBigInteger, setBinaryStream, setBlob, setBlobObject, setBoolean, setByte, setBytes, setCalendar, setChar, setCharacterStream, setClob, setClobString, setConfiguration, setDate, setDate, setDouble, setFloat, setInt, setJoinSyntax, setLocale, setLong, setNumber, setObject, setRef, setShort, setString, setTime, setTimestamp, setTyped, setUnknown, shorten, startConfiguration, storageWarning, substring, supportsDeferredForeignKeyConstraints, supportsDeferredUniqueConstraints, supportsDeleteAction, supportsLocking, supportsRandomAccessResultSet, supportsUpdateAction, toBulkOperation, toDelete, toNativeJoin, toOperation, toOperation, toSelect, toSelect, toSelect, toSelect, toSelect, toSelectCount, toSQL92Join, toTraditionalJoin, toUpdate
 
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
Description copied from class: DBDictionary
Convert the specified column of the SQL ResultSet to the proper java type.

Overrides:
getString in class DBDictionary
Throws:
SQLException

setNull

public void setNull(PreparedStatement stmnt,
                    int idx,
                    int colType,
                    Column col)
             throws SQLException
Description copied from class: DBDictionary
Set the given value as a parameters to the statement. The column type will come from Types.

Overrides:
setNull in class DBDictionary
Throws:
SQLException

appendSize

protected String appendSize(Column col,
                            String typeName)
Description copied from class: DBDictionary
Helper method to add size properties to the specified type. If present, the string "{0}" will be replaced with the size definition; otherwise the size definition will be appended to the type name. If your database has column types that don't allow size definitions, override this method to return the unaltered type name for columns of those types (or add the type names to the fixedSizeTypeNameSet).

Overrides:
appendSize 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(org.apache.openjpa.jdbc.schema.Table) and DBDictionary.getAddPrimaryKeySQL(org.apache.openjpa.jdbc.schema.PrimaryKey). Returns CONSTRAINT <pk name> PRIMARY KEY (<col list>) by default.

Overrides:
getPrimaryKeyConstraintSQL 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

getColumns

public Column[] getColumns(DatabaseMetaData meta,
                           String catalog,
                           String schemaName,
                           String tableName,
                           String columnName,
                           Connection conn)
                    throws SQLException
Description copied from class: DBDictionary
Reflect on the schema to find columns matching the given table and column patterns.

Overrides:
getColumns in class DBDictionary
Throws:
SQLException

getPrimaryKeys

public PrimaryKey[] getPrimaryKeys(DatabaseMetaData meta,
                                   String catalog,
                                   String schemaName,
                                   String tableName,
                                   Connection conn)
                            throws SQLException
Description copied from class: DBDictionary
Reflect on the schema to find primary keys for the given table pattern.

Overrides:
getPrimaryKeys in class DBDictionary
Throws:
SQLException


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.