org.eclipse.stardust.engine.api.query
Class BusinessObjectQuery

java.lang.Object
  extended by org.eclipse.stardust.engine.api.query.Query
      extended by org.eclipse.stardust.engine.api.query.BusinessObjectQuery
All Implemented Interfaces:
Serializable

public class BusinessObjectQuery
extends Query

Query container for building complex queries for business objects.

Valid filter criteria are:

Supported evaluation policies are:

Version:
$Revision: $
Author:
Florin.Herinean
See Also:
Serialized Form

Nested Class Summary
static class BusinessObjectQuery.Option
          Policy options.
static class BusinessObjectQuery.Policy
          Policy that specifies the query options.
 
Field Summary
static FilterVerifier FILTER_VERIFYER
          List of valid filters.
static String ID_ATTRIBUTE
           
static String MODEL_ID_ATTRIBUTE
           
static String PK_ATTRIBUTE
           
 
Method Summary
static BusinessObjectQuery findAll()
          Creates a query for finding all business objects.
static BusinessObjectQuery findForBusinessObject(long modelOid, String businessObjectId)
          Creates a query for finding a business object.
static BusinessObjectQuery findForBusinessObject(String qualifiedBusinessObjectId)
          Creates a query for finding a specific business object.
static BusinessObjectQuery findInModel(long modelOid)
          Creates a query for finding all business objects declared in the specified model.
static BusinessObjectQuery findInModel(String modelId)
          Creates a query for finding all business objects declared in the specified model.
static BusinessObjectQuery findWithPrimaryKey(long modelOid, String businessObjectId, Object pk)
          Creates a query for finding a business object instance.
static BusinessObjectQuery findWithPrimaryKey(String qualifiedBusinessObjectId, Object pk)
          Creates a query for finding a specific instance of a business object.
 
Methods inherited from class org.eclipse.stardust.engine.api.query.Query
getFilter, getOrderCriteria, getPolicy, orderBy, orderBy, orderBy, removePolicy, setPolicy, toString, where
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MODEL_ID_ATTRIBUTE

public static final String MODEL_ID_ATTRIBUTE
See Also:
Constant Field Values

ID_ATTRIBUTE

public static final String ID_ATTRIBUTE
See Also:
Constant Field Values

PK_ATTRIBUTE

public static final String PK_ATTRIBUTE
See Also:
Constant Field Values

FILTER_VERIFYER

public static final FilterVerifier FILTER_VERIFYER
List of valid filters.

Method Detail

findAll

public static BusinessObjectQuery findAll()
Creates a query for finding all business objects.

Returns:
The configured query.

findInModel

public static BusinessObjectQuery findInModel(String modelId)
Creates a query for finding all business objects declared in the specified model.

Parameters:
modelId - the id of the model.
Returns:
The configured query.

findForBusinessObject

public static BusinessObjectQuery findForBusinessObject(String qualifiedBusinessObjectId)
Creates a query for finding a specific business object.

Parameters:
qualifiedBusinessObjectId - the qualified id of the business object (in the form '{' + modelId + '}' + dataId).
Returns:
The configured query.

findWithPrimaryKey

public static BusinessObjectQuery findWithPrimaryKey(String qualifiedBusinessObjectId,
                                                     Object pk)
Creates a query for finding a specific instance of a business object.

Parameters:
qualifiedBusinessObjectId - the qualified id of the business object (in the form '{' + modelId + '}' + dataId).
pk - the primary key value of the business object instance.
Returns:
The configured query.

findInModel

public static BusinessObjectQuery findInModel(long modelOid)
Creates a query for finding all business objects declared in the specified model.

Parameters:
modelOid - the oid of a concrete deployed model or one of the predefined meta oids:
  • PredefinedConstants.ALL_MODELS includes business objects from all models
  • PredefinedConstants.ACTIVE_MODEL includes business objects from the active models
  • PredefinedConstants.LAST_DEPLOYED_MODEL includes business objects from the last deployed models
  • PredefinedConstants.ALIVE_MODELS includes business objects from alive models
  • PredefinedConstants.ANY_MODEL includes business objects from the first matching model
Returns:
The configured query.

findForBusinessObject

public static BusinessObjectQuery findForBusinessObject(long modelOid,
                                                        String businessObjectId)
Creates a query for finding a business object.

Parameters:
modelOid - the oid of a concrete deployed model or one of the predefined meta oids
businessObjectId - the id of the business object, either qualified or simple.
Returns:
The configured query.

findWithPrimaryKey

public static BusinessObjectQuery findWithPrimaryKey(long modelOid,
                                                     String businessObjectId,
                                                     Object pk)
Creates a query for finding a business object instance.

Parameters:
modelOid - the oid of a concrete deployed model or one of the predefined meta oids
businessObjectId - the id of the business object, either qualified or simple.
pk - the primary key value of the business object instance.
Returns:
The configured query.


Copyright © 2017 Eclipse Stardust. All Rights Reserved.