Interface IDfQueryManager


public interface IDfQueryManager
Provides factory methods for query and interfaces for persistent query management.
  • Method Details

    • newQueryBuilder

      IDfQueryBuilder newQueryBuilder() throws DfException
      Creates a new query builder.
      Returns:
      The created query builder.
      Throws:
      DfException - If an error occurs in the server.
    • newQueryBuilder

      IDfQueryBuilder newQueryBuilder(String objectType) throws DfException
      Creates a new query builder using the specified object type.
      Parameters:
      objectType - The object type name such as dm_document.
      Returns:
      A new query builder.
      Throws:
      DfException - If an exception occurs during the construction.
    • newQueryBuilder

      IDfQueryBuilder newQueryBuilder(String objectType, int maxResultCount, boolean isDatabaseSearchRequested) throws DfException
      Creates a new query builder using the specified parameters.
      Parameters:
      objectType - The object type name such as dm_document.
      maxResultCount - The maximum number of results to return.
      isDatabaseSearchRequested - true, to force query to use RDBMS semantics as opposed to fulltext semantics. It is only relevant if full-text clauses are used.
      Returns:
      A new query builder.
      Throws:
      DfException - If an exception occurs during the construction.
    • newPassThroughQuery

      IDfPassThroughQuery newPassThroughQuery(String queryString) throws DfException
      Creates a new pass-through query using the specified parameters.
      Parameters:
      queryString - An opaque query string to be passed to the source's query engine.
      Returns:
      A new pass-through query.
      Throws:
      DfException - If an exception occurs during the construction.
    • newPassThroughQuery

      IDfPassThroughQuery newPassThroughQuery(String queryString, String customQueryData, int maxResultCount) throws DfException
      Creates a new pass-through using the specified parameters.
      Parameters:
      queryString - An opaque query string to be passed to the source's query engine.
      customQueryData - An opaque custom data to be stored with the query. Can be used to support custom query building for example.
      maxResultCount - The maximum number of entries to return.
      Returns:
      A new pass-through query.
      Throws:
      DfException - If an exception occurs during the construction.
    • newSmartListDefinition

      IDfSmartListDefinition newSmartListDefinition() throws DfException
      Creates a new smart list definition. Smart list definition is used as a contents of the dm_smartlist objects in the repository.
      Returns:
      A new smart list definition object/
      Throws:
      DfException - If an exception occurs during the construction.
      See Also:
    • loadQueryDefinition

      IDfQueryDefinition loadQueryDefinition(InputStream in) throws DfException, IOException
      Loads a query definition from a stream.
      Parameters:
      in - The input stream to read.
      Returns:
      The query definition loaded.
      Throws:
      DfException - If the stream is not a well-formed XML stream, or if the query format is invalid.
      IOException - If an I/O error occurs while reading the stream.
    • saveQueryDefinition

      void saveQueryDefinition(IDfQueryDefinition queryDefinition, OutputStream out) throws DfException, IOException
      Saves a query definition in an output stream.
      Parameters:
      queryDefinition - The query definition to save.
      out - The output stream to write in.
      Throws:
      DfException - If an XML configuration error occurs.
      IOException - If an I/O error occurs while writing the output stream.
    • loadSmartListDefinition

      IDfSmartListDefinition loadSmartListDefinition(InputStream in) throws DfException, IOException
      Loads a smart list definition from a stream.
      Parameters:
      in - The input stream to read.
      Returns:
      The smart list definition loaded.
      Throws:
      DfException - If the stream is not a well-formed XML stream, or if the smart list format is invalid.
      IOException - If an I/O error occurs while reading the stream.
    • loadSmartListDefinition

      IDfSmartListDefinition loadSmartListDefinition(Document doc, Node parentNode) throws DfException, IOException
      Loads a smart list definition from an XML document node.
      Parameters:
      doc - a DOM
      parentNode - The node under which the smartlist definition xml representation can be found.
      Returns:
      The smart list definition loaded.
      Throws:
      DfException - If the stream is not a well-formed XML stream, or if the smart list format is invalid.
      IOException - If an I/O error occurs while reading the stream.
    • saveSmartListDefinition

      void saveSmartListDefinition(IDfSmartListDefinition smartList, OutputStream out) throws DfException, IOException
      Saves a smart list definition in an output stream.
      Parameters:
      smartList - The smart list definition to save.
      out - The output stream to write in.
      Throws:
      DfException - If an XML configuration error occurs.
      IOException - If an I/O error occurs while writing the output stream.
    • saveSmartListDefinition

      void saveSmartListDefinition(IDfSmartListDefinition smartList, Document doc, Node parentNode) throws DfException, IOException
      Saves a smart list definition in an output stream.
      Parameters:
      smartList - The smart list definition to save.
      doc - a DOM
      parentNode - The node under which the smartlist definition xml representation can be found.
      Throws:
      DfException - If an XML configuration error occurs.
      IOException - If an I/O error occurs while writing the output stream.
    • convertSmartListDefinition

      IDfSmartListDefinition convertSmartListDefinition(IDfSysObject oldSmartList) throws DfException, IOException
      Converts smart list definition using a legacy dm_smartlist object.
      Parameters:
      oldSmartList - A dm_smartlist object (as an IDfSysObject).
      Returns:
      The converted smart list definition.
      Throws:
      DfException - If a conversion exception occurs.
      IOException - If an I/O error occurs while reading the stream (contents of the oldSmartList).