public interface IRRElement
| Modifier and Type | Method and Description |
|---|---|
void |
delete(boolean loadDetails) |
void |
delete(boolean loadDetails,
RRContext.DatastoreType persistencyType) |
void |
delete(boolean deleteDetails,
RRContext.WritePolicy policy) |
boolean |
exists()
Checks if an
RRElement exists using the default RRContext.ReadPolicy. |
boolean |
exists(RRContext.DatastoreType persistencyType) |
boolean |
exists(RRContext.ReadPolicy readPolicy) |
String |
getID()
Returns the id of the item.
|
RRContext |
getISContext()
Returns the context associated with
ResourceRegistry |
IDaoElement |
getItem()
Returns the underlying DAO
|
boolean |
isEqual(IRRElement f,
boolean includeDetails) |
boolean |
load(boolean loadDetails)
Loads an
IRRElement using the default RRContext.ReadPolicy. |
boolean |
load(boolean loadDetails,
RRContext.DatastoreType persistencyType)
Loads an
IRRElement from a specific RRContext.DatastoreType |
boolean |
load(boolean loadDetails,
RRContext.ReadPolicy policy)
Loads an
IRRElement using a specific RRContext.ReadPolicy |
void |
setDirty()
Marks the item dirty.
|
void |
setID(String id)
Sets the item id.
|
void |
store(boolean storeDetails)
Stores an
IRRElement using the default RRContext.WritePolicy. |
void |
store(boolean storeDetails,
RRContext.DatastoreType persistencyType) |
void |
store(boolean storeDetails,
RRContext.WritePolicy policy) |
String getID()
void setID(String id)
id - The id to be setvoid setDirty()
boolean exists()
throws ResourceRegistryException
RRElement exists using the default RRContext.ReadPolicy.
The read policy used is selected as follows:ResourceRegistryExceptionboolean exists(RRContext.ReadPolicy readPolicy) throws ResourceRegistryException
readPolicy - ResourceRegistryExceptionboolean exists(RRContext.DatastoreType persistencyType) throws ResourceRegistryException
persistencyType - ResourceRegistryExceptionboolean load(boolean loadDetails)
throws ResourceRegistryException
IRRElement using the default RRContext.ReadPolicy.
The read policy used is selected as follows:
1.The item is retrieved from the local datastore if RRContext.ReadPolicy.REFRESH_AHEAD is available.
2.If RRContext.ReadPolicy.READ_THROUGH is available, an attempt to load the item from the local datastore is made first
by using RRContext.ReadPolicy.READ_LOCAL.
If the latter fails, the item is retrieved from the remote datastore using RRContext.ReadPolicy.READ_THROUGHloadDetails - true if the entire object graph should be loaded, false otherwiseResourceRegistryException - An error has occurredboolean load(boolean loadDetails,
RRContext.ReadPolicy policy)
throws ResourceRegistryException
IRRElement using a specific RRContext.ReadPolicyloadDetails - true if the entire object graph should be loaded, false otherwisepolicy - the RRContext.ReadPolicy to be usedResourceRegistryException - An error has occurredboolean load(boolean loadDetails,
RRContext.DatastoreType persistencyType)
throws ResourceRegistryException
IRRElement from a specific RRContext.DatastoreTypeloadDetails - true if the entire object graph should be loaded, false otherwisepersistencyType - the RRContext.DatastoreType to be usedResourceRegistryException - An error has occurredvoid store(boolean storeDetails)
throws ResourceRegistryException
IRRElement using the default RRContext.WritePolicy.
The write policy used is selected as follows:
1.If RRContext.WritePolicy.WRITE_BEHIND is available, the object is stored to the local datastore.
2.If RRContext.WritePolicy.WRITE_THROUGH is available, the object is stored directly to the remote datastore, through the
local datastore.
Note that this method does not provide the option to use the local datastore explicitly as a cache instead of the remote one.
If such kind of optimization ismstoreDetails - true if the entire object graph should be stored, false otherwiseResourceRegistryException - if no RRContext.WritePolicy could be foundvoid store(boolean storeDetails,
RRContext.WritePolicy policy)
throws ResourceRegistryException
storeDetails - policy - ResourceRegistryExceptionvoid store(boolean storeDetails,
RRContext.DatastoreType persistencyType)
throws ResourceRegistryException
storeDetails - persistencyType - ResourceRegistryExceptionvoid delete(boolean loadDetails)
throws ResourceRegistryException
loadDetails - ResourceRegistryExceptionvoid delete(boolean deleteDetails,
RRContext.WritePolicy policy)
throws ResourceRegistryException
deleteDetails - policy - ResourceRegistryExceptionvoid delete(boolean loadDetails,
RRContext.DatastoreType persistencyType)
throws ResourceRegistryException
loadDetails - persistencyType - ResourceRegistryExceptionboolean isEqual(IRRElement f, boolean includeDetails) throws ResourceRegistryException
f - includeDetails - ResourceRegistryExceptionIDaoElement getItem()
IDaoElementRRContext getISContext()
ResourceRegistryCopyright © 2014. All Rights Reserved.