java.lang.Object
org.jooq.SchemaMapping
- All Implemented Interfaces:
Serializable
@Deprecated(forRemoval=true,
since="2.0")
public class SchemaMapping
extends Object
implements Serializable
Deprecated, for removal: This API element is subject to removal in a future version.
General mapping of generated artefacts onto run-time substitutes.
There are several use cases, when the run-time schema configuration may be
different from the compile-time (or code-generation-time) schema
configuration. Say, you develop a schema called DEV
. It contains
a table DEV.T
. When you install your database on a productive
system, you might have two schemata:
PROD
: The productive schema. It contains the tablePROD.T
BACKUP
: The productive backup schema. This schema might be shared with other applications, so you might have table name collisions. Therefore, you'd want to map your tableDEV.T
ontoBACKUP.MY_T
This can be achieved with the SchemaMapping
, where you can map
schemata and tables, for them to render different names at run-time, than at
compile-time.
- Since:
- 1.5.2, 1.6.0
- Author:
- Lukas Eder
- See Also:
- https://sourceforge.net/apps/trac/jooq/wiki/Manual/ADVANCED/SchemaMapping, Serialized Form
-
Constructor Summary
ConstructorDescriptionSchemaMapping(Configuration configuration)
Deprecated, for removal: This API element is subject to removal in a future version.Construct a mapping from aConfiguration
object -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated, for removal: This API element is subject to removal in a future version.Add schemata to this mappingvoid
Deprecated, for removal: This API element is subject to removal in a future version.Add schemata to this mappingvoid
Deprecated, for removal: This API element is subject to removal in a future version.Add schemata to this mappingvoid
Deprecated, for removal: This API element is subject to removal in a future version.Add schemata to this mappingvoid
Deprecated, for removal: This API element is subject to removal in a future version.Add tables to this mappingvoid
Deprecated, for removal: This API element is subject to removal in a future version.Add tables to this mapping@Nullable Catalog
Deprecated, for removal: This API element is subject to removal in a future version.@Nullable Schema
Deprecated, for removal: This API element is subject to removal in a future version.Apply mapping to a given schemaDeprecated, for removal: This API element is subject to removal in a future version.Apply mapping to a given tablevoid
setDefaultSchema(String schema)
Deprecated, for removal: This API element is subject to removal in a future version.Synonym foruse(String)
.void
setSchemaMapping(Map<String,String> schemaMap)
Deprecated, for removal: This API element is subject to removal in a future version.Initialise SchemaMapping.toString()
Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.Set a schema as the default schema.void
Deprecated, for removal: This API element is subject to removal in a future version.Set a schema as the default schema.
-
Constructor Details
-
SchemaMapping
Deprecated, for removal: This API element is subject to removal in a future version.Construct a mapping from aConfiguration
object
-
-
Method Details
-
use
Deprecated, for removal: This API element is subject to removal in a future version.Set a schema as the default schema. This results in the supplied schema being omitted in generated SQL.If the supplied mapping has already been added using
add(Schema, Schema)
, thenuse()
has no effect.- Parameters:
schema
- the default schema
-
use
Deprecated, for removal: This API element is subject to removal in a future version.Set a schema as the default schema. This results in the supplied schema being omitted in generated SQL.If the supplied mapping has already been added using
add(Schema, Schema)
, thenuse()
has no effect.- Parameters:
schemaName
- the default schema
-
add
Deprecated, for removal: This API element is subject to removal in a future version.Add schemata to this mapping- Parameters:
inputSchema
- The schema known at codegen time to be mappedoutputSchema
- The schema configured at run time to be mapped
-
add
Deprecated, for removal: This API element is subject to removal in a future version.Add schemata to this mapping- Parameters:
inputSchema
- The schema known at codegen time to be mappedoutputSchema
- The schema configured at run time to be mapped
-
add
Deprecated, for removal: This API element is subject to removal in a future version.Add schemata to this mapping- Parameters:
inputSchema
- The schema known at codegen time to be mappedoutputSchema
- The schema configured at run time to be mapped
-
add
Deprecated, for removal: This API element is subject to removal in a future version.Add schemata to this mapping- Parameters:
inputSchema
- The schema known at codegen time to be mappedoutputSchema
- The schema configured at run time to be mapped
-
add
Deprecated, for removal: This API element is subject to removal in a future version.Add tables to this mapping- Parameters:
inputTable
- The table known at codegen time to be mappedoutputTable
- The table configured at run time to be mapped
-
add
Deprecated, for removal: This API element is subject to removal in a future version.Add tables to this mapping- Parameters:
inputTable
- The table known at codegen time to be mappedoutputTable
- The table configured at run time to be mapped
-
map
Deprecated, for removal: This API element is subject to removal in a future version. -
map
Deprecated, for removal: This API element is subject to removal in a future version.Apply mapping to a given schema- Parameters:
schema
- The schema to be mapped- Returns:
- The configured schema
-
map
Deprecated, for removal: This API element is subject to removal in a future version.Apply mapping to a given table- Parameters:
table
- The generated table to be mapped- Returns:
- The configured table
-
setDefaultSchema
Deprecated, for removal: This API element is subject to removal in a future version.Synonym foruse(String)
. Added for better interoperability with Spring -
setSchemaMapping
Deprecated, for removal: This API element is subject to removal in a future version.Initialise SchemaMapping. Added for better interoperability with Spring -
toString
Deprecated, for removal: This API element is subject to removal in a future version.
-
Settings
instead