org.hibernate.boot.model.source.spi.RelationalValueSource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-core-jakarta Show documentation
Show all versions of hibernate-core-jakarta Show documentation
Hibernate O/RM implementation of the Jakarta Persistence specification
/*
* 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.boot.model.source.spi;
/**
* Unifying interface for {@link ColumnSource} and {@link DerivedValueSource}.
*
* @author Steve Ebersole
*
* @see ColumnSource
* @see DerivedValueSource
*/
public interface RelationalValueSource {
/**
* @return returns the name of the table that contains this value.
*/
public String getContainingTableName();
/**
* Retrieve the nature of this relational value. Is it a column? Or is it a derived value (formula)?
*
* @return The nature.
*/
public Nature getNature();
public static enum Nature {
COLUMN( ColumnSource.class ),
DERIVED( DerivedValueSource.class );
private final Class specificContractClass;
private Nature(Class specificContractClass) {
this.specificContractClass = specificContractClass;
}
public Class getSpecificContractClass() {
return specificContractClass;
}
}
}