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

org.hibernate.annotations.GenerationTime Maven / Gradle / Ivy

There is a newer version: 6.5.0.CR2
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.annotations;

import org.hibernate.tuple.GenerationTiming;

/**
 * At what time(s) will the generation occur?
 *
 * @author Emmanuel Bernard
 */
public enum GenerationTime {
	/**
	 * Indicates the value is never generated.
	 */
	NEVER( GenerationTiming.NEVER ),
	/**
	 * Indicates the value is generated on insert.
	 */
	INSERT( GenerationTiming.INSERT ),
	/**
	 * Indicates the value is generated on insert and on update.
	 */
	ALWAYS( GenerationTiming.ALWAYS );

	private final GenerationTiming equivalent;

	private GenerationTime(GenerationTiming equivalent) {
		this.equivalent = equivalent;
	}

	public GenerationTiming getEquivalent() {
		return equivalent;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy