com.im.df.api 5.9

com.im.df.api.dml
Class TermErrors

java.lang.Object
  extended by com.im.df.api.dml.TermErrors

public final class TermErrors
extends Object

Result of the validation: DFTerm.validate(com.im.df.api.ddl.DFDataTree). Holds zero or more errors.


Constructor Summary
TermErrors()
          Create new TermErrors instance
 
Method Summary
 void addError(DFTerm term, String error)
          Add a new error to this object
 int getErrorsCount()
          Get the number of errors.
 List<String> getErrorsFor(DFTerm term)
          Get the error for the given term.
 List<DFTerm> getWrongTerms()
          Return list of all incorrect terms.
 boolean hasErrors()
          Test if there are any errors?
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TermErrors

public TermErrors()
Create new TermErrors instance

Method Detail

hasErrors

public boolean hasErrors()
Test if there are any errors?

Returns:
True if there are some errors, otherwise false.

getWrongTerms

public List<DFTerm> getWrongTerms()
Return list of all incorrect terms. What are the errors for each of them is possible to find out from getErrorsFor(DFTerm). If everything is correct, then returns empty List.

Returns:
The set of incorrect terms

getErrorsFor

public List<String> getErrorsFor(DFTerm term)
Get the error for the given term. If there is no error for this term then returns empty List. 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,
                     String error)
Add a new error to this object

Parameters:
term - The term which is incorrect
error - The error message

getErrorsCount

public int getErrorsCount()
Get the number of errors.

Returns:
The number of errors (0 or more).

toString

public String toString()
Overrides:
toString in class Object

com.im.df.api 5.9