diff options
Diffstat (limited to 'odk/examples/DevelopersGuide/Database')
4 files changed, 19 insertions, 19 deletions
diff --git a/odk/examples/DevelopersGuide/Database/OpenQuery.java b/odk/examples/DevelopersGuide/Database/OpenQuery.java index 92b0413c7723..77490f8dbf8f 100644 --- a/odk/examples/DevelopersGuide/Database/OpenQuery.java +++ b/odk/examples/DevelopersGuide/Database/OpenQuery.java @@ -96,7 +96,7 @@ public class OpenQuery { xProp.setPropertyValue("DataSourceName","Bibliography"); // the CommandType must be TABLE, QUERY or COMMAND, here we use COMMAND - xProp.setPropertyValue("CommandType",new Integer(com.sun.star.sdb.CommandType.COMMAND)); + xProp.setPropertyValue("CommandType",Integer.valueOf(com.sun.star.sdb.CommandType.COMMAND)); // the Command could be a table or query name or a SQL command, depending on the CommandType xProp.setPropertyValue("Command","SELECT IDENTIFIER, AUTHOR FROM biblio ORDER BY IDENTIFIER"); diff --git a/odk/examples/DevelopersGuide/Database/RowSet.java b/odk/examples/DevelopersGuide/Database/RowSet.java index 2fd6de38de9e..3f18f35797bb 100644 --- a/odk/examples/DevelopersGuide/Database/RowSet.java +++ b/odk/examples/DevelopersGuide/Database/RowSet.java @@ -87,7 +87,7 @@ public class RowSet XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,xRowRes); xProp.setPropertyValue("DataSourceName","Bibliography"); xProp.setPropertyValue("Command","biblio"); - xProp.setPropertyValue("CommandType",new Integer(com.sun.star.sdb.CommandType.TABLE)); + xProp.setPropertyValue("CommandType",Integer.valueOf(com.sun.star.sdb.CommandType.TABLE)); xRowRes.execute(); System.out.println("RowSet executed!"); @@ -110,7 +110,7 @@ public class RowSet XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,xRowRes); xProp.setPropertyValue("DataSourceName","Bibliography"); xProp.setPropertyValue("Command","biblio"); - xProp.setPropertyValue("CommandType",new Integer(com.sun.star.sdb.CommandType.TABLE)); + xProp.setPropertyValue("CommandType",Integer.valueOf(com.sun.star.sdb.CommandType.TABLE)); xRowRes.execute(); System.out.println("RowSet executed!"); @@ -144,7 +144,7 @@ public class RowSet XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,xRowRes); xProp.setPropertyValue("DataSourceName","Bibliography"); xProp.setPropertyValue("Command","biblio"); - xProp.setPropertyValue("CommandType",new Integer(com.sun.star.sdb.CommandType.TABLE)); + xProp.setPropertyValue("CommandType",Integer.valueOf(com.sun.star.sdb.CommandType.TABLE)); xRowRes.execute(); System.out.println("RowSet executed!"); @@ -183,7 +183,7 @@ public class RowSet XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class,xRowRes); xProp.setPropertyValue("DataSourceName","Bibliography"); xProp.setPropertyValue("Command","biblio"); - xProp.setPropertyValue("CommandType",new Integer(com.sun.star.sdb.CommandType.TABLE)); + xProp.setPropertyValue("CommandType",Integer.valueOf(com.sun.star.sdb.CommandType.TABLE)); xRowRes.execute(); System.out.println("RowSet executed!"); diff --git a/odk/examples/DevelopersGuide/Database/Sales.java b/odk/examples/DevelopersGuide/Database/Sales.java index 7a983c727ec9..1733d21930b0 100644 --- a/odk/examples/DevelopersGuide/Database/Sales.java +++ b/odk/examples/DevelopersGuide/Database/Sales.java @@ -112,8 +112,8 @@ public class Sales { 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.READ_ONLY)); + xProp.setPropertyValue("ResultSetType", Integer.valueOf(ResultSetType.SCROLL_INSENSITIVE)); + xProp.setPropertyValue("ResultSetConcurrency", Integer.valueOf(ResultSetConcurrency.READ_ONLY)); XResultSet rs = stmt.executeQuery("SELECT NAME, PRICE FROM SALES"); XResultSetMetaDataSupplier xRsMetaSup = UnoRuntime.queryInterface(XResultSetMetaDataSupplier.class,rs); XResultSetMetaData xRsMetaData = xRsMetaSup.getMetaData(); diff --git a/odk/examples/DevelopersGuide/Database/sdbcx.java b/odk/examples/DevelopersGuide/Database/sdbcx.java index 4f73c8bb8286..fb498591f2ac 100644 --- a/odk/examples/DevelopersGuide/Database/sdbcx.java +++ b/odk/examples/DevelopersGuide/Database/sdbcx.java @@ -342,42 +342,42 @@ public class sdbcx XPropertySet xCol = xColFac.createDataDescriptor(); // create first column and append xCol.setPropertyValue("Name","SNR"); - xCol.setPropertyValue("Type",new Integer(DataType.INTEGER)); - xCol.setPropertyValue("IsNullable",new Integer(ColumnValue.NO_NULLS)); + xCol.setPropertyValue("Type",Integer.valueOf(DataType.INTEGER)); + xCol.setPropertyValue("IsNullable",Integer.valueOf(ColumnValue.NO_NULLS)); xAppend.appendByDescriptor(xCol); // 2nd only set the properties which differs xCol.setPropertyValue("Name","FIRSTNAME"); - xCol.setPropertyValue("Type",new Integer(DataType.VARCHAR)); - xCol.setPropertyValue("IsNullable",new Integer(ColumnValue.NULLABLE)); - xCol.setPropertyValue("Precision",new Integer(50)); + xCol.setPropertyValue("Type",Integer.valueOf(DataType.VARCHAR)); + xCol.setPropertyValue("IsNullable",Integer.valueOf(ColumnValue.NULLABLE)); + xCol.setPropertyValue("Precision",Integer.valueOf(50)); xAppend.appendByDescriptor(xCol); // 3nd only set the properties which differs xCol.setPropertyValue("Name","LASTNAME"); - xCol.setPropertyValue("Precision",new Integer(100)); + xCol.setPropertyValue("Precision",Integer.valueOf(100)); xAppend.appendByDescriptor(xCol); // 4nd only set the properties which differs xCol.setPropertyValue("Name","STREET"); - xCol.setPropertyValue("Precision",new Integer(50)); + xCol.setPropertyValue("Precision",Integer.valueOf(50)); xAppend.appendByDescriptor(xCol); // 5nd only set the properties which differs xCol.setPropertyValue("Name","STATE"); xAppend.appendByDescriptor(xCol); // 6nd only set the properties which differs xCol.setPropertyValue("Name","ZIP"); - xCol.setPropertyValue("Type",new Integer(DataType.INTEGER)); - xCol.setPropertyValue("Precision",new Integer(10)); // default value integer + xCol.setPropertyValue("Type",Integer.valueOf(DataType.INTEGER)); + xCol.setPropertyValue("Precision",Integer.valueOf(10)); // default value integer xAppend.appendByDescriptor(xCol); // 7nd only set the properties which differs xCol.setPropertyValue("Name","BIRTHDATE"); - xCol.setPropertyValue("Type",new Integer(DataType.DATE)); - xCol.setPropertyValue("Precision",new Integer(10)); // default value integer + xCol.setPropertyValue("Type",Integer.valueOf(DataType.DATE)); + xCol.setPropertyValue("Precision",Integer.valueOf(10)); // default value integer xAppend.appendByDescriptor(xCol); // now we create the primary key XKeysSupplier xKeySup = UnoRuntime.queryInterface(XKeysSupplier.class,xTable); XDataDescriptorFactory xKeyFac = UnoRuntime.queryInterface(XDataDescriptorFactory.class,xKeySup.getKeys()); XAppend xKeyAppend = UnoRuntime.queryInterface(XAppend.class,xKeyFac); XPropertySet xKey = xKeyFac.createDataDescriptor(); - xKey.setPropertyValue("Type",new Integer(KeyType.PRIMARY)); + xKey.setPropertyValue("Type",Integer.valueOf(KeyType.PRIMARY)); // now append the columns to key XColumnsSupplier xKeyColumSup = UnoRuntime.queryInterface(XColumnsSupplier.class,xKey); XDataDescriptorFactory xKeyColFac = UnoRuntime.queryInterface(XDataDescriptorFactory.class,xKeyColumSup.getColumns()); |