【Java开源代码栏目提醒】:网学会员Java开源代码为您提供CatPk.java参考,解决您在CatPk.java学习中工作中的难题,参考学习。
/*
*/
package com.relationinfo.finance.dto;
import java.io.Serializable;
/**
* This class represents the primary key of the CAT table.
*/
public class CatPk implements Serializable
{
private int userId;
private int catId;
/**
* This attribute represents whether the primitive attribute userId is null.
*/
private boolean userIdNull;
/**
* This attribute represents whether the primitive attribute catId is null.
*/
private boolean catIdNull;
/**
* 设置 userId
*/
public void setUserId(int userId)
{
this.userId = userId;
}
/**
* 获得 userId
*/
public int getUserId()
{
return userId;
}
/**
* 设置 catId
*/
public void setCatId(int catId)
{
this.catId = catId;
}
/**
* 获得 catId
*/
public int getCatId()
{
return catId;
}
/**
* Method 'CatPk'
*
*/
public CatPk()
{
}
/**
* Method 'CatPk'
*
* @param userId
* @param catId
*/
public CatPk( int userId, int catId)
{
this.userId = userId;
this.catId = catId;
}
/**
* 设置 userIdNull
*/
public void setUserIdNull(boolean userIdNull)
{
this.userIdNull = userIdNull;
}
/**
* 获得 userIdNull
*/
public boolean isUserIdNull()
{
return userIdNull;
}
/**
* 设置 catIdNull
*/
public void setCatIdNull(boolean catIdNull)
{
this.catIdNull = catIdNull;
}
/**
* 获得 catIdNull
*/
public boolean isCatIdNull()
{
return catIdNull;
}
/**
* Method 'equals'
*
* @param _other
* @return boolean
*/
public boolean equals(Object _other)
{
if (_other == null) {
return false;
}
if (_other == this) {
return true;
}
if (!(_other instanceof CatPk)) {
return false;
}
CatPk _cast = (CatPk) _other;
if (userId != _cast.userId) {
return false;
}
if (catId != _cast.catId) {
return false;
}
if (userIdNull != _cast.userIdNull) {
return false;
}
if (catIdNull != _cast.catIdNull) {
return false;
}
return true;
}
/**
* Method 'hashCode'
*
* @return int
*/
public int hashCode()
{
int _hashCode = 0;
_hashCode = 29 * _hashCode + userId;
_hashCode = 29 * _hashCode + catId;
_hashCode = 29 * _hashCode + (userIdNull ? 1 : 0);
_hashCode = 29 * _hashCode + (catIdNull ? 1 : 0);
return _hashCode;
}
/**
* Method 'toString'
*
* @return String
*/
public String toString()
{
StringBuffer ret = new StringBuffer();
ret.append( "com.mycompany.myapp.dto.CatPk: " );
ret.append( "userId='" + userId + "'" );
ret.append( ", catId='" + catId + "'" );
return ret.toString();
}
}
上一篇:
CatFindWhereUserIdEqualsWebAction.java
下一篇:
网络能耗监测系统管理端的研究与实现