Package org.apache.openjpa.jdbc.schema
Class XMLSchemaSerializer
java.lang.Object
org.apache.openjpa.lib.meta.XMLMetaDataSerializer
org.apache.openjpa.jdbc.schema.XMLSchemaSerializer
- All Implemented Interfaces:
SchemaSerializer,MetaDataSerializer
Serializes
Schemas to XML matching the document
type definition defined by the XMLSchemaParser. The serializer
actually works at the fine-grained table level to allow you to split
schemas among multiple files.
Serializers are not thread safe.- Author:
- Abe White
-
Field Summary
Fields inherited from interface org.apache.openjpa.lib.meta.MetaDataSerializer
APPEND, COMPACT, PRETTY, VERBOSE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the given schema's objects to the set of objects that will be serialized.voidaddAll(SchemaGroup group) Add all the objects in the given group to the set of objects that will be serialized.voidaddSequence(Sequence seq) voidAdd the given table to the set of tables that will be serialized.voidclear()Clear the set of objects to be serialized.protected CollectionReturn the current set of objects for serialization.Sequence[]Table[]Return the set of tables that will be serialized.booleanRemove the given schema's objects from the set to be serialized.booleanremoveAll(SchemaGroup group) Remove all schemas in the given group from the set to be serialized.booleanremoveSequence(Sequence seq) booleanremoveTable(Table table) Remove the given table from the set to be serialized.protected voidserialize(Collection objs) Serialize the given set of objects.Methods inherited from class org.apache.openjpa.lib.meta.XMLMetaDataSerializer
addAttribute, addComments, addComments, addText, currentBackupFile, endElement, getAttributes, getFileMap, getLog, getSourceFile, isVerbose, prepareWrite, reset, serialize, serialize, serialize, serialize, serialize, serialize, setLog, startElementMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.openjpa.lib.meta.MetaDataSerializer
serialize, serialize, serialize, serialize
-
Constructor Details
-
XMLSchemaSerializer
Constructor. Supply configuration.
-
-
Method Details
-
getTables
Description copied from interface:SchemaSerializerReturn the set of tables that will be serialized.- Specified by:
getTablesin interfaceSchemaSerializer
-
addTable
Description copied from interface:SchemaSerializerAdd the given table to the set of tables that will be serialized.- Specified by:
addTablein interfaceSchemaSerializer
-
removeTable
Description copied from interface:SchemaSerializerRemove the given table from the set to be serialized.- Specified by:
removeTablein interfaceSchemaSerializer- Returns:
- true if table was removed, false if not in set
-
getSequences
-
addSequence
-
removeSequence
-
addAll
Description copied from interface:SchemaSerializerAdd the given schema's objects to the set of objects that will be serialized.- Specified by:
addAllin interfaceSchemaSerializer
-
addAll
Description copied from interface:SchemaSerializerAdd all the objects in the given group to the set of objects that will be serialized.- Specified by:
addAllin interfaceSchemaSerializer
-
removeAll
Description copied from interface:SchemaSerializerRemove the given schema's objects from the set to be serialized.- Specified by:
removeAllin interfaceSchemaSerializer- Returns:
- true if any objects in schema removed, false if none in set
-
removeAll
Description copied from interface:SchemaSerializerRemove all schemas in the given group from the set to be serialized.- Specified by:
removeAllin interfaceSchemaSerializer- Returns:
- true if any objects in the group were removed, false if none in set
-
clear
public void clear()Description copied from interface:SchemaSerializerClear the set of objects to be serialized.- Specified by:
clearin interfaceSchemaSerializer
-
getObjects
Description copied from class:XMLMetaDataSerializerReturn the current set of objects for serialization.- Specified by:
getObjectsin classXMLMetaDataSerializer
-
serialize
Description copied from class:XMLMetaDataSerializerSerialize the given set of objects.- Specified by:
serializein classXMLMetaDataSerializer- Throws:
SAXException
-