@NotStorableClass @NoStorableAccess public abstract class AbstractDataAccessSession extends Object implements IDataAccessSessionCommon
| Modifier and Type | Field and Description |
|---|---|
protected static String |
CLOSE_ERROR |
protected FilePersistence |
filePersistence
file persistence manager
|
protected JoafipLogger |
logger |
protected JoafipMutex |
mutex
for thread synchronization
|
protected static String |
OPEN_ERROR |
protected boolean |
opened
true when data access session is opened
|
protected boolean |
opening
true while in opening phase
|
| Constructor and Description |
|---|
AbstractDataAccessSession(FilePersistence filePersistence) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertClosed() |
protected void |
assertOpened() |
protected void |
assertPersistenceOpenned() |
int |
getClassIdentifier(Class<?> clazz) |
JoafipMutex |
getMutex() |
Object |
getObject(long dataRecordIdentifier) |
Object |
getObject(String key)
get a persistent object by its key
|
Collection<Object> |
getObjects() |
boolean |
isClosed() |
boolean |
isOpened() |
Set<String> |
objectKeySet() |
void |
removeAllObject()
remove all persistent object
|
Object |
removeObject(String key)
remove a persistent object associated to a key
|
protected void |
setCloserTrace() |
void |
setEnumState(Enum<?> enumObject)
Deprecated.
|
Object |
setObject(String key,
Object object)
add a persistent object associated to a key
|
protected void |
setOpenerTrace() |
void |
storedEnum(Class<? extends Enum<?>> enumClass)
Deprecated.
|
void |
storedImmutableEnum(Class<? extends Enum<?>> enumClass) |
void |
storedImmutableEnum(Class<? extends Enum<?>>[] enumClasses) |
void |
storedMutableEnum(Class<? extends Enum<?>> enumClass) |
void |
storedMutableEnum(Class<? extends Enum<?>>[] enumClasses) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitopenprotected static final String OPEN_ERROR
protected static final String CLOSE_ERROR
protected final JoafipLogger logger
protected final FilePersistence filePersistence
protected final JoafipMutex mutex
protected boolean opened
protected boolean opening
public AbstractDataAccessSession(FilePersistence filePersistence)
public JoafipMutex getMutex()
getMutex in interface IDataAccessSessionCommonpublic boolean isOpened()
throws FilePersistenceException
isOpened in interface IDataAccessSessionCommonFilePersistenceExceptionpublic boolean isClosed()
throws FilePersistenceException
isClosed in interface IDataAccessSessionCommonFilePersistenceException@Deprecated public void storedEnum(Class<? extends Enum<?>> enumClass) throws FilePersistenceException
IDataAccessSessionCommonstoredEnum in interface IDataAccessSessionCommonenumClass - the enum classFilePersistenceExceptionpublic void storedImmutableEnum(Class<? extends Enum<?>> enumClass) throws FilePersistenceException
storedImmutableEnum in interface IDataAccessSessionCommonFilePersistenceExceptionpublic void storedImmutableEnum(Class<? extends Enum<?>>[] enumClasses) throws FilePersistenceException
storedImmutableEnum in interface IDataAccessSessionCommonFilePersistenceExceptionpublic void storedMutableEnum(Class<? extends Enum<?>> enumClass) throws FilePersistenceException
storedMutableEnum in interface IDataAccessSessionCommonFilePersistenceExceptionpublic void storedMutableEnum(Class<? extends Enum<?>>[] enumClasses) throws FilePersistenceException
storedMutableEnum in interface IDataAccessSessionCommonFilePersistenceExceptionpublic Object getObject(String key) throws FilePersistenceException
IDataAccessSessionCommongetObject in interface IDataAccessSessionCommonkey - the persistent object keyFilePersistenceException - this data access session not openedpublic Object getObject(long dataRecordIdentifier) throws FilePersistenceException, FilePersistenceClassNotFoundException, FilePersistenceInvalidClassException, FilePersistenceDataCorruptedException, FilePersistenceNotSerializableException
@Deprecated public void setEnumState(Enum<?> enumObject) throws FilePersistenceException
IDataAccessSessionCommonsetEnumState in interface IDataAccessSessionCommonenumObject - the enum for which state must be setFilePersistenceExceptionpublic Object setObject(String key, Object object) throws FilePersistenceException
IDataAccessSessionCommonsetObject in interface IDataAccessSessionCommonkey - the object access keyobject - the persistent objectFilePersistenceException - this data access session not openedpublic Object removeObject(String key) throws FilePersistenceException
IDataAccessSessionCommonremoveObject in interface IDataAccessSessionCommonkey - the object access keyFilePersistenceException - this data access session not openedpublic void removeAllObject()
throws FilePersistenceException
IDataAccessSessionCommonremoveAllObject in interface IDataAccessSessionCommonFilePersistenceExceptionpublic Set<String> objectKeySet() throws FilePersistenceException
objectKeySet in interface IDataAccessSessionCommonFilePersistenceException - this data access session not openedpublic Collection<Object> getObjects() throws FilePersistenceException
getObjects in interface IDataAccessSessionCommonFilePersistenceExceptionpublic int getClassIdentifier(Class<?> clazz) throws FilePersistenceException, FilePersistenceClassNotFoundException
getClassIdentifier in interface IDataAccessSessionCommonFilePersistenceExceptionFilePersistenceClassNotFoundExceptionprotected void assertPersistenceOpenned()
throws FilePersistenceException
FilePersistenceExceptionprotected void assertClosed()
throws FilePersistenceException
FilePersistenceExceptionprotected void assertOpened()
throws FilePersistenceException
FilePersistenceExceptionprotected void setOpenerTrace()
protected final void setCloserTrace()
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.