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

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

public final class DeployedModelQuery
extends Query

Query container for building complex queries for deployed models.

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

Nested Class Summary
static class DeployedModelQuery.DeployedModelState
          Enumeration of model states.
 
Field Summary
static FilterableAttribute CONSUMER
          Filters the models based on references to a specific model.
static FilterableAttribute ID
          Filters the models based on the id attribute.
static FilterableAttribute OID
          Filters the models based on the oid attribute.
static FilterableAttribute PROVIDER
          Filters the models based on references to a specific model.
static FilterableAttribute STATE
          Filters the models based on the state attribute.
 
Method Summary
static DeployedModelQuery findActive()
          Creates a query for finding active models.
static DeployedModelQuery findActiveForId(String modelId)
          Creates a query for finding the active deployed model having the specific id.
static DeployedModelQuery findAll()
          Creates a query for finding all deployed models.
static DeployedModelQuery findForId(String modelId)
          Creates a query for finding all deployed model versions having the specific id.
static DeployedModelQuery findInState(DeployedModelQuery.DeployedModelState modelState)
          Creates a query for finding deployed models currently being in the specified state.
static DeployedModelQuery findUsedBy(long modelOid)
          Creates a query for finding all models used by the specified model.
static DeployedModelQuery findUsing(long modelOid)
          Creates a query for finding all models using the specified model.
 
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

OID

public static final FilterableAttribute OID
Filters the models based on the oid attribute. Example to get a range of models:
    DeployedModelQuery query = new DeployedModelQuery();
    query.where(OID.between(2, 5));
 


ID

public static final FilterableAttribute ID
Filters the models based on the id attribute. Example to get a range of models using an SQL style pattern:
    DeployedModelQuery query = new DeployedModelQuery();
    query.where(ID.like("%AN%"));
 


STATE

public static final FilterableAttribute STATE
Filters the models based on the state attribute. Example to get all valid models with a specific id:
    DeployedModelQuery query = new DeployedModelQuery();
    query.where(ID.isEqual(modelId)).and(STATE.isEqual("VALID"));
 


PROVIDER

public static final FilterableAttribute PROVIDER
Filters the models based on references to a specific model. Example to get all models using a specific one:
    DeployedModelQuery query = new DeployedModelQuery();
    query.where(PROVIDER.isEqual(modelOid));
 


CONSUMER

public static final FilterableAttribute CONSUMER
Filters the models based on references to a specific model. Example to get all models used by a specific one:
    DeployedModelQuery query = new DeployedModelQuery();
    query.where(CONSUMER(modelOid));
 

Method Detail

findAll

public static DeployedModelQuery findAll()
Creates a query for finding all deployed models.

Returns:
The configured query.

findActive

public static DeployedModelQuery findActive()
Creates a query for finding active models. It's a shortcut for findInState(DeployedModelState.ACTIVE).

Returns:
The configured query.
See Also:
findInState(DeployedModelState), DeployedModelQuery.DeployedModelState.ACTIVE

findActiveForId

public static DeployedModelQuery findActiveForId(String modelId)
Creates a query for finding the active deployed model having the specific id.

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

findInState

public static DeployedModelQuery findInState(DeployedModelQuery.DeployedModelState modelState)
Creates a query for finding deployed models currently being in the specified state.

Parameters:
modelState - The state the model should be in.
Returns:
The configured query.

findForId

public static DeployedModelQuery findForId(String modelId)
Creates a query for finding all deployed model versions having the specific id.

Parameters:
modelId - The id of the models to retrieve
Returns:
The configured query.

findUsedBy

public static DeployedModelQuery findUsedBy(long modelOid)
Creates a query for finding all models used by the specified model.

Parameters:
modelOid - The model oid of the model.
Returns:
The configured query.

findUsing

public static DeployedModelQuery findUsing(long modelOid)
Creates a query for finding all models using the specified model.

Parameters:
modelOid - The model oid of the model.
Returns:
The configured query.


Copyright © 2017 Eclipse Stardust. All Rights Reserved.