OpMath

com.opmath.test.j2ee.contact
Class ContactVO

java.lang.Object
  |
  +--com.opmath.test.j2ee.contact.ContactVO
All Implemented Interfaces:
Serializable

public class ContactVO
extends Object
implements Serializable

The value object for the Contact EJB. The value object is used to transfer the state of the Contact EJB across the wire in a single logical operation. This class implements the Value Object Pattern. Note that an inconsistency over the use of getter and setter methods prevents this value object class being used as the superclass for the EJB Bean class

Copyright: (c) 2002 The Open Math Company Limited

The Terms of Distribution of this software are stipulated in the javadoc Overview for this project.

Since:
J2SDK 1.3.1, J2SDKEE 1.3.1, EJB 2.0
Version:
OpMath J2EE Example v1.0
Author:
Bruno Beloff bruno.beloff@opmath.com
See Also:
ContactBean, Serialized Form

Constructor Summary
ContactVO()
          Constructs a new ContactVO.
ContactVO(ContactVO cVO)
          Constructs a new ContactVO.
ContactVO(String givenName, String familyName, String email, String phone)
          Constructs a new ContactVO.
 
Method Summary
 boolean equals(Object o)
          Returns true iff the given Object is the same class as this instance, and has the same index.
 ContactVO getData()
          Returns a copy of this ContactPK.
 String getEmail()
          Returns the 'email' field for this ContactVO instance.
 String getFamilyName()
          Returns the 'family name' field for this ContactVO instance.
 String getGivenName()
          Returns the 'given name' field for this ContactVO instance.
 String getPhone()
          Returns the 'phone' field for this ContactVO instance.
 int hashCode()
          Returns the hash code for this ContactPK.
 void setData(ContactVO cVO)
          Sets the state of this ContactVO instance to the values found in the given ContactVO instance.
 void setEmail(String email)
          Sets the 'email' field for this ContactVO instance to the given value.
 void setFamilyName(String familyName)
          Sets the 'family name' field for this ContactVO instance to the given value.
 void setGivenName(String givenName)
          Sets the 'given name' field for this ContactVO instance to the given value.
 void setPhone(String phone)
          Sets the 'phone' field for this ContactVO instance to the given value.
 String toString()
          Returns a descriptive string for this ContactVO instance.
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContactVO

public ContactVO()

Constructs a new ContactVO. The new ContactVO instance has instance variables set to null.


ContactVO

public ContactVO(String givenName,
                 String familyName,
                 String email,
                 String phone)

Constructs a new ContactVO. The new ContactVO instance has instance variables set according to the given parameters.

Parameters:
givenName - a String specifying the givenName field of the new instance.
familyName - a String specifying the familyName field of the new instance.
email - a String specifying the email field of the new instance.
phone - a String specifying the phone field of the new instance.

ContactVO

public ContactVO(ContactVO cVO)

Constructs a new ContactVO. The new ContactVO instance is a copy of the the given parameter.

Parameters:
cVO - a ContactVO specifying the state of the new instance.
Method Detail

getData

public ContactVO getData()

Returns a copy of this ContactPK.

Returns:
a ContactVO copy of this ContactPK.

setData

public void setData(ContactVO cVO)

Sets the state of this ContactVO instance to the values found in the given ContactVO instance.

Parameters:
cVO - a ContactVO specifying the new state of this instance.

getGivenName

public String getGivenName()

Returns the 'given name' field for this ContactVO instance.

Returns:
a String carrying the 'given name' field.

setGivenName

public void setGivenName(String givenName)

Sets the 'given name' field for this ContactVO instance to the given value.

Parameters:
givenName - a String carrying the new 'given name' value.

getFamilyName

public String getFamilyName()

Returns the 'family name' field for this ContactVO instance.

Returns:
a String carrying the 'given family' field.

setFamilyName

public void setFamilyName(String familyName)

Sets the 'family name' field for this ContactVO instance to the given value.

Parameters:
familyName - a String carrying the new 'family name' value.

getEmail

public String getEmail()

Returns the 'email' field for this ContactVO instance.

Returns:
a String carrying the 'email' field.

setEmail

public void setEmail(String email)

Sets the 'email' field for this ContactVO instance to the given value.

Parameters:
email - a String carrying the new 'email' value.

getPhone

public String getPhone()

Returns the 'phone' field for this ContactVO instance.

Returns:
a String carrying the 'phone' field.

setPhone

public void setPhone(String phone)

Sets the 'phone' field for this ContactVO instance to the given value.

Parameters:
phone - a String carrying the new 'phone' value.

equals

public boolean equals(Object o)

Returns true iff the given Object is the same class as this instance, and has the same index.

Overrides:
equals in class Object
Returns:
a boolean indicating equivalance.

hashCode

public int hashCode()

Returns the hash code for this ContactPK. The value returned is the hash code of a concatenation of all of the fields of this ContactPK.

Overrides:
hashCode in class Object
Returns:
an int hash code.

toString

public String toString()

Returns a descriptive string for this ContactVO instance.

Overrides:
toString in class Object
Returns:
a descriptive String.

OpMath

Submit a bug or feature to Open Math
Copyright © 2002 Open Math Company Limited, Brighton, UK