Package com.carmanconsulting.cassidy.util

Examples of com.carmanconsulting.cassidy.util.SerializedValue


        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());
            }
        }
View Full Code Here


        columns.add(HFactory.createStringColumn(POJO_TYPE_COLUMN_NAME, object.getClass().getName()));
        for (PersistableField field : fieldsMap.values()) {
            final Object fieldValue = field.getValue(object);

            if (!CassidyUtils.isDefaultValue(field.getType(), fieldValue)) {
                final SerializedValue serializedValue = new SerializedValue(context, fieldValue);
                columns.add(HFactory.createColumn(field.getColumnName(), serializedValue, AsciiSerializer.get(), ObjectSerializer.get()));
            }
        }
        return columns;
    }
View Full Code Here

        assemblyStack.push(value);
    }

    @Override
    public Object getColumnValue() {
        return new SerializedValue(context, value);
    }
View Full Code Here

        return new SerializedValue(context, value);
    }

    @Override
    public void initializeFromColumn(byte[] columnValue, CassidyContext context) {
        SerializedValue serializedValue = (SerializedValue) ObjectSerializer.get().fromBytes(columnValue);
        this.value = serializedValue.getValue(context);
    }
View Full Code Here

TOP

Related Classes of com.carmanconsulting.cassidy.util.SerializedValue

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.