Package org.h2gis.functions.spatial.crs

## Class UpdateGeometrySRID

- java.lang.Object
- - org.h2gis.api.AbstractFunction
  - - org.h2gis.functions.spatial.crs.UpdateGeometrySRID

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

    public class UpdateGeometrySRID
    extends org.h2gis.api.AbstractFunction
    implements org.h2gis.api.ScalarFunction

Function to update the SRID of a geometry column

Author:
  Erwan Bocher, CNRS (2020)

### Field Summary

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

`PROP_NAME, PROP_REMARKS`

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

`PROP_DETERMINISTIC`

### Constructor Summary

Constructors
`UpdateGeometrySRID()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static boolean` `changeSRID​(Connection connection, String table_name, String column_name, int srid)` Method to update the SRID
`static boolean` `changeSRID​(Connection connection, String schema_name, String table_name, String column_name, int srid)` Method to update the SRID
`static boolean` `changeSRID​(Connection connection, String catalog_name, String schema_name, String table_name, String column_name, int srid)` Method to update the SRID
`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

#### UpdateGeometrySRID

    public UpdateGeometrySRID()

### Method Detail

#### getJavaStaticMethod

    public String getJavaStaticMethod()

Specified by:
  `getJavaStaticMethod` in interface `org.h2gis.api.ScalarFunction`

#### changeSRID

    public static boolean changeSRID​(Connection connection,
                                     String table_name,
                                     String column_name,
                                     int srid)
                              throws SQLException

Method to update the SRID

Parameters:
  `connection` - active connection to the database
  `table_name` - name of the tabe
  `column_name` - name of the geomtry column
  `srid` - value of the new srid
Returns:
  true if the SRID is changed
Throws:
  `SQLException`

#### changeSRID

    public static boolean changeSRID​(Connection connection,
                                     String schema_name,
                                     String table_name,
                                     String column_name,
                                     int srid)
                              throws SQLException

Method to update the SRID

Parameters:
  `connection` - active connection to the database
  `schema_name` - name of the schema
  `table_name` - name of the tabe
  `column_name` - name of the geomtry column
  `srid` - value of the new srid
Returns:
  true if the SRID is changed
Throws:
  `SQLException`

#### changeSRID

    public static boolean changeSRID​(Connection connection,
                                     String catalog_name,
                                     String schema_name,
                                     String table_name,
                                     String column_name,
                                     int srid)
                              throws SQLException

Method to update the SRID

Parameters:
  `connection` - active connection to the database
  `catalog_name` - name of the catalog
  `schema_name` - name of the schema
  `table_name` - name of the tabe
  `column_name` - name of the geomtry column
  `srid` - value of the new srid
Returns:
  true if the SRID is changed
Throws:
  `SQLException`