diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-12 12:11:25 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-19 14:57:13 +0200 |
commit | 3a8d3519889a68ddf209ea7c83307bec51cd6da0 (patch) | |
tree | ab67ef1b6f1f65443b7c4d0e086fdcff17f84283 /odk/examples/DevelopersGuide/Database | |
parent | 8b65a61788aa18e97de068bc75fdeecb20a23026 (diff) |
java: remove unused methods
Change-Id: Ibb905e6f3e7d92a0e558f1f6562e5b472cd2717b
Diffstat (limited to 'odk/examples/DevelopersGuide/Database')
-rw-r--r-- | odk/examples/DevelopersGuide/Database/Sales.java | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/odk/examples/DevelopersGuide/Database/Sales.java b/odk/examples/DevelopersGuide/Database/Sales.java index ff1ec6555761..7a983c727ec9 100644 --- a/odk/examples/DevelopersGuide/Database/Sales.java +++ b/odk/examples/DevelopersGuide/Database/Sales.java @@ -33,7 +33,6 @@ *************************************************************************/ import com.sun.star.uno.*; -import com.sun.star.util.Date; import com.sun.star.beans.XPropertySet; import com.sun.star.sdbc.*; @@ -108,49 +107,6 @@ public class Sales - // inserts a row programmatically. - private void insertRow() throws com.sun.star.uno.Exception - { - // example for a programmatic way to do updates. - XStatement stmt = con.createStatement(); - XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,stmt); - xProp.setPropertyValue("ResultSetType", new java.lang.Integer(ResultSetType.SCROLL_INSENSITIVE)); - xProp.setPropertyValue("ResultSetConcurrency", new java.lang.Integer(ResultSetConcurrency.UPDATABLE)); - XResultSet rs = stmt.executeQuery("SELECT * FROM SALES"); - XRow row = UnoRuntime.queryInterface(XRow.class,rs); - - // insert a new row - XRowUpdate updateRow = UnoRuntime.queryInterface(XRowUpdate.class,rs); - XResultSetUpdate updateRs = UnoRuntime. queryInterface(XResultSetUpdate.class,rs); - updateRs.moveToInsertRow(); - updateRow.updateInt(1, 4); - updateRow.updateInt(2, 102); - updateRow.updateInt(3, 5); - updateRow.updateString(4, "FTOP Darjeeling tea"); - updateRow.updateDate(5, new Date((short)1,(short)2,(short)2002)); - updateRow.updateFloat(6, 150); - updateRs.insertRow(); - } - - // deletes a row programmatically. - private void deleteRow() throws com.sun.star.uno.Exception - { - // example for a programmatic way to do updates. - XStatement stmt = con.createStatement(); - XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,stmt); - xProp.setPropertyValue("ResultSetType", new java.lang.Integer(ResultSetType.SCROLL_INSENSITIVE)); - xProp.setPropertyValue("ResultSetConcurrency", new java.lang.Integer(ResultSetConcurrency.UPDATABLE)); - XResultSet rs = stmt.executeQuery("SELECT * FROM SALES"); - XRow row = UnoRuntime.queryInterface(XRow.class,rs); - - XResultSetUpdate updateRs = UnoRuntime. queryInterface(XResultSetUpdate.class,rs); - // move to the inserted row - rs.absolute(4); - updateRs.deleteRow(); - } - - - // displays the column names public void displayColumnNames() throws com.sun.star.uno.Exception { |