Package com.jk.web.mvc
Class MvcObjectViewModel
java.lang.Object
com.jk.web.mvc.MvcObjectViewModel
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 Summary
ConstructorsConstructorDescriptionThis method constructs a newMvcObjectViewModel
.MvcObjectViewModel
(Object originalObject) This method constructs a newMvcObjectViewModel
with the provided object. -
Method Summary
Modifier and TypeMethodDescriptionThis method gets the MVC entity metadata associated with the object.This method retrieves the original object associated with the view model.void
init()
This method initializes the view model by extracting metadata from the original object.void
setOriginalObject
(Object originalObject) This method sets the original object associated with the view model to the provided value.
-
Constructor Details
-
MvcObjectViewModel
public MvcObjectViewModel()This method constructs a newMvcObjectViewModel
. -
MvcObjectViewModel
This method constructs a newMvcObjectViewModel
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
This method retrieves the original object associated with the view model.- Returns:
- the original object associated with the view model.
-
setOriginalObject
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
This method gets the MVC entity metadata associated with the object.- Returns:
- the MVC entity metadata associated with the object.
-