|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.shept.org.springframework.web.servlet.mvc.support.ModelUtils
public class ModelUtils
| Field Summary | |
|---|---|
static String |
initMethod
|
protected static org.apache.commons.logging.Log |
logger
Logger that is available to subclasses |
| Constructor Summary | |
|---|---|
ModelUtils()
|
|
| Method Summary | |
|---|---|
private static Object |
cloneCopy(Object model)
When the object to be copied provides a clone implementation return a clone of the object. |
static Object |
copyModel(org.springframework.dao.support.DaoSupport dao,
Object model)
Trying to copy a model as generic as possible when Dao Layer is available 1st we check if a #clone method is implemented. |
static Object |
copyModel(Object model)
Trying to copy a model as generic as possible when no Dao layer is available 1st we check if a #clone method is implemented. |
static ModelCreation |
getNewModelTemplate(ChainConfiguration cc,
Object model,
String initString)
|
static ModelCreation |
getNewModelTemplate(Class<?> clazz,
Object model,
String initString)
|
static ModelCreation |
getNewModelTemplate(Class<?> clazz,
String initString)
|
static void |
initialize(Object target,
Object sourceModel)
|
private static Object |
shallowCopy(Object model)
Answer a shallow copy of the object |
static Object |
unwrapIfNecessary(Object commandOrModel)
Unwrap a command or model from its envelope. |
static Object |
wrapIfNecessary(Object model)
This is the counterpart of unwrapIfNecessary(Object)
When showing model entity objects in a form we may want to decorate them
with additional information that should'nt be saved to the database,
e.g. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static String initMethod
protected static org.apache.commons.logging.Log logger
| Constructor Detail |
|---|
public ModelUtils()
| Method Detail |
|---|
public static Object unwrapIfNecessary(Object commandOrModel)
commandOrModel -
public static Object wrapIfNecessary(Object model)
unwrapIfNecessary(Object)
When showing model entity objects in a form we may want to decorate them
with additional information that should'nt be saved to the database,
e.g. repeat information fields (passwords other temporary or compound fields)
Wrapping provides a solution to present a command object instead of the real model entity.
model -
public static Object copyModel(Object model)
model -
public static Object copyModel(org.springframework.dao.support.DaoSupport dao,
Object model)
model -
private static Object cloneCopy(Object model)
model -
private static Object shallowCopy(Object model)
model -
public static ModelCreation getNewModelTemplate(Class<?> clazz,
Object model,
String initString)
public static ModelCreation getNewModelTemplate(Class<?> clazz,
String initString)
public static ModelCreation getNewModelTemplate(ChainConfiguration cc,
Object model,
String initString)
public static void initialize(Object target,
Object sourceModel)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||