public class CheckJob extends java.lang.Object implements java.lang.Runnable, java.io.Serializable, ArooaSessionAware
This Job will COMPLETE if all checks pass. It will be INCOMPLETE if any fail.
The conditional values are converted into the type of the value before the checks are made. Thus in the example below if the row count property is an integer, the 1000 is converted into an integer for the comparison.
If the value property is not provided the job will be INCOMPLETE unless the null property is set to true.
<oddjob> <job> <sequential> <jobs> <check value="apple" eq="apple"/> <check value="apple" ne="orange"/> <check value="apple" lt="orange"/> <check value="apple" le="apple"/> <check value="orange" gt="apple"/> <check value="orange" ge="orange"/> <check value="anything" null="false"/> <check value="${missing}" null="true"/> <check value="pear" z="false"/> <check value="" z="true"/> </jobs> </sequential> </job> </oddjob>Checks that are INCOMPLETE.
<oddjob> <job> <!-- needed to force predictable state transitions for the unit test, so Oddjob goes to INCOMPLETE not ACTIVE first. --> <state:join xmlns:state="http://rgordon.co.uk/oddjob/state"> <job> <parallel id="all-checks"> <jobs> <check value="apple" eq="orange"/> <check value="apple" ne="apple"/> <check value="orange" lt="apple"/> <check value="orange" le="apple"/> <check value="apple" gt="orange"/> <check value="apple" ge="orange"/> <check value="anything" null="true"/> <check value="${missing}" null="false"/> </jobs> </parallel> </job> </state:join> </job> </oddjob>
<oddjob> <job> <sequential> <jobs> <sequence id="sequence" from="1000"/> <check value="${sequence.current}" eq="1000"/> <check value="${sequence.current}" ne="999"/> <check value="${sequence.current}" lt="1001"/> <check value="${sequence.current}" le="1000"/> <check value="${sequence.current}" gt="999"/> <check value="${sequence.current}" ge="1000"/> </jobs> </sequential> </job> </oddjob>
<oddjob> <job> <sequential> <jobs> <properties> <values> <value key="property.that.exists" value="some-value"/> </values> </properties> <check name="Check Something that Exists" value="${property.that.exists}" id="should-complete"/> <check name="Check Something that doesn't Exist" value="${property.doesnt.exist}" id="should-incomplete"/> </jobs> </sequential> </job> </oddjob>
Constructor and Description |
---|
CheckJob() |
Modifier and Type | Method and Description |
---|---|
ArooaValue |
getEq() |
ArooaValue |
getGe() |
ArooaValue |
getGt() |
ArooaValue |
getLe() |
ArooaValue |
getLt() |
java.lang.String |
getName() |
ArooaValue |
getNe() |
boolean |
getNull() |
int |
getResult() |
java.lang.Object |
getValue() |
java.lang.Boolean |
getZ() |
void |
run() |
void |
setArooaSession(ArooaSession session)
Accept the current Arooa Session.
|
void |
setEq(ArooaValue eq) |
void |
setGe(ArooaValue ge) |
void |
setGt(ArooaValue gt) |
void |
setLe(ArooaValue le) |
void |
setLt(ArooaValue lt) |
void |
setName(java.lang.String name) |
void |
setNe(ArooaValue ne) |
void |
setNull(boolean value) |
void |
setValue(java.lang.Object value) |
void |
setZ(java.lang.Boolean z) |
java.lang.String |
toString() |
public void run()
run
in interface java.lang.Runnable
public void setArooaSession(ArooaSession session)
ArooaSessionAware
setArooaSession
in interface ArooaSessionAware
session
- The Arooa Session. Never null.public java.lang.String getName()
public void setName(java.lang.String name)
public boolean getNull()
public void setNull(boolean value)
public java.lang.Boolean getZ()
public void setZ(java.lang.Boolean z)
public java.lang.Object getValue()
public void setValue(java.lang.Object value)
public ArooaValue getEq()
public void setEq(ArooaValue eq)
public ArooaValue getNe()
public void setNe(ArooaValue ne)
public ArooaValue getLt()
public void setLt(ArooaValue lt)
public ArooaValue getGt()
public void setGt(ArooaValue gt)
public ArooaValue getLe()
public void setLe(ArooaValue le)
public ArooaValue getGe()
public void setGe(ArooaValue ge)
public int getResult()
public java.lang.String toString()
toString
in class java.lang.Object