Package org.apache.openjpa.jdbc.schema
Class LazySchemaFactory
- java.lang.Object
-
- org.apache.openjpa.jdbc.schema.NameSet
-
- org.apache.openjpa.jdbc.schema.SchemaGroup
-
- org.apache.openjpa.jdbc.schema.LazySchemaFactory
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,SchemaFactory,Configurable
public class LazySchemaFactory extends SchemaGroup implements SchemaFactory, Configurable
Factory that uses database metadata to construct the system schema. The lazy schema factory only loads table data as it is requested. It does not properly support operations that require knowledge of the entire schema.- Author:
- Abe White
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LazySchemaFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidendConfiguration()Invoked upon completion of bean property configuration for this object.SequencefindSequence(java.lang.String name)Deprecated.SequencefindSequence(DBIdentifier name)SequencefindSequence(QualifiedDBIdentifier name)TablefindTable(java.lang.String name)Deprecated.TablefindTable(DBIdentifier name)TablefindTable(QualifiedDBIdentifier path)booleangetForeignKeys()booleangetIndexes()booleangetPrimaryKeys()SchemaGroupreadSchema()Return the schema group for the current object model and database.voidsetConfiguration(Configuration conf)Invoked prior to setting bean properties.voidsetForeignKeys(boolean fks)voidsetIndexes(boolean idx)voidsetPrimaryKeys(boolean pks)voidstartConfiguration()Invoked before bean property configuration is begun on this object.voidstoreSchema(SchemaGroup schema)Record the schema group after changes may have been made.-
Methods inherited from class org.apache.openjpa.jdbc.schema.SchemaGroup
addSchema, addSchema, addSchema, clone, copy, findExportedForeignKeys, findSequence, findSequence, findSequence, findTable, findTable, findTable, findTable, findTable, getSchema, getSchema, getSchemas, importSchema, isKnownSequence, isKnownSequence, isKnownSequence, isKnownSequence, isKnownTable, isKnownTable, isKnownTable, newColumn, newColumn, newForeignKey, newForeignKey, newIndex, newIndex, newInstance, newPrimaryKey, newPrimaryKey, newSchema, newSchema, newSequence, newSequence, newTable, newTable, newUnique, newUnique, removeSchema, removeUnusedComponents
-
Methods inherited from class org.apache.openjpa.jdbc.schema.NameSet
addName, addName, isNameTaken, isNameTaken, removeName, removeName
-
-
-
-
Method Detail
-
getPrimaryKeys
public boolean getPrimaryKeys()
-
setPrimaryKeys
public void setPrimaryKeys(boolean pks)
-
getForeignKeys
public boolean getForeignKeys()
-
setForeignKeys
public void setForeignKeys(boolean fks)
-
getIndexes
public boolean getIndexes()
-
setIndexes
public void setIndexes(boolean idx)
-
readSchema
public SchemaGroup readSchema()
Description copied from interface:SchemaFactoryReturn the schema group for the current object model and database.- Specified by:
readSchemain interfaceSchemaFactory
-
storeSchema
public void storeSchema(SchemaGroup schema)
Description copied from interface:SchemaFactoryRecord the schema group after changes may have been made.- Specified by:
storeSchemain interfaceSchemaFactory- Parameters:
schema- the schema definition for the entire system
-
findTable
@Deprecated public Table findTable(java.lang.String name)
Deprecated.Description copied from class:SchemaGroupFind the table with the given name in the group, using '.' as the catalog separator. Returns null if no table found.- Overrides:
findTablein classSchemaGroup
-
findTable
public Table findTable(DBIdentifier name)
-
findTable
public Table findTable(QualifiedDBIdentifier path)
- Overrides:
findTablein classSchemaGroup
-
findSequence
@Deprecated public Sequence findSequence(java.lang.String name)
Deprecated.Description copied from class:SchemaGroupFind the sequence with the given name in the group, using '.' as the catalog separator. Returns null if no sequence found.- Overrides:
findSequencein classSchemaGroup
-
findSequence
public Sequence findSequence(DBIdentifier name)
- Overrides:
findSequencein classSchemaGroup
-
findSequence
public Sequence findSequence(QualifiedDBIdentifier name)
- Overrides:
findSequencein classSchemaGroup
-
setConfiguration
public void setConfiguration(Configuration conf)
Description copied from interface:ConfigurableInvoked prior to setting bean properties.- Specified by:
setConfigurationin interfaceConfigurable
-
startConfiguration
public void startConfiguration()
Description copied from interface:ConfigurableInvoked before bean property configuration is begun on this object.- Specified by:
startConfigurationin interfaceConfigurable
-
endConfiguration
public void endConfiguration()
Description copied from interface:ConfigurableInvoked upon completion of bean property configuration for this object.- Specified by:
endConfigurationin interfaceConfigurable
-
-