|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.cnes.sitools.persistence.XmlPersistenceDaoImpl<E>
E - Element must extend Persistentpublic abstract class XmlPersistenceDaoImpl<E extends Persistent>
Generic implementation of PersistenceDao.
| Constructor Summary | |
|---|---|
XmlPersistenceDaoImpl(java.io.File storageRoot,
org.restlet.Context context)
Constructor for file based persistence |
|
| Method Summary | |
|---|---|
void |
delete(E o)
Delete an element |
E |
get(java.lang.String id)
Get an element by ID |
java.util.Collection<E> |
getList()
Get the list of elements |
java.util.Collection<E> |
getList(ResourceCollectionFilter filter)
Get the list of elements |
java.util.Collection<E> |
getPage(ResourceCollectionFilter filter,
java.util.Collection<E> result)
Get the list of elements |
com.thoughtworks.xstream.XStream |
getXstream()
Gets the xstream value |
void |
save(E o)
Save an element |
void |
saveAll(java.util.Collection<E> os)
Save a collection of elements |
void |
setXstream(com.thoughtworks.xstream.XStream xstream)
Sets the value of xstream |
void |
update(E o)
Update an element |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlPersistenceDaoImpl(java.io.File storageRoot,
org.restlet.Context context)
storageRoot - - the base dir where all the xml files will be savedcontext - TODO| Method Detail |
|---|
public final com.thoughtworks.xstream.XStream getXstream()
public final void setXstream(com.thoughtworks.xstream.XStream xstream)
xstream - the xstream to setpublic final E get(java.lang.String id)
PersistenceDao
get in interface PersistenceDao<E extends Persistent>id - the ID
public final void save(E o)
PersistenceDao
save in interface PersistenceDao<E extends Persistent>o - the element to savepublic final void update(E o)
PersistenceDao
update in interface PersistenceDao<E extends Persistent>o - the element to savepublic final void saveAll(java.util.Collection<E> os)
PersistenceDao
saveAll in interface PersistenceDao<E extends Persistent>os - the collection to savepublic final java.util.Collection<E> getList()
PersistenceDao
getList in interface PersistenceDao<E extends Persistent>public java.util.Collection<E> getList(ResourceCollectionFilter filter)
PersistenceDao
getList in interface PersistenceDao<E extends Persistent>filter - query filter
public final java.util.Collection<E> getPage(ResourceCollectionFilter filter,
java.util.Collection<E> result)
PersistenceDao
getPage in interface PersistenceDao<E extends Persistent>filter - query filterresult - the full result list
public final void delete(E o)
PersistenceDao
delete in interface PersistenceDao<E extends Persistent>o - the element to delete
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||