Class InvalidEntityException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- javax.validation.ValidationException
-
- org.apache.syncope.core.persistence.api.attrvalue.validation.InvalidEntityException
-
- All Implemented Interfaces:
Serializable
public class InvalidEntityException extends javax.validation.ValidationException
Exception thrown when any JPA entity fails bean validation.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InvalidEntityException(Class<?> entityClass, EntityViolationType entityViolationType, String message)
Constructs a singleton map of violations from given parameters.InvalidEntityException(String entityClassSimpleName, Set<javax.validation.ConstraintViolation<Object>> violations)
Constructs a map of violations out of givenConstraintViolation
set.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getEntityClassSimpleName()
String
getMessage()
Map<Class<?>,Set<EntityViolationType>>
getViolations()
boolean
hasViolation(EntityViolationType type)
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
InvalidEntityException
public InvalidEntityException(Class<?> entityClass, EntityViolationType entityViolationType, String message)
Constructs a singleton map of violations from given parameters.- Parameters:
entityClass
- class of invalid entityentityViolationType
- type of violation foundmessage
- message to be associated to the violation
-
InvalidEntityException
public InvalidEntityException(String entityClassSimpleName, Set<javax.validation.ConstraintViolation<Object>> violations)
Constructs a map of violations out of givenConstraintViolation
set.- Parameters:
entityClassSimpleName
- simple class name of invalid entityviolations
- as returned by bean validation
-
-
Method Detail
-
hasViolation
public final boolean hasViolation(EntityViolationType type)
-
getEntityClassSimpleName
public String getEntityClassSimpleName()
-
getViolations
public final Map<Class<?>,Set<EntityViolationType>> getViolations()
-
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
-
-