|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dasein.persist.PersistentCache<T>
org.dasein.persist.RelationalCache<T>
public final class RelationalCache<T extends org.dasein.util.CachedItem>
| Nested Class Summary | |
|---|---|
static class |
RelationalCache.OrderedColumn
|
| Nested classes/interfaces inherited from class org.dasein.persist.PersistentCache |
|---|
PersistentCache.EntityJoin |
| Field Summary | |
|---|---|
static org.apache.log4j.Logger |
logger
|
| Constructor Summary | |
|---|---|
RelationalCache()
|
|
| Method Summary | |
|---|---|
long |
count()
Counts the total number of objects governed by this factory in the database. |
long |
count(SearchTerm... terms)
|
T |
create(Transaction xaction,
Map<String,Object> state)
Creates the specified object with the data provided in the specified state under the governance of the specified transaction. |
Collection<T> |
find(SearchTerm[] terms,
org.dasein.util.JiteratorFilter<T> filter,
Boolean orderDesc,
String... orderFields)
|
T |
get(Object primaryKeyValue)
Retrieves the object uniquely identified by the value for the specified ID field. |
protected void |
init(Class<T> cls,
Key... keys)
Constructs a new persistent factory for objects of the specified class with the named unique identifier attributes. |
Collection<T> |
list()
Loads all elements of this class from the data store. |
void |
remove(Transaction xaction,
T item)
Removes the specified item from the system permanently. |
String |
toString()
|
void |
update(Transaction xaction,
T item,
Map<String,Object> state)
Updates the specified object with the data provided in the specified state under the governance of the specified transaction. |
| Methods inherited from class org.dasein.persist.PersistentCache |
|---|
addJoinEntity, find, getCache, getCache, getJoin, getJoins, getKeyValue, getKeyValue, getKeyValue, getKeyValues, getNewKeyValue, getPrimaryKey, getPrimaryKeyField, getSecondaryKeys, getTarget, initBase, list, matchKeys |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.log4j.Logger logger
| Constructor Detail |
|---|
public RelationalCache()
| Method Detail |
|---|
protected void init(Class<T> cls,
Key... keys)
init in class PersistentCache<T extends org.dasein.util.CachedItem>cls - the class of objects managed by this factorykeys - a list of unique identifiers for instances of the specified class
public long count()
throws PersistenceException
count in class PersistentCache<T extends org.dasein.util.CachedItem>PersistenceException - an error occurred counting the elements in the database
public long count(SearchTerm... terms)
throws PersistenceException
count in class PersistentCache<T extends org.dasein.util.CachedItem>PersistenceException
public T create(Transaction xaction,
Map<String,Object> state)
throws PersistenceException
create in class PersistentCache<T extends org.dasein.util.CachedItem>xaction - the transaction governing this eventstate - the new state for the new object
PersistenceException - an error occurred talking to the data store, or
creates are not supported
public Collection<T> find(SearchTerm[] terms,
org.dasein.util.JiteratorFilter<T> filter,
Boolean orderDesc,
String... orderFields)
throws PersistenceException
find in class PersistentCache<T extends org.dasein.util.CachedItem>PersistenceException
public T get(Object primaryKeyValue)
throws PersistenceException
get in class PersistentCache<T extends org.dasein.util.CachedItem>primaryKeyValue - the ID field identifying the object
PersistenceException - an error occurred talking to the data store
public Collection<T> list()
throws PersistenceException
list in class PersistentCache<T extends org.dasein.util.CachedItem>PersistenceException - an error occurred executing the query
public void remove(Transaction xaction,
T item)
throws PersistenceException
remove in class PersistentCache<T extends org.dasein.util.CachedItem>xaction - the transaction under which this event is occurringitem - the item to be removed
PersistenceException - an error occurred talking to the data store or
removal of these objects is prohibitedpublic String toString()
toString in class Object
public void update(Transaction xaction,
T item,
Map<String,Object> state)
throws PersistenceException
update in class PersistentCache<T extends org.dasein.util.CachedItem>xaction - the transaction governing this eventitem - the item to be updatedstate - the new state for the updated object
PersistenceException - an error occurred talking to the data store, or
updates are not supported
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||