@Override public void hydrate(ClientObjectManager objectManager, TCObject tcObject, DNA dna, Object po) throws IOException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { LiteralAction a = (LiteralAction) cursor.getAction(); Object value = a.getObject(); tcObject.setLiteralValue(value); } }
@Override public void hydrate(ClientObjectManager objectManager, TCObject tcObject, DNA dna, Object po) throws IOException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { LiteralAction a = (LiteralAction) cursor.getAction(); Object value = a.getObject(); tcObject.setLiteralValue(value); } }
@Override public void hydrate(ClientObjectManager objectManager, TCObject tcObject, DNA dna, Object pojo) throws IOException, ClassNotFoundException { Set set = (Set) pojo; DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { LogicalAction action = cursor.getLogicalAction(); int method = action.getMethod(); Object[] params = action.getParameters(); apply(objectManager, set, method, params); } }
@Override public void hydrate(final ClientObjectManager objectManager, final TCObject tco, final DNA dna, final Object po) throws IOException, ClassNotFoundException { final DNACursor cursor = dna.getCursor(); while (cursor.next(this.encoding)) { final LogicalAction action = cursor.getLogicalAction(); final int method = action.getMethod(); final Object[] params = action.getParameters(); apply(objectManager, po, method, params); } }
@Override public void hydrate(final ClientObjectManager objectManager, final TCObject tco, final DNA dna, final Object po) throws IOException, ClassNotFoundException { final DNACursor cursor = dna.getCursor(); while (cursor.next(this.encoding)) { final LogicalAction action = cursor.getLogicalAction(); final int method = action.getMethod(); final Object[] params = action.getParameters(); apply(objectManager, po, method, params); } }
@Override public Object getNewInstance(ClientObjectManager objectManager, DNA dna) throws IOException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); Assert.assertEquals(1, cursor.getActionCount()); cursor.next(encoding); LiteralAction a = (LiteralAction) cursor.getAction(); Object value = a.getObject(); return value; } }
@Override public void hydrate(ClientObjectManager objectManager, TCObject tcObject, DNA dna, Object pojo) throws IOException, ClassNotFoundException { Set set = (Set) pojo; DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { LogicalAction action = cursor.getLogicalAction(); int method = action.getMethod(); Object[] params = action.getParameters(); apply(objectManager, set, method, params); } }
@Override public Object getNewInstance(ClientObjectManager objectManager, DNA dna) throws IOException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); Assert.assertEquals(1, cursor.getActionCount()); cursor.next(encoding); LiteralAction a = (LiteralAction) cursor.getAction(); Object value = a.getObject(); return value; } }
@Override public void hydrate(ClientObjectManager objectManager, TCObject tcObject, DNA dna, Object po) throws IOException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); String fieldName; Object fieldValue; while (cursor.next(encoding)) { PhysicalAction a = cursor.getPhysicalAction(); Assert.eval(a.isTruePhysical()); fieldName = a.getFieldName(); fieldValue = a.getObject(); tcObject.setValue(fieldName, fieldValue); } }
@Override public void hydrate(ClientObjectManager objectManager, TCObject tcObject, DNA dna, Object po) throws IOException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); String fieldName; Object fieldValue; while (cursor.next(encoding)) { PhysicalAction a = cursor.getPhysicalAction(); Assert.eval(a.isTruePhysical()); fieldName = a.getFieldName(); fieldValue = a.getObject(); tcObject.setValue(fieldName, fieldValue); } }
public void hydrate(final ApplicatorObjectManager objectManager, final TCObjectExternal tco, final DNA dna, final Object pojo) throws IOException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { PhysicalAction a = cursor.getPhysicalAction(); if (a.isEntireArray()) { tco.setValue(VALUE_FIELD, a.getObject()); } else { tco.setValue(a.getFieldName(), a.getObject()); } } } }
public void hydrate(final ApplicatorObjectManager objectManager, final TCObjectExternal tco, final DNA dna, final Object pojo) throws IOException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { PhysicalAction a = cursor.getPhysicalAction(); if (a.isEntireArray()) { tco.setValue(VALUE_FIELD, a.getObject()); } else { tco.setValue(a.getFieldName(), a.getObject()); } } } }
public void hydrate(final ApplicatorObjectManager objectManager, final TCObjectExternal tco, final DNA dna, final Object pojo) throws IOException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { PhysicalAction a = cursor.getPhysicalAction(); if (a.isEntireArray()) { tco.setValue(VALUE_FIELD, a.getObject()); } else { tco.setValue(a.getFieldName(), a.getObject()); } } } }
public void hydrate(final ClientObjectManager objMgr, final TCObject tco, final DNA dna, final Object pojo) throws IOException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { PhysicalAction a = cursor.getPhysicalAction(); if (a.isEntireArray()) { tco.setValue(VALUE_FIELD, a.getObject()); } else { tco.setValue(a.getFieldName(), a.getObject()); } } } }
public void hydrate(ApplicatorObjectManager objectManager, TCObjectExternal tcObject, DNA dna, Object pojo) throws IOException, ClassNotFoundException { List items = (List) pojo; DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { LogicalAction action = cursor.getLogicalAction(); int method = action.getMethod(); Object[] params = action.getParameters(); for (int i = 0, n = params.length; i < n; i++) { Object param = params[i]; if (param instanceof ObjectID) { params[i] = objectManager.lookupObject((ObjectID) param); } } try { apply(items, method, params); } catch (IndexOutOfBoundsException ioobe) { logger.error("Error applying update to " + pojo, ioobe); } } }
public void hydrate(ClientObjectManager objectManager, TCObject tcObject, DNA dna, Object pojo) throws IOException, ClassNotFoundException { List items = (List) pojo; DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { LogicalAction action = cursor.getLogicalAction(); int method = action.getMethod(); Object[] params = action.getParameters(); for (int i = 0, n = params.length; i < n; i++) { Object param = params[i]; if (param instanceof ObjectID) { params[i] = objectManager.lookupObject((ObjectID) param); } } try { apply(items, method, params); } catch (IndexOutOfBoundsException ioobe) { logger.error("Error applying update to " + pojo, ioobe); } } }
@Override public void hydrate(ClientObjectManager objectManager, TCObject tcObject, DNA dna, Object po) throws IOException, IllegalArgumentException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { PhysicalAction a = cursor.getPhysicalAction(); if (a.isArrayElement()) { setArrayElement(a.getArrayIndex(), a.getObject(), tcObject, po); } else if (a.isEntireArray() || a.isSubArray()) { Object array = a.getObject(); int offset = a.isEntireArray() ? 0 : a.getArrayIndex(); if (ClassUtils.isPrimitiveArray(array)) { System.arraycopy(array, 0, po, offset, Array.getLength(array)); } else { hydrateNonPrimitiveArray((Object[]) array, tcObject, po, offset); } } else { throw Assert.failure("Invalid physical action for array"); } } }
public Object getNewInstance(ApplicatorObjectManager objectManager, DNA dna) throws IOException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); Assert.assertEquals(3, cursor.getActionCount()); cursor.next(encoding); PhysicalAction a = cursor.getPhysicalAction(); String className = (String) a.getObject(); cursor.next(encoding); a = cursor.getPhysicalAction(); Class target = (Class) a.getObject(); cursor.next(encoding); a = cursor.getPhysicalAction(); Object propertyNames = a.getObject(); propertyNames = objectManager.lookupObject((ObjectID) propertyNames); return create(target, className, propertyNames); }