mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-16 16:15:06 +00:00
Fix checkstyle errors
This commit is contained in:
parent
5bae2d8196
commit
cf854c5cfc
@ -10,6 +10,7 @@
|
||||
* Enumeration of types of Spatial Aggregation
|
||||
*
|
||||
* @author Karel Maesen
|
||||
* @deprecated Will be removed in 6.0
|
||||
*/
|
||||
@Deprecated
|
||||
public interface SpatialAggregate {
|
||||
|
@ -10,6 +10,7 @@
|
||||
* The spatial analysis functions defined in the OGC SFS specification.
|
||||
*
|
||||
* @author Karel Maesen
|
||||
* @deprecated Will be removed in 6
|
||||
*/
|
||||
@Deprecated
|
||||
public interface SpatialAnalysis {
|
||||
|
@ -12,93 +12,9 @@
|
||||
* Describes the features of a spatially enabled dialect.
|
||||
*
|
||||
* @author Karel Maesen
|
||||
*
|
||||
* @deprecated To be removed in 6
|
||||
*/
|
||||
@Deprecated
|
||||
public interface SpatialDialect extends Serializable {
|
||||
|
||||
// /**
|
||||
// * Returns the SQL fragment for the SQL WHERE-clause when parsing
|
||||
// * <code>org.hibernatespatial.criterion.SpatialRelateExpression</code>s
|
||||
// * into prepared statements.
|
||||
// * <p/>
|
||||
// *
|
||||
// * @param columnName The name of the geometry-typed column to which the relation is
|
||||
// * applied
|
||||
// * @param spatialRelation The type of spatial relation (as defined in
|
||||
// * <code>SpatialRelation</code>).
|
||||
// *
|
||||
// * @return SQL fragment {@code SpatialRelateExpression}
|
||||
// */
|
||||
// String getSpatialRelateSQL(String columnName, int spatialRelation);
|
||||
//
|
||||
// /**
|
||||
// * Returns the SQL fragment for the SQL WHERE-expression when parsing
|
||||
// * <code>org.hibernate.spatial.criterion.SpatialFilterExpression</code>s
|
||||
// * into prepared statements.
|
||||
// *
|
||||
// * @param columnName The name of the geometry-typed column to which the filter is
|
||||
// * be applied
|
||||
// *
|
||||
// * @return Rhe SQL fragment for the {@code SpatialFilterExpression}
|
||||
// */
|
||||
// String getSpatialFilterExpression(String columnName);
|
||||
//
|
||||
// /**
|
||||
// * Returns the SQL fragment for the specfied Spatial aggregate expression.
|
||||
// *
|
||||
// * @param columnName The name of the Geometry property
|
||||
// * @param aggregation The type of <code>SpatialAggregate</code>
|
||||
// *
|
||||
// * @return The SQL fragment for the projection
|
||||
// */
|
||||
// String getSpatialAggregateSQL(String columnName, int aggregation);
|
||||
//
|
||||
// /**
|
||||
// * Returns The SQL fragment when parsing a <code>DWithinExpression</code>.
|
||||
// *
|
||||
// * @param columnName The geometry column to test against
|
||||
// *
|
||||
// * @return The SQL fragment when parsing a <code>DWithinExpression</code>.
|
||||
// */
|
||||
// String getDWithinSQL(String columnName);
|
||||
//
|
||||
// /**
|
||||
// * Returns the SQL fragment when parsing a <code>HavingSridExpression</code>.
|
||||
// *
|
||||
// * @param columnName The geometry column to test against
|
||||
// *
|
||||
// * @return The SQL fragment for a <code>HavingSridExpression</code>.
|
||||
// */
|
||||
// String getHavingSridSQL(String columnName);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * Returns the SQL fragment when parsing a <code>IsEmptyExpression</code> or
|
||||
// * <code>IsNotEmpty</code> expression.
|
||||
// *
|
||||
// * @param columnName The geometry column
|
||||
// * @param isEmpty Whether the geometry is tested for empty or non-empty
|
||||
// *
|
||||
// * @return The SQL fragment for the isempty function
|
||||
// */
|
||||
// String getIsEmptySQL(String columnName, boolean isEmpty);
|
||||
//
|
||||
// /**
|
||||
// * Returns true if this <code>SpatialDialect</code> supports a specific filtering function.
|
||||
// * <p> This is intended to signal DB-support for fast window queries, or MBR-overlap queries.</p>
|
||||
// *
|
||||
// * @return True if filtering is supported
|
||||
// */
|
||||
// boolean supportsFiltering();
|
||||
//
|
||||
// /**
|
||||
// * Does this dialect supports the specified <code>SpatialFunction</code>.
|
||||
// *
|
||||
// * @param function <code>SpatialFunction</code>
|
||||
// *
|
||||
// * @return True if this <code>SpatialDialect</code> supports the spatial function specified by the function parameter.
|
||||
// */
|
||||
// boolean supports(SpatialFunction function);
|
||||
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
* section 2.1.13.3. "</p>
|
||||
*
|
||||
* @author Karel Maesen
|
||||
* @deprecated Will be removed in 6
|
||||
*/
|
||||
@Deprecated
|
||||
public interface SpatialRelation {
|
||||
|
@ -13,6 +13,7 @@
|
||||
/**
|
||||
* An @{code SpatialDialect} for CockroachDB 20.2 and later. CockroachDB's spatial features where introduced in
|
||||
* that version.
|
||||
* @deprecated Spatial Dialects are no longer needed. Use the standard CockroachDB dialects
|
||||
*/
|
||||
@Deprecated
|
||||
public class CockroachDB202SpatialDialect extends CockroachDialect implements SpatialDialect {
|
||||
|
@ -10,7 +10,6 @@
|
||||
import javax.persistence.criteria.Expression;
|
||||
import javax.persistence.criteria.Predicate;
|
||||
|
||||
import org.hibernate.NotYetImplementedFor6Exception;
|
||||
import org.hibernate.spatial.SpatialFunction;
|
||||
|
||||
import org.geolatte.geom.Geometry;
|
||||
@ -50,8 +49,7 @@ public static Predicate eq(
|
||||
Expression<? extends Geometry> geometry2) {
|
||||
return booleanExpressionToPredicate(
|
||||
criteriaBuilder,
|
||||
criteriaBuilder.function( ST_EQUALS.name(), boolean.class,
|
||||
geometry1, geometry2
|
||||
criteriaBuilder.function( ST_EQUALS.name(), boolean.class, geometry1, geometry2
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -70,8 +68,7 @@ public static Predicate eq(
|
||||
public static Predicate eq(
|
||||
CriteriaBuilder criteriaBuilder, Expression<? extends Geometry> geometry1,
|
||||
Geometry geometry2) {
|
||||
return eq( criteriaBuilder, geometry1,
|
||||
criteriaBuilder.literal( geometry2 )
|
||||
return eq( criteriaBuilder, geometry1, criteriaBuilder.literal( geometry2 )
|
||||
);
|
||||
}
|
||||
|
||||
@ -129,8 +126,7 @@ public static Predicate contains(
|
||||
Expression<? extends Geometry> geometry2) {
|
||||
return booleanExpressionToPredicate(
|
||||
criteriaBuilder,
|
||||
criteriaBuilder.function( ST_CONTAINS.name(), boolean.class,
|
||||
geometry1, geometry2
|
||||
criteriaBuilder.function( ST_CONTAINS.name(), boolean.class, geometry1, geometry2
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -149,8 +145,7 @@ public static Predicate contains(
|
||||
public static Predicate contains(
|
||||
CriteriaBuilder criteriaBuilder, Expression<? extends Geometry> geometry1,
|
||||
Geometry geometry2) {
|
||||
return contains( criteriaBuilder, geometry1,
|
||||
criteriaBuilder.literal( geometry2 )
|
||||
return contains( criteriaBuilder, geometry1, criteriaBuilder.literal( geometry2 )
|
||||
);
|
||||
}
|
||||
|
||||
@ -170,8 +165,7 @@ public static Predicate crosses(
|
||||
Expression<? extends Geometry> geometry2) {
|
||||
return booleanExpressionToPredicate(
|
||||
criteriaBuilder,
|
||||
criteriaBuilder.function( ST_CROSSES.name(), boolean.class,
|
||||
geometry1, geometry2
|
||||
criteriaBuilder.function( ST_CROSSES.name(), boolean.class, geometry1, geometry2
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -229,9 +223,7 @@ public static Predicate disjoint(
|
||||
public static Predicate disjoint(
|
||||
CriteriaBuilder criteriaBuilder, Expression<? extends Geometry> geometry1,
|
||||
Geometry geometry2) {
|
||||
return disjoint( criteriaBuilder, geometry1,
|
||||
criteriaBuilder.literal( geometry2 )
|
||||
);
|
||||
return disjoint( criteriaBuilder, geometry1, criteriaBuilder.literal( geometry2 ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -365,9 +357,7 @@ public static Predicate filter(
|
||||
Expression<? extends Geometry> geometry2) {
|
||||
return booleanExpressionToPredicate(
|
||||
criteriaBuilder,
|
||||
criteriaBuilder.function( SpatialFunction.filter.toString(), boolean.class,
|
||||
geometry1, geometry2
|
||||
)
|
||||
criteriaBuilder.function( SpatialFunction.filter.toString(), boolean.class, geometry1, geometry2 )
|
||||
);
|
||||
}
|
||||
|
||||
@ -429,8 +419,12 @@ public static Predicate distanceWithin(
|
||||
Expression<? extends Geometry> geometry2, Expression<Double> distance) {
|
||||
return booleanExpressionToPredicate(
|
||||
criteriaBuilder,
|
||||
criteriaBuilder.function( SpatialFunction.dwithin.toString(), boolean.class,
|
||||
geometry1, geometry2, distance
|
||||
criteriaBuilder.function(
|
||||
SpatialFunction.dwithin.toString(),
|
||||
boolean.class,
|
||||
geometry1,
|
||||
geometry2,
|
||||
distance
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -450,8 +444,7 @@ public static Predicate distanceWithin(
|
||||
public static Predicate distanceWithin(
|
||||
CriteriaBuilder criteriaBuilder, Expression<? extends Geometry> geometry1,
|
||||
Geometry geometry2, Expression<Double> distance) {
|
||||
return distanceWithin( criteriaBuilder, geometry1,
|
||||
criteriaBuilder.literal( geometry2 ), distance
|
||||
return distanceWithin( criteriaBuilder, geometry1, criteriaBuilder.literal( geometry2 ), distance
|
||||
);
|
||||
}
|
||||
|
||||
@ -470,8 +463,11 @@ public static Predicate distanceWithin(
|
||||
public static Predicate distanceWithin(
|
||||
CriteriaBuilder criteriaBuilder, Expression<? extends Geometry> geometry1,
|
||||
Geometry geometry2, double distance) {
|
||||
return distanceWithin( criteriaBuilder, geometry1,
|
||||
criteriaBuilder.literal( geometry2 ), criteriaBuilder.literal( distance )
|
||||
return distanceWithin(
|
||||
criteriaBuilder,
|
||||
geometry1,
|
||||
criteriaBuilder.literal( geometry2 ),
|
||||
criteriaBuilder.literal( distance )
|
||||
);
|
||||
}
|
||||
|
||||
@ -490,8 +486,7 @@ public static Predicate distanceWithin(
|
||||
public static Predicate distanceWithin(
|
||||
CriteriaBuilder criteriaBuilder, Expression<? extends Geometry> geometry1,
|
||||
Expression<? extends Geometry> geometry2, double distance) {
|
||||
return distanceWithin( criteriaBuilder, geometry1, geometry2,
|
||||
criteriaBuilder.literal( distance )
|
||||
return distanceWithin( criteriaBuilder, geometry1, geometry2, criteriaBuilder.literal( distance )
|
||||
);
|
||||
}
|
||||
|
||||
@ -529,9 +524,7 @@ public static Predicate havingSRID(
|
||||
public static Predicate havingSRID(
|
||||
CriteriaBuilder criteriaBuilder, Expression<? extends Geometry> geometry,
|
||||
int srid) {
|
||||
return havingSRID( criteriaBuilder, geometry,
|
||||
criteriaBuilder.literal( srid )
|
||||
);
|
||||
return havingSRID( criteriaBuilder, geometry, criteriaBuilder.literal( srid ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -547,9 +540,7 @@ public static Predicate havingSRID(
|
||||
public static Predicate isEmpty(CriteriaBuilder criteriaBuilder, Expression<? extends Geometry> geometry) {
|
||||
return booleanExpressionToPredicate(
|
||||
criteriaBuilder,
|
||||
criteriaBuilder.function( SpatialFunction.isempty.toString(), boolean.class,
|
||||
geometry
|
||||
)
|
||||
criteriaBuilder.function( SpatialFunction.isempty.toString(), boolean.class, geometry )
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
import javax.persistence.criteria.Expression;
|
||||
import javax.persistence.criteria.Predicate;
|
||||
|
||||
import org.hibernate.NotYetImplementedFor6Exception;
|
||||
import org.hibernate.spatial.SpatialFunction;
|
||||
|
||||
import org.locationtech.jts.geom.Geometry;
|
||||
@ -136,9 +135,7 @@ public static Predicate contains(
|
||||
public static Predicate contains(
|
||||
CriteriaBuilder criteriaBuilder, Expression<? extends Geometry> geometry1,
|
||||
Geometry geometry2) {
|
||||
return contains( criteriaBuilder, geometry1,
|
||||
criteriaBuilder.literal( geometry2 )
|
||||
);
|
||||
return contains( criteriaBuilder, geometry1, criteriaBuilder.literal( geometry2 ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -155,9 +152,7 @@ public static Predicate crosses(
|
||||
Expression<? extends Geometry> geometry2) {
|
||||
return booleanExpressionToPredicate(
|
||||
criteriaBuilder,
|
||||
criteriaBuilder.function( ST_CROSSES.name(), boolean.class,
|
||||
geometry1, geometry2
|
||||
)
|
||||
criteriaBuilder.function( ST_CROSSES.name(), boolean.class, geometry1, geometry2 )
|
||||
);
|
||||
}
|
||||
|
||||
@ -212,9 +207,7 @@ public static Predicate disjoint(
|
||||
public static Predicate disjoint(
|
||||
CriteriaBuilder criteriaBuilder, Expression<? extends Geometry> geometry1,
|
||||
Geometry geometry2) {
|
||||
return disjoint( criteriaBuilder, geometry1,
|
||||
criteriaBuilder.literal( geometry2 )
|
||||
);
|
||||
return disjoint( criteriaBuilder, geometry1, criteriaBuilder.literal( geometry2 ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -326,7 +319,6 @@ public static Predicate touches(
|
||||
}
|
||||
|
||||
|
||||
|
||||
// /**
|
||||
// * Create a predicate for testing the arguments for bounding box overlap constraint.
|
||||
// *
|
||||
@ -399,8 +391,12 @@ public static Predicate distanceWithin(
|
||||
Expression<? extends Geometry> geometry2, Expression<Double> distance) {
|
||||
return booleanExpressionToPredicate(
|
||||
criteriaBuilder,
|
||||
criteriaBuilder.function( SpatialFunction.dwithin.toString(), boolean.class,
|
||||
geometry1, geometry2, distance
|
||||
criteriaBuilder.function(
|
||||
SpatialFunction.dwithin.toString(),
|
||||
boolean.class,
|
||||
geometry1,
|
||||
geometry2,
|
||||
distance
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -420,9 +416,7 @@ public static Predicate distanceWithin(
|
||||
public static Predicate distanceWithin(
|
||||
CriteriaBuilder criteriaBuilder, Expression<? extends Geometry> geometry1,
|
||||
Geometry geometry2, Expression<Double> distance) {
|
||||
return distanceWithin( criteriaBuilder, geometry1,
|
||||
criteriaBuilder.literal( geometry2 ), distance
|
||||
);
|
||||
return distanceWithin( criteriaBuilder, geometry1, criteriaBuilder.literal( geometry2 ), distance );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -440,8 +434,11 @@ public static Predicate distanceWithin(
|
||||
public static Predicate distanceWithin(
|
||||
CriteriaBuilder criteriaBuilder, Expression<? extends Geometry> geometry1,
|
||||
Geometry geometry2, double distance) {
|
||||
return distanceWithin( criteriaBuilder, geometry1,
|
||||
criteriaBuilder.literal( geometry2 ), criteriaBuilder.literal( distance )
|
||||
return distanceWithin(
|
||||
criteriaBuilder,
|
||||
geometry1,
|
||||
criteriaBuilder.literal( geometry2 ),
|
||||
criteriaBuilder.literal( distance )
|
||||
);
|
||||
}
|
||||
|
||||
@ -460,9 +457,7 @@ public static Predicate distanceWithin(
|
||||
public static Predicate distanceWithin(
|
||||
CriteriaBuilder criteriaBuilder, Expression<? extends Geometry> geometry1,
|
||||
Expression<? extends Geometry> geometry2, double distance) {
|
||||
return distanceWithin( criteriaBuilder, geometry1, geometry2,
|
||||
criteriaBuilder.literal( distance )
|
||||
);
|
||||
return distanceWithin( criteriaBuilder, geometry1, geometry2, criteriaBuilder.literal( distance ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -497,9 +492,7 @@ public static Predicate havingSRID(
|
||||
public static Predicate havingSRID(
|
||||
CriteriaBuilder criteriaBuilder, Expression<? extends Geometry> geometry,
|
||||
int srid) {
|
||||
return havingSRID( criteriaBuilder, geometry,
|
||||
criteriaBuilder.literal( srid )
|
||||
);
|
||||
return havingSRID( criteriaBuilder, geometry, criteriaBuilder.literal( srid ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -513,9 +506,7 @@ public static Predicate havingSRID(
|
||||
public static Predicate isEmpty(CriteriaBuilder criteriaBuilder, Expression<? extends Geometry> geometry) {
|
||||
return booleanExpressionToPredicate(
|
||||
criteriaBuilder,
|
||||
criteriaBuilder.function( SpatialFunction.isempty.toString(), boolean.class,
|
||||
geometry
|
||||
)
|
||||
criteriaBuilder.function( SpatialFunction.isempty.toString(), boolean.class, geometry )
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user