org.trails.persistence
Interface PersistenceService
public interface PersistenceService
getInstance
<T> T getInstance(java.lang.Class<T> type,
java.io.Serializable id)
loadInstance
<T> T loadInstance(java.lang.Class<T> type,
java.io.Serializable id)
getAllInstances
<T> java.util.List<T> getAllInstances(java.lang.Class<T> type)
getInstances
<T> java.util.List<T> getInstances(java.lang.Class<T> type,
int startIndex,
int maxResults)
getAllTypes
java.util.List getAllTypes()
- Returns:
- a List containing all the classes this persistence
service knows about
save
<T> T save(T instance)
remove
void remove(java.lang.Object instance)
removeAll
void removeAll(java.util.Collection collection)
getInstance
<T> T getInstance(java.lang.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
getIdentifier
java.io.Serializable getIdentifier(java.lang.Object data,
IClassDescriptor classDescriptor)
isTransient
boolean isTransient(java.lang.Object data,
IClassDescriptor classDescriptor)
Copyright © 2004-2007. All Rights Reserved.