Пример #1
0
 private ObjectAdapterMemento(final ObjectAdapter adapter) {
   if (adapter == null) {
     throw new IllegalArgumentException("adapter cannot be null");
   }
   final ObjectSpecification specification = adapter.getSpecification();
   objectSpecId = specification.getSpecId();
   init(adapter);
 }
Пример #2
0
 /**
  * Updates the memento if the adapter's state has changed.
  *
  * <p>This is a no-op for
  *
  * @param adapter
  */
 public void setAdapter(final ObjectAdapter adapter) {
   init(adapter);
 }