org.hibernate.envers.internal.tools.ArgumentsTools Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-envers Show documentation
Show all versions of hibernate-envers Show documentation
Hibernate's entity version (audit/history) support
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or .
*/
package org.hibernate.envers.internal.tools;
/**
* @author Adam Warski (adam at warski dot org)
*/
public abstract class ArgumentsTools {
public static void checkNotNull(Object o, String paramName) {
if ( o == null ) {
throw new IllegalArgumentException( paramName + " cannot be null." );
}
}
public static void checkPositive(Number i, String paramName) {
if ( i.longValue() <= 0L ) {
throw new IllegalArgumentException( paramName + " has to be greater than 0." );
}
}
}