fr.cnes.sitools.order
Class OrderStoreXML

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

public final class OrderStoreXML
extends SitoolsStoreXML<Order>

Implementation of OrderStore with XStream FilePersistenceStrategy

Author:
AKKA

Constructor Summary
OrderStoreXML(org.restlet.Context context)
          Default constructor
OrderStoreXML(java.io.File location, org.restlet.Context context)
          Constructor with the XML file location
 
Method Summary
 Order create(Order order)
          Method for creating a object
 java.lang.String getCollectionName()
          Method to implement for collection name
 java.util.List<Order> getList(ResourceCollectionFilter filter)
          Method for getting objects with specific criteria
 void init(java.io.File location)
          XStream FilePersistenceStrategy initialization
 java.util.List<Order> retrieveByParent(java.lang.String id)
          Get the list of object by parent ID
 void sort(java.util.List<Order> result, ResourceCollectionFilter filter)
          Sort the list (by default on the name)
 Order update(Order order)
          Method for updating a object
 
Methods inherited from class fr.cnes.sitools.common.store.SitoolsStoreXML
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

OrderStoreXML

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

Parameters:
location - directory of FilePersistenceStrategy
context - the context

OrderStoreXML

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

Parameters:
context - the context
Method Detail

create

public Order create(Order order)
Description copied from interface: SitoolsStore
Method for creating a object

Specified by:
create in interface SitoolsStore<Order>
Overrides:
create in class SitoolsStoreXML<Order>
Parameters:
order - input
Returns:
created object

update

public Order update(Order order)
Description copied from interface: SitoolsStore
Method for updating a object

Parameters:
order - input
Returns:
updated object

getList

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

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

sort

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

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

init

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

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

retrieveByParent

public java.util.List<Order> 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<Order>
Returns:
the collection name


Copyright © 2010-2013 CNES. All Rights Reserved.