Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.openjpa.xmlstore
Class XMLFileHandler

    java.lang.Object
      org.apache.openjpa.xmlstore.XMLFileHandler

    public class XMLFileHandler

extends Object

Stores `ObjectData` objects by serializing a collection of them into and out of an XML file.

Constructor Summary
`XMLFileHandler(XMLConfiguration conf)` Constructor; supply configuration.

Method Summary
`Collection` | `load(ClassMetaData meta)` Loads all instances of `meta` into a list of objects.
`void` | `store(ClassMetaData meta, Collection datas)` Stores all instances in `datas` into the appropriate file, as dictated by `meta`.
`void` | `writeDataValue(Writer out, int type, Object val)` Write out the data value.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XMLFileHandler

    public XMLFileHandler(XMLConfiguration conf)

  Constructor; supply configuration.

Method Detail

### load

    public Collection load(ClassMetaData meta)

  Loads all instances of `meta` into a list of objects. The given `meta` must represent a least-derived persistence-capable type.

### store

    public void store(ClassMetaData meta,
                      Collection datas)

  Stores all instances in `datas` into the appropriate file, as dictated by `meta`.

  Parameters:
    `meta` - the least-derived type of the instances being stored
    `datas` - a collection of `ObjectData` instances, each of which represents an object of type `meta`

### writeDataValue

    public void writeDataValue(Writer out,
                               int type,
                               Object val)
                        throws IOException

  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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.