Package com.im.df.api.dml
Class TermErrors
- java.lang.Object
-
- com.im.df.api.dml.TermErrors
-
public final class TermErrors extends java.lang.Object
Result of the validation:DFTerm.validate(com.im.df.api.ddl.DFDataTree)
. Holds zero or more errors.- Author:
- Petr Hamernik
-
-
Constructor Summary
Constructors Constructor Description TermErrors()
Create new TermErrors instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addError(DFTerm term, java.lang.String error)
Add a new error to this objectint
getErrorsCount()
Get the number of errors.java.util.List<java.lang.String>
getErrorsFor(DFTerm term)
Get the error for the given term.java.util.List<DFTerm>
getWrongTerms()
Return list of all incorrect terms.boolean
hasErrors()
Test if there are any errors?java.lang.String
toString()
-
-
-
Method Detail
-
hasErrors
public boolean hasErrors()
Test if there are any errors?- Returns:
- True if there are some errors, otherwise false.
-
getWrongTerms
public java.util.List<DFTerm> getWrongTerms()
Return list of all incorrect terms. What are the errors for each of them is possible to find out fromgetErrorsFor(DFTerm)
. If everything is correct, then returns emptyList
.- Returns:
- The set of incorrect terms
-
getErrorsFor
public java.util.List<java.lang.String> getErrorsFor(DFTerm term)
Get the error for the given term. If there is no error for this term then returns emptyList
. Never returns null.- Parameters:
term
- The term- Returns:
- The list of errors for the specified term. Never returns null.
-
addError
public void addError(DFTerm term, java.lang.String error)
Add a new error to this object- Parameters:
term
- The term which is incorrecterror
- The error message
-
getErrorsCount
public int getErrorsCount()
Get the number of errors.- Returns:
- The number of errors (0 or more).
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-