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

import org.apache.cayenne.ObjectId;

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

public class ImwTAccount extends _ImwTAccount {
  public Integer getAccountId() {
    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 setAccountId(Integer id) {
    setObjectId(new ObjectId("ImwTAccount", ACCOUNT_ID_PK_COLUMN, Integer
        .valueOf(id)));
  }
}



