com.siebel.rf.offline.branch.datastore
Interface Persister

All Known Implementing Classes:
RDBMSPersister

public interface Persister

The Persister interface


Method Summary
 void amend(Persisted obj)
          Gets the parameter value from the given Persisted obj then amends the persisted objects
 Persisted create(Persisted obj)
          Gets the parameter value from the given Persisted obj then creates it and returns the persisted objects
 Persisted createAmend(Persisted obj)
          Gets the pk attributes from the given Persisted obj then finds the object by primary key , if there is finder exception then creates the object otherwise amend the object and return the persisted object
 java.util.Collection findBy(java.util.Map params, java.lang.Class persistedClass)
          Returns the Collection of persisted objects
 java.util.Collection findBy(java.util.Map params, java.lang.Class persistedClass, java.lang.String[][] orderBy)
          Returns the Collection of persisted objects
 java.lang.Object findByPrimaryKey(java.util.Map params, java.lang.Class persistedClass)
          Returns the persisted objects
 java.util.Collection findDistinct(java.util.Collection params, java.lang.Class persistedClass)
          Returns the Collection of distinct persisted objects
 void purgeProcessedData(java.util.Map params, java.lang.Class persistedClass)
          Purges the processed data
 void remove(Persisted obj)
          Gets the parameter value from the given Persisted obj then removes the persisted object
 void removeAll(Persisted obj)
          Removes all from persisted object from the given Persisted obj
 

Method Detail

findBy

public java.util.Collection findBy(java.util.Map params,
                                   java.lang.Class persistedClass)
Returns the Collection of persisted objects
Parameters:
params - Map
persistedClass - Class
Returns:
the Collection of persisted objects which matches the query

findBy

public java.util.Collection findBy(java.util.Map params,
                                   java.lang.Class persistedClass,
                                   java.lang.String[][] orderBy)
Returns the Collection of persisted objects
Parameters:
params - Map
persistedClass - Class
orderBy - String[][]
Returns:
the Collection of persisted objects in ordered form which matches the query

findDistinct

public java.util.Collection findDistinct(java.util.Collection params,
                                         java.lang.Class persistedClass)
Returns the Collection of distinct persisted objects
Parameters:
params - Map
Class - persistedClass
Returns:
the Collection of distinct persisted objects which matches the query

findByPrimaryKey

public java.lang.Object findByPrimaryKey(java.util.Map params,
                                         java.lang.Class persistedClass)
                                  throws FinderException
Returns the persisted objects
Parameters:
params - Map
persistedClass - Class
Returns:
the persisted objects which matches the query based on primary key attributes
Throws:
FinderException - This exception is thrown if persisted object not found

create

public Persisted create(Persisted obj)
Gets the parameter value from the given Persisted obj then creates it and returns the persisted objects
Parameters:
obj - Persisted
Returns:
the persisted objects after creating it

amend

public void amend(Persisted obj)
Gets the parameter value from the given Persisted obj then amends the persisted objects
Parameters:
obj - Persisted

remove

public void remove(Persisted obj)
Gets the parameter value from the given Persisted obj then removes the persisted object
Parameters:
obj - Persisted

createAmend

public Persisted createAmend(Persisted obj)
Gets the pk attributes from the given Persisted obj then finds the object by primary key , if there is finder exception then creates the object otherwise amend the object and return the persisted object
Parameters:
obj - Persisted
Returns:
the persisted object after finding by primary key and amneding it

removeAll

public void removeAll(Persisted obj)
Removes all from persisted object from the given Persisted obj
Parameters:
obj - Persisted

purgeProcessedData

public void purgeProcessedData(java.util.Map params,
                               java.lang.Class persistedClass)
Purges the processed data
Parameters:
params - Map
Class - persistedClass