Class SqlContextFactory


  • public class SqlContextFactory
    extends Object
    Load the SQL sentences from XML file build a new context to the queries
    Since:
    0.6.0
    Author:
    Alisson Gomes
    • Constructor Detail

      • SqlContextFactory

        public SqlContextFactory()
    • Method Detail

      • newInstance

        public static SqlContext newInstance​(String resourceName)
        Build a new context from SQL sentences
        Parameters:
        resourceName - Initial XML file with SQL sentences
        Returns:
        SQL sentences that belong to repository (like database)
      • newInstance

        public static SqlContext newInstance​(String resourceName,
                                             Properties props)
        Build a new context from SQL sentences
        Parameters:
        resourceName - Initial XML file with SQL sentences
        props - customized properties to SQL context, see RepositoryProperty enumeration
        Returns:
        SQL sentences that belong to repository (like database)
      • newInstance

        public static SqlContext newInstance​(String resourceName,
                                             String repositoryConfigName)
        Build a new context from SQL sentences
        Parameters:
        resourceName - Initial XML file with SQL sentences
        repositoryConfigName - name of repository
        Returns:
        SQL sentences that belong to repository (like database)