|
|||||||||
| 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.postgres.PostgresAdapter
public class PostgresAdapter
DbAdapter implementation for PostgreSQL RDBMS . Sample connection settings to use with PostgreSQL are shown below:
test-postgresql.cayenne.adapter = org.apache.cayenne.dba.postgres.PostgresAdapter
test-postgresql.jdbc.username = test
test-postgresql.jdbc.password = secret
test-postgresql.jdbc.url = jdbc:postgresql://serverhostname/cayenne
test-postgresql.jdbc.driver = org.postgresql.Driver
| Field Summary |
|---|
| Fields inherited from class org.apache.cayenne.dba.JdbcAdapter |
|---|
extendedTypes, pkGenerator, supportsBatchUpdates, supportsFkConstraints, supportsGeneratedKeys, supportsUniqueConstraints, typesHandler |
| Constructor Summary | |
|---|---|
PostgresAdapter()
|
|
| Method Summary | |
|---|---|
DbAttribute |
buildAttribute(java.lang.String name,
java.lang.String typeName,
int type,
int size,
int precision,
boolean allowNulls)
Creates and returns a DbAttribute based on supplied parameters (usually obtained from database meta data). |
protected void |
configureExtendedTypes(ExtendedTypeMap map)
Installs appropriate ExtendedTypes as converters for passing values between JDBC and Java layers. |
protected PkGenerator |
createPkGenerator()
Creates and returns a primary key generator. |
java.lang.String |
createTable(DbEntity ent)
Customizes table creating procedure for PostgreSQL. |
java.lang.String |
dropTable(DbEntity ent)
Adds the CASCADE option to the DROP TABLE clause. |
SQLAction |
getAction(Query query,
DataNode node)
Uses PostgresActionBuilder to create the right action. |
QualifierTranslator |
getQualifierTranslator(QueryAssembler queryAssembler)
Returns a trimming translator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PostgresAdapter()
| Method Detail |
|---|
public SQLAction getAction(Query query,
DataNode node)
getAction in interface DbAdaptergetAction in class JdbcAdapterprotected void configureExtendedTypes(ExtendedTypeMap map)
configureExtendedTypes in class JdbcAdapter
public DbAttribute buildAttribute(java.lang.String name,
java.lang.String typeName,
int type,
int size,
int precision,
boolean allowNulls)
DbAdapter
buildAttribute in interface DbAdapterbuildAttribute in class JdbcAdaptername - database column nametypeName - database specific type name, may be used as a hint to determine the
right JDBC type.type - JDBC column typesize - database column size (ignored if less than zero)precision - database column precision (ignored if less than zero)allowNulls - database column nullable parameterpublic java.lang.String createTable(DbEntity ent)
createTable in interface DbAdaptercreateTable in class JdbcAdapterpublic java.lang.String dropTable(DbEntity ent)
dropTable in interface DbAdapterdropTable in class JdbcAdapterJdbcAdapter.dropTable(DbEntity)public QualifierTranslator getQualifierTranslator(QueryAssembler queryAssembler)
getQualifierTranslator in interface DbAdaptergetQualifierTranslator in class JdbcAdapterprotected PkGenerator createPkGenerator()
JdbcAdapter
createPkGenerator in class JdbcAdapterJdbcAdapter.createPkGenerator()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||