⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 timeentrybean.java

📁 考勤管理系统源码
💻 JAVA
字号:
package com.wiley.compBooks.EJwithUML.TimeCardDomain;

import com.wiley.compBooks.EJwithUML.Base.EjbUtil.*;
import java.util.*;
import javax.ejb.*;
import javax.naming.*;

/**
 * The TimeEntry bean holds time entries for a date range.
 * TimeEntryBean is the actual entity bean implementation.
 */

public abstract class TimeEntryBean extends BasicEntityBean  implements TimeEntryInt
{

  /** CMP fields */
  public abstract String getId();
  public abstract void setId(String id);
  public abstract long getDay();
  public abstract void setDay(long day);
  public abstract int getHours();
  public abstract void setHours(int hours);

  /** CMR fileds */
  public abstract TimecardLocal getTimecard();
  public abstract void setTimecard(TimecardLocal card);
  public abstract ChargeCodeLocal getChargeCode();
  public abstract void setChargeCode(ChargeCodeLocal code);

  /**
   * Create an TimeEntryBean with the specified parameters. This is never
   * called directly.
   */
  public TimeEntryPK ejbCreate(String timeEntryId, Date day, int hours,
           ChargeCodeLocal code, TimecardLocal tcard) throws CreateException
  {
    System.out.println("in ejbCreate() of TimeEntryBean!");
    // sets the CMP fields
    setId(timeEntryId);
    setDay(day.getTime());
    setHours(hours);
    return null;
  }

  /** Actions performed after creation. This is never called directly. */
  public void ejbPostCreate(String timeEntryId, Date day, int hours,
                        ChargeCodeLocal code, TimecardLocal tcard)
  {
    System.out.println("in ejbPostCreate() of TimeEntryBean!");
    //sets CMR fields
    setChargeCode(code);
    setTimecard(tcard);
  }

  /** Answers the day the time is entered for. */
  public Date getDate()
  {
    return new Date(getDay());
  }

  /** sets the day the time is entered for. */
  public void setDate(Date date)
  {
    setDay(date.getTime());
  }
}

⌨️ 快捷键说明

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