org.apache.jdo.impl.fostore
Class FOStoreConnectionId

java.lang.Object
  extended byorg.apache.jdo.impl.fostore.FOStoreConnectionId

class FOStoreConnectionId
extends java.lang.Object

Represents the information required to connect to a database.

Version:
1.0
Author:
Craig Russell

Field Summary
private  boolean create
          The flag telling whether to create.
private  java.lang.String password
          The password of this connection.
private  java.lang.String url
          The URL of this connection.
private  java.lang.String user
          The user id of this connection.
 
Constructor Summary
FOStoreConnectionId(java.lang.String url, java.lang.String user, java.lang.String password)
          Creates new FOStoreConnectionId.
FOStoreConnectionId(java.lang.String url, java.lang.String user, java.lang.String password, boolean create)
          Creates new FOStoreConnectionId.
 
Method Summary
 boolean equals(java.lang.Object other)
          Returns true if this represents the same URL, user, and password as the other.
 boolean getCreate()
           
 java.lang.String getPassword()
           
 java.lang.String getUrl()
           
 java.lang.String getUser()
           
 int hashCode()
          Combine the hashCodes of URL, user, and password.
static void main(java.lang.String[] argv)
           
 void setCreate(boolean create)
           
 void setPassword(java.lang.String password)
           
 void setUrl(java.lang.String url)
           
 void setUser(java.lang.String user)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

url

private java.lang.String url
The URL of this connection. Must not be null.


user

private java.lang.String user
The user id of this connection. May be null.


password

private java.lang.String password
The password of this connection. May be null.


create

private boolean create
The flag telling whether to create.

Constructor Detail

FOStoreConnectionId

public FOStoreConnectionId(java.lang.String url,
                           java.lang.String user,
                           java.lang.String password,
                           boolean create)
Creates new FOStoreConnectionId.

Parameters:
url - the URL of the connection.
user - the user id of the connection.
password - the password of the connection.
create - the flag whether to create the database.

FOStoreConnectionId

public FOStoreConnectionId(java.lang.String url,
                           java.lang.String user,
                           java.lang.String password)
Creates new FOStoreConnectionId.

Parameters:
url - the URL of the connection.
user - the user id of the connection.
password - the password of the connection.
Method Detail

setUrl

public void setUrl(java.lang.String url)

getUrl

public java.lang.String getUrl()

setUser

public void setUser(java.lang.String user)

getUser

public java.lang.String getUser()

setPassword

public void setPassword(java.lang.String password)

getPassword

public java.lang.String getPassword()

setCreate

public void setCreate(boolean create)

getCreate

public boolean getCreate()

hashCode

public int hashCode()
Combine the hashCodes of URL, user, and password.

Returns:
the combined hashCode. Note that the create flag is not part of the hashCode.

equals

public boolean equals(java.lang.Object other)
Returns true if this represents the same URL, user, and password as the other.

Parameters:
other - another connection id.
Returns:
true if this represents the same URL, user, and password as the other. Note that the create flag is not part of the identity.

main

public static void main(java.lang.String[] argv)