Examples of PersistableField


Examples of com.carmanconsulting.cassidy.util.PersistableField

    public V fromColumns(List<HColumn<String, byte[]>> columns) {
        final Iterator<HColumn<String, byte[]>> iterator = columns.iterator();
        final V entity = instantiateFromColumn(iterator.next());
        while (iterator.hasNext()) {
            final HColumn<String, byte[]> column = iterator.next();
            final PersistableField field = fieldsMap.get(column.getName());
            if (field != null) {
                final Object fieldValue = field.getSerializer().fromBytes(column.getValue());
                field.setValue(entity, fieldValue);
            }
        }
        return entity;
    }
View Full Code Here

Examples of com.carmanconsulting.cassidy.util.PersistableField

    public V fromColumns(List<HColumn<String, byte[]>> columns) {
        final Iterator<HColumn<String, byte[]>> iterator = columns.iterator();
        final V entity = instantiateFromColumn(iterator.next());
        while (iterator.hasNext()) {
            final HColumn<String, byte[]> column = iterator.next();
            final PersistableField field = fieldsMap.get(column.getName());
            if (field != null) {
                final SerializedValue serializedValue = (SerializedValue) ObjectSerializer.get().fromBytes(column.getValue());
                final Object fieldValue = serializedValue.getValue(context);
                field.setValue(entity, fieldValue);
            } else {
                LOGGER.warn("Column {} not mapped to a persistent field on class {}!", column.getName(), entity.getClass().getCanonicalName());
            }
        }
        return entity;
View Full Code Here

Examples of com.carmanconsulting.cassidy.util.PersistableField

    @Override
    @SuppressWarnings("unchecked")
    public void execute(AssemblyStack assemblyStack) {
        Object value = getValue(assemblyStack);
        final Object target = assemblyStack.peek();
        PersistableField field = PersistableField.getPersistableField(target, fieldName);
        if (field != null) {
            field.setValue(target, value);
        } else {
            LOGGER.warn("Persistable field {} not found on object of type {}.", fieldName, target.getClass().getCanonicalName());
        }
    }
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.