Hello, ranchers. Reading the following memento pattern definition
Without violating encapsulation, capture and externalise an object's internal state so that the object can be restored to this state later.
, I came up with a sudden thought that DTO J2EE pattern is building on this one. First, the facade session bean accepting and returning DTOs has a role of Caretaker, and DTO is a Memento for the entity bean. Concerning the definition 'can be restored'. This is accomplished by passing a populated DTO to the facade, and the bean updates the entity bean to reflect the state. This all is quite a high-level view from an unusual angle, so don't take it too seriously. But I would like to here from you, people, if my thoughts went in the right direction. cheers