package com.alodar.example.interfaces;
import java.lang.*;
public class ItemPK
extends java.lang.Object
implements java.io.Serializable
{
static final long serialVersionUID = -9168028755305208442L;
transient private int _hashCode = Integer.MIN_VALUE;
transient private String value = null;
public java.lang.Integer itemId;
public ItemPK()
{
}
public ItemPK( java.lang.Integer itemId )
{
this.itemId = itemId;
}
public java.lang.Integer getItemId()
{
return itemId;
}
public void setItemId(java.lang.Integer itemId)
{
this.itemId = itemId;
}
public int hashCode()
{
if( _hashCode == Integer.MIN_VALUE )
{
_hashCode += this.itemId.hashCode();
}
return _hashCode;
}
public boolean equals(Object obj)
{
if( !(obj instanceof com.alodar.example.interfaces.ItemPK) )
return false;
com.alodar.example.interfaces.ItemPK pk = (com.alodar.example.interfaces.ItemPK)obj;
boolean eq = true;
if( obj == null )
{
eq = false;
}
else
{
if( this.itemId == null && ((com.alodar.example.interfaces.ItemPK)obj).getItemId() == null )
{
eq = true;
}
else
{
if( this.itemId == null || ((com.alodar.example.interfaces.ItemPK)obj).getItemId() == null )
{
eq = false;
}
else
{
eq = eq && this.itemId.equals( pk.itemId );
}
}
}
return eq;
}
public String toString()
{
if( value == null )
{
value = "[.";
value += this.itemId+".";
value += "]";
}
return value;
}
}