Package com.jengine.utils.commons

Examples of com.jengine.utils.commons.Variant


    public boolean isChanged(Model obj) throws DBException {
        return obj.getOldData().containsKey(fieldName);
    }

    public Object cast(Object value) throws DBException {
        return new Variant(value).convertTo(getFieldClass());
    }
View Full Code Here


    public String getAlias() {
        return name;
    }

    public Object cast(Object value) throws DBException {
        return new Variant(value).convertTo(fieldClass);
    }
View Full Code Here

        List values = value instanceof List ? (List) value : Arrays.asList(value);
        Field field = getReverseField().getKeyField();

        for (Object item : values) {
            result.add(item instanceof Model ?
                    ((Model) item).getValue(field) : new Variant(item).convertTo(field.getFieldClass()));
        }

        return result;
    }
View Full Code Here

        return key != null ? getReferenceClass().filter(getReferenceModelKey().eq(key)).one() : null;
    }

    public Object cast(Object value) throws DBException {
        Field field = getReferenceModelKey();
        return value instanceof Model ? ((Model) value).getValue(field) : new Variant(value).convertTo(field.getFieldClass());
    }
View Full Code Here

TOP

Related Classes of com.jengine.utils.commons.Variant

Copyright © 2018 www.massapicom. 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.