Package lumis.util

Class 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) $
    • 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