|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.dba.JdbcAdapter
org.apache.cayenne.dba.sqlite.SQLiteAdapter
public class SQLiteAdapter
A SQLite database adapter that works with Zentus JDBC driver. See http://www.zentus.com/sqlitejdbc/ for the driver information. Also look at http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC for another adaptor option.
sqlite.jdbc.url = jdbc:sqlite:sqlitetest.db sqlite.jdbc.driver = org.sqlite.JDBC
Field Summary |
---|
Fields inherited from class org.apache.cayenne.dba.JdbcAdapter |
---|
batchQueryBuilderFactory, caseInsensitiveCollations, CI_PROPERTY, ejbqlTranslatorFactory, extendedTypes, identifiersEndQuote, identifiersStartQuote, logger, resourceLocator, supportsBatchUpdates, supportsGeneratedKeys, supportsUniqueConstraints, typesHandler |
Constructor Summary | |
---|---|
SQLiteAdapter(RuntimeProperties runtimeProperties,
java.util.List<ExtendedType> defaultExtendedTypes,
java.util.List<ExtendedType> userExtendedTypes,
java.util.List<ExtendedTypeFactory> extendedTypeFactories)
|
Method Summary | |
---|---|
protected void |
configureExtendedTypes(ExtendedTypeMap map)
Called from JdbcAdapter.initExtendedTypes(List, List, List) to load adapter-specific
types into the ExtendedTypeMap right after the default types are loaded, but before
the DI overrides are. |
java.lang.String |
createFkConstraint(DbRelationship rel)
Returns a SQL string that can be used to create a foreign key constraint for the relationship. |
void |
createTableAppendColumn(java.lang.StringBuffer sqlBuffer,
DbAttribute column)
Appends AUTOINCREMENT clause to the column definition for generated columns. |
protected void |
createTableAppendPKClause(java.lang.StringBuffer sqlBuffer,
DbEntity entity)
|
java.lang.String |
createUniqueConstraint(DbEntity source,
java.util.Collection<DbAttribute> columns)
Returns a DDL string to create a unique constraint over a set of columns. |
SQLAction |
getAction(Query query,
DataNode node)
Uses JdbcActionBuilder to create the right action. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SQLiteAdapter(RuntimeProperties runtimeProperties, java.util.List<ExtendedType> defaultExtendedTypes, java.util.List<ExtendedType> userExtendedTypes, java.util.List<ExtendedTypeFactory> extendedTypeFactories)
Method Detail |
---|
protected void configureExtendedTypes(ExtendedTypeMap map)
JdbcAdapter
JdbcAdapter.initExtendedTypes(List, List, List)
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.
configureExtendedTypes
in class JdbcAdapter
public java.lang.String createFkConstraint(DbRelationship rel)
JdbcAdapter
createFkConstraint
in interface DbAdapter
createFkConstraint
in class JdbcAdapter
public java.lang.String createUniqueConstraint(DbEntity source, java.util.Collection<DbAttribute> columns)
JdbcAdapter
createUniqueConstraint
in interface DbAdapter
createUniqueConstraint
in class JdbcAdapter
public SQLAction getAction(Query query, DataNode node)
JdbcAdapter
getAction
in interface DbAdapter
getAction
in class JdbcAdapter
public void createTableAppendColumn(java.lang.StringBuffer sqlBuffer, DbAttribute column)
createTableAppendColumn
in interface DbAdapter
createTableAppendColumn
in class JdbcAdapter
sqlBuffer
- the StringBuffer
to append the column type tocolumn
- the DbAttribute
defining the column to append type forprotected void createTableAppendPKClause(java.lang.StringBuffer sqlBuffer, DbEntity entity)
createTableAppendPKClause
in class JdbcAdapter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |