|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AssetDataManager
This interface is the primary access point for getting to Asset's data.
An asset data can be looked up either by itsAssetId
using AssetDataManager.read(List)
or by using a Query
in AssetDataManager.read(Query)
.
A Query is an abstract construct that defines user's request for asset's data. Query can be considered as an object
representation of SQL.
Using Query one would be able to specify Condition
(a set of matching criterion) to limit the assets returned as well as the sorting order in which the results are to be read.
A Query also limits the number of attributes to be retrieved. Limiting the Query to contain only a few attributes limits the
amount of data that read into memory.
Query also contains an accessory set of properties, QueryProperties
.
QueryProperties can be used, among other things, to specify the type of query algorithm to use.
For more details about Query, its construct and limitations please see Query
Note: Only read methods are implemented in CS version 7.0. Methods for which implementation does not exist
throw UnsupportedOperationException.
Method Summary | |
---|---|
void |
delete(java.util.List<AssetId> data)
Deletes a given Iterator of AssetIds from database. |
void |
insert(java.util.List<AssetData> data)
Inserts a given List of AssetData instances in the database and new assets will be created with the data from the list After the operation complete, the passed in AssetData in the list will be populated with the newly created Asset id |
AssetData |
newAssetData(java.lang.String assetTypeName,
AssetData example)
Creates an instance of AssetData (with copied instances of AttributeData from the example AssetData) |
MutableAssetData |
newAssetData(java.lang.String assetTypeName,
java.lang.String subtype)
Create an empty instance of AssetData with empty instance of AttributeData |
AttributeData |
newAttribiteData(java.lang.String attributeName,
java.lang.String assetTypeName,
java.lang.String subtype)
Deprecated. Please use AssetDataManager.newAttributeData(String,String, String) |
AttributeData |
newAttributeData(AttributeDef attributeDef)
Create an attributeData with an attribute definition specified |
AttributeData |
newAttributeData(java.lang.String attributeName,
java.lang.String assetTypeName,
java.lang.String subtype)
Creates an empty instance of AttributeData (of appropriate type and default) |
java.lang.Iterable<AssetData> |
read(java.util.List<AssetId> ids)
Reads asset data for all given AssetId s. |
java.lang.Iterable<AssetData> |
read(Query query)
Reads all asset data that satisfies a given Query |
AssetData |
readAttributes(AssetId id,
java.util.List<java.lang.String> attributeNames)
Reads given set attribute data and returns an AssetData instance containing them. |
java.lang.Iterable<MutableAssetData> |
readForUpdate(java.util.List<AssetId> ids)
NOTE: This method is not implemented yet. |
java.lang.Iterable<MutableAssetData> |
readForUpdate(Query query)
Reads all asset data that satisfies a given Query and results in mutable results. |
void |
update(java.util.List<AssetData> data)
Updates a given list of AssetData in the database. |
Method Detail |
---|
java.lang.Iterable<AssetData> read(Query query) throws AssetAccessException
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.java.lang.Iterable<MutableAssetData> readForUpdate(Query query) throws AssetAccessException
query
- Query to be satisfied.
AssetAccessException
- is the layer specific failures and wraps other internal exceptions.java.lang.Iterable<AssetData> read(java.util.List<AssetId> ids) throws AssetAccessException, AssetNotExistException
AssetId
s.
ids
- List of AssetIds
AssetAccessException
- is thrown when any of the AssetIds passed in does not exist.
AssetAccessException also wraps any AssetExcptions thrown by the internal implementation.
AssetNotExistException
java.lang.Iterable<MutableAssetData> readForUpdate(java.util.List<AssetId> ids) throws AssetAccessException, AssetNotExistException
ids
- List of AssetIds
AssetAccessException
- captures layer specific failures and wraps other internal exceptions.
AssetNotExistException
AssetData readAttributes(AssetId id, java.util.List<java.lang.String> attributeNames) throws AssetAccessException, AssetNotExistException
id
- AssetId to read attributes forattributeNames
- names of the attributes
AssetAccessException
- if thrown if the AssetId does not exist or attribute names passed are incorrect
for the asset. AssetAccessException also wraps any AssetExcptions thrown by the internal implementation.
AssetNotExistException
void insert(java.util.List<AssetData> data) throws AssetAccessException
data
- AssetData to be inserted.
AssetAccessException
- captures layer specific failures and wraps other internal exceptions.void update(java.util.List<AssetData> data) throws AssetAccessException
data
- AssetData to be updated.
AssetAccessException
- captures layer specific failures and wraps other internal exceptions.void delete(java.util.List<AssetId> data) throws AssetAccessException
data
- AssetIds to be deleted.
AssetAccessException
- captures layer specific failures and wraps other internal exceptions.AttributeData newAttribiteData(java.lang.String attributeName, java.lang.String assetTypeName, java.lang.String subtype)
AssetDataManager.newAttributeData(String,String, String)
attributeName
- name of the attributeassetTypeName
- name of asset typesubtype
- subtype of asset type.
AttributeData newAttributeData(java.lang.String attributeName, java.lang.String assetTypeName, java.lang.String subtype)
attributeName
- name of the attributeassetTypeName
- name of asset typesubtype
- subtype of asset type.
AttributeData newAttributeData(AttributeDef attributeDef)
attributeDef
- the definition of the attribute
AssetData newAssetData(java.lang.String assetTypeName, AssetData example)
assetTypeName
- name of the asset typeexample
- optional example AsetData the returned will be based on.
MutableAssetData newAssetData(java.lang.String assetTypeName, java.lang.String subtype) throws AssetAccessException
assetTypeName
- the name of the assettypesubtype
- the name of the aset subtype
AssetAccessException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |