@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
StoreException
public void setListener(IExporterListener listener)
setListener
in interface IExporter
public void export(String directoryName, String temporaryDirectoryName, boolean exportPersistedClassByteCode) throws StoreException, StoreClassNotFoundException, StoreInvalidClassException, StoreDataCorruptedException, StoreNotSerializableException, StoreTooBigForSerializationException
IExporter
directoryName directory
also export byte code of class of persisted object
export
in interface IExporter
directoryName
- directory name where store exporttemporaryDirectoryName
- temporary directory name used to store temporary files while
exportingexportPersistedClassByteCode
- true if export persisted class byte codeStoreException
StoreClassNotFoundException
StoreInvalidClassException
StoreDataCorruptedException
StoreNotSerializableException
StoreTooBigForSerializationException
public void export(String directoryName, String temporaryDirectoryName, Object objectToExport) throws StoreException, StoreClassNotFoundException, StoreInvalidClassException, StoreDataCorruptedException, StoreNotSerializableException
export
in interface IExporter
StoreException
StoreClassNotFoundException
StoreInvalidClassException
StoreDataCorruptedException
StoreNotSerializableException
protected abstract void open(File directory) throws StoreException
directory
- StoreException
protected abstract void close() throws StoreException
StoreException
protected abstract void closeWriterAfterError()
public int getNumberOfObjectExported()
getNumberOfObjectExported
in interface IExporter
protected abstract void exportNotPersistedReference(int objectIdentifier) throws StoreException
objectIdentifier
- the not persisted object identifierStoreException
protected abstract void beginExportVisit(String joafipRelease, int dataModelIdentifier, long lastRecordId) throws StoreException
joafipRelease
- dataModelIdentifier
- lastRecordId
- StoreException
protected abstract void endExportVisit() throws StoreException
StoreException
protected abstract void beginExportRoot() throws StoreException
StoreException
protected abstract void endExportRoot() throws StoreException
StoreException
protected abstract void beginExportStaticField() throws StoreException
StoreException
protected abstract void endExportStaticField() throws StoreException
StoreException
protected abstract void exportString(DataRecordIdentifier dataRecordIdentifier, String string) throws StoreException
dataRecordIdentifier
- string
- the string instanceStoreException
protected abstract void exportString(int objectIdentifier, String string) throws StoreException
objectIdentifier
- string
- the string instanceStoreException
protected abstract void beginExportStatic(DataRecordIdentifier objectDataRecordIdentifier, ClassInfo objectClassInfo) throws StoreException
StoreException
protected abstract void endExportStatic() throws StoreException
StoreException
protected abstract void beginExportGeneric(DataRecordIdentifier objectDataRecordIdentifier, ClassInfo objectClassInfo) throws StoreException
objectDataRecordIdentifier
- the object data record identifierobjectClassInfo
- the object class informationStoreException
protected abstract void beginExportNotPersistedGeneric(int objectIdentifier, ClassInfo objectClassInfo) throws StoreException
objectIdentifier
- the object data record identifierobjectClassInfo
- the object class informationStoreException
protected abstract void endExportGeneric() throws StoreException
StoreException
protected abstract void endExportNotPersistedGeneric() throws StoreException
StoreException
protected 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
- StoreException
protected abstract void endExportField() throws StoreException
StoreException
protected abstract void exportBasicValue(Object value) throws StoreException
value
- the value to exportStoreException
protected abstract void exportNullReference() throws StoreException
StoreException
protected abstract void exportReference(DataRecordIdentifier dataRecordIdentifier) throws StoreException
dataRecordIdentifier
- the data record identifier as referenceStoreException
protected 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 informationStoreException
protected abstract void endExportArrayNotPersisted() throws StoreException
StoreException
protected abstract void endExportArray() throws StoreException
StoreException
protected abstract void beginExportArrayNotPersisted(int arrayIdentifier, int arrayLength, ClassInfo arrayComponentClassInfo) throws StoreException
StoreException
protected abstract void beginExportEnum(DataRecordIdentifier enumDataRecordIdentifier, ClassInfo enumClassInfo, Enum<?> enumInstance) throws StoreException
enumDataRecordIdentifier
- the enum instance data record identifierenumClassInfo
- the enum class informationenumInstance
- the enumStoreException
protected abstract void beginExportEnumNotPersisted(int enumIdentifier, ClassInfo enumClassInfo, Enum<?> enumInstance) throws StoreException
StoreException
protected abstract void endExportEnum() throws StoreException
StoreException
protected abstract void endExportEnumNotPersisted() throws StoreException
StoreException
protected String basicValueToString(Object basicValue) throws StoreException
basicValue
- StoreException
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.