|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.acsinet_solutions.cetia4.controller.map.AbstractMapping
public abstract class AbstractMapping
Base class for simple mappings with structure and utility methods. Simple mappings are mappings of one element in a form versus one simple property in a bean. More complex mapping require complete implementation of the Mapping interface.
| Constructor Summary | |
|---|---|
protected |
AbstractMapping(java.lang.String fieldName,
java.lang.String propertyName,
boolean required)
Public constructor, for a mapping that requires nulls. |
protected |
AbstractMapping(java.lang.String fieldName,
java.lang.String propertyName,
boolean required,
boolean allowsNulls)
Public constructor. |
| Method Summary | |
|---|---|
java.lang.String |
getFieldName()
Get the field name of the current mapping |
java.lang.String |
getPropertyName()
Gets the name of the property used in this mapping. |
java.lang.String |
getReadableName()
Gets the readable name of the field. |
boolean |
isNullsAllowed()
Get the null allowed flag of the current mapping |
boolean |
isRequired()
Get the required flag of the current mapping |
protected ValidationIssue |
performBigDecimalMapping(java.lang.String parameter,
java.lang.Object bean)
Generic BigDecimal mapping utility method |
protected ValidationIssue |
performBooleanMapping(java.lang.String parameter,
java.lang.Object bean)
Generic boolean mapping utility method |
protected ValidationIssue |
performCalendarMapping(java.lang.String parameter,
java.lang.Object bean)
Generic Calendar mapping utility method |
protected ValidationIssue |
performDateMapping(java.lang.String parameter,
java.lang.Object bean)
Generic Date mapping utility method |
protected ValidationIssue |
performDoubleMapping(java.lang.String parameter,
java.lang.Object bean)
Generic int mapping utility method |
protected ValidationIssue |
performFloatMapping(java.lang.String parameter,
java.lang.Object bean)
Generic int mapping utility method |
protected ValidationIssue |
performIntMapping(java.lang.String parameter,
java.lang.Object bean)
Generic int mapping utility method |
protected ValidationIssue |
performLongMapping(java.lang.String parameter,
java.lang.Object bean)
Generic int mapping utility method |
protected ValidationIssue |
performStringMapping(java.lang.String parameter,
java.lang.Object bean)
Generic String mapping utility method |
void |
setInvalidDateMessageKey(java.lang.String invalidDateMessageKey)
Set the invalid Date message. |
void |
setInvalidIntMessageKey(java.lang.String invalidIntMessageKey)
Set the invalid int message. |
void |
setInvalidNumericMessageKey(java.lang.String invalidMessageKey)
Set the invalid Numeric message. |
void |
setNullMessageKey(java.lang.String nullMessageKey)
Set the null message key. |
void |
setNullsAllowed(boolean allowsNulls)
Set the null allowed flag of the current mapping |
protected void |
setProperty(java.lang.Object bean,
java.lang.Object value)
Utility method for setting the internal configure property of the provided bean to the provided value. |
void |
setReadableName(java.lang.String readableName)
Set the readable name to improve legibility in code. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.acsinet_solutions.cetia4.controller.map.Mapping |
|---|
performMapping |
| Constructor Detail |
|---|
protected AbstractMapping(java.lang.String fieldName,
java.lang.String propertyName,
boolean required,
boolean allowsNulls)
fieldName - is the name from the HTML formpropertyName - is the JavaBean propertyrequired - true if the mapping is attempted even if no
input parameter is present. Required mappings are useful for
example where dealing with check boxes where the HTTP param may
not travel if the component is not checked.allowsNulls - true if the mapping resultant value allows null;
false otherwise. Values mapped to primitive type typically do not
accept nulls, and an empty parameter will raise an issue.
protected AbstractMapping(java.lang.String fieldName,
java.lang.String propertyName,
boolean required)
fieldName - is the name from the HTML formpropertyName - is the JavaBean propertyrequired - true if the mapping is attempted even if no
input parameter is present. Required mappings are useful for
example where dealing with check boxes where the HTTP param may
not travel if the component is not checked.allowsNulls - true if the mapping resultant value allows null;
false otherwise. Values mapped to primitive type typically do not
accept nulls, and an empty parameter will raise an issue.| Method Detail |
|---|
public final java.lang.String getPropertyName()
getPropertyName in interface MappingRequestMapper.getMapping(String),
RequestMapper.removeMapping(String)public final java.lang.String getFieldName()
public final boolean isRequired()
public final boolean isNullsAllowed()
public final void setNullsAllowed(boolean allowsNulls)
public final java.lang.String getReadableName()
public final void setReadableName(java.lang.String readableName)
public final void setInvalidIntMessageKey(java.lang.String invalidIntMessageKey)
public final void setInvalidNumericMessageKey(java.lang.String invalidMessageKey)
public final void setInvalidDateMessageKey(java.lang.String invalidDateMessageKey)
public final void setNullMessageKey(java.lang.String nullMessageKey)
protected final ValidationIssue performStringMapping(java.lang.String parameter,
java.lang.Object bean)
protected final ValidationIssue performIntMapping(java.lang.String parameter,
java.lang.Object bean)
protected final ValidationIssue performLongMapping(java.lang.String parameter,
java.lang.Object bean)
protected final ValidationIssue performFloatMapping(java.lang.String parameter,
java.lang.Object bean)
protected final ValidationIssue performDoubleMapping(java.lang.String parameter,
java.lang.Object bean)
protected final ValidationIssue performBigDecimalMapping(java.lang.String parameter,
java.lang.Object bean)
protected final ValidationIssue performDateMapping(java.lang.String parameter,
java.lang.Object bean)
protected final ValidationIssue performCalendarMapping(java.lang.String parameter,
java.lang.Object bean)
protected final ValidationIssue performBooleanMapping(java.lang.String parameter,
java.lang.Object bean)
protected final void setProperty(java.lang.Object bean,
java.lang.Object value)
The provided bean may also bean an instance of java.util.Map, in which case the put() method of the given map will be called by this method.
IllegalStateNestableException - Thrown if the property
assignation could not be performed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||