|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.billpringle.utils.WrpValidateCsv.ValidationRule
public class WrpValidateCsv.ValidationRule
Inner class for validation rule
This class instantiates a rule used to validate a CSV record. A rule can "fire", which typically indicates a sucessful test or an exception to the operation.
A validation rule consists of various arguments. Which arguments are required depends on the command itself. The rule can have a statement label as well as a GoTo destination. (Execution continues at the GoTo label if the command fires.) It can also have a message to be displayed if the command fires, as well as a record status if the command fires. Two variables can be specified - an input and an output variable (invar and outvar) (which can be the same variable), and two literals (arg1 and arg2), which are constants.
The data type of a literal depends on its name:
To reduce overhead during run time, the index into variables or literals for each argument is stored for each referenced variable or literal.
Field Summary | |
---|---|
java.lang.String |
Arg1
argument 1 |
int |
Arg1Loc
location of literal in arg1 |
java.lang.String |
Arg2
argument 2 |
int |
Arg2Loc
location of literal in arg2 |
java.lang.String |
Cmd
command for rule |
java.lang.String |
Comment
comment |
java.lang.String |
GoTo
GoTo destination |
int |
GoToLoc
compiled index into rules for destination |
int |
Id
unique row ID (from the database) |
java.lang.String |
InVar
input variable |
int |
InVarLoc
compiled location of input variable |
java.lang.String |
Label
destination label |
java.lang.String |
Msg
output message for user |
java.lang.String |
OutVar
output variable - where results are stored |
int |
OutVarLoc
compiled location of output variable |
java.lang.String |
Result
validation results for entry |
int |
Seq
sequence number for rule |
Constructor Summary | |
---|---|
WrpValidateCsv.ValidationRule()
default constructor |
Method Summary | |
---|---|
java.lang.String |
getArg1()
Get the first literal value |
int |
getArg1Loc()
Obtain the location of the literal for arg1 |
java.lang.String |
getArg2()
Get the second literal value for this rule |
int |
getArg2Loc()
Obtain the location of the literal for arg2 |
java.lang.String |
getCmd()
Return the command name for this rule |
java.lang.String |
getComment()
Get the comment for this rule |
java.lang.String |
getGoTo()
Get the "GoTo" destination for this rule |
int |
getGoToLoc()
Get the location in rules for the GoTo destination of this rule |
int |
getId()
Get the unique database ID for this rule |
java.lang.String |
getInVar()
Get the input variable for this rule |
int |
getInVarLoc()
Get the location in variables for the input variable for this rule |
java.lang.String |
getLabel()
Get the statement label for this rule |
java.lang.String |
getMsg()
Get the user message for this rule |
java.lang.String |
getOutVar()
Get the output variable for this rule |
int |
getOutVarLoc()
Get the location in variables of the output variable for this rule |
java.lang.String |
getResult()
Get the optional result value for this rule |
int |
getSeq()
Get the sequence number for the current rule |
void |
setArg1(java.lang.String arg1)
Set the first literal value |
void |
setArg1Loc(int loc)
Save location of literal for arg1 of this command |
void |
setArg2(java.lang.String arg2)
Set the second literal value for this rule |
void |
setArg2Loc(int loc)
Save location of literal for arg2 of this command |
void |
setCmd(java.lang.String cmd)
set the command name for this rule |
void |
setComment(java.lang.String comment)
Set the comment for this rule |
void |
setGoTo(java.lang.String goTo)
Set the "GoTo" destination for this rule |
void |
setGoToLoc(int goToLoc)
Set the location inrules for the GoTo destination label of this rule |
void |
setId(int id)
Set the unique database ID for this rule |
void |
setInVar(java.lang.String inVar)
Set the input variable for this rule |
void |
setInVarLoc(int inVarLoc)
Set the location in variables of the input variable for this rule |
void |
setLabel(java.lang.String label)
Set the statement label for this rule |
void |
setMsg(java.lang.String msg)
Set the user message for this rule |
void |
setOutVar(java.lang.String outVar)
Set the second literal value for this rule |
void |
setOutVarLoc(int outVarLoc)
Set the location in variables of the outvariable for this rule |
void |
setResult(java.lang.String result)
Set the result string for this rule |
void |
setSeq(int seq)
Set the sequence number for this rule |
java.lang.String |
toString()
Provide a string representation of the validation rule. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int Id
public int Seq
public java.lang.String Label
public java.lang.String InVar
public int InVarLoc
public java.lang.String Cmd
public java.lang.String Arg1
public int Arg1Loc
public java.lang.String Arg2
public int Arg2Loc
public java.lang.String OutVar
public int OutVarLoc
public java.lang.String Result
public java.lang.String Msg
public java.lang.String GoTo
public int GoToLoc
public java.lang.String Comment
Constructor Detail |
---|
public WrpValidateCsv.ValidationRule()
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public int getSeq()
public void setSeq(int seq)
seq
- the sequence number to setpublic java.lang.String getLabel()
public void setLabel(java.lang.String label)
label
- the statement label to setpublic java.lang.String getInVar()
public void setInVar(java.lang.String inVar)
inVar
- the input variable to setpublic java.lang.String getCmd()
public void setCmd(java.lang.String cmd)
cmd
- the command to setpublic java.lang.String getArg1()
public void setArg1(java.lang.String arg1)
arg1
- the first argument to setpublic void setArg1Loc(int loc)
loc
- the index into literals for arg1 of this commandpublic int getArg1Loc()
public java.lang.String getArg2()
public void setArg2(java.lang.String arg2)
arg2
- the second argument to setpublic void setArg2Loc(int loc)
loc
- the index into literals for arg2 of this commandpublic int getArg2Loc()
public java.lang.String getOutVar()
public void setOutVar(java.lang.String outVar)
outVar
- the output variable to setpublic java.lang.String getResult()
public void setResult(java.lang.String result)
result
- the validation result to setpublic java.lang.String getMsg()
public void setMsg(java.lang.String msg)
msg
- the user message to setpublic java.lang.String getGoTo()
public void setGoTo(java.lang.String goTo)
goTo
- the destination label to setpublic java.lang.String getComment()
public void setComment(java.lang.String comment)
comment
- the comment to setpublic int getId()
public void setId(int id)
id
- the id to setpublic int getInVarLoc()
public void setInVarLoc(int inVarLoc)
inVarLoc
- the inVarLoc to setpublic int getOutVarLoc()
public void setOutVarLoc(int outVarLoc)
outVarLoc
- the outVarLoc to setpublic int getGoToLoc()
public void setGoToLoc(int goToLoc)
goToLoc
- the goToLoc to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |