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

import org.apache.cayenne.ObjectId;

import com.aimluck.eip.cayenne.om.account.auto._AvzMRole;

public class AvzMRole extends _AvzMRole {
  public Integer getRoleId() {
    if (getObjectId() != null && !getObjectId().isTemporary()) {
      Object obj = getObjectId().getIdSnapshot().get(ROLE_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 setRoleId(int id) {
    setObjectId(new ObjectId("AvzMRole", ROLE_ID_PK_COLUMN, id));
  }
}
