Package com.impetus.kundera.property.accessor

Examples of com.impetus.kundera.property.accessor.EnumAccessor.fromString()


                        }
                    }
                    break;
                case ENUM:
                    EnumAccessor accessor = new EnumAccessor();
                    value = accessor.fromString(javaType, value.toString());
                    PropertyAccessorHelper.set(entityObject, (Field) column.getJavaMember(), value);
                    break;
                case PRIMITIVE:
                    value = MongoDBUtils.populateValue(value, value.getClass());
                    value = MongoDBUtils.getTranslatedObject(value, value.getClass(), javaType);
View Full Code Here


        if (member != null && member.getType().isEnum())
        {
            EnumAccessor accessor = new EnumAccessor();
            if (member != null)
            {
                retVal = accessor.fromString(member.getType(), (String) retVal);
            }
        }
        else if (member != null
                && (member.getType().isAssignableFrom(char.class) || member.getType().isAssignableFrom(Character.class)))
        {
View Full Code Here

    private Object onEnum(Attribute attribute, Object fieldValue)
    {
        if (((Field) attribute.getJavaMember()).getType().isEnum())
        {
            EnumAccessor accessor = new EnumAccessor();
            fieldValue = accessor.fromString(((AbstractAttribute) attribute).getBindableJavaType(),
                    fieldValue.toString());

        }
        return fieldValue;
    }
View Full Code Here

                                    .toUpperCase()) == null ? valueMap.get(jpaColumnName.toLowerCase()) : valueMap
                                    .get(jpaColumnName.toUpperCase()) : valueMap.get(jpaColumnName);
                            if (valueObject != null && AttributeType.getType(javaType).equals(AttributeType.ENUM))
                            {
                                EnumAccessor accessor = new EnumAccessor();
                                valueObject = accessor.fromString(javaType, valueObject.toString());
                                setFieldValue(entity, valueObject, column);
                            }
                            else if(valueObject != null)
                            {
                                setFieldValue(entity, valueObject, column);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.