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

import org.apache.cayenne.ObjectId;

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

public class ImwMItemCategory extends _ImwMItemCategory {

  public Integer getItemCategoryId() {
    if (getObjectId() != null && !getObjectId().isTemporary()) {
      Object obj = getObjectId().getIdSnapshot().get(ITEM_CATEGORY_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 setItemCategoryId(String id) {
    setObjectId(new ObjectId("ImwMItemCategory", ITEM_CATEGORY_ID_PK_COLUMN, Integer
        .valueOf(id)));
  }

}



