package com.aimluck.eip.cayenne.om.portlet;

import org.apache.cayenne.ObjectId;

import com.aimluck.eip.cayenne.om.portlet.auto._ImwTExtTimecardSystemDetail;

public class ImwTExtTimecardSystemDetail extends _ImwTExtTimecardSystemDetail {
  
  public static final String END_HOUR_COLUMN = "END_HOUR";
  public static final String END_MINUTE_COLUMN = "END_MINUTE";
  public static final String START_HOUR_COLUMN = "START_HOUR";
  public static final String START_MINUTE_COLUMN = "START_MINUTE";
  public static final String SYSTEM_ID_COLUMN = "SYSTEM_ID";
  public static final String WORKSTART_FLAG_COLUMN = "WORKSTART_FLAG";
  public static final String WORKTIME_COLUMN = "WORKTIME";
  public static final String WORKTIME_STATUS_COLUMN = "WORKTIME_STATUS";
  
  public static final String SYSTEM_ID_PROPERTY = "systemId";
  
  public Integer getDetailId() {
    if (getObjectId() != null && !getObjectId().isTemporary()) {
      Object obj = getObjectId().getIdSnapshot().get(SYSTEM_DETAIL_ID_PK_COLUMN);
      if (obj instanceof Long) {
        Long value = (Long) obj;
        return Integer.valueOf(value.intValue());
      } else {
        return (Integer) obj;
      }
    } else {
      return null;
    }
  }

  public void setDetailId(String id) {
    setObjectId(new ObjectId("ImwTExtTimecardSystemDetail", SYSTEM_DETAIL_ID_PK_COLUMN, Integer
        .valueOf(id)));
  }
  
  public void setSystemId(Integer systemId) {
    writeProperty("systemId", systemId);
  }

  public Integer getSystemId() {
    return (Integer) readProperty("systemId");
  }

}




