|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.lib.meta.XMLMetaDataSerializer org.apache.openjpa.lib.meta.CFMetaDataSerializer org.apache.openjpa.persistence.XMLPersistenceMetaDataSerializer org.apache.openjpa.persistence.jdbc.XMLPersistenceMappingSerializer
public class XMLPersistenceMappingSerializer
Serializes persistence mapping to XML.
Nested Class Summary | |
---|---|
protected class |
XMLPersistenceMappingSerializer.MappingSerializationComparator
Extends XMLPersistenceMappingSerializer.MappingSerializationComparator for store-specific tags such
as <sql-result-set-mapping>. |
Nested classes/interfaces inherited from class org.apache.openjpa.persistence.XMLPersistenceMetaDataSerializer |
---|
XMLPersistenceMetaDataSerializer.SerializationComparator |
Field Summary |
---|
Fields inherited from class org.apache.openjpa.persistence.XMLPersistenceMetaDataSerializer |
---|
TYPE_CLASS_QUERIES, TYPE_CLASS_SEQS, TYPE_META, TYPE_QUERY, TYPE_SEQ |
Fields inherited from interface org.apache.openjpa.lib.meta.MetaDataSerializer |
---|
APPEND, COMPACT, PRETTY, VERBOSE |
Constructor Summary | |
---|---|
XMLPersistenceMappingSerializer(JDBCConfiguration conf)
Constructor. |
Method Summary | |
---|---|
void |
addAll(MetaDataRepository repos)
Add all components in the given repository to the set to be serialized. |
protected void |
addCommments(Object obj)
|
void |
addQueryResultMapping(QueryResultMapping meta)
Adds the given result set mapping to local cache. |
protected void |
addSystemMappingElements(Collection toSerialize)
Add system-level mapping elements to be serialized. |
void |
clear()
Clear the set of metadatas to be serialized. |
protected EnumType |
getEnumType(FieldMapping field)
Return enum type for the field. |
protected PersistenceStrategy |
getStrategy(FieldMetaData fmd)
Return the serialized strategy name. |
boolean |
getSyncMappingInfo()
Whether to automatically synchronize mapping info with data available from mapped components before serialization. |
protected XMLPersistenceMetaDataSerializer.SerializationComparator |
newSerializationComparator()
Create a new comparator for ordering objects that are to be serialized. |
boolean |
removeAll(MetaDataRepository repos)
Remove all the components in the given repository from the set to be serialized. |
boolean |
removeQueryResultMapping(QueryResultMapping meta)
Removes given result set mapping from the local cache. |
protected boolean |
serializeAttributeOverride(FieldMetaData fmd,
FieldMetaData orig)
Always returns false by default. |
protected void |
serializeAttributeOverrideMappingContent(FieldMetaData fmd,
FieldMetaData orig)
Serialize attribute override mapping content. |
protected void |
serializeClass(ClassMetaData meta,
boolean access)
Serialize class metadata. |
protected void |
serializeClassMappingContent(ClassMetaData mapping)
Serialize class mapping content. |
protected void |
serializeFieldMappingContent(FieldMetaData fmd,
PersistenceStrategy strategy)
Serialize field mapping content; this will be called before #serializeValueMappingContent . |
protected void |
serializeInheritanceContent(ClassMetaData mapping)
Serialize inheritance content. |
protected void |
serializeQueryMappings(ClassMetaData meta)
Serialize query mappings. |
protected void |
serializeSequence(SequenceMetaData meta)
Serialize sequence metadata. |
protected void |
serializeSystemMappingElement(Object obj)
Serialize unknown mapping element at system level. |
void |
setSyncMappingInfo(boolean sync)
Whether to automatically synchronize mapping info with data available from mapped components before serialization. |
protected int |
type(Object o)
Return the type constant for the given object based on its runtime class. |
Methods inherited from class org.apache.openjpa.persistence.XMLPersistenceMetaDataSerializer |
---|
addClassMappingAttributes, addFieldMappingAttributes, addMetaData, addQueryMetaData, addSequenceMetaData, addStrategyMappingAttributes, getConfiguration, getMode, getObjects, getPackage, getSerializeAnnotations, getSourceFile, isMappingMode, isMappingMode, isMappingMode, isMetaDataMode, isQueryMode, removeMetaData, removeQueryMetaData, removeSequenceMetaData, serialize, setMode, setMode, setSerializeAnnotations |
Methods inherited from class org.apache.openjpa.lib.meta.CFMetaDataSerializer |
---|
getClassName, getPackage, groupByPackage, setPackage |
Methods inherited from class org.apache.openjpa.lib.meta.XMLMetaDataSerializer |
---|
addAttribute, addComments, addComments, addText, currentBackupFile, endElement, getAttributes, getFileMap, getLog, isVerbose, prepareWrite, reset, serialize, serialize, serialize, serialize, serialize, serialize, setLog, startElement |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.openjpa.lib.meta.MetaDataSerializer |
---|
serialize, serialize, serialize, serialize |
Constructor Detail |
---|
public XMLPersistenceMappingSerializer(JDBCConfiguration conf)
Method Detail |
---|
public boolean getSyncMappingInfo()
public void setSyncMappingInfo(boolean sync)
public void addQueryResultMapping(QueryResultMapping meta)
public boolean removeQueryResultMapping(QueryResultMapping meta)
public void addAll(MetaDataRepository repos)
XMLPersistenceMetaDataSerializer
addAll
in interface AbstractCFMetaDataFactory.Serializer
addAll
in class XMLPersistenceMetaDataSerializer
public boolean removeAll(MetaDataRepository repos)
XMLPersistenceMetaDataSerializer
removeAll
in class XMLPersistenceMetaDataSerializer
public void clear()
XMLPersistenceMetaDataSerializer
clear
in class XMLPersistenceMetaDataSerializer
protected void addCommments(Object obj) throws SAXException
SAXException
protected void serializeClass(ClassMetaData meta, boolean access) throws SAXException
XMLPersistenceMetaDataSerializer
serializeClass
in class XMLPersistenceMetaDataSerializer
SAXException
protected void serializeClassMappingContent(ClassMetaData mapping) throws SAXException
XMLPersistenceMetaDataSerializer
serializeClassMappingContent
in class XMLPersistenceMetaDataSerializer
SAXException
protected void serializeInheritanceContent(ClassMetaData mapping) throws SAXException
XMLPersistenceMetaDataSerializer
serializeInheritanceContent
in class XMLPersistenceMetaDataSerializer
SAXException
protected boolean serializeAttributeOverride(FieldMetaData fmd, FieldMetaData orig)
XMLPersistenceMetaDataSerializer
serializeAttributeOverride
in class XMLPersistenceMetaDataSerializer
protected void serializeAttributeOverrideMappingContent(FieldMetaData fmd, FieldMetaData orig) throws SAXException
XMLPersistenceMetaDataSerializer
serializeAttributeOverrideMappingContent
in class XMLPersistenceMetaDataSerializer
SAXException
protected PersistenceStrategy getStrategy(FieldMetaData fmd)
XMLPersistenceMetaDataSerializer
getStrategy
in class XMLPersistenceMetaDataSerializer
protected void serializeFieldMappingContent(FieldMetaData fmd, PersistenceStrategy strategy) throws SAXException
XMLPersistenceMetaDataSerializer
#serializeValueMappingContent
. Does nothing by default.
serializeFieldMappingContent
in class XMLPersistenceMetaDataSerializer
SAXException
protected EnumType getEnumType(FieldMapping field)
protected XMLPersistenceMetaDataSerializer.SerializationComparator newSerializationComparator()
XMLPersistenceMetaDataSerializer
newSerializationComparator
in class XMLPersistenceMetaDataSerializer
protected void addSystemMappingElements(Collection toSerialize)
XMLPersistenceMetaDataSerializer
addSystemMappingElements
in class XMLPersistenceMetaDataSerializer
protected int type(Object o)
XMLPersistenceMetaDataSerializer
type
in class XMLPersistenceMetaDataSerializer
protected void serializeSystemMappingElement(Object obj) throws SAXException
XMLPersistenceMetaDataSerializer
serializeSystemMappingElement
in class XMLPersistenceMetaDataSerializer
SAXException
protected void serializeQueryMappings(ClassMetaData meta) throws SAXException
XMLPersistenceMetaDataSerializer
serializeQueryMappings
in class XMLPersistenceMetaDataSerializer
SAXException
protected void serializeSequence(SequenceMetaData meta) throws SAXException
XMLPersistenceMetaDataSerializer
serializeSequence
in class XMLPersistenceMetaDataSerializer
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |