|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PersistentRepository<T extends Entity>
Repository with the capabibility of writing (persist
) its entities to some sort of non-volatile storage.
Next, the repository can (re-)read (load
) the persisted entities (back) into memory.
Each of the PersistentRepository
implementations have a PersistenceDefinition
attached,
defining semantics around (persist
)/(load
),
and the level of coupling between the entities and the persistent store.
Method Summary | |
---|---|
void |
close()
Closes the repository and releases all resources. |
java.lang.String |
getFormat()
|
EntityMetaData |
getMetaDataFor(T entity)
|
PersistenceDefinition |
getPersistenceDefinition()
|
java.io.File |
getRepositoryDirectory()
The unique file directory in which the repository data files resides. |
java.lang.String |
getRepositoryId()
The repository-ID the name of the repository. |
void |
load()
The semantics of this operation depends on the Repository 's PersistenceDefinition . |
void |
persist()
The semantics of this operation depends on the Repository 's PersistenceDefinition . |
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 |
Method Detail |
---|
java.io.File getRepositoryDirectory()
java.lang.UnsupportedOperationException
- if not applicablejava.lang.String getRepositoryId()
For file-based repositories, the repository-ID should constitute the last directory element of the repository directory.
PersistenceDefinition getPersistenceDefinition()
java.lang.String getFormat()
void load()
Repository
's PersistenceDefinition
.
void persist()
Repository
's PersistenceDefinition
.
EntityMetaData getMetaDataFor(T entity)
void close()
This method is redundant for certain repository implementations, but by using this method in a consistent manner, an eventual repository migration will not need any code changes.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |