Class UseAttributeForEnumMapper

    • Constructor Detail

      • UseAttributeForEnumMapper

        public UseAttributeForEnumMapper​(Mapper wrapped)
    • Method Detail

      • isEnum

        public static boolean isEnum​(java.lang.Class type)
        Deprecated.
        only used for Java 1.4 support
      • shouldLookForSingleValueConverter

        public boolean shouldLookForSingleValueConverter​(java.lang.String fieldName,
                                                         java.lang.Class type,
                                                         java.lang.Class definedIn)
        Overrides:
        shouldLookForSingleValueConverter in class AttributeMapper
      • getConverterFromItemType

        public SingleValueConverter getConverterFromItemType​(java.lang.String fieldName,
                                                             java.lang.Class type,
                                                             java.lang.Class definedIn)
        Description copied from interface: Mapper
        Returns a single value converter to be used in a specific field.
        Specified by:
        getConverterFromItemType in interface Mapper
        Overrides:
        getConverterFromItemType in class AttributeMapper
        Parameters:
        fieldName - the field name
        type - the field type
        definedIn - the type which defines this field
        Returns:
        a SingleValueConverter or null if there no such converter should be used for this field.
      • getConverterFromAttribute

        public SingleValueConverter getConverterFromAttribute​(java.lang.Class definedIn,
                                                              java.lang.String attribute,
                                                              java.lang.Class type)
        Description copied from interface: Mapper
        Returns which converter to use for an specific attribute in a type.
        Specified by:
        getConverterFromAttribute in interface Mapper
        Overrides:
        getConverterFromAttribute in class AttributeMapper
        Parameters:
        definedIn - the field's parent
        attribute - the attribute name
        type - the type the converter should create
      • createEnumMapper

        static Mapper createEnumMapper​(Mapper mapper)