19 package org.turro.financials.product;
21 import org.turro.util.CompareUtil;
29 private long productId, providerId, providerProductId;
30 private String productDescription;
35 public IProductKey(
long productId,
long providerId,
long providerProductId, String productDescription) {
36 this.productId = productId;
37 this.providerId = providerId;
38 this.providerProductId = providerProductId;
39 this.productDescription = productDescription;
51 return providerProductId;
55 return productDescription;
59 this.productId = productId;
63 this.providerId = providerId;
67 this.providerProductId = providerProductId;
71 this.productDescription = productDescription;
76 int result = CompareUtil.compare(productId, o.productId);
78 result = CompareUtil.compare(providerId, o.providerId);
81 result = CompareUtil.compare(providerProductId, o.providerProductId);
84 result = CompareUtil.compare(productDescription, o.productDescription);
92 hash = 89 * hash + (int) (this.productId ^ (this.productId >>> 32));
93 hash = 89 * hash + (int) (this.providerId ^ (this.providerId >>> 32));
94 hash = 89 * hash + (int) (this.providerProductId ^ (this.providerProductId >>> 32));
95 hash = 89 * hash + (this.productDescription !=
null ? this.productDescription.hashCode() : 0);
104 if (getClass() != obj.getClass()) {
108 if (this.productId != other.productId) {
111 if (this.providerId != other.providerId) {
114 if (this.providerProductId != other.providerProductId) {
117 if ((this.productDescription ==
null) ? (other.productDescription !=
null) : !this.productDescription.equals(other.productDescription)) {
int compareTo(IProductKey o)
long getProviderProductId()
void setProviderProductId(long providerProductId)
void setProductId(long productId)
IProductKey(long productId, long providerId, long providerProductId, String productDescription)
boolean equals(Object obj)
void setProviderId(long providerId)
void setProductDescription(String productDescription)
String getProductDescription()