com.bankframe.examples.bo.impl.account
Class AccountPK

java.lang.Object
  extended by com.bankframe.examples.bo.impl.account.AccountPK
All Implemented Interfaces:
EPrimaryKey, Serializable

public class AccountPK
extends Object
implements EPrimaryKey, Serializable

This class defines the primary key attributes of the Account Entity

See Also:
Serialized Form

Field Summary
 String accountNumber
           
 String cardNumber
           
 
Fields inherited from interface com.bankframe.ejb.EPrimaryKey
serialVersionUID
 
Constructor Summary
AccountPK()
          Default Constructor.
AccountPK(String cardNumber, String accountNumber)
          Constructor.
 
Method Summary
 boolean equals(Object o)
          This method compares this instance with another for equality.
 int hashCode()
          This method generates a hash code for this primary key.
 DataPacket toDataPacket()
          This method converts this primary key to a DataPacket.
 String toString()
          This method returns a string representation of this primary key.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

cardNumber

public String cardNumber

accountNumber

public String accountNumber
Constructor Detail

AccountPK

public AccountPK()
Default Constructor.


AccountPK

public AccountPK(String cardNumber,
                 String accountNumber)
Constructor.

Parameters:
cardNumber - part of the key
accountNumber - part of the key
Method Detail

equals

public boolean equals(Object o)
This method compares this instance with another for equality.

Specified by:
equals in interface EPrimaryKey
Overrides:
equals in class Object
Parameters:
o - The object to compare with this object
Returns:
true if the object are the same, else false

hashCode

public int hashCode()
This method generates a hash code for this primary key.

Specified by:
hashCode in interface EPrimaryKey
Overrides:
hashCode in class Object
Returns:
a hash-code value for this primary key

toDataPacket

public DataPacket toDataPacket()
This method converts this primary key to a DataPacket.

Specified by:
toDataPacket in interface EPrimaryKey
Returns:
A DataPacket representation of the primary key

toString

public String toString()
This method returns a string representation of this primary key.

Specified by:
toString in interface EPrimaryKey
Overrides:
toString in class Object
Returns:
a string representation of this primary key


Copyright © 2005, 2007, Oracle. All rights reserved.