Package net.sf.jkniv.sqlegance
Class ConstraintException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- net.sf.jkniv.sqlegance.RepositoryException
-
- net.sf.jkniv.sqlegance.ConstraintException
-
- All Implemented Interfaces:
Serializable
public class ConstraintException extends RepositoryException
Thrown when model data violate the rules with JSR Bean Validation- Since:
- 0.6.0
- Author:
- Alisson Gomes
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConstraintException(String param, String message)Constructor for ConstraintException without message detailConstraintException(Map<String,String> violations)Constructor for ConstraintException with a set of messages
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMessage()Map<String,String>getViolations()Map with violations where key isjavax.validation.ConstraintViolation.getPropertyPath()name with violation message.StringtoString()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Method Detail
-
getViolations
public Map<String,String> getViolations()
Map with violations where key isjavax.validation.ConstraintViolation.getPropertyPath()name with violation message.- Returns:
- set of violation messages from Bean Validation
-
getMessage
public String getMessage()
- Overrides:
getMessagein classThrowable
-
-