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.ValidationExceptionException 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 givenConstraintViolationset.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetEntityClassSimpleName()StringgetMessage()Map<Class<?>,Set<EntityViolationType>>getViolations()booleanhasViolation(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 givenConstraintViolationset.- 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:
getMessagein classThrowable
-
-