Package com.sun.star.sdbcx

Examples of com.sun.star.sdbcx.XColumnsSupplier


        createTestCase(true);

        // first we create our RowSet object
        final RowSetEventListener pRow = new RowSetEventListener();

        final XColumnsSupplier colSup = UnoRuntime.queryInterface( XColumnsSupplier.class, m_rowSet );
        final XPropertySet col = UnoRuntime.queryInterface( XPropertySet.class, colSup.getColumns().getByName( "ID" ) );
        col.addPropertyChangeListener("Value", pRow);
        m_rowSetProperties.addPropertyChangeListener("IsModified", pRow);
        m_rowSetProperties.addPropertyChangeListener("IsNew", pRow);
        m_rowSetProperties.addPropertyChangeListener("IsRowCountFinal", pRow);
        m_rowSetProperties.addPropertyChangeListener("RowCount", pRow);
View Full Code Here


                UnoRuntime.queryInterface(com.sun.star.sdbc.XRowSet.class,
                oRowSet) ;

            xORowSet.execute() ;
           
            XColumnsSupplier xColSup = (XColumnsSupplier)
                    UnoRuntime.queryInterface(XColumnsSupplier.class, oRowSet);
           
            XNameAccess xCols = xColSup.getColumns();
           
            XPropertySet xCol = (XPropertySet) AnyConverter.toObject(
                                new Type(XPropertySet.class),
                                xCols.getByName(xCols.getElementNames()[0]));
           
View Full Code Here

            Helper.setUnoPropertyValue(xRowSet, "CommandType", new Integer(_nCommandType)); // CommandType
            xExecute.executeWithCompletion(xInteraction);
            com.sun.star.sdb.XResultSetAccess xResultAccess = (com.sun.star.sdb.XResultSetAccess) UnoRuntime.queryInterface(com.sun.star.sdb.XResultSetAccess.class, xRowSet);
            ResultSet = xResultAccess.createResultSet();
            xResultSetRow = (com.sun.star.sdbc.XRow) UnoRuntime.queryInterface(com.sun.star.sdbc.XRow.class, ResultSet);
            XColumnsSupplier xDBCols = (XColumnsSupplier) UnoRuntime.queryInterface(XColumnsSupplier.class, ResultSet);
            xColumns = xDBCols.getColumns();
            setCommandType(_nCommandType);
            return true;
        }
        catch (Exception exception)
        {
View Full Code Here

                        String scurreftablename = AnyConverter.toString(xPropertySet.getPropertyValue("ReferencedTable"));
                        if (getTableNamesAsNameAccess().hasByName(scurreftablename))
                        {
                            if (scurreftablename.equals(_sreferencedtablename))
                            {
                                XColumnsSupplier xColumnsSupplier = UnoRuntime.queryInterface( XColumnsSupplier.class, xPropertySet );
                                String[] smastercolnames = xColumnsSupplier.getColumns().getElementNames();
                                skeycolumnnames = new String[2][smastercolnames.length];
                                skeycolumnnames[0] = smastercolnames;
                                skeycolumnnames[1] = new String[smastercolnames.length];
                                for (int n = 0; n < smastercolnames.length; n++)
                                {
                                    XPropertySet xcolPropertySet = UnoRuntime.queryInterface( XPropertySet.class, xColumnsSupplier.getColumns().getByName( smastercolnames[n] ) );
                                    skeycolumnnames[1][n] = AnyConverter.toString(xcolPropertySet.getPropertyValue("RelatedColumn"));
                                }
                                return skeycolumnnames;
                            }
                        }
View Full Code Here

    }

    // misc
    public int getColumnCount()
    {
        XColumnsSupplier suppCols = (XColumnsSupplier)UnoRuntime.queryInterface(
            XColumnsSupplier.class, m_rowSet );
        XIndexAccess columns = (XIndexAccess)UnoRuntime.queryInterface(
            XIndexAccess.class, suppCols.getColumns() );
        return columns.getCount();
    }
View Full Code Here

    public int[] getSelectedQueryFields(String[] FieldNames) throws Tools.InvalidQueryException{
    try{
  String CurFieldName;
  SQLQueryComposer = getSQLQueryComposer();
  SQLQueryComposer.setQuery(Command);
  XColumnsSupplier xColSuppl = (XColumnsSupplier) UnoRuntime.queryInterface(XColumnsSupplier.class, SQLQueryComposer);
  XNameAccess xColumns = xColSuppl.getColumns();
  String[] AllQueryFieldNames = xColumns.getElementNames();
  int FieldCount = FieldNames.length;
  int[] SelColIndices = Tools.initializeintArray(FieldCount, -1);
  for (int i=0; i<FieldCount; i++){
      CurFieldName = FieldNames[i];
View Full Code Here


    public void addSortingCriteria(String SortingColumnName, boolean bAscend){
    try{
  SQLQueryComposer.setQuery(Command);
  XColumnsSupplier xColSuppl = (XColumnsSupplier) UnoRuntime.queryInterface(XColumnsSupplier.class, SQLQueryComposer);
  XNameAccess xColumns = xColSuppl.getColumns();
  Object oColumn =  xColumns.getByName(SortingColumnName);
  XPropertySet xColumn = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oColumn);
 
  SQLQueryComposer.appendOrderByColumn(xColumn, bAscend);
  Command = SQLQueryComposer.getComposedQuery();
View Full Code Here

  xExecute.executeWithCompletion(xInteraction);
  // create the ResultSet to access the data
  XResultSetAccess xResultAccess = (XResultSetAccess) UnoRuntime.queryInterface(XResultSetAccess.class, xRowSet);
  ResultSet = xResultAccess.createResultSet();
  xResultSetRow = (com.sun.star.sdbc.XRow) UnoRuntime.queryInterface(com.sun.star.sdbc.XRow.class, ResultSet);
  XColumnsSupplier xDBCols = (XColumnsSupplier) UnoRuntime.queryInterface(XColumnsSupplier.class, ResultSet);
  xColumns = xDBCols.getColumns();
  String[] sElementNames = xColumns.getElementNames();
  CommandType = com.sun.star.sdb.CommandType.COMMAND;
  if (binitializeDBColumns == true){
      initializeFields(FieldNames, false);
  }
View Full Code Here

        {
            tableDesc.setPropertyValue( "Name", getName() );
        }
        catch ( Exception e ) { e.printStackTrace( System.err ); }
       
        XColumnsSupplier suppDescCols = UnoRuntime.queryInterface( XColumnsSupplier.class, tableDesc );

        XNameAccess descColumns = suppDescCols.getColumns();
        XDataDescriptorFactory columnDescFac = UnoRuntime.queryInterface( XDataDescriptorFactory.class, descColumns );

        HsqlColumnDescriptor[] myColumns = getColumns();
        for ( int i = 0; i < myColumns.length; ++i )
        {
View Full Code Here

    }

    // misc
    public int getColumnCount()
    {
        XColumnsSupplier suppCols = (XColumnsSupplier)UnoRuntime.queryInterface(
            XColumnsSupplier.class, m_rowSet );
        XIndexAccess columns = (XIndexAccess)UnoRuntime.queryInterface(
            XIndexAccess.class, suppCols.getColumns() );
        return columns.getCount();
    }
View Full Code Here

TOP

Related Classes of com.sun.star.sdbcx.XColumnsSupplier

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.