Using the Criteria api, how can I go about using SQL Server 2008 GeoSpatial functions in my queries?
CriteriaBuilder.function() looks promising:
javax.persistence.criteria.CriteriaBuilder
function
<T> Expression<T> function(java.lang.String name,
java.lang.Class<T> type,
Expression<?>... args)
Create an expression for the execution of a database function.
Parameters:
name - function name
type - expected result type
args - function arguments
Returns:
expression
It looks like I can use CriteriaBuilder.function() for static geometry functions, but how would I go about calling a geometry instance function of SQL Server?
Example:
shape.STIntersects('POLYGON((1 2,3 4,5 6,1 2))')
Thanks