Class LoadableModel<T>

java.lang.Object
com.evolveum.midpoint.gui.api.model.LoadableModel<T>
All Implemented Interfaces:
Serializable, org.apache.wicket.model.IDetachable, org.apache.wicket.model.IModel<T>, org.apache.wicket.util.io.IClusterable
Direct Known Subclasses:
CountableLoadableModel, NonEmptyLoadableModel, RoleAnalysisAggregateChartModel, RoleAnalysisAttributeChartModel, RoleAnalysisAttributeResultChartModel, RoleAnalysisStackedAttributeChartModel, ShadowStatisticsModel

public abstract class LoadableModel<T> extends Object implements org.apache.wicket.model.IModel<T>
Lazy loading Wicket model. This is an IModel implementation that loads the model content only when needed. This is supposed to be used for objects that are expensive to load. So we can avoid loading the at all when a component that uses them is not visible.
Author:
lazyman
See Also:
  • Constructor Details

    • LoadableModel

      public LoadableModel()
    • LoadableModel

      public LoadableModel(boolean alwaysReload)
    • LoadableModel

      public LoadableModel(T object)
    • LoadableModel

      public LoadableModel(T object, boolean alwaysReload)
  • Method Details

    • create

      public static <T> LoadableModel<T> create(Producer<T> producer, boolean alwaysReload)
    • getObject

      public T getObject()
      Specified by:
      getObject in interface org.apache.wicket.model.IModel<T>
    • setObject

      public void setObject(T object)
      Specified by:
      setObject in interface org.apache.wicket.model.IModel<T>
    • isLoaded

      public boolean isLoaded()
    • reset

      public void reset()
    • detach

      public void detach()
      Specified by:
      detach in interface org.apache.wicket.model.IDetachable
      Specified by:
      detach in interface org.apache.wicket.model.IModel<T>
    • getNestedModel

      public org.apache.wicket.model.IModel getNestedModel()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • load

      protected abstract T load()
    • onLoad

      protected void onLoad()
    • onDetach

      protected void onDetach()
    • revive

      public void revive(PrismContext prismContext) throws SchemaException
      Throws:
      SchemaException