org.caleigo.core
Interface IDataService

All Superinterfaces:
IDistributable, ISecureService, IService, java.io.Serializable
All Known Implementing Classes:
AbstractDataService

public interface IDataService
extends ISecureService

IDataSerice is an IService that defines an abstract interface for generic database or other structured information access. The interface uses the CEL package and its defined structures to define, map and contain the information that are distributed using the interface.

Note the central importance of the IDataTransaction interface that defines data transaction abilities for the IDataService interface. If it is not possible for the underlaying data structure to provide trasaction management then the newTransaction() method should return null.

Version:
1.00
Author:
Dennis Zikovic

Method Summary
 void delete(IEntity entity)
          Deletes a single entity object to the database.
 IDataSourceDescriptor getDataSourceDescriptor()
          This method provides access to the IDataSourceDescriptor that describes the entity meta structure of the information source that a specific data service provides access to.
 IEntity load(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(DataQuery dataQuery)
          Loads a selection of entities identyfied by the provided reusable dataQuery object.
 ISelection loadSelection(IEntityDescriptor entityDescriptor, Qualifier qualifier)
          Loads a selection of entities identyfied by the provided qualifier.
 IDataTransaction newTransaction()
          Returns a new IDataTransaction object that can be used to batch data operations and wrap them in a transaction.
 void refresh(IEntity entity)
          Reloads a single entity object from the database.
 void store(IEntity entity)
          Stores a single entity object to the database.
 
Methods inherited from interface org.caleigo.service.IService
finalizeService, getCustomProxyService, getServiceIdentity, getServiceInterface, getServiceInterfaceClass, getServiceType, hasCustomProxyService, initializeService, ping
 

Method Detail

getDataSourceDescriptor

public IDataSourceDescriptor getDataSourceDescriptor()
This method provides access to the IDataSourceDescriptor that describes the entity meta structure of the information source that a specific data service provides access to.


load

public IEntity load(IEntityDescriptor entityDescriptor,
                    Qualifier identityQualifier)
             throws DataServiceException
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.

Throws:
DataServiceException

loadSelection

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

Throws:
DataServiceException

loadSelection

public ISelection loadSelection(DataQuery dataQuery)
                         throws DataServiceException
Loads a selection of entities identyfied by the provided reusable dataQuery object.

Throws:
DataServiceException

store

public void store(IEntity entity)
           throws DataServiceException
Stores a single entity object to the database.

Throws:
DataServiceException

delete

public void delete(IEntity entity)
            throws DataServiceException
Deletes a single entity object to the database. Note that the emtity object can still be used and even stored again posssibly to another data source.

Throws:
DataServiceException

refresh

public void refresh(IEntity entity)
             throws DataServiceException
Reloads a single entity object from the database.

Throws:
DataServiceException

newTransaction

public IDataTransaction newTransaction()
Returns a new IDataTransaction object that can be used to batch data operations and wrap them in a transaction.



Copyright © 2005 Caleigo. All Rights Reserved.