Package net.sourceforge.squirrel_sql.fw.sql

Examples of net.sourceforge.squirrel_sql.fw.sql.DatabaseObjectInfo


    final SQLDatabaseMetaData md = session.getSQLConnection().getSQLMetaData();
    final String catalogName = parentDbinfo.getCatalogName();
    final String schemaName = parentDbinfo.getSimpleName();

    IDatabaseObjectInfo seqInfo =
      new DatabaseObjectInfo(catalogName, schemaName, _inodeFactory.getParentLabelForType(_dbObjType),
        _dbObjType, md);
    ObjectTreeNode node = new ObjectTreeNode(session, seqInfo);
    node.addExpander(_inodeFactory.createExpander(_dbObjType));
    childNodes.add(node);
View Full Code Here


         CatalogFilterMatcher filterMatcher = new CatalogFilterMatcher(session.getProperties());

      for (int i = 0; i < catalogs.length; ++i)
      {
            IDatabaseObjectInfo dbo = new DatabaseObjectInfo(null, null,
                                 catalogs[i],
                                 DatabaseObjectType.CATALOG,
                                 md);
            if (filterMatcher.matches(dbo.getSimpleName()))
            {
          childNodes.add(new ObjectTreeNode(session, dbo));
        }
      }
    }
View Full Code Here

         SchemaFilterMatcher filterMatcher = new SchemaFilterMatcher(session.getProperties());

      for (int i = 0; i < schemas.length; ++i)
      {
            IDatabaseObjectInfo dbo = new DatabaseObjectInfo(catalogName, null,
                                    schemas[i],
                                    DatabaseObjectType.SCHEMA, md);
            if(filterMatcher.matches(dbo.getSimpleName()))
            {
               childNodes.add(new ObjectTreeNode(session, dbo));
        }
      }
    }
View Full Code Here

      // Add table types to list.
      if (_tableTypes.length > 0)
      {
        for (int i = 0; i < _tableTypes.length; ++i)
        {
          IDatabaseObjectInfo dbo = new DatabaseObjectInfo(catalogName,
                          schemaName, _tableTypes[i],
                          DatabaseObjectType.TABLE_TYPE_DBO, md);
          ObjectTreeNode child = new ObjectTreeNode(session, dbo);
          list.add(child);
        }
      }
      else
      {
        s_log.debug("List of table types is empty so trying null table type to load all tables");
        IDatabaseObjectInfo dbo = new DatabaseObjectInfo(catalogName,
                        schemaName, null,
                        DatabaseObjectType.TABLE_TYPE_DBO, md);
        ObjectTreeNode child = new ObjectTreeNode(session, dbo);
        child.setUserObject("TABLE");
        list.add(child);
      }

      // Add stored proc parent node.
      boolean supportsStoredProcs = false;
      try
      {
        supportsStoredProcs = md.supportsStoredProcedures();
      }
      catch (SQLException ex)
      {
        s_log.debug("DBMS doesn't support 'supportsStoredProcedures()'", ex);
      }
      if (supportsStoredProcs)
      {
        IDatabaseObjectInfo dbo = new DatabaseObjectInfo(catalogName,
                          schemaName, "PROCEDURE",
                          DatabaseObjectType.PROC_TYPE_DBO, md);
        ObjectTreeNode child = new ObjectTreeNode(session, dbo);
        list.add(child);
      }

      // Add UDT parent node.
      {
        IDatabaseObjectInfo dbo = new DatabaseObjectInfo(catalogName,
                      schemaName, "UDT",
                      DatabaseObjectType.UDT_TYPE_DBO, md);
        ObjectTreeNode child = new ObjectTreeNode(session, dbo);
        list.add(child);
      }
View Full Code Here

      pstmt = conn.prepareStatement(query);
      triggerExtractor.bindParamters(pstmt, tableInfo);
      rs = pstmt.executeQuery();
      while (rs.next())
      {
        DatabaseObjectInfo doi = new DatabaseObjectInfo(
           catalogName, schemaName, rs.getString(1), DatabaseObjectType.TRIGGER, md);
        childNodes.add(new ObjectTreeNode(session, doi));
      }
    } catch (SQLException e)
    {
View Full Code Here

     * This adds a node to the tree that says "Loading..." in order to give
     * feedback to the user.
     */
    private ObjectTreeNode showLoadingNode()
    {
      IDatabaseObjectInfo doi = new DatabaseObjectInfo(null, null,
                "Loading...", DatabaseObjectType.OTHER,
                _session.getSQLConnection().getSQLMetaData());
      ObjectTreeNode loadingNode = new ObjectTreeNode(_session, doi);
      _parentNode.add(loadingNode);
      fireStructureChanged(_parentNode);
View Full Code Here

         super(session, createDbo(session));
      }

      private static final IDatabaseObjectInfo createDbo(ISession session)
      {
         return new DatabaseObjectInfo(null, null, session.getAlias().getName(),
                                 DatabaseObjectType.SESSION,
                                 session.getMetaData());
      }
View Full Code Here

      rs = pstmt.executeQuery();
      while (rs.next())
      {
        final IDatabaseObjectInfo si =
          new DatabaseObjectInfo(catalogName, schemaName, rs.getString(1), DatabaseObjectType.SEQUENCE,
            md);
        if (filterMatcher.matches(si.getSimpleName()))
        {
          childNodes.add(new ObjectTreeNode(session, si));
        }
      }
    }
View Full Code Here

    try
    {
      ResultSet rs = pstmt.executeQuery();
      while (rs.next())
      {
        IDatabaseObjectInfo doi = new DatabaseObjectInfo(null, schemaName,
                      rs.getString(1), DatabaseObjectType.USER, md);
        childNodes.add(new ObjectTreeNode(session, doi));
      }
    }
    finally
View Full Code Here

  {
    final List<ObjectTreeNode> childNodes = new ArrayList<ObjectTreeNode>();
    final SQLDatabaseMetaData md = session.getSQLConnection().getSQLMetaData();

    // Users.
    DatabaseObjectInfo dboInfo = new DatabaseObjectInfo(null, null, "USERS",
                      IObjectTypes.USER_PARENT, md);
    ObjectTreeNode node = new ObjectTreeNode(session, dboInfo);
    childNodes.add(node);

    return childNodes;
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.fw.sql.DatabaseObjectInfo

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.