net.sourceforge.domian.repository
Class AbstractXStreamSingleXmlFileRepository<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.AbstractXStreamSingleXmlFileRepository<T>
All Implemented Interfaces:
HumanReadableFormatRepository<T>, PersistentRepository<T>, Repository<T>, TextualFormatRepository<T>
Direct Known Subclasses:
InMemoryAndXStreamXmlFileRepository

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

Common functionality for all Domian XStream-based repositories, where all entities are gathered in one single XStream XML file.

Since:
0.4
Author:
Eirik Torske

Nested Class Summary
protected  class AbstractXStreamSingleXmlFileRepository.Load
           
protected  class AbstractXStreamSingleXmlFileRepository.Persist
           
protected  class AbstractXStreamSingleXmlFileRepository.Type_Id_Date_CustomDenomination_NamedXStreamFilePersistenceStrategy
          Custom FilePersistenceStrategy class.
 
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
AbstractXStreamSingleXmlFileRepository()
           
 
Method Summary
protected  void createRepositoryRootPathIfNotExist()
           
 EntityPersistenceMetaData getMetaDataFor(T notApplicableEntity)
           
protected abstract  java.lang.String getRepositoryTypeName()
           
protected  void purgeRepositoryEntitiesFileOnly_IfExist()
           
protected  void purgeRepositoryFilesIfExist()
           
protected  void purgeRepositoryFilesIfExist(int filesToBePurgedLimit, java.lang.Boolean purgeRepositoryFolder, java.lang.Boolean purgeMetadata)
           
 
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, 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

AbstractXStreamSingleXmlFileRepository

AbstractXStreamSingleXmlFileRepository()
Method Detail

getRepositoryTypeName

protected abstract java.lang.String getRepositoryTypeName()
Returns:
the repository type name; the name of the repository implementation (e.g. Unix-name-variant of the class simple name)

getMetaDataFor

public EntityPersistenceMetaData getMetaDataFor(T notApplicableEntity)

createRepositoryRootPathIfNotExist

protected void createRepositoryRootPathIfNotExist()

purgeRepositoryFilesIfExist

protected void purgeRepositoryFilesIfExist()

purgeRepositoryEntitiesFileOnly_IfExist

protected void purgeRepositoryEntitiesFileOnly_IfExist()

purgeRepositoryFilesIfExist

protected void purgeRepositoryFilesIfExist(int filesToBePurgedLimit,
                                           java.lang.Boolean purgeRepositoryFolder,
                                           java.lang.Boolean purgeMetadata)


Copyright © 2008-2010. All Rights Reserved.