org.h2gis.functions.spatial.type

## Class GeometryTypeFromConstraint

- java.lang.Object
- - org.h2gis.api.AbstractFunction
  - - org.h2gis.api.DeterministicScalarFunction
    - - org.h2gis.functions.spatial.type.GeometryTypeFromConstraint

All Implemented Interfaces:
  org.h2gis.api.Function, org.h2gis.api.ScalarFunction

    public class GeometryTypeFromConstraint
    extends org.h2gis.api.DeterministicScalarFunction

Convert H2 constraint string into a OGC geometry type index.

Author:
  Nicolas Fortin

### Field Summary

### Fields inherited from interface org.h2gis.api.ScalarFunction

`PROP_DETERMINISTIC, PROP_NOBUFFER`

### Fields inherited from interface org.h2gis.api.Function

`PROP_NAME, PROP_REMARKS`

### Constructor Summary

Constructors
Constructor and Description
`GeometryTypeFromConstraint()` Default constructor

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static int` `geometryTypeFromConstraint(String constraint, int numericPrecision)` Convert H2 constraint string into a OGC geometry type index.
`String` `getJavaStaticMethod()`

### Methods inherited from class org.h2gis.api.AbstractFunction

`addProperty, getProperty, removeProperty`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.h2gis.api.Function

`getProperty`

### Constructor Detail

#### GeometryTypeFromConstraint

    public GeometryTypeFromConstraint()

Default constructor

### Method Detail

#### getJavaStaticMethod

    public String getJavaStaticMethod()

#### geometryTypeFromConstraint

    public static int geometryTypeFromConstraint(String constraint,
                                                 int numericPrecision)

Convert H2 constraint string into a OGC geometry type index.

Parameters:
  `constraint` - SQL Constraint ex: ST_GeometryTypeCode(the_geom) = 5
  `numericPrecision` - This parameter is available if the user give domain
Returns:
  Geometry type code `GeometryTypeCodes`