org.caleigo.core.service
Class BinaryFileDataService

java.lang.Object
  extended byorg.caleigo.core.AbstractDataService
      extended byorg.caleigo.core.service.MemoryDataService
          extended byorg.caleigo.core.service.BinaryFileDataService
All Implemented Interfaces:
IDataService, IDistributable, ISecureService, IService, java.io.Serializable

public class BinaryFileDataService
extends MemoryDataService

BinaryFileDataService provides a simple extension of the MemoryDataService that stores the data entities in binary files in database file-catalog. Note that the binary format used is the standard java serialization format that may vary between differnt versions of the JDK and CEL library. The class should therfore only be used for tests, demonstrations or other temporary data storage solutions.

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

Nested Class Summary
 
Nested classes inherited from class org.caleigo.core.service.MemoryDataService
MemoryDataService.DataTransaction, MemoryDataService.DefaultSelectionHolder, MemoryDataService.ISelectionHolder
 
Nested classes inherited from class org.caleigo.core.AbstractDataService
AbstractDataService.AbstractDataTransaction
 
Field Summary
 
Fields inherited from class org.caleigo.core.service.MemoryDataService
mTableSelectionMap
 
Fields inherited from class org.caleigo.core.AbstractDataService
DEFAULT_TIMEOUT
 
Constructor Summary
BinaryFileDataService(IDataSourceDescriptor dataSourceDescriptor, java.lang.Object serviceIdentity, java.lang.String dbDirectoryPath)
           
BinaryFileDataService(IDataSourceDescriptor dataSourceDescriptor, java.lang.String dbDirectoryPath)
           
 
Method Summary
 java.io.File getDirectoryFile()
           
protected  ISelection loadTableSelection(IEntityDescriptor entityDescriptor)
          This method can be overriden to provide a simple persistent storage for the MemoryDataService.
 boolean ping()
          Should return true if the service is online and reponding to calls.
protected  void storeTableSelection(ISelection dbSelection)
          This method can be overriden to provide a simple persistent storage for the MemoryDataService.
 
Methods inherited from class org.caleigo.core.service.MemoryDataService
backupTo, backupTo, copyDataSource, createSelectionHolder, executeDelete, executeInsert, executeLoad, executeQuery, executeUpdate, finalize, getTableSelection, isAutGenerateEnabled, isSyncronized, markTableAsChanged, newTransaction, restoreFrom, restoreFrom, restoreFromURL, restoreFromURL, setAutGenerateEnabled, setSyncronized, syncronize
 
Methods inherited from class org.caleigo.core.AbstractDataService
checkEntityAsDeletable, checkEntityAsStorable, delete, finalizeService, getCustomProxyService, getDataSourceDescriptor, getServiceIdentity, getServiceInterface, getServiceInterfaceClass, getServiceType, getTimeout, hasCustomProxyService, initializeService, isValidating, load, loadSelection, loadSelection, refresh, setEntityData, setTimeout, setValidating, store
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryFileDataService

public BinaryFileDataService(IDataSourceDescriptor dataSourceDescriptor,
                             java.lang.String dbDirectoryPath)

BinaryFileDataService

public BinaryFileDataService(IDataSourceDescriptor dataSourceDescriptor,
                             java.lang.Object serviceIdentity,
                             java.lang.String dbDirectoryPath)
Method Detail

ping

public boolean ping()
Description copied from class: AbstractDataService
Should return true if the service is online and reponding to calls. Note that initializeService() must be called prior to this method.

Specified by:
ping in interface IService
Overrides:
ping in class MemoryDataService

loadTableSelection

protected ISelection loadTableSelection(IEntityDescriptor entityDescriptor)
Description copied from class: MemoryDataService
This method can be overriden to provide a simple persistent storage for the MemoryDataService. The method is called prior to any access of addressed table.

Overrides:
loadTableSelection in class MemoryDataService

storeTableSelection

protected void storeTableSelection(ISelection dbSelection)
Description copied from class: MemoryDataService
This method can be overriden to provide a simple persistent storage for the MemoryDataService. The method is called to store changes when neaded.

Overrides:
storeTableSelection in class MemoryDataService

getDirectoryFile

public java.io.File getDirectoryFile()


Copyright © 2005 Caleigo. All Rights Reserved.