mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-03-07 02:09:31 +00:00
remove some unused deprecated operations
This commit is contained in:
parent
7f8b685973
commit
c8e4fead2c
@ -640,46 +640,10 @@ public java.util.List<CheckConstraint> getCheckConstraints() {
|
|||||||
return unmodifiableList( checkConstraints );
|
return unmodifiableList( checkConstraints );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated(since = "6.2")
|
|
||||||
public String getCheckConstraint() {
|
|
||||||
if ( checkConstraints.isEmpty() ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
else if ( checkConstraints.size() > 1 ) {
|
|
||||||
throw new IllegalStateException( "column has multiple check constraints" );
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return checkConstraints.get(0).getConstraint();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated(since = "6.2")
|
|
||||||
public void setCheckConstraint(String constraint) {
|
|
||||||
if ( constraint != null ) {
|
|
||||||
if ( !checkConstraints.isEmpty() ) {
|
|
||||||
throw new IllegalStateException( "column already has a check constraint" );
|
|
||||||
}
|
|
||||||
checkConstraints.add( new CheckConstraint( constraint ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean hasCheckConstraint() {
|
public boolean hasCheckConstraint() {
|
||||||
return !checkConstraints.isEmpty();
|
return !checkConstraints.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated(since = "6.2")
|
|
||||||
public String checkConstraint() {
|
|
||||||
if ( checkConstraints.isEmpty() ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
else if ( checkConstraints.size() > 1 ) {
|
|
||||||
throw new IllegalStateException( "column has multiple check constraints" );
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return checkConstraints.get(0).constraintString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTemplate(Dialect dialect, TypeConfiguration typeConfiguration, SqmFunctionRegistry registry) {
|
public String getTemplate(Dialect dialect, TypeConfiguration typeConfiguration, SqmFunctionRegistry registry) {
|
||||||
return safeInterning(
|
return safeInterning(
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.hibernate.query.sqm.produce.function;
|
package org.hibernate.query.sqm.produce.function;
|
||||||
|
|
||||||
import org.hibernate.query.spi.QueryEngine;
|
|
||||||
import org.hibernate.query.sqm.tree.SqmTypedNode;
|
import org.hibernate.query.sqm.tree.SqmTypedNode;
|
||||||
import org.hibernate.sql.ast.tree.SqlAstNode;
|
import org.hibernate.sql.ast.tree.SqlAstNode;
|
||||||
import org.hibernate.type.spi.TypeConfiguration;
|
import org.hibernate.type.spi.TypeConfiguration;
|
||||||
@ -20,15 +19,6 @@
|
|||||||
* @see ArgumentTypesValidator
|
* @see ArgumentTypesValidator
|
||||||
*/
|
*/
|
||||||
public interface ArgumentsValidator {
|
public interface ArgumentsValidator {
|
||||||
/**
|
|
||||||
* Perform validation that may be done using the {@link SqmTypedNode} tree and assigned Java types.
|
|
||||||
*
|
|
||||||
* @deprecated Use {@link #validate(List, String, TypeConfiguration)}
|
|
||||||
*/
|
|
||||||
@Deprecated(since = "6.2")
|
|
||||||
default void validate(List<? extends SqmTypedNode<?>> arguments, String functionName, QueryEngine queryEngine) {
|
|
||||||
validate( arguments, functionName, queryEngine.getTypeConfiguration() );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform validation that may be done using the {@link SqmTypedNode} tree and assigned Java types.
|
* Perform validation that may be done using the {@link SqmTypedNode} tree and assigned Java types.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user