@Override public Object getInstance(ByteBuffer buffer) { return readDynamicComposite(dynamicSerializer.fromByteBuffer(buffer)); }
DynamicComposite parsed = DynamicCompositeSerializer.get().fromByteBuffer(buffer);
DynamicComposite composite = serializer.fromByteBuffer(column.getValue());
DynamicComposite composite = serializer.fromByteBuffer(column.getValue());
/** * Read the field from the query result into the opject within the state * manager. * * @param stateManager * @param result * @return True if the field was loaded. False otherwise */ public boolean readField(OpenJPAStateManager stateManager, QueryResult<ColumnSlice<String, ByteBuffer>> result) { HColumn<String, ByteBuffer> column = result.get().getColumnByName(name); if (column == null) { stateManager.store(fieldId, null); return false; } DynamicComposite composite = serializer.fromByteBuffer(column.getValue()); // The entity itself is embedded read the de-serialized object and set // it's state manager OpenJPAStateManager embeddedSm = stateManager.getContext().embed(null, null, stateManager, embeddedField); stateManager.store(fieldId, embeddedSm.getManagedInstance()); // now load from the composite entityValue.getFromComposite(embeddedSm, composite, 0); return true; }