コード例 #1
0
ファイル: User.java プロジェクト: arsalankhanahmed/AndroidPOS
  public void doClockIn(Terminal terminal, Shift shift, Calendar currentTime) {
    setClockedIn(true);
    setCurrentShift(shift);
    setCurrentTerminal(terminal);
    setLastClockInTime(currentTime.getTime());

    LogFactory.getLog(Application.class)
        .info("terminal id befor saving clockIn=" + terminal.getId());

    AttendenceHistory attendenceHistory = new AttendenceHistory();
    attendenceHistory.setClockInTime(currentTime.getTime());
    attendenceHistory.setClockInHour(Short.valueOf((short) currentTime.get(Calendar.HOUR)));
    attendenceHistory.setUser(this);
    attendenceHistory.setTerminal(terminal);
    attendenceHistory.setShift(shift);

    UserDAO.getInstance().saveClockIn(this, attendenceHistory, shift, currentTime);
  }
コード例 #2
0
 /** Copy terminal fields. */
 public final void link(Terminal terminal) {
   set(F_TERMINALID, new Long(terminal.getId()));
   set(F_TERMINALNAME, terminal.getName());
   set(F_BUILDINGID, new Long(terminal.getBuildingId()));
   set(F_BUILDINGNAME, terminal.getBuildingName());
 }