|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jooq.util.AbstractDatabase
public abstract class AbstractDatabase
A base implementation for all types of databases.
| Constructor Summary | |
|---|---|
AbstractDatabase()
|
|
| Method Summary | |
|---|---|
boolean |
dateAsTimestamp()
Whether DATE columns should be treated as TIMESTAMP columns |
ArrayDefinition |
getArray(SchemaDefinition schema,
String name)
Get a ARRAY defined in this database by name |
ArrayDefinition |
getArray(SchemaDefinition schema,
String name,
boolean ignoreCase)
Get a ARRAY defined in this database by name |
List<ArrayDefinition> |
getArrays(SchemaDefinition schema)
The Arrays defined in this database |
protected abstract List<ArrayDefinition> |
getArrays0()
Retrieve ALL ARRAYs from the database. |
CustomType |
getConfiguredCustomType(String name)
Get a specific configured custom type by its name |
List<CustomType> |
getConfiguredCustomTypes()
Database objects matching any of these field names will be generated as custom types |
List<EnumType> |
getConfiguredEnumTypes()
Database objects matching any of these field names will be generated as enum types |
ForcedType |
getConfiguredForcedType(Definition definition)
Get the configured forced type object for any given Definition,
or null if no ForcedType matches the definition. |
List<ForcedType> |
getConfiguredForcedTypes()
Database objects matching any of these field names will be generated as forced types |
List<MasterDataTable> |
getConfiguredMasterDataTables()
Database objects matching any of these table names will be generated as master data tables. |
Connection |
getConnection()
The database connection |
protected DataTypeDefinition |
getDataTypeForMAX_VAL(SchemaDefinition schema,
BigInteger value)
Get the data type considering a known max value |
org.jooq.SQLDialect |
getDialect()
Get the dialect for this database |
EnumDefinition |
getEnum(SchemaDefinition schema,
String name)
Get an enum UDT defined in this database by name |
EnumDefinition |
getEnum(SchemaDefinition schema,
String name,
boolean ignoreCase)
Get an enum UDT defined in this database by name |
List<EnumDefinition> |
getEnums(SchemaDefinition schema)
The enum UDTs defined in this database |
protected abstract List<EnumDefinition> |
getEnums0()
Retrieve ALL enum UDTs from the database. |
String[] |
getExcludes()
Database objects matching any of these regular expressions will not be generated. |
String[] |
getIncludes()
Only database objects matching any of these regular expressions will be generated. |
List<String> |
getInputSchemata()
The input schemata are the schemata that jooq-meta is reading data from |
MasterDataTableDefinition |
getMasterDataTable(SchemaDefinition schema,
String name)
Get a master data table in this database by name |
MasterDataTableDefinition |
getMasterDataTable(SchemaDefinition schema,
String name,
boolean ignoreCase)
Get a master data table in this database by name |
List<MasterDataTableDefinition> |
getMasterDataTables(SchemaDefinition schema)
The master data tables contained in this database (for schema Database.getSchema(String)) |
String |
getOutputSchema(String inputSchema)
Deprecated. |
List<PackageDefinition> |
getPackages(SchemaDefinition schema)
The packages contained in this database |
protected abstract List<PackageDefinition> |
getPackages0()
Retrieve ALL packages from the database. |
Relations |
getRelations()
Retrieve the schema's primary key / foreign key relations |
protected Relations |
getRelations0()
Retrieve ALL relations from the database. |
List<RoutineDefinition> |
getRoutines(SchemaDefinition schema)
The stored routines (procedures and functions) contained in this database |
protected abstract List<RoutineDefinition> |
getRoutines0()
Retrieve ALL stored routines (functions and procedures) from the database. |
SchemaDefinition |
getSchema(String inputName)
Get a schema defined in this database by name |
List<SchemaDefinition> |
getSchemata()
The schemata generated from this database |
List<SequenceDefinition> |
getSequences(SchemaDefinition schema)
The sequences contained in this database |
protected abstract List<SequenceDefinition> |
getSequences0()
Retrieve ALL sequences from the database. |
TableDefinition |
getTable(SchemaDefinition schema,
String name)
Get a table in this database by name |
TableDefinition |
getTable(SchemaDefinition schema,
String name,
boolean ignoreCase)
Get a table in this database by name |
List<TableDefinition> |
getTables(SchemaDefinition schema)
The tables contained in this database |
protected abstract List<TableDefinition> |
getTables0()
Retrieve ALL tables from the database. |
UDTDefinition |
getUDT(SchemaDefinition schema,
String name)
Get a UDT defined in this database by name |
UDTDefinition |
getUDT(SchemaDefinition schema,
String name,
boolean ignoreCase)
Get a UDT defined in this database by name |
List<UDTDefinition> |
getUDTs(SchemaDefinition schema)
The UDTs defined in this database |
protected abstract List<UDTDefinition> |
getUDTs0()
Retrieve ALL UDTs from the database. |
boolean |
isArrayType(String dataType)
Check whether a type is an array type |
protected abstract void |
loadForeignKeys(DefaultRelations r)
Retrieve foreign keys and store them to relations. |
protected abstract void |
loadPrimaryKeys(DefaultRelations r)
Retrieve primary keys and store them to relations |
protected abstract void |
loadUniqueKeys(DefaultRelations r)
Retrieve non-primary unique keys and store them to relations |
void |
setConfiguredCustomTypes(List<CustomType> configuredCustomTypes)
Database objects matching any of these field names will be generated as custom types |
void |
setConfiguredEnumTypes(List<EnumType> configuredEnumTypes)
Database objects matching any of these field names will be generated as enum types |
void |
setConfiguredForcedTypes(List<ForcedType> configuredForcedTypes)
Database objects matching any of these field names will be generated as forced types |
void |
setConfiguredMasterDataTables(List<MasterDataTable> configuredMasterDataTables)
Database objects matching any of these table names will be generated as master data tables. |
void |
setConfiguredSchemata(List<Schema> schemata)
The input and output schemata |
void |
setConnection(Connection connection)
Initialise a connection to this database |
void |
setDateAsTimestamp(boolean dateAsTimestamp)
Whether DATE columns should be treated as TIMESTAMP columns |
void |
setExcludes(String[] excludes)
Database objects matching any of these regular expressions will not be generated. |
void |
setIncludes(String[] includes)
Only database objects matching any of these regular expressions will be generated. |
void |
setSupportsUnsignedTypes(boolean supportsUnsignedTypes)
Whether this database supports unsigned types |
boolean |
supportsUnsignedTypes()
Whether this database supports unsigned types |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jooq.util.Database |
|---|
create |
| Constructor Detail |
|---|
public AbstractDatabase()
| Method Detail |
|---|
public final org.jooq.SQLDialect getDialect()
Database
getDialect in interface Databasepublic final void setConnection(Connection connection)
Database
setConnection in interface Databasepublic final Connection getConnection()
Database
getConnection in interface Databasepublic final List<SchemaDefinition> getSchemata()
Database
getSchemata in interface Databasepublic final SchemaDefinition getSchema(String inputName)
Database
getSchema in interface Databasepublic final List<String> getInputSchemata()
Database
getInputSchemata in interface Database@Deprecated public String getOutputSchema(String inputSchema)
Database
getOutputSchema in interface Databasepublic final void setConfiguredSchemata(List<Schema> schemata)
Database
setConfiguredSchemata in interface Databasepublic final void setExcludes(String[] excludes)
Database
setExcludes in interface Databasepublic final String[] getExcludes()
Database
getExcludes in interface Databasepublic final void setIncludes(String[] includes)
Database
setIncludes in interface Databasepublic final String[] getIncludes()
Database
getIncludes in interface Databasepublic final void setConfiguredMasterDataTables(List<MasterDataTable> configuredMasterDataTables)
Database
setConfiguredMasterDataTables in interface Databasepublic final List<MasterDataTable> getConfiguredMasterDataTables()
Database
getConfiguredMasterDataTables in interface Databasepublic final void setConfiguredEnumTypes(List<EnumType> configuredEnumTypes)
Database
setConfiguredEnumTypes in interface Databasepublic final List<EnumType> getConfiguredEnumTypes()
Database
getConfiguredEnumTypes in interface Databasepublic final void setConfiguredCustomTypes(List<CustomType> configuredCustomTypes)
Database
setConfiguredCustomTypes in interface Databasepublic final List<CustomType> getConfiguredCustomTypes()
Database
getConfiguredCustomTypes in interface Databasepublic final CustomType getConfiguredCustomType(String name)
Database
getConfiguredCustomType in interface Databasepublic final void setConfiguredForcedTypes(List<ForcedType> configuredForcedTypes)
Database
setConfiguredForcedTypes in interface Databasepublic final List<ForcedType> getConfiguredForcedTypes()
Database
getConfiguredForcedTypes in interface Databasepublic final void setSupportsUnsignedTypes(boolean supportsUnsignedTypes)
Database
setSupportsUnsignedTypes in interface Databasepublic final boolean supportsUnsignedTypes()
Database
supportsUnsignedTypes in interface Databasepublic final void setDateAsTimestamp(boolean dateAsTimestamp)
Database
setDateAsTimestamp in interface Databasepublic final boolean dateAsTimestamp()
Database
dateAsTimestamp in interface Databasepublic final List<SequenceDefinition> getSequences(SchemaDefinition schema)
Database
getSequences in interface Databasepublic final List<TableDefinition> getTables(SchemaDefinition schema)
Database
getTables in interface Database
public final TableDefinition getTable(SchemaDefinition schema,
String name)
Database
getTable in interface Database
public final TableDefinition getTable(SchemaDefinition schema,
String name,
boolean ignoreCase)
Database
getTable in interface Databasepublic final List<MasterDataTableDefinition> getMasterDataTables(SchemaDefinition schema)
DatabaseDatabase.getSchema(String))
getMasterDataTables in interface Database
public final MasterDataTableDefinition getMasterDataTable(SchemaDefinition schema,
String name)
Database
getMasterDataTable in interface Database
public final MasterDataTableDefinition getMasterDataTable(SchemaDefinition schema,
String name,
boolean ignoreCase)
Database
getMasterDataTable in interface Databasepublic final List<EnumDefinition> getEnums(SchemaDefinition schema)
Database
getEnums in interface Databasepublic final ForcedType getConfiguredForcedType(Definition definition)
DatabaseDefinition,
or null if no ForcedType matches the definition.
getConfiguredForcedType in interface Database
public final EnumDefinition getEnum(SchemaDefinition schema,
String name)
Database
getEnum in interface Database
public final EnumDefinition getEnum(SchemaDefinition schema,
String name,
boolean ignoreCase)
Database
getEnum in interface Databasepublic final List<ArrayDefinition> getArrays(SchemaDefinition schema)
Database
getArrays in interface Database
public final ArrayDefinition getArray(SchemaDefinition schema,
String name)
Database
getArray in interface Database
public final ArrayDefinition getArray(SchemaDefinition schema,
String name,
boolean ignoreCase)
Database
getArray in interface Databasepublic final List<UDTDefinition> getUDTs(SchemaDefinition schema)
Database
getUDTs in interface Database
public final UDTDefinition getUDT(SchemaDefinition schema,
String name)
Database
getUDT in interface Database
public final UDTDefinition getUDT(SchemaDefinition schema,
String name,
boolean ignoreCase)
Database
getUDT in interface Databasepublic final Relations getRelations()
Database
getRelations in interface Databasepublic final List<RoutineDefinition> getRoutines(SchemaDefinition schema)
Database
getRoutines in interface Databasepublic final List<PackageDefinition> getPackages(SchemaDefinition schema)
Database
getPackages in interface Database
protected final Relations getRelations0()
throws SQLException
SQLExceptionpublic final boolean isArrayType(String dataType)
Database
isArrayType in interface Database
protected abstract void loadPrimaryKeys(DefaultRelations r)
throws SQLException
SQLException
protected abstract void loadUniqueKeys(DefaultRelations r)
throws SQLException
SQLException
protected abstract void loadForeignKeys(DefaultRelations r)
throws SQLException
SQLException
protected abstract List<SequenceDefinition> getSequences0()
throws SQLException
getTables(SchemaDefinition)
SQLException
protected abstract List<TableDefinition> getTables0()
throws SQLException
getTables(SchemaDefinition)
SQLException
protected abstract List<RoutineDefinition> getRoutines0()
throws SQLException
getRoutines(SchemaDefinition)
SQLException
protected abstract List<PackageDefinition> getPackages0()
throws SQLException
getPackages(SchemaDefinition)
SQLException
protected abstract List<EnumDefinition> getEnums0()
throws SQLException
getEnums(SchemaDefinition)
SQLException
protected abstract List<UDTDefinition> getUDTs0()
throws SQLException
getEnums(SchemaDefinition)
SQLException
protected abstract List<ArrayDefinition> getArrays0()
throws SQLException
getArrays(SchemaDefinition)
SQLException
protected final DataTypeDefinition getDataTypeForMAX_VAL(SchemaDefinition schema,
BigInteger value)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||