public class DynamicSchemaFactory extends SchemaGroup implements SchemaFactory, Configurable
map
method.
Tables are added when SchemaGroup.findTable(org.apache.openjpa.jdbc.schema.Table)
is called. Columns
are added to tables when Table.getColumn(java.lang.String)
is called. And the
column types are set when Column.isCompatible(int, java.lang.String, int, int)
is called.Constructor and Description |
---|
DynamicSchemaFactory() |
Modifier and Type | Method and Description |
---|---|
void |
endConfiguration()
Invoked upon completion of bean property configuration for this object.
|
Table |
findTable(DBIdentifier name) |
Table |
findTable(QualifiedDBIdentifier path) |
Table |
findTable(String name)
Find the table with the given name in the group, using '.' as the
catalog separator.
|
boolean |
isKnownTable(QualifiedDBIdentifier path) |
boolean |
isKnownTable(String name)
Return true if the given table is known to exist.
|
boolean |
isKnownTable(Table table)
Return true if the given table is known to exist.
|
protected Column |
newColumn(DBIdentifier name,
Table table) |
protected Table |
newTable(DBIdentifier name,
Schema schema) |
SchemaGroup |
readSchema()
Return the schema group for the current object model and database.
|
void |
setConfiguration(Configuration conf)
Invoked prior to setting bean properties.
|
void |
startConfiguration()
Invoked before bean property configuration is begun on this object.
|
void |
storeSchema(SchemaGroup schema)
Record the schema group after changes may have been made.
|
addSchema, addSchema, addSchema, clone, copy, findExportedForeignKeys, findSequence, findSequence, findSequence, findSequence, findSequence, findSequence, findTable, findTable, findTable, findTable, findTable, getSchema, getSchema, getSchemas, importSchema, isKnownSequence, isKnownSequence, isKnownSequence, isKnownSequence, newColumn, newForeignKey, newForeignKey, newIndex, newIndex, newInstance, newPrimaryKey, newPrimaryKey, newSchema, newSchema, newSequence, newSequence, newTable, newUnique, newUnique, removeSchema, removeUnusedComponents
addName, addName, isNameTaken, isNameTaken, removeName, removeName
public void setConfiguration(Configuration conf)
Configurable
setConfiguration
in interface Configurable
public void startConfiguration()
Configurable
startConfiguration
in interface Configurable
public void endConfiguration()
Configurable
endConfiguration
in interface Configurable
public SchemaGroup readSchema()
SchemaFactory
readSchema
in interface SchemaFactory
public void storeSchema(SchemaGroup schema)
SchemaFactory
storeSchema
in interface SchemaFactory
schema
- the schema definition for the entire systempublic boolean isKnownTable(Table table)
SchemaGroup
SchemaGroup.findTable(org.apache.openjpa.jdbc.schema.Table)
may exhibit dynamic behavior in some schema group
implementations, this method only returns true if the table has been
added to this group or is known to exist in the database.isKnownTable
in class SchemaGroup
public boolean isKnownTable(String name)
SchemaGroup
SchemaGroup.findTable(org.apache.openjpa.jdbc.schema.Table)
may exhibit dynamic behavior in some schema group
implementations, this method only returns true if the table has been
added to this group or is known to exist in the database.isKnownTable
in class SchemaGroup
public boolean isKnownTable(QualifiedDBIdentifier path)
isKnownTable
in class SchemaGroup
public Table findTable(String name)
SchemaGroup
findTable
in class SchemaGroup
public Table findTable(DBIdentifier name)
public Table findTable(QualifiedDBIdentifier path)
findTable
in class SchemaGroup
protected Table newTable(DBIdentifier name, Schema schema)
newTable
in class SchemaGroup
protected Column newColumn(DBIdentifier name, Table table)
newColumn
in class SchemaGroup
Copyright © 2006–2019 Apache Software Foundation. All rights reserved.