Class MvcObjectViewModel

java.lang.Object
com.jk.web.mvc.MvcObjectViewModel

public class MvcObjectViewModel extends Object
This class represents a view model for an object in the Model-View-Controller (MVC) architecture.

It provides metadata about the object, such as its fields and their types.

Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Constructor Details

    • MvcObjectViewModel

      public MvcObjectViewModel()
      This method constructs a new MvcObjectViewModel.
    • MvcObjectViewModel

      public MvcObjectViewModel(Object originalObject)
      This method constructs a new MvcObjectViewModel with the provided object.
      Parameters:
      originalObject - Specifies the original object to associate with the view model.
  • Method Details

    • init

      public void init()
      This method initializes the view model by extracting metadata from the original object.
    • getOriginalObject

      public Object getOriginalObject()
      This method retrieves the original object associated with the view model.
      Returns:
      the original object associated with the view model.
    • setOriginalObject

      public void setOriginalObject(Object originalObject)
      This method sets the original object associated with the view model to the provided value.
      Parameters:
      originalObject - Specifies the new original object associated with the view model.
    • getEntity

      public MvcEntityMeta getEntity()
      This method gets the MVC entity metadata associated with the object.
      Returns:
      the MVC entity metadata associated with the object.