【Java开源代码栏目提醒】:网学会员在Java开源代码频道为大家收集整理了AccPk.java提供大家参考,希望对大家有所帮助!
/*
*/
package com.relationinfo.finance.dto;
import java.io.Serializable;
/**
* This class represents the primary key of the ACC table.
*/
public class AccPk implements Serializable
{
private int userId;
private int accId;
/**
* This attribute represents whether the primitive attribute userId is null.
*/
private boolean userIdNull;
/**
* This attribute represents whether the primitive attribute accId is null.
*/
private boolean accIdNull;
/**
* 设置 userId
*/
public void setUserId(int userId)
{
this.userId = userId;
}
/**
* 获得 userId
*/
public int getUserId()
{
return userId;
}
/**
* 设置 accId
*/
public void setAccId(int accId)
{
this.accId = accId;
}
/**
* 获得 accId
*/
public int getAccId()
{
return accId;
}
/**
* Method 'AccPk'
*
*/
public AccPk()
{
}
/**
* Method 'AccPk'
*
* @param userId
* @param accId
*/
public AccPk( int userId, int accId)
{
this.userId = userId;
this.accId = accId;
}
/**
* 设置 userIdNull
*/
public void setUserIdNull(boolean userIdNull)
{
this.userIdNull = userIdNull;
}
/**
* 获得 userIdNull
*/
public boolean isUserIdNull()
{
return userIdNull;
}
/**
* 设置 accIdNull
*/
public void setAccIdNull(boolean accIdNull)
{
this.accIdNull = accIdNull;
}
/**
* 获得 accIdNull
*/
public boolean isAccIdNull()
{
return accIdNull;
}
/**
* Method 'equals'
*
* @param _other
* @return boolean
*/
public boolean equals(Object _other)
{
if (_other == null) {
return false;
}
if (_other == this) {
return true;
}
if (!(_other instanceof AccPk)) {
return false;
}
AccPk _cast = (AccPk) _other;
if (userId != _cast.userId) {
return false;
}
if (accId != _cast.accId) {
return false;
}
if (userIdNull != _cast.userIdNull) {
return false;
}
if (accIdNull != _cast.accIdNull) {
return false;
}
return true;
}
/**
* Method 'hashCode'
*
* @return int
*/
public int hashCode()
{
int _hashCode = 0;
_hashCode = 29 * _hashCode + userId;
_hashCode = 29 * _hashCode + accId;
_hashCode = 29 * _hashCode + (userIdNull ? 1 : 0);
_hashCode = 29 * _hashCode + (accIdNull ? 1 : 0);
return _hashCode;
}
/**
* Method 'toString'
*
* @return String
*/
public String toString()
{
StringBuffer ret = new StringBuffer();
ret.append( "com.mycompany.myapp.dto.AccPk: " );
ret.append( "userId='" + userId + "'" );
ret.append( ", accId='" + accId + "'" );
return ret.toString();
}
}