org.persvr.datasource
Interface DataSource

All Known Subinterfaces:
DataSourceCanHaveOrphans, ListDataSource, ManagesOwnSchema, ReferenceAwareDataSource, WritableDataSource
All Known Implementing Classes:
AbstractJsonSource, BaseDataSource, ClientData, DatabaseDataSource, DatabaseTableDataSource, DynaArrayDBSource, DynaFileDBSource, DynaFunctionDBSource, DynaObjectDBSource, DynaObjectDBSource, HttpJsonSource, HttpPageSource, LocalJsonFileSource, RootDataSource, RssSource, WritableXmlSource, XmlFileSource, XmlSource

public interface DataSource

This is an interface to map persistent data sources to objects

Author:
Kris Zyp

Method Summary
 java.lang.Object getFieldValue(LazyPropertyId valueId)
          This is called when a field value contains an unfulfilled value (ValueId)
 java.lang.String getId()
          Gets a string identification of the data source
 boolean hiddenId(java.lang.String id)
           
 void initParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
          This is called on initialization and provides access to the data source configuration parameters
 void mapObject(PersistableInitializer initializer, java.lang.String objectId)
          This is called when an object is being activated to retrieve the persisted data for a given object
 java.util.Iterator mapQuery(Query query)
          This is called when an object is being activated to retrieve the persisted data for a given object with a filter
 void setId(java.lang.String id)
          Sets a string identification of the data source
 

Method Detail

getId

java.lang.String getId()
Gets a string identification of the data source

Returns:

setId

void setId(java.lang.String id)
Sets a string identification of the data source

Parameters:
id -

initParameters

void initParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
                    throws java.lang.Exception
This is called on initialization and provides access to the data source configuration parameters

Parameters:
parameters -
Throws:
java.lang.Exception

mapObject

void mapObject(PersistableInitializer initializer,
               java.lang.String objectId)
               throws java.lang.Exception
This is called when an object is being activated to retrieve the persisted data for a given object

Parameters:
initializer -
objectId -
Throws:
java.lang.Exception

getFieldValue

java.lang.Object getFieldValue(LazyPropertyId valueId)
                               throws java.lang.Exception
This is called when a field value contains an unfulfilled value (ValueId)

Parameters:
valueId -
Returns:
the real value referred to by valueId
Throws:
java.lang.Exception

mapQuery

java.util.Iterator mapQuery(Query query)
                            throws java.lang.Exception
This is called when an object is being activated to retrieve the persisted data for a given object with a filter

Returns:
Throws:
java.lang.Exception

hiddenId

boolean hiddenId(java.lang.String id)