public abstract class FldDatePair extends MboValueAdapter
| Modifier and Type | Field and Description |
|---|---|
protected static int |
COMPARE_TYPE_AFTER |
protected static int |
COMPARE_TYPE_BEFORE |
mboValueTYPE_DOMAIN, TYPE_FIELDCLASS, TYPE_KEY, TYPE_UNKNOWNALLROWS, CHANGEDBY_USER, COUNT_ADDITIONS, COUNT_AFTERSAVE, COUNT_DATABASE, COUNT_DELETED, COUNT_EXISTING, DBCONFIG, DELAYVALIDATION, DELAYVALIDATIONONLY, DISCARDABLE, GOTCOMPLETEWHERE, HIDDEN, NO_RELATEDMBOS_OF_OWNERSCHILDREN_FETCH, NOACCESSCHECK, NOACTION, NOADD, NOCOMMIT, NODELETE, NONE, NOOVERWRITE, NOSAVE, NOSETVALUE, NOUPDATE, NOVALIDATION, NOVALIDATION_AND_NOACTION, NOVALIDATION_AND_NOACTION_ALLOWCROSSOVER, READONLY, REBUILD, REQUIRED, SAMEVALUEVALIDATION, SETBYPARENT, USER| Constructor and Description |
|---|
FldDatePair(MboValue mbv,
java.lang.String validateDate,
java.lang.String validateAgainstDate)
Construct and attach to the specified mbo value
|
| Modifier and Type | Method and Description |
|---|---|
void |
action()
Clear out the validateAgainstDate if errorAction is true
|
protected void |
setCompareType(int ctype)
Sets the type of validation needed.
|
protected void |
setValidateErrorMessage(java.lang.String resource,
java.lang.String errorMessage)
Sets the error message to be displayed if the validation fails
|
void |
validate()
Checks if validateDate is later or before than validateAgainstDate
based on the compare type value.
|
getAppLink, getIntegrationService, getList, getLookupName, getMatchingAttr, getMatchingAttr, getMboValue, getMboValue, getTranslator, getType, hasList, init, initValue, setType, setValueFromLookup, smartFill, smartFind, smartFindprotected static final int COMPARE_TYPE_AFTER
protected static final int COMPARE_TYPE_BEFORE
public FldDatePair(MboValue mbv, java.lang.String validateDate, java.lang.String validateAgainstDate)
MboValue - - Instance of MboValueString - - Name of the Field being validatedString - - Name of the Field that this field is being validated againstpublic void validate()
throws MXException,
java.rmi.RemoteException
validate in interface MboValueListenervalidate in class MboValueAdapterMXExceptionjava.rmi.RemoteExceptionpublic void action()
throws MXException,
java.rmi.RemoteException
action in interface MboValueListeneraction in class MboValueAdapterMXExceptionjava.rmi.RemoteExceptionprotected void setCompareType(int ctype)
throws MXException,
java.rmi.RemoteException
ctype - - Integer value representing the comparison type.
Use the constants COMPARE_TYPE_AFTER or COMPARE_TYPE_BEFORE.
Default is COMPARE_TYPE_AFTER.
COMPARE_TYPE_AFTER will test if validate date is after validateAgainst date
and if true will throw an exception.
COMPARE_TYPE_BEFORE will test if validate date is before validateAgainst date
and if true will throw an exception.MXExceptionjava.rmi.RemoteExceptionprotected void setValidateErrorMessage(java.lang.String resource,
java.lang.String errorMessage)
throws MXException,
java.rmi.RemoteException
resource - - The name of the resource file (.txt) where the message is locatederrorMessage - - The name of the message keyMXExceptionjava.rmi.RemoteException