public class AnnotationPersistenceMappingSerializer extends AnnotationPersistenceMetaDataSerializer
Modifier and Type | Class and Description |
---|---|
protected class |
AnnotationPersistenceMappingSerializer.MappingSerializationComparator
Extends
SerializationComparator for store-specific tags such
as <sql-result-set-mapping>. |
AnnotationPersistenceMetaDataSerializer.SerializationComparator
TYPE_CLASS_QUERIES, TYPE_CLASS_SEQS, TYPE_META, TYPE_QUERY, TYPE_SEQ
APPEND, COMPACT, PRETTY, VERBOSE
Constructor and Description |
---|
AnnotationPersistenceMappingSerializer(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 |
addAnnotation(AnnotationBuilder ab,
QueryResultMapping meta)
Add an annotation builder to list of builders for the specified
class metadata.
|
protected AnnotationBuilder |
addAnnotation(Class<? extends Annotation> annType,
QueryResultMapping meta)
Creates an an annotation builder for the specified class metadata
and adds it to list of builders.
|
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 AnnotationPersistenceMetaDataSerializer.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,
AnnotationBuilder ab)
Serialize attribute override mapping content.
|
protected void |
serializeClass(ClassMetaData meta)
Serialize class metadata.
|
protected void |
serializeClassMappingContent(ClassMetaData mapping)
Serialize class mapping content.
|
protected void |
serializeFieldMappingContent(FieldMetaData fmd,
PersistenceStrategy strategy,
AnnotationBuilder ab)
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.
|
addAnnotation, addAnnotation, addAnnotation, addAnnotation, addAnnotation, addAnnotation, addAnnotation, addAnnotation, addAnnotation, addClassMappingAnnotations, addFieldMappingAttributes, addMetaData, addQueryMetaData, addSequenceMetaData, addStrategyMappingAttributes, getClassMetaData, getConfiguration, getLog, getMode, getObjects, isMappingMode, isMappingMode, isMappingMode, isMetaDataMode, isQueryMode, newAnnotationBuilder, removeMetaData, removeQueryMetaData, removeSequenceMetaData, serialize, serialize, serialize, serialize, serialize, setLog, setMode, setMode, writeAnnotations
public AnnotationPersistenceMappingSerializer(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)
AnnotationPersistenceMetaDataSerializer
addAll
in interface AbstractCFMetaDataFactory.Serializer
addAll
in class AnnotationPersistenceMetaDataSerializer
public boolean removeAll(MetaDataRepository repos)
AnnotationPersistenceMetaDataSerializer
removeAll
in class AnnotationPersistenceMetaDataSerializer
public void clear()
AnnotationPersistenceMetaDataSerializer
clear
in class AnnotationPersistenceMetaDataSerializer
protected void addAnnotation(AnnotationBuilder ab, QueryResultMapping meta)
protected AnnotationBuilder addAnnotation(Class<? extends Annotation> annType, QueryResultMapping meta)
protected void serializeClass(ClassMetaData meta)
AnnotationPersistenceMetaDataSerializer
serializeClass
in class AnnotationPersistenceMetaDataSerializer
protected void serializeClassMappingContent(ClassMetaData mapping)
AnnotationPersistenceMetaDataSerializer
serializeClassMappingContent
in class AnnotationPersistenceMetaDataSerializer
protected void serializeInheritanceContent(ClassMetaData mapping)
AnnotationPersistenceMetaDataSerializer
serializeInheritanceContent
in class AnnotationPersistenceMetaDataSerializer
protected boolean serializeAttributeOverride(FieldMetaData fmd, FieldMetaData orig)
AnnotationPersistenceMetaDataSerializer
serializeAttributeOverride
in class AnnotationPersistenceMetaDataSerializer
protected void serializeAttributeOverrideMappingContent(FieldMetaData fmd, FieldMetaData orig, AnnotationBuilder ab)
AnnotationPersistenceMetaDataSerializer
serializeAttributeOverrideMappingContent
in class AnnotationPersistenceMetaDataSerializer
protected PersistenceStrategy getStrategy(FieldMetaData fmd)
AnnotationPersistenceMetaDataSerializer
getStrategy
in class AnnotationPersistenceMetaDataSerializer
protected void serializeFieldMappingContent(FieldMetaData fmd, PersistenceStrategy strategy, AnnotationBuilder ab)
AnnotationPersistenceMetaDataSerializer
#serializeValueMappingContent
. Does nothing by default.serializeFieldMappingContent
in class AnnotationPersistenceMetaDataSerializer
protected javax.persistence.EnumType getEnumType(FieldMapping field)
protected AnnotationPersistenceMetaDataSerializer.SerializationComparator newSerializationComparator()
AnnotationPersistenceMetaDataSerializer
newSerializationComparator
in class AnnotationPersistenceMetaDataSerializer
protected void addSystemMappingElements(Collection toSerialize)
AnnotationPersistenceMetaDataSerializer
addSystemMappingElements
in class AnnotationPersistenceMetaDataSerializer
protected int type(Object o)
AnnotationPersistenceMetaDataSerializer
type
in class AnnotationPersistenceMetaDataSerializer
protected void serializeSystemMappingElement(Object obj)
AnnotationPersistenceMetaDataSerializer
serializeSystemMappingElement
in class AnnotationPersistenceMetaDataSerializer
protected void serializeQueryMappings(ClassMetaData meta)
AnnotationPersistenceMetaDataSerializer
serializeQueryMappings
in class AnnotationPersistenceMetaDataSerializer
protected void serializeSequence(SequenceMetaData meta)
AnnotationPersistenceMetaDataSerializer
serializeSequence
in class AnnotationPersistenceMetaDataSerializer
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.