use of org.hibernate.spatial.SpatialDialect in project hibernate-orm by hibernate.
the class HavingSridExpression method toSqlString.
@Override
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException {
final String column = ExpressionUtil.findColumn(propertyName, criteria, criteriaQuery);
final SpatialDialect spatialDialect = ExpressionUtil.getSpatialDialect(criteriaQuery, SpatialFunction.srid);
return spatialDialect.getHavingSridSQL(column);
}
use of org.hibernate.spatial.SpatialDialect in project hibernate-orm by hibernate.
the class IsEmptyExpression method toSqlString.
@Override
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException {
final String column = ExpressionUtil.findColumn(propertyName, criteria, criteriaQuery);
final SpatialDialect spatialDialect = ExpressionUtil.getSpatialDialect(criteriaQuery, SpatialFunction.isempty);
return spatialDialect.getIsEmptySQL(column, isEmpty);
}
use of org.hibernate.spatial.SpatialDialect in project hibernate-orm by hibernate.
the class SpatialFilter method toSqlString.
@Override
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException {
final SessionFactoryImplementor factory = criteriaQuery.getFactory();
final String[] columns = criteriaQuery.getColumnsUsingProjection(criteria, this.propertyName);
final Dialect dialect = factory.getDialect();
if (dialect instanceof SpatialDialect) {
final SpatialDialect seDialect = (SpatialDialect) dialect;
return seDialect.getSpatialFilterExpression(columns[0]);
} else {
throw new IllegalStateException("Dialect must be spatially enabled dialect");
}
}
use of org.hibernate.spatial.SpatialDialect in project hibernate-orm by hibernate.
the class OracleSpatialProjection method toSqlString.
@Override
public String toSqlString(Criteria criteria, int position, CriteriaQuery criteriaQuery) throws HibernateException {
final SessionFactoryImplementor factory = criteriaQuery.getFactory();
final String[] columns = criteriaQuery.getColumnsUsingProjection(criteria, this.propertyName);
final Dialect dialect = factory.getDialect();
if (dialect instanceof SpatialDialect) {
final SpatialDialect seDialect = (SpatialDialect) dialect;
return new StringBuffer(seDialect.getSpatialAggregateSQL(columns[0], this.aggregate)).append(" y").append(position).append("_").toString();
} else {
throw new IllegalStateException("Dialect must be spatially enabled dialect");
}
}
Aggregations