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

org.hibernate.envers.exception.RevisionDoesNotExistException Maven / Gradle / Ivy

There is a newer version: 7.0.0.Alpha3
Show newest version
/*
 * 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.exception;

import java.util.Date;

/**
 * @author Adam Warski (adam at warski dot org)
 */
public class RevisionDoesNotExistException extends AuditException {
	private static final long serialVersionUID = -6417768274074962282L;

	private final Number revision;
	private final Date date;

	public RevisionDoesNotExistException(Number revision) {
		super( "Revision " + revision + " does not exist." );
		this.revision = revision;
		this.date = null;
	}

	public RevisionDoesNotExistException(Date date) {
		super( "There is no revision before or at " + date + "." );
		this.date = date;
		this.revision = null;
	}

	public Number getRevision() {
		return revision;
	}

	public Date getDate() {
		return date;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy