Class AlteringModel<F,​B>

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.wicket.model.IChainingModel<B>, org.apache.wicket.model.IDetachable, org.apache.wicket.model.IModel<B>, org.apache.wicket.util.io.IClusterable

    public abstract class AlteringModel<F,​B>
    extends java.lang.Object
    implements org.apache.wicket.model.IChainingModel<B>
    A basic model wrapper that will alter an IModel<Foo> into an IModel<Bar> via the implementation of the abstract alter method
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.wicket.model.IModel<F> model  
    • Constructor Summary

      Constructors 
      Constructor Description
      AlteringModel​(org.apache.wicket.model.IModel<F> model)  
    • Field Detail

      • model

        protected org.apache.wicket.model.IModel<F> model
    • Constructor Detail

      • AlteringModel

        public AlteringModel​(org.apache.wicket.model.IModel<F> model)
    • Method Detail

      • getObject

        public B getObject()
        Specified by:
        getObject in interface org.apache.wicket.model.IModel<F>
      • alter

        protected abstract B alter​(F modelObject)
      • setObject

        public void setObject​(B object)
        Specified by:
        setObject in interface org.apache.wicket.model.IModel<F>
      • detach

        public void detach()
        Specified by:
        detach in interface org.apache.wicket.model.IDetachable
      • getChainedModel

        public org.apache.wicket.model.IModel<F> getChainedModel()
        Specified by:
        getChainedModel in interface org.apache.wicket.model.IChainingModel<F>
      • setChainedModel

        public void setChainedModel​(org.apache.wicket.model.IModel<?> model)
        Specified by:
        setChainedModel in interface org.apache.wicket.model.IChainingModel<F>