Package org.apache.cayenne.dba.openbase
Class OpenBaseAdapter
java.lang.Object
org.apache.cayenne.dba.JdbcAdapter
org.apache.cayenne.dba.openbase.OpenBaseAdapter
- All Implemented Interfaces:
- DbAdapter
public class OpenBaseAdapter extends JdbcAdapter
DbAdapter implementation for OpenBase.
 Sample connection settings to use with OpenBase are shown below:
 
openbase.jdbc.username = test openbase.jdbc.password = secret openbase.jdbc.url = jdbc:openbase://serverhostname/cayenne openbase.jdbc.driver = com.openbase.jdbc.ObDriver
- Since:
- 1.1
- 
Field SummaryFields inherited from class org.apache.cayenne.dba.JdbcAdapterbatchQueryBuilderFactory, caseInsensitiveCollations, ejbqlTranslatorFactory, extendedTypes, logger, quotingStrategy, resourceLocator, supportsBatchUpdates, supportsGeneratedKeys, supportsUniqueConstraints, typesHandler
- 
Constructor SummaryConstructors Constructor Description OpenBaseAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ResourceLocator resourceLocator, ValueObjectTypeRegistry valueObjectTypeRegistry)
- 
Method SummaryModifier and Type Method Description DbAttributebuildAttribute(String name, String typeName, int type, int size, int scale, boolean allowNulls)Creates and returns a DbAttribute based on supplied parameters (usually obtained from database meta data).protected voidconfigureExtendedTypes(ExtendedTypeMap map)Called fromJdbcAdapter.initExtendedTypes(List, List, List, ValueObjectTypeRegistry)to load adapter-specific types into the ExtendedTypeMap right after the default types are loaded, but before the DI overrides are.StringcreateFkConstraint(DbRelationship rel)Returns a SQL string that can be used to create a foreign key constraint for the relationship.protected PkGeneratorcreatePkGenerator()Creates and returns a primary key generator.StringcreateTable(DbEntity ent)Returns a SQL string that can be used to create database table corresponding toentparameter.StringgetBatchTerminator()Returns word "go".QualifierTranslatorgetQualifierTranslator(QueryAssembler queryAssembler)Returns OpenBase-specific translator for queries.SelectTranslatorgetSelectTranslator(SelectQuery<?> query, EntityResolver entityResolver)Returns a SelectTranslator that works with the adapter target database.StringtableTypeForView()Returns null, since views are not yet supported in openbase.Methods inherited from class org.apache.cayenne.dba.JdbcAdapterbindParameter, createEJBQLTranslatorFactory, createQuotingStrategy, createTableAppendColumn, createTableAppendPKClause, createUniqueConstraint, dropTableStatements, externalTypesForJdbcType, findResource, getAction, getEjbqlTranslatorFactory, getExtendedTypes, getJdbcEventLogger, getPkGenerator, getQuotingStrategy, getSystemCatalogs, getSystemSchemas, getType, initExtendedTypes, setEjbqlTranslatorFactory, setPkGenerator, setSupportsBatchUpdates, setSupportsGeneratedKeys, setSupportsUniqueConstraints, sizeAndPrecision, supportsBatchUpdates, supportsCatalogsOnReverseEngineering, supportsGeneratedKeys, supportsUniqueConstraints, tableTypeForTable, typeSupportsLength, unwrap
- 
Constructor Details- 
OpenBaseAdapterpublic OpenBaseAdapter(RuntimeProperties runtimeProperties, List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ResourceLocator resourceLocator, ValueObjectTypeRegistry valueObjectTypeRegistry)
 
- 
- 
Method Details- 
getSelectTranslatorDescription copied from interface:DbAdapterReturns a SelectTranslator that works with the adapter target database.- Specified by:
- getSelectTranslatorin interface- DbAdapter
- Overrides:
- getSelectTranslatorin class- JdbcAdapter
- Since:
- 4.0
 
- 
configureExtendedTypesDescription copied from class:JdbcAdapterCalled fromJdbcAdapter.initExtendedTypes(List, List, List, ValueObjectTypeRegistry)to load adapter-specific types into the ExtendedTypeMap right after the default types are loaded, but before the DI overrides are. This method has specific implementations in JdbcAdapter subclasses.- Overrides:
- configureExtendedTypesin class- JdbcAdapter
 
- 
buildAttributepublic DbAttribute buildAttribute(String name, String typeName, int type, int size, int scale, boolean allowNulls)Description copied from interface:DbAdapterCreates and returns a DbAttribute based on supplied parameters (usually obtained from database meta data).- Specified by:
- buildAttributein interface- DbAdapter
- Overrides:
- buildAttributein class- JdbcAdapter
- Parameters:
- name- database column name
- typeName- database specific type name, may be used as a hint to determine the right JDBC type.
- type- JDBC column type
- size- database column size (ignored if less than zero)
- scale- database column scale, i.e. the number of decimal digits (ignored if less than zero)
- allowNulls- database column nullable parameter
 
- 
getBatchTerminatorReturns word "go".- Specified by:
- getBatchTerminatorin interface- DbAdapter
- Overrides:
- getBatchTerminatorin class- JdbcAdapter
 
- 
tableTypeForViewReturns null, since views are not yet supported in openbase.- Specified by:
- tableTypeForViewin interface- DbAdapter
- Overrides:
- tableTypeForViewin class- JdbcAdapter
 
- 
getQualifierTranslatorReturns OpenBase-specific translator for queries.- Specified by:
- getQualifierTranslatorin interface- DbAdapter
- Overrides:
- getQualifierTranslatorin class- JdbcAdapter
 
- 
createPkGeneratorCreates and returns a primary key generator. Overrides superclass implementation to return an instance of OpenBasePkGenerator that uses built-in multi-server primary key generation.- Overrides:
- createPkGeneratorin class- JdbcAdapter
 
- 
createTableReturns a SQL string that can be used to create database table corresponding toentparameter.- Specified by:
- createTablein interface- DbAdapter
- Overrides:
- createTablein class- JdbcAdapter
 
- 
createFkConstraintReturns a SQL string that can be used to create a foreign key constraint for the relationship.- Specified by:
- createFkConstraintin interface- DbAdapter
- Overrides:
- createFkConstraintin class- JdbcAdapter
 
 
-