Package org.datanucleus.store.schema
Interface StoreSchemaHandler
-
- All Known Implementing Classes:
AbstractStoreSchemaHandler,DefaultStoreSchemaHandler
public interface StoreSchemaHandlerInterface defining schema operation for a StoreManager.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Method to clear out any cached schema information.voidcreateDatabase(String catalogName, String schemaName, Properties props, Object connection)Method to create the specified database (catalog/schema).voidcreateSchemaForClasses(Set<String> classNames, Properties props, Object connection)Method to generate the required schema for the supplied classes.voiddeleteDatabase(String catalogName, String schemaName, Properties props, Object connection)Method to delete the specified database (catalog/schema).voiddeleteSchemaForClasses(Set<String> classNames, Properties props, Object connection)Method to delete the schema for the supplied classes.voidenableSchemaGeneration()Convenience method to override the specified schema generation properties and enable schema generation.StoreSchemaDatagetSchemaData(Object connection, String name, Object[] values)Accessor for schema data store under the provided name and defined by the specified values.StoreManagergetStoreManager()booleanisAutoCreateColumns()booleanisAutoCreateConstraints()booleanisAutoCreateDatabase()booleanisAutoCreateTables()booleanisAutoCreateWarnOnError()booleanisAutoDeleteColumns()booleanisValidateColumns()booleanisValidateConstraints()booleanisValidateTables()voidresetSchemaGeneration()Convenience method to reset the schema generation properties to their initial creation values, effectively undoing a call to enableSchemaGeneration.voidvalidateSchema(Set<String> classNames, Properties props, Object connection)Method to validate the schema for the supplied classes.
-
-
-
Method Detail
-
getStoreManager
StoreManager getStoreManager()
-
isAutoCreateDatabase
boolean isAutoCreateDatabase()
-
isAutoCreateTables
boolean isAutoCreateTables()
-
isAutoCreateConstraints
boolean isAutoCreateConstraints()
-
isAutoCreateColumns
boolean isAutoCreateColumns()
-
isAutoCreateWarnOnError
boolean isAutoCreateWarnOnError()
-
isAutoDeleteColumns
boolean isAutoDeleteColumns()
-
isValidateTables
boolean isValidateTables()
-
isValidateColumns
boolean isValidateColumns()
-
isValidateConstraints
boolean isValidateConstraints()
-
clear
void clear()
Method to clear out any cached schema information.
-
createDatabase
void createDatabase(String catalogName, String schemaName, Properties props, Object connection)
Method to create the specified database (catalog/schema).- Parameters:
catalogName- Name of the catalogschemaName- Name of the schemaprops- Any properties controlling the schema generationconnection- Connection to use (null implies this will obtain its own connection)
-
deleteDatabase
void deleteDatabase(String catalogName, String schemaName, Properties props, Object connection)
Method to delete the specified database (catalog/schema).- Parameters:
catalogName- Name of the catalogschemaName- Name of the schemaprops- Any properties controlling the schema deletionconnection- Connection to use (null implies this will obtain its own connection)
-
createSchemaForClasses
void createSchemaForClasses(Set<String> classNames, Properties props, Object connection)
Method to generate the required schema for the supplied classes. Note that this does not generate a "schema", just the tables. Refer to createDatabase to create a "schema".- Parameters:
classNames- Names of the classes we want the schema generating for.props- Any properties controlling the schema generationconnection- Connection to use (null implies this will obtain its own connection)
-
deleteSchemaForClasses
void deleteSchemaForClasses(Set<String> classNames, Properties props, Object connection)
Method to delete the schema for the supplied classes. Note that this does not delete a "schema", just the tables. Refer to deleteDatabase to delete a "schema".- Parameters:
classNames- Names of the classes we want the schema deleting for.props- Any properties controlling the schema deletionconnection- Connection to use (null implies this will obtain its own connection)
-
validateSchema
void validateSchema(Set<String> classNames, Properties props, Object connection)
Method to validate the schema for the supplied classes.- Parameters:
classNames- Names of classesprops- Any properties controlling schema validationconnection- Connection to use (null implies this will obtain its own connection)
-
getSchemaData
StoreSchemaData getSchemaData(Object connection, String name, Object[] values)
Accessor for schema data store under the provided name and defined by the specified values. The supported types of values is particular to the implementation.- Parameters:
connection- Connection to the datastorename- Name of the schema component to return.values- Value(s) to use as qualifier(s) for selecting the schema component- Returns:
- Schema data definition for this name
-
enableSchemaGeneration
void enableSchemaGeneration()
Convenience method to override the specified schema generation properties and enable schema generation.
-
resetSchemaGeneration
void resetSchemaGeneration()
Convenience method to reset the schema generation properties to their initial creation values, effectively undoing a call to enableSchemaGeneration.
-
-