Package wicket.contrib.phonebook.web
Class DetachableContactModel
- java.lang.Object
-
- org.apache.wicket.model.LoadableDetachableModel<Contact>
-
- wicket.contrib.phonebook.web.DetachableContactModel
-
- All Implemented Interfaces:
Serializable,IDetachable,IModel<Contact>,IClusterable
public class DetachableContactModel extends LoadableDetachableModel<Contact>
Detachable, read-only Contact model. Ensures that memory used to load the contact details is immediately freed rather than held in the session. Typically used by List-type pages, where multiple elements are loaded at a time.- Author:
- ivaynberg
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DetachableContactModel(Contact contact, ContactDao dao)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Contactload()Loads the contact from the database-
Methods inherited from class org.apache.wicket.model.LoadableDetachableModel
detach, getObject, isAttached, of, onAttach, onDetach, setObject, toString
-
-
-
-
Constructor Detail
-
DetachableContactModel
public DetachableContactModel(Contact contact, ContactDao dao)
Constructor- Parameters:
contact-dao-
-
-
Method Detail
-
load
protected Contact load()
Loads the contact from the database- Specified by:
loadin classLoadableDetachableModel<Contact>- See Also:
LoadableDetachableModel.load()
-
-