net.sourceforge.squirrel_sql.plugins.refactoring.commands
Class PrimaryKeyCommandUtility

java.lang.Object
  extended by net.sourceforge.squirrel_sql.plugins.refactoring.commands.PrimaryKeyCommandUtility

public class PrimaryKeyCommandUtility
extends Object

Implements an utility Class for various Primary Key operations.


Field Summary
protected  IDatabaseObjectInfo[] _info
          Selected table(s)
protected  ISession _session
          Current session
 
Constructor Summary
PrimaryKeyCommandUtility(ISession session, IDatabaseObjectInfo[] info)
          Constructor of the PrimaryKeyCommandUtility Class.
 
Method Summary
protected  boolean tableHasPrimaryKey()
          Returns true if table has a Primary key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_session

protected ISession _session
Current session


_info

protected final IDatabaseObjectInfo[] _info
Selected table(s)

Constructor Detail

PrimaryKeyCommandUtility

public PrimaryKeyCommandUtility(ISession session,
                                IDatabaseObjectInfo[] info)
Constructor of the PrimaryKeyCommandUtility Class.

Parameters:
session - ClientSession.
info - DatabaseObjectInfo.
Method Detail

tableHasPrimaryKey

protected boolean tableHasPrimaryKey()
                              throws SQLException
Returns true if table has a Primary key.

Returns:
true if table is having a primary key, otherwise returns false.
Throws:
SQLException - if there sql statement can not be completed or an error occures.


Copyright © 2001-2010. All Rights Reserved.