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

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

public class AccountPK
extends java.lang.Object
implements EPrimaryKey, java.io.Serializable

This class defines the primary key attributes of the Account Entity

See Also:
Serialized Form

Field Summary
 java.lang.String accountNumber
           
 java.lang.String cardNumber
           
 
Fields inherited from interface com.bankframe.ejb.EPrimaryKey
serialVersionUID
 
Constructor Summary
AccountPK()
          Default Constructor.
AccountPK(java.lang.String cardNumber, java.lang.String accountNumber)
          Constructor.
 
Method Summary
 boolean equals(java.lang.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.
 java.lang.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 java.lang.String cardNumber

accountNumber

public java.lang.String accountNumber
Constructor Detail

AccountPK

public AccountPK()
Default Constructor.


AccountPK

public AccountPK(java.lang.String cardNumber,
                 java.lang.String accountNumber)
Constructor.

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

equals

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

Specified by:
equals in interface EPrimaryKey
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
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 java.lang.String toString()
This method returns a string representation of this primary key.

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


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