public class XMLPersistenceMappingSerializer extends XMLPersistenceMetaDataSerializer
Modifier and Type | Class and Description |
---|---|
protected class |
XMLPersistenceMappingSerializer.MappingSerializationComparator
Extends
SerializationComparator for store-specific tags such
as <sql-result-set-mapping>. |
XMLPersistenceMetaDataSerializer.SerializationComparator
TYPE_CLASS_QUERIES, TYPE_CLASS_SEQS, TYPE_META, TYPE_QUERY, TYPE_SEQ
APPEND, COMPACT, PRETTY, VERBOSE
Constructor and Description |
---|
XMLPersistenceMappingSerializer(JDBCConfiguration conf)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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 javax.persistence.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 |
serializeOrderColumn(FieldMetaData fmd)
Serialize order column.
|
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.
|
addClassMappingAttributes, addFieldMappingAttributes, addMetaData, addQueryMetaData, addSequenceMetaData, addStrategyMappingAttributes, getClassMetaData, getConfiguration, getMode, getObjects, getPackage, getSerializeAnnotations, getSourceFile, isMappingMode, isMappingMode, isMappingMode, isMetaDataMode, isQueryMode, removeMetaData, removeQueryMetaData, removeSequenceMetaData, serialize, setMode, setMode, setSerializeAnnotations
getClassName, getPackage, groupByPackage, setPackage
addAttribute, addComments, addComments, addText, currentBackupFile, endElement, getAttributes, getFileMap, getLog, isVerbose, prepareWrite, reset, serialize, serialize, serialize, serialize, serialize, serialize, setLog, startElement
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
serialize, serialize, serialize, serialize
public XMLPersistenceMappingSerializer(JDBCConfiguration conf)
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 void serializeOrderColumn(FieldMetaData fmd) throws SAXException
serializeOrderColumn
in class XMLPersistenceMetaDataSerializer
SAXException
protected javax.persistence.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
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.