Class NonEmptyLoadableModel<T>
- java.lang.Object
-
- com.evolveum.midpoint.gui.api.model.LoadableModel<T>
-
- com.evolveum.midpoint.gui.api.model.NonEmptyLoadableModel<T>
-
- All Implemented Interfaces:
NonEmptyModel<T>
,Serializable
,org.apache.wicket.model.IDetachable
,org.apache.wicket.model.IModel<T>
,org.apache.wicket.util.io.IClusterable
- Direct Known Subclasses:
ResourceWizardIssuesModel
public abstract class NonEmptyLoadableModel<T> extends LoadableModel<T> implements NonEmptyModel<T>
Loadable model whose object is always not null. Used to reduce checks of the 'model.getObject() != null' kind. TODO remove redundant checks after annotations are checked at runtime (needs to be done in maven build)- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NonEmptyLoadableModel(boolean alwaysReload)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static <T> NonEmptyLoadableModel<T>
create(Producer<T> producer, boolean alwaysReload)
T
getObject()
protected abstract T
load()
void
setObject(T object)
-
Methods inherited from class com.evolveum.midpoint.gui.api.model.LoadableModel
detach, getNestedModel, isLoaded, onDetach, onLoad, reset, revive, toString
-
-
-
-
Method Detail
-
create
public static <T> NonEmptyLoadableModel<T> create(Producer<T> producer, boolean alwaysReload)
-
getObject
@NotNull public T getObject()
- Specified by:
getObject
in interfaceorg.apache.wicket.model.IModel<T>
- Specified by:
getObject
in interfaceNonEmptyModel<T>
- Overrides:
getObject
in classLoadableModel<T>
-
setObject
public void setObject(@NotNull T object)
- Specified by:
setObject
in interfaceorg.apache.wicket.model.IModel<T>
- Specified by:
setObject
in interfaceNonEmptyModel<T>
- Overrides:
setObject
in classLoadableModel<T>
-
load
@NotNull protected abstract T load()
- Specified by:
load
in classLoadableModel<T>
-
-