Class PostgisDBManager
- java.lang.Object
-
- org.gcube.application.cms.sdi.engine.PostgisDBManager
-
- All Implemented Interfaces:
PostgisDBManagerI
public class PostgisDBManager extends Object implements PostgisDBManagerI
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classPostgisDBManager.DBUtils
-
Constructor Summary
Constructors Constructor Description PostgisDBManager(Connection conn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommit()longcount(PostgisTable table)voidcreate(PostgisTable toCreate)intdeleteByFieldValue(PostgisTable target, PostgisTable.Field field, Object value)voiddeleteTable(String tableName)PreparedStatementprepareInsertStatement(PostgisTable target, boolean createTable, boolean geometryAsText)PreparedStatementprepareStatement(String stmt)ResultSetqueryAll(PostgisTable table)voidtruncate(String tableName)
-
-
-
Constructor Detail
-
PostgisDBManager
public PostgisDBManager(Connection conn) throws SQLException
- Throws:
SQLException
-
-
Method Detail
-
create
public void create(PostgisTable toCreate) throws SQLException
- Specified by:
createin interfacePostgisDBManagerI- Throws:
SQLException
-
commit
public void commit() throws SQLException- Specified by:
commitin interfacePostgisDBManagerI- Throws:
SQLException
-
prepareInsertStatement
public PreparedStatement prepareInsertStatement(PostgisTable target, boolean createTable, boolean geometryAsText) throws SQLException
- Specified by:
prepareInsertStatementin interfacePostgisDBManagerI- Throws:
SQLException
-
prepareStatement
public PreparedStatement prepareStatement(String stmt) throws SQLException
- Specified by:
prepareStatementin interfacePostgisDBManagerI- Throws:
SQLException
-
deleteByFieldValue
public int deleteByFieldValue(PostgisTable target, PostgisTable.Field field, Object value) throws SQLException
- Specified by:
deleteByFieldValuein interfacePostgisDBManagerI- Throws:
SQLException
-
deleteTable
public void deleteTable(String tableName) throws SQLException
- Specified by:
deleteTablein interfacePostgisDBManagerI- Throws:
SQLException
-
truncate
public void truncate(String tableName) throws SQLException
- Specified by:
truncatein interfacePostgisDBManagerI- Throws:
SQLException
-
queryAll
public ResultSet queryAll(PostgisTable table) throws SQLException
- Specified by:
queryAllin interfacePostgisDBManagerI- Throws:
SQLException
-
count
public long count(PostgisTable table) throws SQLException
- Specified by:
countin interfacePostgisDBManagerI- Throws:
SQLException
-
-