All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.zeger_tak.enversvalidationplugin.utils.IgnoreUtils Maven / Gradle / Ivy

Go to download

This is a Maven plugin that allows for easy validation of database auditing with Hibernate and is intended to be used by projects that do not always rely on Envers to create the audit history.

There is a newer version: 0.6
Show newest version
package com.github.zeger_tak.enversvalidationplugin.utils;

import java.lang.reflect.Method;
import java.util.List;

import javax.annotation.Nonnull;

import com.github.zeger_tak.enversvalidationplugin.execution.ValidatorWrapper;

public final class IgnoreUtils
{
	private IgnoreUtils()
	{
	}

	public static boolean validationShouldBeIgnored(@Nonnull List ignorables, @Nonnull Class validatorClass)
	{
		return ignorables.contains(validatorClass.getSimpleName());
	}

	public static boolean validationShouldBeIgnored(@Nonnull List ignorables, @Nonnull ValidatorWrapper validatorWrapper, @Nonnull Method validatorMethod)
	{
		return ignorables.contains(validatorWrapper.getUniqueIdentifier(validatorMethod));
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy