Package net.sourceforge.squirrel_sql.fw.sql

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


         final List<ObjectTreeNode> childNodes = super.createChildren(session, parentNode);

         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);

         if (InstanceDetailsTab.isAccessible(session))
         {
            // Instances.
            dboInfo = new DatabaseObjectInfo(null, null, "INSTANCES",
               IObjectTypes.INSTANCE_PARENT, md);
            node = new ObjectTreeNode(session, dboInfo);
            childNodes.add(node);
         }

         if (SessionDetailsTab.isAccessible(session))
         {
            // Sessions.
            dboInfo = new DatabaseObjectInfo(null, null, "SESSIONS",
               IObjectTypes.SESSION_PARENT, md);
            node = new ObjectTreeNode(session, dboInfo);
            childNodes.add(node);
         }
View Full Code Here


    {
      pstmt = conn.prepareStatement(SQL);
      rs = pstmt.executeQuery();
      while (rs.next())
      {
        IDatabaseObjectInfo doi = new DatabaseObjectInfo(
           null, null, rs.getString(1), IObjectTypes.INSTANCE, md);
        // final Map map = new HashMap();
        // map.put("Instance Number", new Integer(rs.getInt(1)));
        // map.put("Name", rs.getString(2));
        // map.put("Host Name", rs.getString(3));
View Full Code Here

    final IDatabaseObjectInfo parentDbinfo = parentNode.getDatabaseObjectInfo();
    final SQLDatabaseMetaData md = session.getSQLConnection().getSQLMetaData();
    final String schemaName = parentDbinfo.getSchemaName();

    // Add package node to contain standalone procedures.
    IDatabaseObjectInfo dbinfo = new DatabaseObjectInfo(null, schemaName,
                        "", IObjectTypes.PACKAGE, md);
    ObjectTreeNode child = new ObjectTreeNode(session, dbinfo);
    child.setUserObject("Standalone");
    childNodes.add(child);
View Full Code Here

      ResultSet rs = pstmt.executeQuery();
      try
      {
        while (rs.next())
        {
          IDatabaseObjectInfo dbinfo = new DatabaseObjectInfo(catalogName,
                      schemaName, rs.getString(1),
                      _objectType._childDboType, md);

               if(filterMatcher.matches(dbinfo.getSimpleName()))
               {
                  childNodes.add(new ObjectTreeNode(session, dbinfo));
               }
            }
      }
View Full Code Here

      pstmt.setString(1, schemaName);
      pstmt.setString(2, filterMatcher.getSqlLikeMatchString());
      rs = pstmt.executeQuery();
            while (rs.next())
            {
               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

        PreparedStatement pstmt = conn.prepareStatement(SQL);
        try {
            ResultSet rs = pstmt.executeQuery();
            while (rs.next()) {
                IDatabaseObjectInfo si = new DatabaseObjectInfo(catalogName,
                        schemaName, rs.getString(1),
                        DatabaseObjectType.SEQUENCE, md);
                childNodes.add(new ObjectTreeNode(session, si));
            }
        } finally {
View Full Code Here

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

    {
      pstmt = conn.prepareStatement(SQL);
      rs = pstmt.executeQuery();
      while (rs.next())
      {
        IDatabaseObjectInfo si = new DatabaseObjectInfo(
           catalogName, schemaName, rs.getString(1), DatabaseObjectType.DATATYPE, md);
        childNodes.add(new ObjectTreeNode(session, si));
      }
    } finally
    {
View Full Code Here

        {
            pstmt = conn.prepareStatement(ALL_INDICES_SQL);
            final ResultSet rs = pstmt.executeQuery();
            while (rs.next())
            {
                IDatabaseObjectInfo doi = new DatabaseObjectInfo(null, null,
                                            rs.getString(1),
                                            DatabaseObjectType.INDEX, md);
                childNodes.add(new ObjectTreeNode(session, doi));
            }
        }
View Full Code Here

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

        IDatabaseObjectInfo seqInfo =
            new DatabaseObjectInfo(catalogName,
                                   schemaName,
                                   "SEQUENCE",
                                   DatabaseObjectType.SEQUENCE_TYPE_DBO,
                                   md);
        ObjectTreeNode node = new ObjectTreeNode(session, seqInfo);
        node.addExpander(new SequenceParentExpander(isOS400));
        childNodes.add(node);

        IDatabaseObjectInfo udfInfo =
            new DatabaseObjectInfo(catalogName,
                                   schemaName,
                                   "UDF",
                                   DatabaseObjectType.UDF_TYPE_DBO,
                                   md);
        ObjectTreeNode udfnode = new ObjectTreeNode(session, udfInfo);
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.