Package com.sun.star.sdbc

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


        if (xResultSet.first()) {
            // obtain XContentAccess interface for child content access and XRow for properties
            XContentAccess xContentAccess = (XContentAccess)UnoRuntime.queryInterface(
                XContentAccess.class, xResultSet);
            XRow xRow = (XRow)UnoRuntime.queryInterface(XRow.class, xResultSet);
            do {
                // Obtain URL of child.
                String aId = xContentAccess.queryContentIdentifierString();
                // First column: Title (column numbers are 1-based!)
                String aTitle = xRow.getString(1);
                if (aTitle.length() == 0 && xRow.wasNull())
                    ;//ignore
                else
                    files.add(aTitle);
            } while (xResultSet.next()); // next child
        }
View Full Code Here

        pv[0] = new Property();
        pv[0].Name = propName;
        pv[0].Handle = -1;
   
        Object row = executeCommand(content,"getPropertyValues",pv);
        XRow xrow = (XRow)UnoRuntime.queryInterface(XRow.class,row);
        if (type.equals(String.class))
           return xrow.getString(1);
        else if (type.equals(Boolean.class))
            return xrow.getBoolean(1) ? Boolean.TRUE : Boolean.FALSE;
        else if (type.equals(Integer.class))
            return new Integer(xrow.getInt(1));
        else if (type.equals(Short.class))
            return new Short(xrow.getShort(1));
        else return null;
       
    }
View Full Code Here

            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

                prop.Handle = -1; // n/a
                props[ index ] = prop;
            }

            // Execute command "getPropertyValues".
            XRow values =
                ( XRow )UnoRuntime.queryInterface(
                    XRow.class, m_helper.executeCommand( m_content,"getPropertyValues", props ));

            m_propValues = new Vector();

            /*
              Extract values from row object. Note that the
              first column is 1, not 0.
              Title: Obtain value of column 1 as string.*/
            for ( int index = 1 ; index <= size; index++ ) {
                Object propertyValue = values.getObject( index, null );
                if ( !values.wasNull() && !(propertyValue instanceof com.sun.star.uno.Any ))
                    m_propValues.add( propertyValue );
                else
                    m_propValues.add( "[ Property not found ]" );
            }
        }
View Full Code Here


            tEnv.addObjRelation("XParameters.ParamValues", params) ;

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

            // Adding relation for XResultSetUpdate
            {
                final XResultSet xResSet = (XResultSet)
                    UnoRuntime.queryInterface(XResultSet.class, oObj) ;
                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() ;
View Full Code Here

            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

            command.Argument = cmargs2;

            Object result = xCommandProcessor.execute(command, 0, null);
            XDynamicResultSet xDynamicResultSet = (XDynamicResultSet)UnoRuntime.queryInterface(XDynamicResultSet.class, result);
            XResultSet xResultSet = xDynamicResultSet.getStaticResultSet();
            XRow xRow = (XRow)UnoRuntime.queryInterface(XRow.class, xResultSet);
            // create the new folder 'folderName': first, check if it's already there
            while(xResultSet.next()) {
                String existingFolderName = xRow.getString(1);
                log.println("Found existing folder: '" + existingFolderName + "'");
                if (folderName.equals(existingFolderName)) {
                    failed("Cannot create a new folder: folder already exists: adapt test or choose a different document.");
                }
            }
View Full Code Here

      // obtain XContentAccess interface for child content access and XRow for properties
      XContentAccess xContentAccess =
        (XContentAccess) UnoRuntime.queryInterface(
          XContentAccess.class,
          xResultSet);
      XRow xRow =
        (XRow) UnoRuntime.queryInterface(XRow.class, xResultSet);
      do {
        // Obtain URL of child.
        String aId = xContentAccess.queryContentIdentifierString();
        // First column: Title (column numbers are 1-based!)
        String aTitle = xRow.getString(1);
        if (aTitle.length() == 0 && xRow.wasNull());
        //ignore
        else
          files.add(aTitle);
      } while (xResultSet.next()); // next child
    }
View Full Code Here

    pv[0] = new Property();
    pv[0].Name = propName;
    pv[0].Handle = -1;

    Object row = executeCommand(content, "getPropertyValues", pv);
    XRow xrow = (XRow) UnoRuntime.queryInterface(XRow.class, row);
    if (type.equals(String.class))
      return xrow.getString(1);
    else if (type.equals(Boolean.class))
      return xrow.getBoolean(1) ? Boolean.TRUE : Boolean.FALSE;
    else if (type.equals(Integer.class))
      return new Integer(xrow.getInt(1));
    else if (type.equals(Short.class))
      return new Short(xrow.getShort(1));
    else
      return null;

  }
View Full Code Here

TOP

Related Classes of com.sun.star.sdbc.XRow

Copyright © 2018 www.massapicom. 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.