@Override public ObjectAdapterMemento getObject() { if (hasPending) { return pending; } final ObjectAdapter adapter = entityModel.getObject(); return ObjectAdapterMemento.createOrNull(adapter); }
@Override public void setObject(final ObjectAdapter adapter) { super.setObject(adapter); adapterMemento = ObjectAdapterMemento.createOrNull(adapter); }
public EntityModel(final ObjectAdapter adapter) { this(ObjectAdapterMemento.createOrNull(adapter)); setObject(adapter); }