org.h2gis.functions.spatial.type

## Class DimensionFromConstraint

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

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

    public class DimensionFromConstraint
    extends org.h2gis.api.DeterministicScalarFunction

Check column constraint for Z constraint. Has M is not supported yet by JTS Topology Suite WKTReader.

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
`DimensionFromConstraint()` Check column constraint for Z constraint.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static int` `dimensionFromConnection(Connection connection, String catalogName, String schemaName, String tableName, String columnName, String constraint)`
`static int` `dimensionFromConstraint(String constraint, String columnName)` Public for Unit test
`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

#### DimensionFromConstraint

    public DimensionFromConstraint()

Check column constraint for Z constraint. Has M is not supported yet by JTS Topology Suite WKTReader.

### Method Detail

#### getJavaStaticMethod

    public String getJavaStaticMethod()

#### dimensionFromConstraint

    public static int dimensionFromConstraint(String constraint,
                                              String columnName)

Public for Unit test

Parameters:
  `constraint` - Constraint value ex: ST_COORDIM(the_geom) = 3
  `columnName` - Column name ex:the_geom
Returns:
  The dimension constraint [2-3]

#### dimensionFromConnection

    public static int dimensionFromConnection(Connection connection,
                                              String catalogName,
                                              String schemaName,
                                              String tableName,
                                              String columnName,
                                              String constraint)

Parameters:
  `connection` - Active connection
  `catalogName` - Table db
  `schemaName` - Table schema
  `tableName` - Table name
  `columnName` - Column name
  `constraint` - Column constraint
Returns:
  The dimension constraint [2-3]