net.sourceforge.squirrel_sql.plugins.sessionscript
Class AliasScript

java.lang.Object
  extended by net.sourceforge.squirrel_sql.plugins.sessionscript.AliasScript
All Implemented Interfaces:
Serializable, IHasIdentifier

public class AliasScript
extends Object
implements Serializable, IHasIdentifier

An SQL script run when a session is started.

Author:
Colin Bell
See Also:
Serialized Form

Constructor Summary
AliasScript()
          Default ctor.
AliasScript(ISQLAlias alias)
          Ctor specifying the ISQLAlias.
 
Method Summary
 boolean equals(Object rhs)
          Returns true if this objects is equal to the passed one.
 IIdentifier getIdentifier()
          Return the identifier that uniquely identifies this object.
 String getSQL()
          Return the SQL to be run.
 int hashCode()
          Returns a hash code value for this object.
 void setIdentifier(IIdentifier id)
          Set the identifier that uniquely identifies this object.
 void setSQL(String value)
          Set the SQL to be run.
 String toString()
          Return the SQL as a string representaion of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AliasScript

public AliasScript()
Default ctor. Should only be used by to/from XML code.


AliasScript

public AliasScript(ISQLAlias alias)
Ctor specifying the ISQLAlias.

Parameters:
alias - ISQLAlias we have creatign this script for.
Throws:
IllegalArgumentException - Thrown if null ISQLAlias passed.
Method Detail

equals

public boolean equals(Object rhs)
Returns true if this objects is equal to the passed one. Two AliasScript objects are considered equal if they have the same identifier.

Overrides:
equals in class Object

hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class Object

toString

public String toString()
Return the SQL as a string representaion of this object.

Overrides:
toString in class Object
Returns:
The SQL as a string representation of this object.

getIdentifier

public IIdentifier getIdentifier()
Return the identifier that uniquely identifies this object.

Specified by:
getIdentifier in interface IHasIdentifier
Returns:
the identifier that uniquely identifies this object.

getSQL

public String getSQL()
Return the SQL to be run.

Returns:
the SQL to be run.

setIdentifier

public void setIdentifier(IIdentifier id)
Set the identifier that uniquely identifies this object. This should be the ID of the ISQLALais that this script is for.

Parameters:
the - identifier that uniquely identifies this object.

setSQL

public void setSQL(String value)
Set the SQL to be run.

Parameters:
value - The SQL.


Copyright © 2001-2010. All Rights Reserved.