Package org.apache.openjpa.xmlstore
Class XMLFileHandler
java.lang.Object
org.apache.openjpa.xmlstore.XMLFileHandler
Stores
ObjectData
objects by serializing a collection
of them into and out of an XML file.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionload
(ClassMetaData meta) Loads all instances ofmeta
into a list of objects.void
store
(ClassMetaData meta, Collection datas) Stores all instances indatas
into the appropriate file, as dictated bymeta
.void
writeDataValue
(Writer out, int type, Object val) Write out the data value.
-
Constructor Details
-
XMLFileHandler
Constructor; supply configuration.
-
-
Method Details
-
load
Loads all instances ofmeta
into a list of objects. The givenmeta
must represent a least-derived persistence-capable type. -
store
Stores all instances indatas
into the appropriate file, as dictated bymeta
.- Parameters:
meta
- the least-derived type of the instances being storeddatas
- a collection ofObjectData
instances, each of which represents an object of typemeta
-
writeDataValue
Write out the data value. This method writes nulls as "null", serializes (using Java serialization and base16 encoding) out non- primitives/boxed primitives and non-persistent types, and writes primitives/boxed primitives and oids using their toString.- Throws:
IOException
-