org.apache.ojb.broker
Class PBKey

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

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 365231 2005-12-21 22:22:08Z tomdz $
Author:
Armin Waibel
See Also:
Serialized Form

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)
          Creates a new PBKey.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 java.lang.String getAlias()
          Returns the jdbc connection descriptor name as defined in the repository file.
 java.lang.String getPassword()
          Returns the password.
 java.lang.String getRepositoryFile()
          Deprecated. use getAlias() instead.
 java.lang.String getUser()
          Returns the username.
 int hashCode()
          
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PBKey

public PBKey(java.lang.String jcdAlias,
             java.lang.String user,
             java.lang.String password)
Creates a new PBKey.

Parameters:
jcdAlias - The jdbc connection descriptor name as defined in the repository file
user - The username
password - The password

PBKey

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

Parameters:
jcdAlias - The jdbc connection descriptor name as defined in the repository file
Method Detail

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

getAlias

public java.lang.String getAlias()
Returns the jdbc connection descriptor name as defined in the repository file.

Returns:
The JCD alias

getRepositoryFile

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

Returns the jdbc connection descriptor name as defined in the repository file.

Returns:
The JCD alias

getUser

public java.lang.String getUser()
Returns the username.

Returns:
The username

getPassword

public java.lang.String getPassword()
Returns the password.

Returns:
The password


(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30