org.tynamo.services
Interface PersistenceService
public interface PersistenceService
getInstance
<T> T getInstance(Class<T> type,
Serializable id)
loadInstance
<T> T loadInstance(Class<T> type,
Serializable id)
getInstances
<T> List<T> getInstances(Class<T> type)
getInstances
<T> List<T> getInstances(Class<T> type,
int startIndex,
int maxResults)
save
<T> T save(T instance)
- Returns:
- a List containing all the classes this persistence
service knows about
remove
void remove(Object instance)
removeAll
void removeAll(Collection collection)
getInstance
<T> T getInstance(Class<T> type)
- A convenience method for getting a singleton instance of specific type
- Type Parameters:
T - Specific type of the entity- Parameters:
type - Type of singleton entity you want return
- Returns:
- Returns the singleton entity of requested type
isTransient
boolean isTransient(Object data,
TynamoClassDescriptor classDescriptor)
saveCollectionElement
<T> T saveCollectionElement(String addExpression,
T member,
Object parent)
removeCollectionElement
void removeCollectionElement(String removeExpression,
Object member,
Object parent)
Copyright © 2004-2009. All Rights Reserved.