| Constructor and Description |
|---|
SimpleQuery(Query query)
Constructs a Simple query from a query; Query cannot be null, if null is specified, a NullPointerException will be thrown
|
SimpleQuery(String assetType, String subtype)
Builds Query with asset type.
|
SimpleQuery(String assetType, String subtype, Condition cond, List<String> attributeNames)
Builds a Query for an asset type, a Condition and a List of attributes.
|
SimpleQuery(String assetType, String subtype, Condition cond, List<String> attributeNames, List<SortOrder> sortOrder)
Builds a Query for an asset type, a Condition, and a List of attributes where results are sorted.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAssetType()
Returns asset type this query is built for
|
List<String> |
getAttributeNames()
Lists name of the attributes requested in the Query
|
Condition |
getCondition()
Returns Condition for this Query, if any,
|
QueryProperties |
getProperties()
Gets properties associated with this Query instance.
|
List<SortOrder> |
getSortOrder()
Returns list of SortOrders.
|
String |
getSubtype()
Returns asset type this query is built for
|
void |
setAttributes(List<String> attributeNames)
Sets(resets) the names of attributes this Query uses.
|
void |
setCondition(Condition cond)
Sets(resets) Condition used for this query
|
void |
setProperties(QueryProperties props)
Sets(resets) properties associated with this Query instance.
|
void |
setSortOrder(List<SortOrder> sort)
Sets(resets) sort order to be used in this Query.
|
public SimpleQuery(Query query)
query - the Query that we will use to constructs the SimpleQuery; NULLPointerException will be thrown if query is nullpublic SimpleQuery(String assetType, String subtype)
assetType - name of the asset typesubtype - name of the sub typepublic SimpleQuery(String assetType, String subtype, Condition cond, List<String> attributeNames)
QueryProperties of this instance to read all attributes.assetType - Name of the asset typecond - data Condition to be satisfied by returning dataattributeNames - names of the attributes that will be made part of the result.subtype - name of the sub typepublic SimpleQuery(String assetType, String subtype, Condition cond, List<String> attributeNames, List<SortOrder> sortOrder)
SortOrderassetType - Name of the asset typecond - data Condition to be satisfied by returning dataattributeNames - names of the attributes that will be made part of the result.sortOrder - Sorting criteria.subtype - name of the sub typepublic String getAssetType()
getAssetType in interface Querypublic String getSubtype()
getSubtype in interface Querypublic Condition getCondition()
getCondition in interface Querypublic void setCondition(Condition cond)
cond - the Condition that the Query containspublic List<String> getAttributeNames()
getAttributeNames in interface Querypublic void setAttributes(List<String> attributeNames)
attributeNames - List of Attribute namespublic List<SortOrder> getSortOrder()
getSortOrder in interface Querypublic void setSortOrder(List<SortOrder> sort)
sort - List of SortOrderpublic QueryProperties getProperties()
getProperties in interface Querypublic void setProperties(QueryProperties props)
props - properties