CustomerPK.java
资源名称:MyStore.rar [点击查看]
上传用户:hgs128
上传日期:2007-02-03
资源大小:166k
文件大小:2k
源码类别:
百货/超市行业
开发平台:
WINDOWS
- /*
- * Generated by XDoclet - Do not edit!
- */
- package bmp;
- /**
- * Primary key for Customer.
- * @lomboz generated
- */
- public class CustomerPK
- extends java.lang.Object
- implements java.io.Serializable
- {
- private int _hashCode = 0;
- private StringBuffer _toStringValue = null;
- public java.lang.String customerID;
- public CustomerPK()
- {
- }
- public CustomerPK( java.lang.String customerID )
- {
- this.customerID = customerID;
- }
- public java.lang.String getCustomerID()
- {
- return customerID;
- }
- public void setCustomerID(java.lang.String customerID)
- {
- this.customerID = customerID;
- _hashCode = 0;
- }
- public int hashCode()
- {
- if( _hashCode == 0 )
- {
- if (this.customerID != null) _hashCode += this.customerID.hashCode();
- }
- return _hashCode;
- }
- public boolean equals(Object obj)
- {
- if( !(obj instanceof bmp.CustomerPK) )
- return false;
- bmp.CustomerPK pk = (bmp.CustomerPK)obj;
- boolean eq = true;
- if( obj == null )
- {
- eq = false;
- }
- else
- {
- if( this.customerID == null && ((bmp.CustomerPK)obj).getCustomerID() == null )
- {
- eq = true;
- }
- else
- {
- if( this.customerID == null || ((bmp.CustomerPK)obj).getCustomerID() == null )
- {
- eq = false;
- }
- else
- {
- eq = eq && this.customerID.equals( pk.customerID );
- }
- }
- }
- return eq;
- }
- /** @return String representation of this pk in the form of [.field1.field2.field3]. */
- public String toString()
- {
- if( _toStringValue == null )
- {
- _toStringValue = new StringBuffer("[.");
- _toStringValue.append(this.customerID).append('.');
- _toStringValue.append(']');
- }
- return _toStringValue.toString();
- }
- }