org.jooq.util
Interface Database

All Known Implementing Classes:
AbstractDatabase, ASEDatabase, CUBRIDDatabase, DB2Database, DerbyDatabase, H2Database, HSQLDBDatabase, IngresDatabase, MySQLDatabase, OracleDatabase, PostgresDatabase, SQLiteDatabase, SQLServerDatabase, SybaseDatabase

public interface Database

A general database model.

Author:
Lukas Eder

Method Summary
 org.jooq.impl.Factory create()
          Create the factory for this database
 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
 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
 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
 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 getSchema(String))
 String getOutputSchema(String inputSchema)
          Deprecated. - 2.0.5 - This will be implemented in each Definition.getOutputName()
 List<PackageDefinition> getPackages(SchemaDefinition schema)
          The packages contained in this database
 Relations getRelations()
          Retrieve the schema's primary key / foreign key relations
 List<RoutineDefinition> getRoutines(SchemaDefinition schema)
          The stored routines (procedures and functions) contained in this database
 SchemaDefinition getSchema(String name)
          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
 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
 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
 boolean isArrayType(String dataType)
          Check whether a type is an array type
 void setConfiguredCustomTypes(List<CustomType> types)
          Database objects matching any of these field names will be generated as custom types
 void setConfiguredEnumTypes(List<EnumType> types)
          Database objects matching any of these field names will be generated as enum types
 void setConfiguredForcedTypes(List<ForcedType> types)
          Database objects matching any of these field names will be generated as forced types
 void setConfiguredMasterDataTables(List<MasterDataTable> tables)
          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
 

Method Detail

getSchemata

List<SchemaDefinition> getSchemata()
The schemata generated from this database


getSchema

SchemaDefinition getSchema(String name)
Get a schema defined in this database by name


getRelations

Relations getRelations()
Retrieve the schema's primary key / foreign key relations


getSequences

List<SequenceDefinition> getSequences(SchemaDefinition schema)
The sequences contained in this database


getTables

List<TableDefinition> getTables(SchemaDefinition schema)
The tables contained in this database


getTable

TableDefinition getTable(SchemaDefinition schema,
                         String name)
Get a table in this database by name


getTable

TableDefinition getTable(SchemaDefinition schema,
                         String name,
                         boolean ignoreCase)
Get a table in this database by name


getMasterDataTables

List<MasterDataTableDefinition> getMasterDataTables(SchemaDefinition schema)
The master data tables contained in this database (for schema getSchema(String))


getMasterDataTable

MasterDataTableDefinition getMasterDataTable(SchemaDefinition schema,
                                             String name)
Get a master data table in this database by name


getMasterDataTable

MasterDataTableDefinition getMasterDataTable(SchemaDefinition schema,
                                             String name,
                                             boolean ignoreCase)
Get a master data table in this database by name


getEnums

List<EnumDefinition> getEnums(SchemaDefinition schema)
The enum UDTs defined in this database


getEnum

EnumDefinition getEnum(SchemaDefinition schema,
                       String name)
Get an enum UDT defined in this database by name


getEnum

EnumDefinition getEnum(SchemaDefinition schema,
                       String name,
                       boolean ignoreCase)
Get an enum UDT defined in this database by name


getUDTs

List<UDTDefinition> getUDTs(SchemaDefinition schema)
The UDTs defined in this database


getUDT

UDTDefinition getUDT(SchemaDefinition schema,
                     String name)
Get a UDT defined in this database by name


getUDT

UDTDefinition getUDT(SchemaDefinition schema,
                     String name,
                     boolean ignoreCase)
Get a UDT defined in this database by name


getArrays

List<ArrayDefinition> getArrays(SchemaDefinition schema)
The Arrays defined in this database


getArray

ArrayDefinition getArray(SchemaDefinition schema,
                         String name)
Get a ARRAY defined in this database by name


getArray

ArrayDefinition getArray(SchemaDefinition schema,
                         String name,
                         boolean ignoreCase)
Get a ARRAY defined in this database by name


getRoutines

List<RoutineDefinition> getRoutines(SchemaDefinition schema)
The stored routines (procedures and functions) contained in this database


getPackages

List<PackageDefinition> getPackages(SchemaDefinition schema)
The packages contained in this database


setConnection

void setConnection(Connection connection)
Initialise a connection to this database


getConnection

Connection getConnection()
The database connection


getInputSchemata

List<String> getInputSchemata()
The input schemata are the schemata that jooq-meta is reading data from


getOutputSchema

@Deprecated
String getOutputSchema(String inputSchema)
Deprecated. - 2.0.5 - This will be implemented in each Definition.getOutputName()

The output schema is the schema used by jooq-codegen in class names


setConfiguredSchemata

void setConfiguredSchemata(List<Schema> schemata)
The input and output schemata


setIncludes

void setIncludes(String[] includes)
Only database objects matching any of these regular expressions will be generated.


getIncludes

String[] getIncludes()
Only database objects matching any of these regular expressions will be generated.


setConfiguredMasterDataTables

void setConfiguredMasterDataTables(List<MasterDataTable> tables)
Database objects matching any of these table names will be generated as master data tables.


getConfiguredMasterDataTables

List<MasterDataTable> getConfiguredMasterDataTables()
Database objects matching any of these table names will be generated as master data tables.


setConfiguredCustomTypes

void setConfiguredCustomTypes(List<CustomType> types)
Database objects matching any of these field names will be generated as custom types


getConfiguredCustomTypes

List<CustomType> getConfiguredCustomTypes()
Database objects matching any of these field names will be generated as custom types


getConfiguredCustomType

CustomType getConfiguredCustomType(String name)
Get a specific configured custom type by its name


setConfiguredEnumTypes

void setConfiguredEnumTypes(List<EnumType> types)
Database objects matching any of these field names will be generated as enum types


getConfiguredEnumTypes

List<EnumType> getConfiguredEnumTypes()
Database objects matching any of these field names will be generated as enum types


setConfiguredForcedTypes

void setConfiguredForcedTypes(List<ForcedType> types)
Database objects matching any of these field names will be generated as forced types


getConfiguredForcedTypes

List<ForcedType> getConfiguredForcedTypes()
Database objects matching any of these field names will be generated as forced types


getConfiguredForcedType

ForcedType getConfiguredForcedType(Definition definition)
Get the configured forced type object for any given Definition, or null if no ForcedType matches the definition.


setExcludes

void setExcludes(String[] excludes)
Database objects matching any of these regular expressions will not be generated.


getExcludes

String[] getExcludes()
Database objects matching any of these regular expressions will not be generated.


getDialect

org.jooq.SQLDialect getDialect()
Get the dialect for this database


create

org.jooq.impl.Factory create()
Create the factory for this database


isArrayType

boolean isArrayType(String dataType)
Check whether a type is an array type


setSupportsUnsignedTypes

void setSupportsUnsignedTypes(boolean supportsUnsignedTypes)
Whether this database supports unsigned types


supportsUnsignedTypes

boolean supportsUnsignedTypes()
Whether this database supports unsigned types


setDateAsTimestamp

void setDateAsTimestamp(boolean dateAsTimestamp)
Whether DATE columns should be treated as TIMESTAMP columns


dateAsTimestamp

boolean dateAsTimestamp()
Whether DATE columns should be treated as TIMESTAMP columns



Copyright © 2012. All Rights Reserved.