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

import org.apache.cayenne.ObjectId;

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

public class ImwTAccountPlan extends _ImwTAccountPlan {
  public Integer getAccountPlanId() {
    if (getObjectId() != null && !getObjectId().isTemporary()) {
      Object obj = getObjectId().getIdSnapshot().get(ACCOUNT_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 setAccountPlanId(Integer id) {
    setObjectId(new ObjectId("ImwTAccountPlan", ACCOUNT_ID_PK_COLUMN, Integer
        .valueOf(id)));
  }
}



