Package org.alfresco.util.schemacomp
Class ExportDb
java.lang.Object
org.alfresco.util.schemacomp.ExportDb
Exports a database schema to an in-memory
Schema object.- Author:
- Matt Ward
-
Constructor Summary
ConstructorsConstructorDescriptionExportDb(DataSource dataSource, Dialect dialect, DescriptorService descriptorService, DatabaseMetaDataHelper databaseMetaDataHelper) Create a new instance of the tool within the context of an existing database connectionExportDb(org.springframework.context.ApplicationContext context) -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()protected StringgenerateType(String dbTypeRaw, int size, int digits, int sqlType) voidsetDbSchemaName(String dbSchemaName) Set the default schema namevoidsetNamePrefix(String namePrefix)
-
Constructor Details
-
ExportDb
public ExportDb(org.springframework.context.ApplicationContext context) -
ExportDb
public ExportDb(DataSource dataSource, Dialect dialect, DescriptorService descriptorService, DatabaseMetaDataHelper databaseMetaDataHelper) Create a new instance of the tool within the context of an existing database connection- Parameters:
dataSource- the database connection to use for metadata queriesdialect- the Hibernate dialectdescriptorService- descriptorServicedatabaseMetaDataHelper- databaseMetaDataHelper
-
-
Method Details
-
execute
public void execute() -
generateType
protected String generateType(String dbTypeRaw, int size, int digits, int sqlType) throws IllegalArgumentException, IllegalAccessException -
getSchema
- Returns:
- the schema
-
getNamePrefix
- Returns:
- the namePrefix
-
setNamePrefix
- Parameters:
namePrefix- the namePrefix to set
-
setDbSchemaName
Set the default schema name- Parameters:
dbSchemaName- the default schema name
-