@Override protected AutoBeanFactory getAutoBeanFactory() { return getRequestFactory().getAutoBeanFactory(); }
@Override SimpleProxyId<BaseProxy> getId(IdMessage op) { if (Strength.SYNTHETIC.equals(op.getStrength())) { return getRequestFactory().allocateSyntheticId( getRequestFactory().getTypeFromToken(op.getTypeToken()), op.getSyntheticId()); } return super.getId(op); }
/** * Convert any non-persistent ids into store-local synthetic ids. */ private <T extends BaseProxy> SimpleProxyId<T> serializedId(SimpleProxyId<T> stableId) { assert !stableId.isSynthetic(); if (stableId.isEphemeral()) { @SuppressWarnings("unchecked") SimpleProxyId<T> syntheticId = (SimpleProxyId<T>) syntheticIds.get(stableId); if (syntheticId == null) { int nextId = store.nextId(); assert nextId >= 0 : "ProxyStore.nextId() returned a negative number " + nextId; syntheticId = getRequestFactory().allocateSyntheticId(stableId.getProxyClass(), nextId + 1); syntheticIds.put(stableId, syntheticId); } return syntheticId; } return stableId; }
@Override <Q extends BaseProxy> AutoBean<Q> getProxyForReturnPayloadGraph(SimpleProxyId<Q> id) { AutoBean<Q> toReturn = super.getProxyForReturnPayloadGraph(id); if (restored.add(id)) { /* * If we haven't seen the id before, use the data in the OperationMessage * to repopulate the properties of the canonical bean for this id. */ OperationMessage op = getOperation(getRequestFactory().getHistoryToken(id)); this.processReturnOperation(id, op); toReturn.setTag(Constants.STABLE_ID, super.getId(op)); } return toReturn; }
private void serializeOneProxy(SimpleProxyId<?> idForSerialization, AutoBean<? extends BaseProxy> bean) { AutoBean<OperationMessage> op = makeOperationMessage(serializedId(BaseProxyCategory.stableId(bean)), bean, false); store.put(getRequestFactory().getHistoryToken(idForSerialization), AutoBeanCodex.encode(op)); } }
return getRequestFactory().getHistoryToken(id);
@Override protected AutoBeanFactory getAutoBeanFactory() { return getRequestFactory().getAutoBeanFactory(); }
@Override protected AutoBeanFactory getAutoBeanFactory() { return getRequestFactory().getAutoBeanFactory(); }
@Override protected AutoBeanFactory getAutoBeanFactory() { return getRequestFactory().getAutoBeanFactory(); }
@Override SimpleProxyId<BaseProxy> getId(IdMessage op) { if (Strength.SYNTHETIC.equals(op.getStrength())) { return getRequestFactory().allocateSyntheticId( getRequestFactory().getTypeFromToken(op.getTypeToken()), op.getSyntheticId()); } return super.getId(op); }
@Override SimpleProxyId<BaseProxy> getId(IdMessage op) { if (Strength.SYNTHETIC.equals(op.getStrength())) { return getRequestFactory().allocateSyntheticId( getRequestFactory().getTypeFromToken(op.getTypeToken()), op.getSyntheticId()); } return super.getId(op); }
@Override SimpleProxyId<BaseProxy> getId(IdMessage op) { if (Strength.SYNTHETIC.equals(op.getStrength())) { return getRequestFactory().allocateSyntheticId( getRequestFactory().getTypeFromToken(op.getTypeToken()), op.getSyntheticId()); } return super.getId(op); }
/** * Convert any non-persistent ids into store-local synthetic ids. */ private <T extends BaseProxy> SimpleProxyId<T> serializedId(SimpleProxyId<T> stableId) { assert !stableId.isSynthetic(); if (stableId.isEphemeral()) { @SuppressWarnings("unchecked") SimpleProxyId<T> syntheticId = (SimpleProxyId<T>) syntheticIds.get(stableId); if (syntheticId == null) { int nextId = store.nextId(); assert nextId >= 0 : "ProxyStore.nextId() returned a negative number " + nextId; syntheticId = getRequestFactory().allocateSyntheticId(stableId.getProxyClass(), nextId + 1); syntheticIds.put(stableId, syntheticId); } return syntheticId; } return stableId; }
/** * Convert any non-persistent ids into store-local synthetic ids. */ private <T extends BaseProxy> SimpleProxyId<T> serializedId(SimpleProxyId<T> stableId) { assert !stableId.isSynthetic(); if (stableId.isEphemeral()) { @SuppressWarnings("unchecked") SimpleProxyId<T> syntheticId = (SimpleProxyId<T>) syntheticIds.get(stableId); if (syntheticId == null) { int nextId = store.nextId(); assert nextId >= 0 : "ProxyStore.nextId() returned a negative number " + nextId; syntheticId = getRequestFactory().allocateSyntheticId(stableId.getProxyClass(), nextId + 1); syntheticIds.put(stableId, syntheticId); } return syntheticId; } return stableId; }
@Override <Q extends BaseProxy> AutoBean<Q> getProxyForReturnPayloadGraph(SimpleProxyId<Q> id) { AutoBean<Q> toReturn = super.getProxyForReturnPayloadGraph(id); if (restored.add(id)) { /* * If we haven't seen the id before, use the data in the OperationMessage * to repopulate the properties of the canonical bean for this id. */ OperationMessage op = getOperation(getRequestFactory().getHistoryToken(id)); this.processReturnOperation(id, op); toReturn.setTag(Constants.STABLE_ID, super.getId(op)); } return toReturn; }
@Override <Q extends BaseProxy> AutoBean<Q> getProxyForReturnPayloadGraph(SimpleProxyId<Q> id) { AutoBean<Q> toReturn = super.getProxyForReturnPayloadGraph(id); if (restored.add(id)) { /* * If we haven't seen the id before, use the data in the OperationMessage * to repopulate the properties of the canonical bean for this id. */ OperationMessage op = getOperation(getRequestFactory().getHistoryToken(id)); this.processReturnOperation(id, op); toReturn.setTag(Constants.STABLE_ID, super.getId(op)); } return toReturn; }
@Override <Q extends BaseProxy> AutoBean<Q> getProxyForReturnPayloadGraph(SimpleProxyId<Q> id) { AutoBean<Q> toReturn = super.getProxyForReturnPayloadGraph(id); if (restored.add(id)) { /* * If we haven't seen the id before, use the data in the OperationMessage * to repopulate the properties of the canonical bean for this id. */ OperationMessage op = getOperation(getRequestFactory().getHistoryToken(id)); this.processReturnOperation(id, op); toReturn.setTag(Constants.STABLE_ID, super.getId(op)); } return toReturn; }
private void serializeOneProxy(SimpleProxyId<?> idForSerialization, AutoBean<? extends BaseProxy> bean) { AutoBean<OperationMessage> op = makeOperationMessage(serializedId(BaseProxyCategory.stableId(bean)), bean, false); store.put(getRequestFactory().getHistoryToken(idForSerialization), AutoBeanCodex.encode(op)); } }
private void serializeOneProxy(SimpleProxyId<?> idForSerialization, AutoBean<? extends BaseProxy> bean) { AutoBean<OperationMessage> op = makeOperationMessage(serializedId(BaseProxyCategory.stableId(bean)), bean, false); store.put(getRequestFactory().getHistoryToken(idForSerialization), AutoBeanCodex.encode(op)); } }
private void serializeOneProxy(SimpleProxyId<?> idForSerialization, AutoBean<? extends BaseProxy> bean) { AutoBean<OperationMessage> op = makeOperationMessage(serializedId(BaseProxyCategory.stableId(bean)), bean, false); store.put(getRequestFactory().getHistoryToken(idForSerialization), AutoBeanCodex.encode(op)); } }