|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Exportable
Classes that want to provide the possibility of being exported/imported by the import/export functionality of @enterprise must implement this interface.
| Field Summary | |
|---|---|
static java.lang.String[][] |
emptyKeys
Empty String array which can be used by classes which don't want to define keys. |
| Method Summary | |
|---|---|
void |
addRequiredObjects(java.util.List preReqObjects)
This methid is called by the exporter before an object is exported. |
boolean |
beforeImport(java.util.Map values,
ImportHandler data)
This method is called by the importer before the object is filled with data. |
java.util.List |
exportAsElements()
A class can use this method to define which fields should be exported as own XML elements instead of simple attributes. |
java.lang.String[][] |
getKeys()
A class has to return key groups in order to identify already existing objects of that class. |
java.util.List |
ignoreFields()
Here a class can return the names of fields which should not be exported during an @enterprise export. |
| Field Detail |
|---|
static final java.lang.String[][] emptyKeys
| Method Detail |
|---|
java.lang.String[][] getKeys()
{{"name", "birthdate"}} for a
class defining one key group containing the fields name and
birthdate.java.util.List ignoreFields()
transient or
volatile are never exported, thus you don't need to include
them here.
java.util.List exportAsElements()
byte[] are always exported as elements and
don't need to be included here.
void addRequiredObjects(java.util.List preReqObjects)
preReqObjects - List containing required objects. Required objects must be
Persistent objects implementing the Exportable interface.
boolean beforeImport(java.util.Map values,
ImportHandler data)
true or false).values
Map! Don't set fields of the exportable object, because they would be overwritten later
when the importer fills the object with the values of the values Map.
values - The map contains the values with which the object will be filled.
Key is a String with the field name, value is the value object (String for text
fields, Long or Double for decimal fields, etc.).
true if import should be performed or false if
this object should be skipped.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||