Package lumis.util
Class AbstractSqlGenerator
- java.lang.Object
-
- lumis.util.AbstractSqlGenerator
-
- Direct Known Subclasses:
DeploymentSqlGenerator
,SqlGenerator
public abstract class AbstractSqlGenerator extends Object
Abstract SQL generator.- Since:
- 7.1.0
- Version:
- $Revision: 17047 $ $Date: 2015-03-03 11:22:22 -0300 (Tue, 03 Mar 2015) $
-
-
Constructor Summary
Constructors Constructor Description AbstractSqlGenerator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Transformer
createTransformer(String sourcePath)
Returns the transformer for the given stylesheet path.String
generateSql(Document databaseXml, String dbType)
String
generateSql(Document databaseXml, DatabaseType dbType)
Generates the sql according to the given database definition for the specified database type.protected abstract String
getMySqlStylePath()
Returns the stylesheet file path for MySql.protected abstract String
getOracleStylePath()
Returns the stylesheet file path for Oracle.protected abstract String
getSqlServerStylePath()
Returns the stylesheet file path for SQL Server.
-
-
-
Constructor Detail
-
AbstractSqlGenerator
public AbstractSqlGenerator() throws PortalException
- Throws:
PortalException
-
-
Method Detail
-
createTransformer
protected abstract Transformer createTransformer(String sourcePath) throws PortalException
Returns the transformer for the given stylesheet path.- Parameters:
sourcePath
- the stylesheet path- Returns:
- the transformer for the given stylesheet path.
- Throws:
PortalException
- Since:
- 8.0.0
-
getMySqlStylePath
protected abstract String getMySqlStylePath()
Returns the stylesheet file path for MySql.- Returns:
- the stylesheet file path for MySql.
- Since:
- 7.1.0
-
getOracleStylePath
protected abstract String getOracleStylePath()
Returns the stylesheet file path for Oracle.- Returns:
- the stylesheet file path for Oracle.
- Since:
- 7.1.0
-
getSqlServerStylePath
protected abstract String getSqlServerStylePath()
Returns the stylesheet file path for SQL Server.- Returns:
- the stylesheet file path for SQL Server.
- Since:
- 7.1.0
-
generateSql
public String generateSql(Document databaseXml, DatabaseType dbType) throws PortalException
Generates the sql according to the given database definition for the specified database type.- Parameters:
databaseXml
- the database definition.dbType
- the database type.- Returns:
- the sql script generated.
- Throws:
PortalException
- Since:
- 7.1.0
-
generateSql
public String generateSql(Document databaseXml, String dbType) throws PortalException
- Throws:
PortalException
-
-