public ConstraintViolationException(ServerManagedObject<?> managedObject,Collection<LocalizableMessage> messages){
  super(getDefaultMessage(messages));
  this.managedObject=managedObject;
  this.messages=new ArrayList<>(messages);
}

public ConstraintViolationException ( ServerManagedObject < ? > managedObject , Collection < LocalizableMessage > messages ) { super ( getDefaultMessage ( messages ) ) ; this . managedObject = managedObject ; this . messages = new ArrayList < > ( messages ) ; }
creates a new constraint violation exception with the provided messages .
