org.caleigo.core
Interface IDataSource

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
SingleServiceDataSource

public interface IDataSource
extends java.io.Serializable

The IDataSource defines an interface that describes a source of data and provides the means to access that source. It can be viewed as a handle or reference to a specific individual persistent storage or database.

Version:
1.00
Author:
Dennis Zikovic

Nested Class Summary
static interface IDataSource.IDataSourceCreator
          Interface used for the DataSourceCreator constant.
 
Field Summary
static IDataSource.IDataSourceCreator DataSourceCreator
          Contains method that creates a new DataSource
 
Method Summary
 IEntity createEntity(IEntityDescriptor entityDescriptor)
          Creates a new entity and lets the data source be the manager of that entity.
 IEntity createEntity(IEntityDescriptor entityDescriptor, IDataProvider propertySource)
          Creates a new entity and lets the data source be the manager of that entity.
 IDataService getDataService()
          Returns the IDataService for this data source.
 IDataSourceDescriptor getDataSourceDescriptor()
          Returns the IDataSourceDescriptor for this data source.
 IEntity loadEntity(IEntityDescriptor entityDescriptor, Qualifier identityQualifier)
          The load method returnes a single entity object intentified by the provided indentity qualifier that must be able to uniquely identify a single entity instance.
 ISelection loadSelection(IEntityDescriptor entityDescriptor, Qualifier qualifier)
          Loads a selection of entities identyfied by the provided qualifier.
 IEntity manageEntity(IEntity entity)
          Instucts the data source object to take over the control of an entity.
 

Field Detail

DataSourceCreator

public static final IDataSource.IDataSourceCreator DataSourceCreator
Contains method that creates a new DataSource

Method Detail

createEntity

public IEntity createEntity(IEntityDescriptor entityDescriptor)
Creates a new entity and lets the data source be the manager of that entity. This method can be used to create an entity with a data source that is not the default data source for the entitys realated IDataSourceDescriptor.


createEntity

public IEntity createEntity(IEntityDescriptor entityDescriptor,
                            IDataProvider propertySource)
Creates a new entity and lets the data source be the manager of that entity. This method can be used to create an entity with a data source that is not the default data source for the entitys realated IDataSourceDescriptor. The entity is loaded with data from the provided property source.


loadEntity

public IEntity loadEntity(IEntityDescriptor entityDescriptor,
                          Qualifier identityQualifier)
The load method returnes a single entity object intentified by the provided indentity qualifier that must be able to uniquely identify a single entity instance.


loadSelection

public ISelection loadSelection(IEntityDescriptor entityDescriptor,
                                Qualifier qualifier)
Loads a selection of entities identyfied by the provided qualifier.


manageEntity

public IEntity manageEntity(IEntity entity)
Instucts the data source object to take over the control of an entity. The entity will henceforth belong to this data source and will have its PERSISTENT flag reset. This method is optional and may throw an UnsupportedOperationException.


getDataSourceDescriptor

public IDataSourceDescriptor getDataSourceDescriptor()
Returns the IDataSourceDescriptor for this data source.


getDataService

public IDataService getDataService()
Returns the IDataService for this data source.



Copyright © 2005 Caleigo. All Rights Reserved.