|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.extensions.surf.ModelHelper
public final class ModelHelper
Static Utility class that provides reflection against the public properties of a given object. This class provides methods for checking whether a given property name is declared as a model variable. Model variables are defined on ModelObject derived types as variables that begin with a "PROP_" prefix. The code walks the class chain and picks out which variables are model specific and which ones are custom. The results are stored in look-up tables so that subsequent lookups will simply hit the cache. This is perfectly fine since model definitions do not change at runtime.
| Constructor Summary | |
|---|---|
ModelHelper()
|
|
| Method Summary | |
|---|---|
static boolean |
isCustomProperty(ModelObject object,
String propertyName)
Determines whether the given property is a custom property for the given object |
static boolean |
isModelProperty(ModelObject object,
String propertyName)
Determines whether the given property is a non-custom (or model) property for the given object. |
static String |
newGUID()
Builds a new GUID |
static void |
resetId(ModelObject object,
String id)
Allows model object ids to be set manually |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ModelHelper()
| Method Detail |
|---|
public static boolean isCustomProperty(ModelObject object,
String propertyName)
object - the objectpropertyName - the property name
public static boolean isModelProperty(ModelObject object,
String propertyName)
object - the objectpropertyName - the property name
public static String newGUID()
public static void resetId(ModelObject object,
String id)
object - id -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||