info.aduna.infosource.query
Class QueryUtil

java.lang.Object
  extended by info.aduna.infosource.query.QueryUtil

public class QueryUtil
extends Object

Utility class for formulating SeRQL queries in the Enterprise Desktop model.

These queries rely on Aperture's DataObject metadata model as well as the InfoSource-specific manner in which context is used to group statements in a Repository.


Constructor Summary
QueryUtil()
           
 
Method Summary
static String createAllEntitiesQuery()
          Returns a query that simply selects all Entities.
static String createAllEntityCreatorNamesQuery()
          Returns a SeRQL select query returning all creator names of all Entities.
static String createAllLanguagesQuery()
          Returns a SeRQL query that selects all entities that have a Language property, together with that language property.
static String createDateRangeQuery(long from, long to)
          Returns a SeRQL SELECT query that matches Entities whose date falls in the specified interval (inclusive).
static String createLanguageQuery(String language)
          Returns a SeRQL query that selects all entities that have the specified language.
static String createMatchesQuery(String queryString)
          Returns a SeRQL SELECT query that searches for Entities that match the specified queryString.
static String createMatchesTermQuery(String queryString)
          Returns a SeRQL SELECT query that searches for Entities that match the specified queryString.
static String createMissingLanguageQuery()
          Returns a SeRQL query that selects all entities that have no specified language.
static String createSelectCreatedByEntitiesQuery(String name)
          Returns a SeRQL query that selects all entities that are created by the specified creator.
static String createSelectCreatorNamesQuery()
          Returns a SeRQL select query returning all names of Agents that are registered as creator of a specific Entity.
static String createSelectEntityFolderQuery()
           
static String createSelectFolderEntitiesQuery(String folderUri)
          Returns a query that selects all Entities located in the specified folder.
static String createSelectFolderHierarchy()
           
static String createSelectMailAddressesQuery(String... properties)
          Returns a SeRQL select query returning all addresses and optionally names of Agents that are registered to an Entity under one of the specified mail properties.
static String createSelectMimeTypeEntitiesQuery(String mimeType)
          Returns a query that selects all Entities with the specified mime type.
static String createSelectMimeTypeEntitiesQuery(String[] mimeTypes)
          Returns a query that selects all Entities that have at least one of the specified mime types.
static String createSelectMimeTypesQuery()
          Returns a query that selects all occurring mime types.
static String createSelectReceivedFromEntitiesQuery(String address)
          Returns a SeRQL query that selects all entities that have the specified address as "from" or "sender" attribute.
static String createSelectRootFoldersQuery()
          The query that selects all root folders, e.g.
static String createSelectSentToEntitiesQuery(String address)
          Returns a SeRQL query that selects all entities that have the specified address as "to", "cc" or "bcc" attribute.
static String createSizeRangeQuery(long from, long to)
          Returns a SeRQL SELECT query that matches Entities whose size falls in the specified interval (inclusive).
static String createSubFoldersSelectQuery(String parentFolderUri)
          Returns a query that selects all subfolders of the specified folder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryUtil

public QueryUtil()
Method Detail

createSelectFolderHierarchy

public static String createSelectFolderHierarchy()

createSelectRootFoldersQuery

public static String createSelectRootFoldersQuery()
The query that selects all root folders, e.g. folders that do not reside in another folder.


createAllEntitiesQuery

public static String createAllEntitiesQuery()
Returns a query that simply selects all Entities.


createSubFoldersSelectQuery

public static String createSubFoldersSelectQuery(String parentFolderUri)
Returns a query that selects all subfolders of the specified folder.


createSelectFolderEntitiesQuery

public static String createSelectFolderEntitiesQuery(String folderUri)
Returns a query that selects all Entities located in the specified folder.


createSelectEntityFolderQuery

public static String createSelectEntityFolderQuery()

createSelectMimeTypesQuery

public static String createSelectMimeTypesQuery()
Returns a query that selects all occurring mime types.


createSelectMimeTypeEntitiesQuery

public static String createSelectMimeTypeEntitiesQuery(String mimeType)
Returns a query that selects all Entities with the specified mime type.


createSelectMimeTypeEntitiesQuery

public static String createSelectMimeTypeEntitiesQuery(String[] mimeTypes)
Returns a query that selects all Entities that have at least one of the specified mime types.


createMatchesQuery

public static String createMatchesQuery(String queryString)
Returns a SeRQL SELECT query that searches for Entities that match the specified queryString.


createDateRangeQuery

public static String createDateRangeQuery(long from,
                                          long to)
Returns a SeRQL SELECT query that matches Entities whose date falls in the specified interval (inclusive). Specify a negative value to indicate negative and positive infinity respectively.


createSizeRangeQuery

public static String createSizeRangeQuery(long from,
                                          long to)
Returns a SeRQL SELECT query that matches Entities whose size falls in the specified interval (inclusive). Specify a negative value to indicate negative and positive infinity respectively.


createAllLanguagesQuery

public static String createAllLanguagesQuery()
Returns a SeRQL query that selects all entities that have a Language property, together with that language property. What this query really needs is COUNT support in SeRQL.


createLanguageQuery

public static String createLanguageQuery(String language)
Returns a SeRQL query that selects all entities that have the specified language.


createMissingLanguageQuery

public static String createMissingLanguageQuery()
Returns a SeRQL query that selects all entities that have no specified language.


createSelectMailAddressesQuery

public static String createSelectMailAddressesQuery(String... properties)
Returns a SeRQL select query returning all addresses and optionally names of Agents that are registered to an Entity under one of the specified mail properties. This can be used to retrieve mail artefacts such as "from", "to" and "cc" headers.


createSelectCreatorNamesQuery

public static String createSelectCreatorNamesQuery()
Returns a SeRQL select query returning all names of Agents that are registered as creator of a specific Entity.


createAllEntityCreatorNamesQuery

public static String createAllEntityCreatorNamesQuery()
Returns a SeRQL select query returning all creator names of all Entities.


createSelectReceivedFromEntitiesQuery

public static String createSelectReceivedFromEntitiesQuery(String address)
Returns a SeRQL query that selects all entities that have the specified address as "from" or "sender" attribute.


createSelectSentToEntitiesQuery

public static String createSelectSentToEntitiesQuery(String address)
Returns a SeRQL query that selects all entities that have the specified address as "to", "cc" or "bcc" attribute.


createSelectCreatedByEntitiesQuery

public static String createSelectCreatedByEntitiesQuery(String name)
Returns a SeRQL query that selects all entities that are created by the specified creator.


createMatchesTermQuery

public static String createMatchesTermQuery(String queryString)
Returns a SeRQL SELECT query that searches for Entities that match the specified queryString.



Copyright © 1997-2008 Aduna. All Rights Reserved.