public abstract class HibernateSchemaManagement extends Object implements SchemaManagement
Modifier and Type | Field and Description |
---|---|
protected static String |
HIBERNATE_2_PACKAGE
The Hibernate 2 schema export class name.
|
protected static String |
HIBERNATE_3_PACKAGE
The Hibernate 3 schema export class name.
|
protected static Logger |
logger
getLogger(HibernateSchemaManagement.class)
|
Constructor and Description |
---|
HibernateSchemaManagement() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addArguments(Map options,
List<String> arguments)
Adds any arguments required by the specialized class.
|
String |
execute(Connection connection,
Map options)
Executes the schema related task and returns the resulting SQL script (if applicable).
|
protected Class |
getExecutionClass()
Retrieves the class that performs the execution work.
|
protected abstract String |
getExecutionClassName()
Returns the name of the class that performs the execution.
|
protected abstract String |
getExecutionOuputPath(Map options)
Returns the path of the execution output file.
|
protected List<String> |
getMappingFilesList(String extension,
String baseDirectory)
Retrieves all mapping files having the given
extension
existing in the baseDirectory or any of its sub directories. |
protected String |
getOutputPath()
Gets the path to which output should be written.
|
protected String |
getProperty(Map properties,
String name)
Attempts to retrieve the given property with the given
name . |
protected String |
getRequiredProperty(Map properties,
String name)
Attempts to retrieve the given property with the given
name . |
protected String |
getVersion()
Returns the current Hibernate version this management object
is targetting.
|
void |
setOutputPath(String outputPath)
Sets the path to which the output should be written.
|
void |
setVersion(String version)
Sets the version of Hibernate to target.
|
protected static final String HIBERNATE_2_PACKAGE
protected static final String HIBERNATE_3_PACKAGE
public HibernateSchemaManagement()
public void setVersion(String version)
version
- the version of Hibernate to target.protected Class getExecutionClass()
protected String getVersion()
public void setOutputPath(String outputPath)
outputPath
- protected String getProperty(Map properties, String name)
name
.properties
- the properties from which to retrieve the property.name
- the name of the property to retrieve.protected String getRequiredProperty(Map properties, String name)
name
.
If the property isn't found an exception is thrown.properties
- the properties from which to retrieve the property.name
- the name of the property to retrieve.protected String getOutputPath()
protected abstract String getExecutionClassName()
public String execute(Connection connection, Map options) throws Exception
SchemaManagement
execute
in interface SchemaManagement
connection
- the connection if required to execute the task.options
- the options used during execution.Exception
SchemaManagement.execute(java.sql.Connection, java.util.Map)
protected abstract String getExecutionOuputPath(Map options)
options
- the options from which to retrieve properties.protected abstract void addArguments(Map options, List<String> arguments) throws Exception
options
- any options from which to retrieve argument values.arguments
- the list of arguments to add.Exception
protected List<String> getMappingFilesList(String extension, String baseDirectory)
extension
existing in the baseDirectory
or any of its sub directories.extension
- the mapping file extensionbaseDirectory
- the directory from which to perform the search.Copyright © 2005–2014 AndroMDA.org. All rights reserved.