org.caleigo.core
Class SingleServiceDataSource

java.lang.Object
  extended byorg.caleigo.core.SingleServiceDataSource
All Implemented Interfaces:
IDataSource, java.io.Serializable

public class SingleServiceDataSource
extends java.lang.Object
implements IDataSource

Basic implementation of IDataSource that wraps a IDataService.

Version:
1.00
Author:
Dennis Zikovic
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.caleigo.core.IDataSource
IDataSource.IDataSourceCreator
 
Field Summary
 
Fields inherited from interface org.caleigo.core.IDataSource
DataSourceCreator
 
Constructor Summary
SingleServiceDataSource(IDataService dataService)
          Creates new AbstractDataSource
 
Method Summary
 IEntity createEntity(IEntityDescriptor entityDescriptor)
          Creates a new entity and lets the data source be the manafer of that entity.
 IEntity createEntity(IEntityDescriptor entityDescriptor, IDataProvider propertySource)
          Creates a new entity and lets the data source be the manafer 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleServiceDataSource

public SingleServiceDataSource(IDataService dataService)
Creates new AbstractDataSource

Method Detail

getDataSourceDescriptor

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

Specified by:
getDataSourceDescriptor in interface IDataSource

getDataService

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

Specified by:
getDataService in interface IDataSource

createEntity

public IEntity createEntity(IEntityDescriptor entityDescriptor)
Creates a new entity and lets the data source be the manafer 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.

Specified by:
createEntity in interface IDataSource

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.

Specified by:
loadEntity in interface IDataSource

loadSelection

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

Specified by:
loadSelection in interface IDataSource

createEntity

public IEntity createEntity(IEntityDescriptor entityDescriptor,
                            IDataProvider propertySource)
Creates a new entity and lets the data source be the manafer 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.

Specified by:
createEntity in interface IDataSource

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.

Specified by:
manageEntity in interface IDataSource


Copyright © 2005 Caleigo. All Rights Reserved.