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

import org.apache.cayenne.ObjectId;

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

public class ImwTOfficeCalendar extends _ImwTOfficeCalendar {
  
  public static final String CALENDAR_DATE_COLUMN = "CALENDAR_DATE";
  public static final String CREATE_DATE_COLUMN = "CREATE_DATE";
  public static final String CREATE_USER_ID_COLUMN = "CREATE_USER_ID";
  public static final String DISABLED_COLUMN = "DISABLED";
  public static final String NOTE_COLUMN = "NOTE";
  public static final String OFFICE_ID_COLUMN = "OFFICE_ID";
  public static final String ON_OFF_CLASS_COLUMN = "ON_OFF_CLASS";
  public static final String UPDATE_DATE_COLUMN = "UPDATE_DATE";
  public static final String UPDATE_USER_ID_COLUMN = "UPDATE_USER_ID";
  
	public Integer getOfficeCalendarId() {
		if (getObjectId() != null && !getObjectId().isTemporary()) {
			Object obj = getObjectId().getIdSnapshot().get(
					CALENDAR_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 setOfficeCalendarId(String id) {
		setObjectId(new ObjectId("ImwTOfficeCalendar", CALENDAR_ID_PK_COLUMN, Integer
				.valueOf(id)));
	}
}
