| java.lang.Object com.salmonllc.sql.ValidationRule
Constructor Summary | |
public | ValidationRule(String expression, String errorMessage) Creates an expression rule. | public | ValidationRule(Object minValue, Object maxValue, String errorMessage) Creates a range rule. | public | ValidationRule(String expression, String errorMessage, int type) Creates an expression rule. | public | ValidationRule(DataStoreExpression expression, String errorMessage, boolean executeOnServer) Creates an expression rule. | public | ValidationRule(String errorMessage) Creates a type check rule. | public | ValidationRule(String errorMessage, int type) Creates a type or a required rule rule. | public | ValidationRule(String lookupTable, String searchExpression, String descriptionColumn, String descriptionBucket, String errorMessage) | public | ValidationRule() |
TYPE_EXPRESSION | final public static int TYPE_EXPRESSION(Code) | | |
TYPE_JAVASCRIPT | final public static int TYPE_JAVASCRIPT(Code) | | |
TYPE_LOOKUP | final public static int TYPE_LOOKUP(Code) | | |
TYPE_RANGE | final public static int TYPE_RANGE(Code) | | |
TYPE_REGULAR_EXPRESSION | final public static int TYPE_REGULAR_EXPRESSION(Code) | | |
TYPE_REMOTE | final public static int TYPE_REMOTE(Code) | | |
TYPE_REQUIRED | final public static int TYPE_REQUIRED(Code) | | |
TYPE_TYPE_CHECK | final public static int TYPE_TYPE_CHECK(Code) | | |
ValidationRule | public ValidationRule(String expression, String errorMessage)(Code) | | Creates an expression rule. The expression is a boolean value and the rule will be violated if the expression returns false
Parameters: expression - The expression to evaluate Parameters: errorMessage - The message to return if the rule is violated |
ValidationRule | public ValidationRule(Object minValue, Object maxValue, String errorMessage)(Code) | | Creates a range rule. The rule is true if the value of the field is within the minValue and maxValue
|
ValidationRule | public ValidationRule(String expression, String errorMessage, int type)(Code) | | Creates an expression rule. The rule can be a SOFIA expression or a regular expression. A SOFIA expression returns a boolean value and the rule will be violated if the expression returns false. A regular expression will be violated if the value in the datastore column doesn't match the specified regular expression
Parameters: expression - The expression to evaluate Parameters: errorMessage - The message to return if the rule is violated Parameters: type - TYPE_EXPRESSION (SOFIA Expression) or TYPE_REGULAR_EXPRESSION (Regular Expression) or TYPE_JAVASCRIPT (Note JavaScript Rules are not executed by this validator, they can be added here as a place holder in case the rules are imported into an HtmlValidatorTextComponent) |
ValidationRule | public ValidationRule(DataStoreExpression expression, String errorMessage, boolean executeOnServer)(Code) | | Creates an expression rule. The expression is a boolean value and the rule will be violated if the expression returns false
Parameters: expression - The expression to evaluate Parameters: errorMessage - The message to return if the rule is violated Parameters: executeOnServer - If the validator is being used from a proxy datastore and the rule must be executed on the server set this value to true |
ValidationRule | public ValidationRule(String errorMessage)(Code) | | Creates a type check rule. The type check rule checks if a field is the correct data type
Parameters: errorMessage - The message to return if the rule is violated |
ValidationRule | public ValidationRule(String errorMessage, int type)(Code) | | Creates a type or a required rule rule. The type check rule checks if a field is the correct data type, required checks that the value is not null or spaces
Parameters: errorMessage - The message to return if the rule is violated Parameters: type - The type of rule TYPE_TYPE_CHECK or TYPE_REQUIRED |
ValidationRule | public ValidationRule(String lookupTable, String searchExpression, String descriptionColumn, String descriptionBucket, String errorMessage)(Code) | | Creates a lookup rule
Parameters: lookupTable - The name of the table to lookup the value against. Parameters: searchExpression - A DataStore Expression that returns a String and will be used as the where clause for the SQL that will validate the data. Parameters: errorMessage - The error message to display if the error expression returns false. Parameters: descriptionColumn - The name of the column in the lookup table used to fill in the description. Parameters: descriptionBucket - The name of a bucket column in the datastore to place the description. Parameters: errorMessage - The message to return if the rule is violated |
ValidationRule | public ValidationRule()(Code) | | Creates a proxy rule that will run on the server
|
getDesciptionColumn | public String getDesciptionColumn()(Code) | | |
getDescriptionBucket | public String getDescriptionBucket()(Code) | | |
getLookupExpression | public String getLookupExpression()(Code) | | |
getRuleType | public int getRuleType()(Code) | | |
isExecuteOnServer | public boolean isExecuteOnServer()(Code) | | |
|
|