wicket.contrib.phonebook.web
Class DetachableContactModel

java.lang.Object
  extended by org.apache.wicket.model.LoadableDetachableModel<Contact>
      extended by wicket.contrib.phonebook.web.DetachableContactModel
All Implemented Interfaces:
Serializable, org.apache.wicket.IClusterable, org.apache.wicket.model.IDetachable, org.apache.wicket.model.IModel<Contact>

public class DetachableContactModel
extends org.apache.wicket.model.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
DetachableContactModel(Contact contact, ContactDao dao)
          Constructor
 
Method Summary
protected  Contact load()
          Loads the contact from the database
 
Methods inherited from class org.apache.wicket.model.LoadableDetachableModel
detach, getObject, isAttached, onAttach, onDetach, setObject, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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:
load in class org.apache.wicket.model.LoadableDetachableModel<Contact>
See Also:
wicket.model.LoadableDetachableModel#load()


Copyright © 2005-2012 Wicket developers. All Rights Reserved.