org.apache.ojb.broker
Class PBKey

java.lang.Object
  extended byorg.apache.ojb.broker.PBKey
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class PBKey
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

A immutable key to identify PB instances in pools, ...
The used jcdAlias name represents an alias for a connection defined in the repository file.

Version:
$Id: PBKey.java,v 1.7 2004/01/07 11:41:20 thma Exp $
Author:
Armin Waibel
See Also:
Serialized Form

Field Summary
(package private) static long serialVersionUID
           
 
Constructor Summary
PBKey(java.lang.String jcdAlias)
          Convenience constructor for PBKey(jcdAlias, null, null)
PBKey(java.lang.String jcdAlias, java.lang.String user, java.lang.String password)
          Constructor for new PBKey.
 
Method Summary
protected  java.lang.Object clone()
          Returns an 'deep' copy of this key.
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAlias()
          Returns the jcd-alias name, defined in the repository file.
 java.lang.String getPassword()
           
 java.lang.String getRepositoryFile()
          Deprecated. use getAlias() instead.
 java.lang.String getUser()
           
 int hashCode()
          Return the hash code of this PBKey, formed by the repository-, user-, password-name.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

PBKey

public PBKey(java.lang.String jcdAlias,
             java.lang.String user,
             java.lang.String password)
Constructor for new PBKey.

Parameters:
jcdAlias - alias name, defined in the repository file.
user -
password -

PBKey

public PBKey(java.lang.String jcdAlias)
Convenience constructor for PBKey(jcdAlias, null, null)

Method Detail

equals

public boolean equals(java.lang.Object obj)

clone

protected java.lang.Object clone()
                          throws java.lang.CloneNotSupportedException
Returns an 'deep' copy of this key.

Throws:
java.lang.CloneNotSupportedException

hashCode

public int hashCode()
Return the hash code of this PBKey, formed by the repository-, user-, password-name.


toString

public java.lang.String toString()

getAlias

public java.lang.String getAlias()
Returns the jcd-alias name, defined in the repository file.


getRepositoryFile

public java.lang.String getRepositoryFile()
Deprecated. use getAlias() instead.


getUser

public java.lang.String getUser()

getPassword

public java.lang.String getPassword()


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14