Package com.inet.problemfinder.rules
Class AbstractRuleField
- java.lang.Object
-
- com.inet.problemfinder.rules.AbstractRuleField
-
- All Implemented Interfaces:
ProblemFinderRule
public abstract class AbstractRuleField extends java.lang.Object implements ProblemFinderRule
Base class for all rules checking certainFields
.
By default checks every type of field, you should overridegetFieldType()
to limit check to certain fields.
-
-
Constructor Summary
Constructors Constructor Description AbstractRuleField()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ProblemFinderWarning
check(Engine engine, Field field)
Here the concrete check is made.
This is called for each found field that matches the types returned bygetFieldType()
.java.util.List<ProblemFinderWarning>
findErrors(Engine engine)
Runs this rule and checks the given Engine for Problemsint
getFieldType()
returns the Field type which has to checked, -1 listen to all Field types-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.inet.problemfinder.rules.ProblemFinderRule
findErrors, getRuleLabel
-
-
-
-
Method Detail
-
findErrors
public java.util.List<ProblemFinderWarning> findErrors(Engine engine)
Runs this rule and checks the given Engine for Problems- Specified by:
findErrors
in interfaceProblemFinderRule
- Parameters:
engine
- TheEngine
to check.- Returns:
- A list of found problems, can be empty or
null
if the Check is Canceled.
-
check
protected abstract ProblemFinderWarning check(Engine engine, Field field)
Here the concrete check is made.
This is called for each found field that matches the types returned bygetFieldType()
.- Parameters:
engine
- is the Engine to checkfield
- the field to check- Returns:
- the ProblemFinderWarning of the found error or
null
if there is no warning - Since:
- i-net Clear Reports 12.0
- See Also:
PromptField
,FormulaField
,SummaryField
,SQLField
-
getFieldType
public int getFieldType()
returns the Field type which has to checked, -1 listen to all Field types- Returns:
- the int-type value of the Field
- Since:
- i-net Clear Reports 12.0
- See Also:
ProblemFinder.CHECK_FIELD_FORMULA
,ProblemFinder.CHECK_FIELD_SQL
,ProblemFinder.CHECK_FIELD_SUMMARY
-
-