timeentrypk.java

来自「考勤管理系统源码」· Java 代码 · 共 55 行

JAVA
55
字号
package com.wiley.compBooks.EJwithUML.TimeCardDomain;


import java.io.Serializable;

/**
 * The TimeEntry bean holds a single time entry.
 *
 * TimeEntryPK is the primary key class for the underlying entity bean. It is,
 *            id = timecard-id + entry-count-for-timecard
 */
public class TimeEntryPK implements Serializable
{
  public String id;

  public TimeEntryPK()
  {

  }

  public TimeEntryPK(String id)
  {
     this.id = id;
  }

  public String toString()
  {
    return id;
  }

  public  int hashCode()
  {
    return id.hashCode();
  }

  public boolean equals(Object key)
  {
    if (key == null)
    {
      return false;
    }
    else
    {
      if (!key.getClass().equals(this.getClass()))
      {
        return false;
      }
      else
      {
        return ((TimeEntryPK)key).id.equals(this.id);
      }
    }
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?