Examples of XRow


Examples of com.sun.star.sdbc.XRow

            command.Argument = pArgs;

            com.sun.star.ucb.XCommandEnvironment env = null ;
            Object result =  xCmd.execute( command, 0, env ) ;

            XRow values = ( XRow ) UnoRuntime.queryInterface( XRow.class,
                result );
   
            xModel = ( XModel UnoRuntime.queryInterface( XModel.class,
                values.getObject( 1, null ) );
        }
        catch ( Exception ignore )
        {
            LogUtils.DEBUG("Failed to get model exception " + ignore );
         
View Full Code Here

Examples of com.sun.star.sdbc.XRow

    String[] sReferencedTableNames = new String[]{};   
    try {
        String[] sTableNames = super.getCommandMetaData().getTableNames();
        Vector aReferencedTableVector = new Vector();
        XResultSet xResultSet = super.getCommandMetaData().xDBMetaData.getExportedKeys((getCatalogName(this)), getSchemaName(), getTableName());
        XRow xRow = (XRow) UnoRuntime.queryInterface(XRow.class, xResultSet);
        while (xResultSet.next()){
            String sForeignCatalog = xRow.getString(FKTABLE_CAT);
            String sForeignScheme = xRow.getString(FKTABLE_SCHEM);
            String sForeignTableName = xRow.getString(FKTABLE_NAME);
            CommandName oCommandName = new CommandName(getCommandMetaData(), sForeignCatalog, sForeignScheme, sForeignTableName, false);
            aReferencedTableVector.add(oCommandName.getComposedName());
        }          
        sReferencedTableNames = new String[aReferencedTableVector.size()];
        aReferencedTableVector.toArray(sReferencedTableNames);
View Full Code Here

Examples of com.sun.star.sdbc.XRow

    public String[][] getImportedKeyColumns(String _sreferencedtablename){
    String[][] sKeyColumnNames = new String[][]{};
    try {
        CommandName oLocCommandName = new CommandName(super.getCommandMetaData(), _sreferencedtablename);
        XResultSet xResultSet = super.getCommandMetaData().xDBMetaData.getImportedKeys(getCatalogName(oLocCommandName),oLocCommandName.getSchemaName(), _sreferencedtablename);
        XRow xRow = (XRow) UnoRuntime.queryInterface(XRow.class, xResultSet);
        boolean bleaveLoop = false;
        Vector aMasterFieldNamesVector = new Vector();
        Vector aSlaveFieldNamesVector = new Vector();
        while (xResultSet.next() && !bleaveLoop){
            String sPrimaryCatalog = null;
            String sPrimarySchema = null;
            if (super.getCommandMetaData().xDBMetaData.supportsCatalogsInDataManipulation())
                sPrimaryCatalog = xRow.getString(PKTABLE_CAT);
            if (super.getCommandMetaData().xDBMetaData.supportsCatalogsInDataManipulation())
                sPrimarySchema = xRow.getString(PKTABLE_SCHEM);
            String sPrimaryTableName = xRow.getString(PKTABLE_NAME);
            String sPrimaryColumnName = xRow.getString(PKCOLUMN_NAME);
            String sForeignColumnName = xRow.getString(FKCOLUMN_NAME);
            if (JavaTools.isSame(getTableName(), sPrimaryTableName )){
                if (JavaTools.isSame(getSchemaName(), sPrimarySchema )){
                    if (JavaTools.isSame(getCatalogName(), sPrimaryCatalog)){
                        aSlaveFieldNamesVector.add(sForeignColumnName);
                        aMasterFieldNamesVector.add(sPrimaryColumnName);
View Full Code Here

Examples of com.sun.star.sdbc.XRow


    private String[] StringsFromResultSet(XResultSet _xResultSet, int _icol){
        String[] sColValues = null;
        try {
            XRow xRow = (XRow) UnoRuntime.queryInterface(XRow.class, _xResultSet);
            Vector aColVector = new Vector();
            while (_xResultSet.next()){
                aColVector.addElement(xRow.getString(_icol));
            }
            sColValues = new String[aColVector.size()];
            aColVector.toArray(sColValues);
        } catch (SQLException e) {
            e.printStackTrace();
View Full Code Here

Examples of com.sun.star.sdbc.XRow

        Vector aMinScaleVector = new Vector();
        Vector aMaxScaleVector = new Vector();
        Vector aSearchableVector = new Vector();
        Integer[] aIntegerDataTypes = null;
//      XResultSet xResultSet = xDBMetaDagetTypeInfo();
        XRow xRow = (XRow) UnoRuntime.queryInterface(XRow.class, xResultSet);
        while (xResultSet.next()){
            aTypeNameVector.addElement(new String(xRow.getString(1)));             
            aTypeVector.addElement(new Integer(xRow.getShort(2)));
            aPrecisionVector.addElement(new Integer(xRow.getInt(3)));
            aNullableVector.addElement(new Integer(xRow.getShort(7)));
            aSearchableVector.addElement(new Integer(xRow.getShort(9)));
            aAutoIncrementVector.addElement(new Boolean(xRow.getBoolean(12)));             
            aMinScaleVector.addElement(new Integer(xRow.getShort(14)));            
            aMaxScaleVector.addElement(new Integer(xRow.getShort(15)));
           
        }
        sDataTypeNames = new String[aTypeNameVector.size()];
        aTypeNameVector.toArray(sDataTypeNames);
        nDataTypeInfos = JavaTools.IntegerTointList(aTypeVector);
View Full Code Here

Examples of com.sun.star.sdbc.XRow

    public void _getWarnings() {
        final XRowUpdate xRowUpdate = (XRowUpdate)
            UnoRuntime.queryInterface(XRowUpdate.class, oObj);
        final XResultSetUpdate xResSetUpdate = (XResultSetUpdate)
            UnoRuntime.queryInterface(XResultSetUpdate.class, oObj);
        final XRow xRow = (XRow)
            UnoRuntime.queryInterface(XRow.class, oObj);
        if (xRowUpdate == null || xResSetUpdate == null || xRow == null) {
            throw new StatusException(Status.failed("Test must be modified"));
        }
        int oldVal = 0, newVal = 0;
        String valToSet = "9999999999999999";
        try {
            oldVal = xRow.getInt(DBTools.TST_INT);
            xRowUpdate.updateString(DBTools.TST_INT, valToSet);
            xResSetUpdate.updateRow();
            newVal = xRow.getInt(DBTools.TST_INT);
        } catch(com.sun.star.sdbc.SQLException e) {
            log.println("Unexpected SQL exception");
            e.printStackTrace(log);
            tRes.tested("getWarnings()", false);
            return;
View Full Code Here

Examples of com.sun.star.sdbc.XRow

        }

        // Adding relation for XResultSetUpdate
        final XRowUpdate xRowUpdate = (XRowUpdate) UnoRuntime.queryInterface(
                                              XRowUpdate.class, oObj);
        final XRow xRow = (XRow) UnoRuntime.queryInterface(XRow.class, oObj);

        tEnv.addObjRelation("XResultSetUpdate.UpdateTester",
                            new ifc.sdbc._XResultSetUpdate.UpdateTester() {
            String lastUpdate = null;

            public int rowCount() throws SQLException {
                int prevPos = xResSet.getRow();
                xResSet.last();

                int count = xResSet.getRow();
                xResSet.absolute(prevPos);

                return count;
            }

            public void update() throws SQLException {
                lastUpdate = xRow.getString(1);
                lastUpdate += "_";
                xRowUpdate.updateString(1, lastUpdate);
            }

            public boolean wasUpdated() throws SQLException {
                String getStr = xRow.getString(1);

                return lastUpdate.equals(getStr);
            }

            public int currentRow() throws SQLException {
                return xResSet.getRow();
            }
        });

        // Adding relations for XRow as a Vector with all data
        // of current row of RowSet.

        Vector rowData = new Vector();

        for (int i = 0; i < DBTools.TST_TABLE_VALUES[0].length; i++) {
            rowData.add(DBTools.TST_TABLE_VALUES[0][i]);
        }

        tEnv.addObjRelation("CurrentRowData", rowData);

        // Adding relation for XRowUpdate
        XRow row = (XRow) UnoRuntime.queryInterface(XRow.class, oObj);
        tEnv.addObjRelation("XRowUpdate.XRow", row);

       
        tEnv.addObjRelation("XPropertyContainer.propertyNotRemovable", "Cycle");
View Full Code Here

Examples of com.sun.star.sdbc.XRow

            command.Argument = pArgs;

            com.sun.star.ucb.XCommandEnvironment env = null ;
            Object result =  xCmd.execute( command, 0, env ) ;

            XRow values = ( XRow ) UnoRuntime.queryInterface( XRow.class,
                result );
   
            xModel = ( XModel UnoRuntime.queryInterface( XModel.class,
                values.getObject( 1, null ) );
        }
        catch ( Exception ignore )
        {
            LogUtils.DEBUG("Failed to get model exception " + ignore );
         
View Full Code Here

Examples of com.sun.star.sdbc.XRow

        try
        {
            String[] sTableNames = super.getCommandMetaData().getTableNames();
            Vector aReferencedTableVector = new Vector();
            XResultSet xResultSet = super.getCommandMetaData().xDBMetaData.getExportedKeys((getCatalogName(this)), getSchemaName(), getTableName());
            XRow xRow = (XRow) UnoRuntime.queryInterface(XRow.class, xResultSet);
            while (xResultSet.next())
            {
                String sForeignCatalog = xRow.getString(FKTABLE_CAT);
                String sForeignScheme = xRow.getString(FKTABLE_SCHEM);
                String sForeignTableName = xRow.getString(FKTABLE_NAME);
                CommandName oCommandName = new CommandName(getCommandMetaData(), sForeignCatalog, sForeignScheme, sForeignTableName, false);
                aReferencedTableVector.add(oCommandName.getComposedName());
            }
            sReferencedTableNames = new String[aReferencedTableVector.size()];
            aReferencedTableVector.toArray(sReferencedTableNames);
View Full Code Here

Examples of com.sun.star.sdbc.XRow

        };
        try
        {
            CommandName oLocCommandName = new CommandName(super.getCommandMetaData(), _sreferencedtablename);
            XResultSet xResultSet = super.getCommandMetaData().xDBMetaData.getImportedKeys(getCatalogName(oLocCommandName), oLocCommandName.getSchemaName(), oLocCommandName.getTableName());
            XRow xRow = (XRow) UnoRuntime.queryInterface(XRow.class, xResultSet);
            boolean bleaveLoop = false;
            Vector aMasterFieldNamesVector = new Vector();
            Vector aSlaveFieldNamesVector = new Vector();
            while (xResultSet.next() && !bleaveLoop)
            {
                String sPrimaryCatalog = null;
                String sPrimarySchema = null;
                if (super.getCommandMetaData().xDBMetaData.supportsCatalogsInDataManipulation())
                {
                    sPrimaryCatalog = xRow.getString(PKTABLE_CAT);
                }
                if (super.getCommandMetaData().xDBMetaData.supportsSchemasInDataManipulation())
                {
                    sPrimarySchema = xRow.getString(PKTABLE_SCHEM);
                }
                String sPrimaryTableName = xRow.getString(PKTABLE_NAME);
                String sPrimaryColumnName = xRow.getString(PKCOLUMN_NAME);
                String sForeignColumnName = xRow.getString(FKCOLUMN_NAME);
                if (JavaTools.isSame(getTableName(), sPrimaryTableName))
                {
                    if (sPrimarySchema == null || JavaTools.isSame(getSchemaName(), sPrimarySchema))
                    {
                        if (JavaTools.isSame(getCatalogName(), sPrimaryCatalog))
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.