Class AbstractQuery

  • All Implemented Interfaces:
    Query
    Direct Known Subclasses:
    LdapQuery, SqlQuery

    public abstract class AbstractQuery
    extends Object
    implements Query
    An abstract query.
    Defines getters and setters for all base members of a query, and provides some helpful methods.
    • Method Detail

      • getId

        public String getId()
        Description copied from interface: Query
        Get the query ID.
        Specified by:
        getId in interface Query
        Returns:
        the query ID.
      • setId

        public void setId​(String id)
        Set the query id.
        Parameters:
        id - the id of the query
      • getName

        public String getName()
        Description copied from interface: Query
        Get the query name.
        Specified by:
        getName in interface Query
        Returns:
        the query name.
      • setName

        public void setName​(String name)
        Set the query name.
        Parameters:
        name - the name of the query
      • setDescription

        public void setDescription​(String description)
        Set the query description.
        Parameters:
        description - the description of the query
      • setResultType

        public void setResultType​(Query.ResultType resultType)
        Set the query result type.
        Parameters:
        resultType - the query result type.
      • getFactory

        public String getFactory()
        Description copied from interface: Query
        Get the id of source factory
        Specified by:
        getFactory in interface Query
        Returns:
        the id of source factory
      • setFactory

        public void setFactory​(String factoryId)
        Set the data source factory
        Parameters:
        factoryId - The id of source factory
      • getDataSourceId

        public String getDataSourceId()
        Description copied from interface: Query
        Get the id of datasource on which depends this query.
        Specified by:
        getDataSourceId in interface Query
        Returns:
        the datasource on which depends this query.
      • setDataSourceId

        public void setDataSourceId​(String dataSourceId)
        Set the id of data source
        Parameters:
        dataSourceId - The id of data source
      • _buildParameters

        protected Map<String,​String_buildParameters​(String query)
        Extract parameters from a query string in the form ${parameterName}.
        Parameters:
        query - the query containing parameters.
        Returns:
        the parameter names as a Set.