nyla.solutions.global.patterns.validation.spring.ArrayableUniqueValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nyla.solutions.global Show documentation
Show all versions of nyla.solutions.global Show documentation
Nyla Solutions Global Java API provides support for basic application
utilities (application configuration, data encryption, debugger and text
processing).
The newest version!
package nyla.solutions.global.patterns.validation.spring;
import java.util.HashSet;
import java.util.Set;
import nyla.solutions.global.data.Arrayable;
import nyla.solutions.global.exception.DuplicateRowException;
import org.springframework.validation.Errors;
/**
* @author Gregory Green
*
*/
public class ArrayableUniqueValidator extends AbstractValidation
{
/**
* @see org.springframework.validation.Validator#validate(java.lang.Object, org.springframework.validation.Errors)
*/
@SuppressWarnings("unchecked")
@Override
public void validate(Object obj, Errors errors)
{
if(set == null)
set = new HashSet