@NotStorableClass public abstract class AbstractExporter extends Object implements IExporter
| Modifier and Type | Field and Description |
|---|---|
protected JoafipLogger |
logger |
| Constructor and Description |
|---|
AbstractExporter(IStore store) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
basicValueToString(Object basicValue)
convert basic value to string ( primitives and correspond java.lang class
)
|
protected abstract void |
beginExportArray(DataRecordIdentifier arrayDataRecordIdentifier,
int arrayLength,
ClassInfo arrayComponentClassInfo)
begin of array export
|
protected abstract void |
beginExportArrayNotPersisted(int arrayIdentifier,
int arrayLength,
ClassInfo arrayComponentClassInfo) |
protected abstract void |
beginExportEnum(DataRecordIdentifier enumDataRecordIdentifier,
ClassInfo enumClassInfo,
Enum<?> enumInstance)
begin enum export
|
protected abstract void |
beginExportEnumNotPersisted(int enumIdentifier,
ClassInfo enumClassInfo,
Enum<?> enumInstance) |
protected abstract void |
beginExportField(String fieldClassName,
String fieldName,
String fieldDeclaringClassName,
boolean staticField,
boolean transientField)
begin of an object field export
|
protected abstract void |
beginExportGeneric(DataRecordIdentifier objectDataRecordIdentifier,
ClassInfo objectClassInfo)
begin generic object export
|
protected abstract void |
beginExportNotPersistedGeneric(int objectIdentifier,
ClassInfo objectClassInfo)
begin generic not persisted object export
|
protected abstract void |
beginExportRoot()
begin of root export
|
protected abstract void |
beginExportStatic(DataRecordIdentifier objectDataRecordIdentifier,
ClassInfo objectClassInfo) |
protected abstract void |
beginExportStaticField() |
protected abstract void |
beginExportVisit(String joafipRelease,
int dataModelIdentifier,
long lastRecordId)
begin of the visit for export
|
protected abstract void |
close()
close export
|
protected abstract void |
closeWriterAfterError()
close export after an error
|
protected abstract void |
endExportArray()
end of array export
|
protected abstract void |
endExportArrayNotPersisted() |
protected abstract void |
endExportEnum()
end enum export
|
protected abstract void |
endExportEnumNotPersisted() |
protected abstract void |
endExportField()
end of object field export
|
protected abstract void |
endExportGeneric()
end of generic object export
|
protected abstract void |
endExportNotPersistedGeneric()
end of generic not persisted object export
|
protected abstract void |
endExportRoot()
end of root export
|
protected abstract void |
endExportStatic() |
protected abstract void |
endExportStaticField() |
protected abstract void |
endExportVisit()
end visit for export
|
void |
export(String directoryName,
String temporaryDirectoryName,
boolean exportPersistedClassByteCode)
FIXMELUC x generic export or xml export ?
|
void |
export(String directoryName,
String temporaryDirectoryName,
Object objectToExport) |
protected abstract void |
exportBasicValue(Object value)
export a basic value
|
protected abstract void |
exportNotPersistedReference(int objectIdentifier)
export reference to not persisted object
|
protected abstract void |
exportNullReference()
export null reference
|
protected abstract void |
exportReference(DataRecordIdentifier dataRecordIdentifier)
export not null reference
|
protected abstract void |
exportString(DataRecordIdentifier dataRecordIdentifier,
String string)
export string
|
protected abstract void |
exportString(int objectIdentifier,
String string)
export not persisted string
|
int |
getNumberOfObjectExported() |
protected abstract void |
open(File directory)
opening for export
|
void |
setListener(IExporterListener listener) |
protected final JoafipLogger logger
public AbstractExporter(IStore store) throws StoreException
StoreExceptionpublic void setListener(IExporterListener listener)
setListener in interface IExporterpublic void export(String directoryName, String temporaryDirectoryName, boolean exportPersistedClassByteCode) throws StoreException, StoreClassNotFoundException, StoreInvalidClassException, StoreDataCorruptedException, StoreNotSerializableException, StoreTooBigForSerializationException
IExporterdirectoryName directory
also export byte code of class of persisted object
export in interface IExporterdirectoryName - directory name where store exporttemporaryDirectoryName - temporary directory name used to store temporary files while
exportingexportPersistedClassByteCode - true if export persisted class byte codeStoreExceptionStoreClassNotFoundExceptionStoreInvalidClassExceptionStoreDataCorruptedExceptionStoreNotSerializableExceptionStoreTooBigForSerializationExceptionpublic void export(String directoryName, String temporaryDirectoryName, Object objectToExport) throws StoreException, StoreClassNotFoundException, StoreInvalidClassException, StoreDataCorruptedException, StoreNotSerializableException
export in interface IExporterStoreExceptionStoreClassNotFoundExceptionStoreInvalidClassExceptionStoreDataCorruptedExceptionStoreNotSerializableExceptionprotected abstract void open(File directory) throws StoreException
directory - StoreExceptionprotected abstract void close()
throws StoreException
StoreExceptionprotected abstract void closeWriterAfterError()
public int getNumberOfObjectExported()
getNumberOfObjectExported in interface IExporterprotected abstract void exportNotPersistedReference(int objectIdentifier)
throws StoreException
objectIdentifier - the not persisted object identifierStoreExceptionprotected abstract void beginExportVisit(String joafipRelease, int dataModelIdentifier, long lastRecordId) throws StoreException
joafipRelease - dataModelIdentifier - lastRecordId - StoreExceptionprotected abstract void endExportVisit()
throws StoreException
StoreExceptionprotected abstract void beginExportRoot()
throws StoreException
StoreExceptionprotected abstract void endExportRoot()
throws StoreException
StoreExceptionprotected abstract void beginExportStaticField()
throws StoreException
StoreExceptionprotected abstract void endExportStaticField()
throws StoreException
StoreExceptionprotected abstract void exportString(DataRecordIdentifier dataRecordIdentifier, String string) throws StoreException
dataRecordIdentifier - string - the string instanceStoreExceptionprotected abstract void exportString(int objectIdentifier,
String string)
throws StoreException
objectIdentifier - string - the string instanceStoreExceptionprotected abstract void beginExportStatic(DataRecordIdentifier objectDataRecordIdentifier, ClassInfo objectClassInfo) throws StoreException
StoreExceptionprotected abstract void endExportStatic()
throws StoreException
StoreExceptionprotected abstract void beginExportGeneric(DataRecordIdentifier objectDataRecordIdentifier, ClassInfo objectClassInfo) throws StoreException
objectDataRecordIdentifier - the object data record identifierobjectClassInfo - the object class informationStoreExceptionprotected abstract void beginExportNotPersistedGeneric(int objectIdentifier,
ClassInfo objectClassInfo)
throws StoreException
objectIdentifier - the object data record identifierobjectClassInfo - the object class informationStoreExceptionprotected abstract void endExportGeneric()
throws StoreException
StoreExceptionprotected abstract void endExportNotPersistedGeneric()
throws StoreException
StoreExceptionprotected abstract void beginExportField(String fieldClassName, String fieldName, String fieldDeclaringClassName, boolean staticField, boolean transientField) throws StoreException
fieldClassName - the field class namefieldName - the field namefieldDeclaringClassName - the field declaring class namestaticField - transientField - StoreExceptionprotected abstract void endExportField()
throws StoreException
StoreExceptionprotected abstract void exportBasicValue(Object value) throws StoreException
value - the value to exportStoreExceptionprotected abstract void exportNullReference()
throws StoreException
StoreExceptionprotected abstract void exportReference(DataRecordIdentifier dataRecordIdentifier) throws StoreException
dataRecordIdentifier - the data record identifier as referenceStoreExceptionprotected abstract void beginExportArray(DataRecordIdentifier arrayDataRecordIdentifier, int arrayLength, ClassInfo arrayComponentClassInfo) throws StoreException
arrayDataRecordIdentifier - the array instance data record identifierarrayLength - the array lengtharrayComponentClassInfo - the array component class informationStoreExceptionprotected abstract void endExportArrayNotPersisted()
throws StoreException
StoreExceptionprotected abstract void endExportArray()
throws StoreException
StoreExceptionprotected abstract void beginExportArrayNotPersisted(int arrayIdentifier,
int arrayLength,
ClassInfo arrayComponentClassInfo)
throws StoreException
StoreExceptionprotected abstract void beginExportEnum(DataRecordIdentifier enumDataRecordIdentifier, ClassInfo enumClassInfo, Enum<?> enumInstance) throws StoreException
enumDataRecordIdentifier - the enum instance data record identifierenumClassInfo - the enum class informationenumInstance - the enumStoreExceptionprotected abstract void beginExportEnumNotPersisted(int enumIdentifier,
ClassInfo enumClassInfo,
Enum<?> enumInstance)
throws StoreException
StoreExceptionprotected abstract void endExportEnum()
throws StoreException
StoreExceptionprotected abstract void endExportEnumNotPersisted()
throws StoreException
StoreExceptionprotected String basicValueToString(Object basicValue) throws StoreException
basicValue - StoreExceptionCopyright © 2007-2012 Luc Peuvrier. All Rights Reserved.