Package spark

Class ModelAndView


  • public class ModelAndView
    extends java.lang.Object
    Model And View class is used to set the name of the view and the model object to be rendered.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Object model
      Model object.
      private java.lang.String viewName
      View name used to render output.
    • Constructor Summary

      Constructors 
      Constructor Description
      ModelAndView​(java.lang.Object model, java.lang.String viewName)
      Constructs an instance with the provided model and view name
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getModel()  
      java.lang.String getViewName()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • model

        private java.lang.Object model
        Model object.
      • viewName

        private java.lang.String viewName
        View name used to render output.
    • Constructor Detail

      • ModelAndView

        public ModelAndView​(java.lang.Object model,
                            java.lang.String viewName)
        Constructs an instance with the provided model and view name
        Parameters:
        model - the model
        viewName - the view name
    • Method Detail

      • getModel

        public java.lang.Object getModel()
        Returns:
        the model object
      • getViewName

        public java.lang.String getViewName()
        Returns:
        the view name