public abstract class AbstractStoreSchemaHandler extends Object implements StoreSchemaHandler
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
autoCreateColumns
Whether to auto create any columns that are missing.
|
protected boolean |
autoCreateConstraints
Whether to auto create any constraints
|
protected boolean |
autoCreateSchema
Whether to auto create any schema.
|
protected boolean |
autoCreateTables
Whether to auto create any tables.
|
protected boolean |
autoCreateWarnOnError
Whether to warn only when any errors occur on auto-create.
|
protected boolean |
autoDeleteColumns
Whether to auto delete any columns that are present but not in the metadata.
|
protected StoreManager |
storeMgr |
protected boolean |
validateColumns
Whether to validate any columns
|
protected boolean |
validateConstraints
Whether to validate any constraints
|
protected boolean |
validateTables
Whether to validate any tables
|
| Constructor and Description |
|---|
AbstractStoreSchemaHandler(StoreManager storeMgr) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Method to clear out any cached schema information.
|
void |
createSchema(String schemaName,
Properties props,
Object connection)
Method to create the specified schema.
|
void |
createSchemaForClasses(Set<String> classNames,
Properties props,
Object connection)
Method to generate the required schema for the supplied classes.
|
void |
deleteSchema(String schemaName,
Properties props,
Object connection)
Method to delete the specified schema.
|
void |
deleteSchemaForClasses(Set<String> classNames,
Properties props,
Object connection)
Method to delete the schema for the supplied classes.
|
StoreSchemaData |
getSchemaData(Object connection,
String name,
Object[] values)
Accessor for schema data store under the provided name and defined by the specified values.
|
StoreManager |
getStoreManager() |
boolean |
isAutoCreateColumns() |
boolean |
isAutoCreateConstraints() |
boolean |
isAutoCreateSchema() |
boolean |
isAutoCreateTables() |
boolean |
isAutoCreateWarnOnError() |
boolean |
isAutoDeleteColumns() |
boolean |
isValidateColumns() |
boolean |
isValidateConstraints() |
boolean |
isValidateTables() |
void |
validateSchema(Set<String> classNames,
Properties props,
Object connection)
Method to validate the schema for the supplied classes.
|
protected StoreManager storeMgr
protected final boolean autoCreateSchema
protected final boolean autoCreateTables
protected final boolean autoCreateColumns
protected final boolean autoCreateConstraints
protected final boolean autoCreateWarnOnError
protected final boolean autoDeleteColumns
protected final boolean validateTables
protected final boolean validateColumns
protected final boolean validateConstraints
public AbstractStoreSchemaHandler(StoreManager storeMgr)
public StoreManager getStoreManager()
getStoreManager in interface StoreSchemaHandlerpublic boolean isAutoCreateSchema()
isAutoCreateSchema in interface StoreSchemaHandlerpublic boolean isAutoCreateTables()
isAutoCreateTables in interface StoreSchemaHandlerpublic boolean isAutoCreateColumns()
isAutoCreateColumns in interface StoreSchemaHandlerpublic boolean isAutoCreateConstraints()
isAutoCreateConstraints in interface StoreSchemaHandlerpublic boolean isAutoCreateWarnOnError()
isAutoCreateWarnOnError in interface StoreSchemaHandlerpublic boolean isAutoDeleteColumns()
isAutoDeleteColumns in interface StoreSchemaHandlerpublic boolean isValidateTables()
isValidateTables in interface StoreSchemaHandlerpublic boolean isValidateColumns()
isValidateColumns in interface StoreSchemaHandlerpublic boolean isValidateConstraints()
isValidateConstraints in interface StoreSchemaHandlerpublic void clear()
StoreSchemaHandlerclear in interface StoreSchemaHandlerpublic void createSchema(String schemaName, Properties props, Object connection)
StoreSchemaHandlercreateSchema in interface StoreSchemaHandlerschemaName - Name of the schemaprops - Any properties controlling the schema generationconnection - Connection to use (null implies this will obtain its own connection)public void deleteSchema(String schemaName, Properties props, Object connection)
StoreSchemaHandlerdeleteSchema in interface StoreSchemaHandlerschemaName - Name of the schemaprops - Any properties controlling the schema deletionconnection - Connection to use (null implies this will obtain its own connection)public void createSchemaForClasses(Set<String> classNames, Properties props, Object connection)
StoreSchemaHandlercreateSchemaForClasses in interface StoreSchemaHandlerclassNames - 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)public void deleteSchemaForClasses(Set<String> classNames, Properties props, Object connection)
StoreSchemaHandlerdeleteSchemaForClasses in interface StoreSchemaHandlerclassNames - 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)public void validateSchema(Set<String> classNames, Properties props, Object connection)
StoreSchemaHandlervalidateSchema in interface StoreSchemaHandlerclassNames - Names of classesprops - Any properties controlling schema validationconnection - Connection to use (null implies this will obtain its own connection)public StoreSchemaData getSchemaData(Object connection, String name, Object[] values)
StoreSchemaHandlergetSchemaData in interface StoreSchemaHandlerconnection - Connection to the datastorename - Name of the schema component to return.values - Value(s) to use as qualifier(s) for selecting the schema componentCopyright © 2017. All rights reserved.