public class AttributeMapper extends MapperWrapper
SingleValueConverter for item types and attribute names.Mapper.ImplicitCollectionMapping, Mapper.Null| Modifier and Type | Field and Description |
|---|---|
private ConverterLookup |
converterLookup |
private java.util.Map |
fieldNameToTypeMap |
private java.util.Set |
fieldToUseAsAttribute |
private ReflectionProvider |
reflectionProvider |
private java.util.Set |
typeSet |
| Constructor and Description |
|---|
AttributeMapper(Mapper wrapped)
Deprecated.
As of 1.3
|
AttributeMapper(Mapper wrapped,
ConverterLookup converterLookup,
ReflectionProvider refProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttributeFor(java.lang.Class type) |
void |
addAttributeFor(java.lang.Class definedIn,
java.lang.String fieldName)
Tells this mapper to use an attribute for this field.
|
void |
addAttributeFor(java.lang.reflect.Field field)
Tells this mapper to use an attribute for this field.
|
void |
addAttributeFor(java.lang.String fieldName,
java.lang.Class type) |
SingleValueConverter |
getConverterFromAttribute(java.lang.Class definedIn,
java.lang.String attribute)
Deprecated.
As of 1.3.1, use
getConverterFromAttribute(Class, String, Class) |
SingleValueConverter |
getConverterFromAttribute(java.lang.Class definedIn,
java.lang.String attribute,
java.lang.Class type)
Returns which converter to use for an specific attribute in a type.
|
SingleValueConverter |
getConverterFromAttribute(java.lang.String attributeName)
Deprecated.
As of 1.3, use
getConverterFromAttribute(Class, String, Class) |
SingleValueConverter |
getConverterFromItemType(java.lang.Class type)
Deprecated.
As of 1.3, use
getConverterFromItemType(String, Class, Class) |
SingleValueConverter |
getConverterFromItemType(java.lang.String fieldName,
java.lang.Class type)
Deprecated.
As of 1.3, use
getConverterFromItemType(String, Class, Class) |
SingleValueConverter |
getConverterFromItemType(java.lang.String fieldName,
java.lang.Class type,
java.lang.Class definedIn)
Returns a single value converter to be used in a specific field.
|
private SingleValueConverter |
getLocalConverterFromItemType(java.lang.Class type) |
void |
setConverterLookup(ConverterLookup converterLookup)
Deprecated.
As of 1.3
|
boolean |
shouldLookForSingleValueConverter(java.lang.String fieldName,
java.lang.Class type,
java.lang.Class definedIn) |
aliasForAttribute, aliasForAttribute, aliasForSystemAttribute, attributeForAlias, attributeForAlias, defaultImplementationOf, getFieldNameForItemTypeAndName, getImplicitCollectionDefForFieldName, getItemTypeForItemFieldName, getLocalConverter, isIgnoredElement, isImmutableValueType, isReferenceable, lookupMapperOfType, realClass, realMember, serializedClass, serializedMember, shouldSerializeMemberprivate final java.util.Map fieldNameToTypeMap
private final java.util.Set typeSet
private ConverterLookup converterLookup
private ReflectionProvider reflectionProvider
private final java.util.Set fieldToUseAsAttribute
public AttributeMapper(Mapper wrapped)
public AttributeMapper(Mapper wrapped, ConverterLookup converterLookup, ReflectionProvider refProvider)
public void setConverterLookup(ConverterLookup converterLookup)
public void addAttributeFor(java.lang.String fieldName,
java.lang.Class type)
public void addAttributeFor(java.lang.Class type)
private SingleValueConverter getLocalConverterFromItemType(java.lang.Class type)
public SingleValueConverter getConverterFromItemType(java.lang.String fieldName, java.lang.Class type)
getConverterFromItemType(String, Class, Class)getConverterFromItemType in interface MappergetConverterFromItemType in class MapperWrapperpublic SingleValueConverter getConverterFromItemType(java.lang.String fieldName, java.lang.Class type, java.lang.Class definedIn)
MappergetConverterFromItemType in interface MappergetConverterFromItemType in class MapperWrapperfieldName - the field nametype - the field typedefinedIn - the type which defines this fieldpublic boolean shouldLookForSingleValueConverter(java.lang.String fieldName,
java.lang.Class type,
java.lang.Class definedIn)
public SingleValueConverter getConverterFromItemType(java.lang.Class type)
getConverterFromItemType(String, Class, Class)getConverterFromItemType in interface MappergetConverterFromItemType in class MapperWrapperpublic SingleValueConverter getConverterFromAttribute(java.lang.String attributeName)
getConverterFromAttribute(Class, String, Class)getConverterFromAttribute in interface MappergetConverterFromAttribute in class MapperWrapperpublic SingleValueConverter getConverterFromAttribute(java.lang.Class definedIn, java.lang.String attribute)
getConverterFromAttribute(Class, String, Class)MappergetConverterFromAttribute in interface MappergetConverterFromAttribute in class MapperWrapperdefinedIn - the field's parentattribute - the attribute namepublic SingleValueConverter getConverterFromAttribute(java.lang.Class definedIn, java.lang.String attribute, java.lang.Class type)
MappergetConverterFromAttribute in interface MappergetConverterFromAttribute in class MapperWrapperdefinedIn - the field's parentattribute - the attribute nametype - the type the converter should createpublic void addAttributeFor(java.lang.reflect.Field field)
field - the field itselfpublic void addAttributeFor(java.lang.Class definedIn,
java.lang.String fieldName)
definedIn - the declaring class of the fieldfieldName - the name of the field