fr.cnes.sitools.inscription
Class InscriptionStoreXML

java.lang.Object
  extended by fr.cnes.sitools.persistence.Paginable<T>
      extended by fr.cnes.sitools.common.store.SitoolsStoreXML<Inscription>
          extended by fr.cnes.sitools.inscription.InscriptionStoreXML
All Implemented Interfaces:
SitoolsStore<Inscription>, java.io.Closeable

public final class InscriptionStoreXML
extends SitoolsStoreXML<Inscription>

Class for managing Inscription objects persistence

Author:
jp.boignard (AKKA Technologies)

Constructor Summary
InscriptionStoreXML(org.restlet.Context context)
          Default constructor
InscriptionStoreXML(java.io.File location, org.restlet.Context context)
          Constructor with the XML file location
 
Method Summary
 java.lang.String getCollectionName()
          Method to implement for collection name
 java.util.List<Inscription> getList(ResourceCollectionFilter filter)
          Method for getting objects with specific criteria
 void init(java.io.File location)
          XStream FilePersistenceStrategy initialization
 java.util.List<Inscription> retrieveByParent(java.lang.String id)
          Get the list of object by parent ID
 void sort(java.util.List<Inscription> result, ResourceCollectionFilter filter)
          Sort the list (by default on the name)
 Inscription update(Inscription inscription)
          Method for updating a object
 
Methods inherited from class fr.cnes.sitools.common.store.SitoolsStoreXML
create, delete, getArray, getArray, getArrayByXQuery, retrieve
 
Methods inherited from class fr.cnes.sitools.persistence.Paginable
close, getList, getListByXQuery, getLog, getPage, getPaginableClass, getRawList, init, setList
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fr.cnes.sitools.common.store.SitoolsStore
getList, getListByXQuery, getPage
 
Methods inherited from interface java.io.Closeable
close
 

Constructor Detail

InscriptionStoreXML

public InscriptionStoreXML(java.io.File location,
                           org.restlet.Context context)
Constructor with the XML file location

Parameters:
location - directory for file persistence
context - the Restlet Context

InscriptionStoreXML

public InscriptionStoreXML(org.restlet.Context context)
Default constructor

Parameters:
context - the Restlet Context
Method Detail

init

public void init(java.io.File location)
XStream FilePersistenceStrategy initialization

Specified by:
init in class Paginable<Inscription>
Parameters:
location - Directory

update

public Inscription update(Inscription inscription)
Description copied from interface: SitoolsStore
Method for updating a object

Parameters:
inscription - input
Returns:
updated object

sort

public void sort(java.util.List<Inscription> result,
                 ResourceCollectionFilter filter)
Sort the list (by default on the name)

Overrides:
sort in class SitoolsStoreXML<Inscription>
Parameters:
result - list to be sorted
filter - ResourceCollectionFilter with sort properties.

getList

public java.util.List<Inscription> getList(ResourceCollectionFilter filter)
Description copied from interface: SitoolsStore
Method for getting objects with specific criteria

Specified by:
getList in interface SitoolsStore<Inscription>
Overrides:
getList in class SitoolsStoreXML<Inscription>
Parameters:
filter - criteria (pagination, ...)
Returns:
ArrayList of objects

retrieveByParent

public java.util.List<Inscription> retrieveByParent(java.lang.String id)
Description copied from interface: SitoolsStore
Get the list of object by parent ID

Parameters:
id - the parent ID
Returns:
the list of resource objects

getCollectionName

public java.lang.String getCollectionName()
Description copied from class: SitoolsStoreXML
Method to implement for collection name

Specified by:
getCollectionName in class SitoolsStoreXML<Inscription>
Returns:
the collection name


Copyright © 2010-2013 CNES. All Rights Reserved.