- java.lang.Object
- 
- org.jooq.SchemaMapping
 
- 
- All Implemented Interfaces:
- Serializable
 
 @Deprecated public class SchemaMapping extends Object implements Serializable Deprecated.- 2.0.5 - Use runtime configurationSettingsinsteadGeneral 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 tableDEV.T. When you install your database on a productive system, you might have two schemata:- PROD: The productive schema. It contains the table- PROD.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 table- DEV.Tonto- BACKUP.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 SummaryConstructors Constructor Description SchemaMapping(Configuration configuration)Deprecated.Construct a mapping from aConfigurationobject
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidadd(String inputSchema, String outputSchema)Deprecated.Add schemata to this mappingvoidadd(String inputSchema, Schema outputSchema)Deprecated.Add schemata to this mappingvoidadd(Schema inputSchema, String outputSchema)Deprecated.Add schemata to this mappingvoidadd(Schema inputSchema, Schema outputSchema)Deprecated.Add schemata to this mappingvoidadd(Table<?> inputTable, String outputTable)Deprecated.Add tables to this mappingvoidadd(Table<?> inputTable, Table<?> outputTable)Deprecated.Add tables to this mappingCatalogmap(Catalog catalog)Deprecated.Schemamap(Schema schema)Deprecated.Apply mapping to a given schema<R extends Record>
 Table<R>map(Table<R> table)Deprecated.Apply mapping to a given tablevoidsetDefaultSchema(String schema)Deprecated.Synonym foruse(String).voidsetSchemaMapping(Map<String,String> schemaMap)Deprecated.Initialise SchemaMapping.StringtoString()Deprecated.voiduse(String schemaName)Deprecated.Set a schema as the default schema.voiduse(Schema schema)Deprecated.Set a schema as the default schema.
 
- 
- 
- 
Constructor Detail- 
SchemaMappingpublic SchemaMapping(Configuration configuration) Deprecated.Construct a mapping from aConfigurationobject
 
- 
 - 
Method Detail- 
usepublic void use(Schema schema) Deprecated.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
 
 - 
usepublic void use(String schemaName) Deprecated.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
 
 - 
addpublic void add(String inputSchema, String outputSchema) Deprecated.Add schemata to this mapping- Parameters:
- inputSchema- The schema known at codegen time to be mapped
- outputSchema- The schema configured at run time to be mapped
 
 - 
addpublic void add(String inputSchema, Schema outputSchema) Deprecated.Add schemata to this mapping- Parameters:
- inputSchema- The schema known at codegen time to be mapped
- outputSchema- The schema configured at run time to be mapped
 
 - 
addpublic void add(Schema inputSchema, Schema outputSchema) Deprecated.Add schemata to this mapping- Parameters:
- inputSchema- The schema known at codegen time to be mapped
- outputSchema- The schema configured at run time to be mapped
 
 - 
addpublic void add(Schema inputSchema, String outputSchema) Deprecated.Add schemata to this mapping- Parameters:
- inputSchema- The schema known at codegen time to be mapped
- outputSchema- The schema configured at run time to be mapped
 
 - 
addpublic void add(Table<?> inputTable, Table<?> outputTable) Deprecated.Add tables to this mapping- Parameters:
- inputTable- The table known at codegen time to be mapped
- outputTable- The table configured at run time to be mapped
 
 - 
addpublic void add(Table<?> inputTable, String outputTable) Deprecated.Add tables to this mapping- Parameters:
- inputTable- The table known at codegen time to be mapped
- outputTable- The table configured at run time to be mapped
 
 - 
mappublic Schema map(Schema schema) Deprecated.Apply mapping to a given schema- Parameters:
- schema- The schema to be mapped
- Returns:
- The configured schema
 
 - 
mappublic <R extends Record> Table<R> map(Table<R> table) Deprecated.Apply mapping to a given table- Parameters:
- table- The generated table to be mapped
- Returns:
- The configured table
 
 - 
setDefaultSchemapublic void setDefaultSchema(String schema) Deprecated.Synonym foruse(String). Added for better interoperability with Spring
 - 
setSchemaMappingpublic void setSchemaMapping(Map<String,String> schemaMap) Deprecated.Initialise SchemaMapping. Added for better interoperability with Spring
 
- 
 
-