net.sourceforge.squirrel_sql.plugins.netezza.exp
Class NetezzaExtTableParentExpander

java.lang.Object
  extended by net.sourceforge.squirrel_sql.plugins.netezza.exp.NetezzaExtTableParentExpander
All Implemented Interfaces:
INodeExpander

public class NetezzaExtTableParentExpander
extends Object
implements INodeExpander

This class handles the expanding of the "External Table" node. It will give a list of all the External Tables available in the schema.


Constructor Summary
NetezzaExtTableParentExpander()
          Default ctor.
 
Method Summary
 List<ObjectTreeNode> createChildren(ISession session, ObjectTreeNode parentNode)
          Though this implementation looks incomplete, it is nonetheless correct.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetezzaExtTableParentExpander

public NetezzaExtTableParentExpander()
Default ctor.

Method Detail

createChildren

public List<ObjectTreeNode> createChildren(ISession session,
                                           ObjectTreeNode parentNode)
                                    throws SQLException
Though this implementation looks incomplete, it is nonetheless correct. Since the Netezza driver knows about "EXTERNAL TABLE" table types, it returns them from DatabaseMetaData.getTables. So it is enough to merely plugin an expander that supports this type and when SQuirreL attempts to populate the "EXTERNAL TABLE" tree node, the tables are provided by the driver. There was a real implementation here before that executed the following SQL: SELECT * FROM _v_objs_owned where class = 'EXTERNAL TABLE' and owner = ? and database = ? However, for reasons mentioned above, this resulted in duplicate entries in the object tree under the "EXTERNAL TABLE" node.

Specified by:
createChildren in interface INodeExpander
Parameters:
session - Current session.
parentNode - Node to be expanded.
Returns:
an empty list of ObjectTreeNode type
Throws:
SQLException


Copyright © 2001-2013. All Rights Reserved.