public class BasicAssetDataReadStrategy extends Object implements AssetDataReadStrategy
Modifier and Type | Field and Description |
---|---|
static List<String> |
basicStandAttributes |
Constructor and Description |
---|
BasicAssetDataReadStrategy(ICS ics) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
allStandardAttributes(List<String> attributeNames) |
protected String |
getAssetDefinitionType(ICS ics, com.openmarket.xcelerate.asset.AssetType type, String attributename) |
protected String |
performQuery(Query query, String assettype, String subtype, AssetTypeDef def, boolean isFlex, List<String> uniqIds) |
MutableAssetData |
read(com.openmarket.xcelerate.interfaces.IAsset asset, AssetId id)
|
Iterable<MutableAssetData> |
read(List<AssetId> ids)
Reads asset data for all given
AssetId s. |
Iterable<MutableAssetData> |
read(Query query)
Reads all asset data that satisfies a given Query
|
MutableAssetData |
readAttributes(AssetId id, List<String> attributeNames)
Reads given set attribute data and returns an AssetData instance containing them.
|
public BasicAssetDataReadStrategy(ICS ics)
public Iterable<MutableAssetData> read(Query query) throws AssetAccessException
AssetDataReadStrategy
read
in interface AssetDataReadStrategy
query
- Query to be satisfied.AssetAccessException
- is thrown when Query is invalid by the way of incorrect attributes or invalid operation given the choice of query algorithm. AssetAccessException also wraps any AssetExcptions thrown by the internal implementation.public MutableAssetData read(com.openmarket.xcelerate.interfaces.IAsset asset, AssetId id) throws AssetAccessException
AssetDataReadStrategy
read
in interface AssetDataReadStrategy
asset
- the asset where the asset will be read fromid
- AssetId to read forAssetAccessException
- is thrown when error met reading the data from the assetpublic Iterable<MutableAssetData> read(List<AssetId> ids) throws AssetAccessException, AssetNotExistException
AssetDataReadStrategy
AssetId
s.read
in interface AssetDataReadStrategy
ids
- List of AssetIdsAssetAccessException
- is thrown when any of the AssetIds passed in does not exist. AssetAccessException also wraps any AssetExcptions thrown by the internal implementation.AssetNotExistException
- an AssetNotExistExceptionpublic MutableAssetData readAttributes(AssetId id, List<String> attributeNames) throws AssetAccessException, AssetNotExistException
AssetDataReadStrategy
readAttributes
in interface AssetDataReadStrategy
id
- AssetId to read attributes forattributeNames
- names of the attributesAssetAccessException
- if thrown if the AssetId does not exist or attrbute names passed are incorrect for the asset. AssetAccessException also wraps any AssetExcptions thrown by the internal implementation.AssetNotExistException
- an AssetNotExistExceptionprotected String getAssetDefinitionType(ICS ics, com.openmarket.xcelerate.asset.AssetType type, String attributename) throws com.openmarket.basic.interfaces.AssetException
com.openmarket.basic.interfaces.AssetException
protected String performQuery(Query query, String assettype, String subtype, AssetTypeDef def, boolean isFlex, List<String> uniqIds) throws AssetAccessException
AssetAccessException