net.sourceforge.domian.repository
Class AbstractXStreamXmlFilePerEntityRepository<T extends Entity>

java.lang.Object
  extended by net.sourceforge.domian.repository.AbstractRepository<T>
      extended by net.sourceforge.domian.repository.AbstractDomianCoreRepository<T>
          extended by net.sourceforge.domian.repository.AbstractXStreamXmlFileRepository<T>
              extended by net.sourceforge.domian.repository.AbstractXStreamXmlFilePerEntityRepository<T>
All Implemented Interfaces:
HumanReadableFormatRepository<T>, PersistentRepository<T>, Repository<T>, TextualFormatRepository<T>
Direct Known Subclasses:
XStreamXmlFilePerEntityRepository

abstract class AbstractXStreamXmlFilePerEntityRepository<T extends Entity>
extends AbstractXStreamXmlFileRepository<T>

Common functionality for all Domian XStream-based repositories, where each individual entity is represented by its own XStream XML file.

Since:
0.4
Author:
Eirik Torske

Nested Class Summary
protected static class AbstractXStreamXmlFilePerEntityRepository.EntityId_NamedXStreamFilePersistenceStrategy
          Custom FilePersistenceStrategy class.
protected  class AbstractXStreamXmlFilePerEntityRepository.EntityIdNamedXStreamXmlSet<T extends Entity>
          Custom XmlSet class.
protected  class AbstractXStreamXmlFilePerEntityRepository.FindAllEntitiesSpecifiedBy<T>
           
protected  class AbstractXStreamXmlFilePerEntityRepository.IterateAllEntitiesSpecifiedBy<T>
           
protected  class AbstractXStreamXmlFilePerEntityRepository.Put<T extends Entity>
           
protected  class AbstractXStreamXmlFilePerEntityRepository.PutWithoutEntityExistsCheck<T extends Entity>
           
protected  class AbstractXStreamXmlFilePerEntityRepository.Remove<T extends Entity>
           
protected  class AbstractXStreamXmlFilePerEntityRepository.RemoveAllEntitiesSpecifiedBy<T extends Entity>
           
protected  class AbstractXStreamXmlFilePerEntityRepository.XStreamXmlFileEntityIterator<T>
          Custom iterator class for AbstractXStreamXmlFilePerEntityRepository.
 
Field Summary
 
Fields inherited from class net.sourceforge.domian.repository.AbstractXStreamXmlFileRepository
repositoryId, repositoryRootPath, XSTREAM_XML_FILE_SUFFIX
 
Fields inherited from class net.sourceforge.domian.repository.AbstractDomianCoreRepository
DEFAULT_DOMIAN_ROOT_DIR_NAME, DEFAULT_DOMIAN_ROOT_PATH, log, synchronizer
 
Fields inherited from class net.sourceforge.domian.repository.AbstractRepository
supportsRecursiveIndexing, usesNativePartitioningSupport
 
Constructor Summary
AbstractXStreamXmlFilePerEntityRepository()
           
 
Method Summary
protected  void createRepositoryFilesIfNotExist()
           
protected static java.lang.String getEntityIdBasedFilenameFrom(Entity entity)
          A naming scheme for file-per-entity Domian XStream persistence.
 
Methods inherited from class net.sourceforge.domian.repository.AbstractXStreamXmlFileRepository
call, callConcurrently, callConcurrentlyInNewThread, callConcurrentlyWithRetry, callExclusively, callExclusivelyInNewThread, callExclusivelyWithRetry, getEncoding, getMaxNumberOfRetries, getRepositoryDirectory, getRepositoryId, getRepositoryPath, getRepositoryPathString, getRepositoryRootPath, getRetryTimeoutInMilliseconds, run, runAsynchronously, runConcurrently, setMaxNumberOfRetries, setRetryTimeoutInMilliseconds
 
Methods inherited from class net.sourceforge.domian.repository.AbstractDomianCoreRepository
, createUniqueSpecificationFor, getSynchronizer, makePartition, onMakePartition, setSynchronizer
 
Methods inherited from class net.sourceforge.domian.repository.AbstractRepository
contains, count, countAll, countAllEntitiesSpecifiedBy, find, findAll, findSingle, findSingleEntitySpecifiedBy, isIndexingEntitiesRecursively, isPartitioningNatively, iterate, iterateAll, putAll, remove, removeAll, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.domian.repository.PersistentRepository
close, getFormat, getMetaDataFor, getPersistenceDefinition, load, persist
 
Methods inherited from interface net.sourceforge.domian.repository.Repository
count, countAll, countAllEntitiesSpecifiedBy, find, findAll, findAllEntitiesSpecifiedBy, findSingle, findSingleEntitySpecifiedBy, isIndexingEntitiesRecursively, isPartitioningNatively, iterate, iterateAll, iterateAllEntitiesSpecifiedBy, makePartition, put, putAll, remove, remove, removeAll, removeAllEntitiesSpecifiedBy, update, update
 

Constructor Detail

AbstractXStreamXmlFilePerEntityRepository

AbstractXStreamXmlFilePerEntityRepository()
Method Detail

getEntityIdBasedFilenameFrom

protected static java.lang.String getEntityIdBasedFilenameFrom(Entity entity)
A naming scheme for file-per-entity Domian XStream persistence. This particular naming scheme is based on the entities' IDs.

Returns:
the file name for this entity based on its entity-ID

createRepositoryFilesIfNotExist

protected void createRepositoryFilesIfNotExist()


Copyright © 2008-2010. All Rights Reserved.