package oracle.fodemo.storefront.entities;

import oracle.jbo.Key;
import oracle.jbo.RowIterator;
import oracle.jbo.RowSet;
import oracle.jbo.domain.DBSequence;
import oracle.jbo.domain.Date;
import oracle.jbo.domain.Number;
import oracle.jbo.server.AttributeDefImpl;
import oracle.jbo.server.EntityDefImpl;
import oracle.jbo.server.EntityImpl;
import oracle.jbo.server.TransactionEvent;
// ---------------------------------------------------------------------
// ---    File generated by Oracle ADF Business Components Design Time.
// ---    Custom code may be added to this class.
// ---    Warning: Do not modify method signatures of generated methods.
// ---------------------------------------------------------------------
public class PersonEOImpl extends EntityImpl {
    private static EntityDefImpl mDefinitionObject;
    
    RowSet newPersonBeforePost = null;
    RowSet newPersonBeforePost1 = null;


    /**
     * AttributesEnum: generated enum for identifying attributes and accessors. Do not modify.
     */
    public enum AttributesEnum {
        PersonId {
            public Object get(PersonEOImpl obj) {
                return obj.getPersonId();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setPersonId((DBSequence)value);
            }
        }
        ,
        PrincipalName {
            public Object get(PersonEOImpl obj) {
                return obj.getPrincipalName();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setPrincipalName((String)value);
            }
        }
        ,
        Title {
            public Object get(PersonEOImpl obj) {
                return obj.getTitle();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setTitle((String)value);
            }
        }
        ,
        FirstName {
            public Object get(PersonEOImpl obj) {
                return obj.getFirstName();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setFirstName((String)value);
            }
        }
        ,
        LastName {
            public Object get(PersonEOImpl obj) {
                return obj.getLastName();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setLastName((String)value);
            }
        }
        ,
        PersonTypeCode {
            public Object get(PersonEOImpl obj) {
                return obj.getPersonTypeCode();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setPersonTypeCode((String)value);
            }
        }
        ,
        SupplierId {
            public Object get(PersonEOImpl obj) {
                return obj.getSupplierId();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setSupplierId((Number)value);
            }
        }
        ,
        ProvisionedFlag {
            public Object get(PersonEOImpl obj) {
                return obj.getProvisionedFlag();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setProvisionedFlag((String)value);
            }
        }
        ,
        PrimaryAddressId {
            public Object get(PersonEOImpl obj) {
                return obj.getPrimaryAddressId();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setPrimaryAddressId((Number)value);
            }
        }
        ,
        RegisteredDate {
            public Object get(PersonEOImpl obj) {
                return obj.getRegisteredDate();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setRegisteredDate((Date)value);
            }
        }
        ,
        MembershipId {
            public Object get(PersonEOImpl obj) {
                return obj.getMembershipId();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setMembershipId((Number)value);
            }
        }
        ,
        Email {
            public Object get(PersonEOImpl obj) {
                return obj.getEmail();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setEmail((String)value);
            }
        }
        ,
        ConfirmedEmail {
            public Object get(PersonEOImpl obj) {
                return obj.getConfirmedEmail();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setConfirmedEmail((String)value);
            }
        }
        ,
        PhoneNumber {
            public Object get(PersonEOImpl obj) {
                return obj.getPhoneNumber();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setPhoneNumber((String)value);
            }
        }
        ,
        MobilePhoneNumber {
            public Object get(PersonEOImpl obj) {
                return obj.getMobilePhoneNumber();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setMobilePhoneNumber((String)value);
            }
        }
        ,
        CreditLimit {
            public Object get(PersonEOImpl obj) {
                return obj.getCreditLimit();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setCreditLimit((Number)value);
            }
        }
        ,
        DateOfBirth {
            public Object get(PersonEOImpl obj) {
                return obj.getDateOfBirth();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setDateOfBirth((Date)value);
            }
        }
        ,
        MaritalStatusCode {
            public Object get(PersonEOImpl obj) {
                return obj.getMaritalStatusCode();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setMaritalStatusCode((String)value);
            }
        }
        ,
        Gender {
            public Object get(PersonEOImpl obj) {
                return obj.getGender();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setGender((String)value);
            }
        }
        ,
        ChildrenUnder18 {
            public Object get(PersonEOImpl obj) {
                return obj.getChildrenUnder18();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setChildrenUnder18((Number)value);
            }
        }
        ,
        ApproximateIncome {
            public Object get(PersonEOImpl obj) {
                return obj.getApproximateIncome();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setApproximateIncome((Number)value);
            }
        }
        ,
        ContactMethodCode {
            public Object get(PersonEOImpl obj) {
                return obj.getContactMethodCode();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setContactMethodCode((String)value);
            }
        }
        ,
        ContactableFlag {
            public Object get(PersonEOImpl obj) {
                return obj.getContactableFlag();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setContactableFlag((String)value);
            }
        }
        ,
        ContactByAffilliatesFlag {
            public Object get(PersonEOImpl obj) {
                return obj.getContactByAffilliatesFlag();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setContactByAffilliatesFlag((String)value);
            }
        }
        ,
        CreatedBy {
            public Object get(PersonEOImpl obj) {
                return obj.getCreatedBy();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setCreatedBy((String)value);
            }
        }
        ,
        CreationDate {
            public Object get(PersonEOImpl obj) {
                return obj.getCreationDate();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setAttributeInternal(index(), value);
            }
        }
        ,
        LastUpdatedBy {
            public Object get(PersonEOImpl obj) {
                return obj.getLastUpdatedBy();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setLastUpdatedBy((String)value);
            }
        }
        ,
        LastUpdateDate {
            public Object get(PersonEOImpl obj) {
                return obj.getLastUpdateDate();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setAttributeInternal(index(), value);
            }
        }
        ,
        ObjectVersionId {
            public Object get(PersonEOImpl obj) {
                return obj.getObjectVersionId();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setAttributeInternal(index(), value);
            }
        }
        ,
        Address {
            public Object get(PersonEOImpl obj) {
                return obj.getAddress();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setAddress((AddressEOImpl)value);
            }
        }
        ,
        MembershipBase {
            public Object get(PersonEOImpl obj) {
                return obj.getMembershipBase();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setMembershipBase((EntityImpl)value);
            }
        }
        ,
        CouponUsage {
            public Object get(PersonEOImpl obj) {
                return obj.getCouponUsage();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setAttributeInternal(index(), value);
            }
        }
        ,
        PaymentOption {
            public Object get(PersonEOImpl obj) {
                return obj.getPaymentOption();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setAttributeInternal(index(), value);
            }
        }
        ,
        AddressUsage {
            public Object get(PersonEOImpl obj) {
                return obj.getAddressUsage();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setAttributeInternal(index(), value);
            }
        }
        ,
        Order {
            public Object get(PersonEOImpl obj) {
                return obj.getOrder();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setAttributeInternal(index(), value);
            }
        }
        ,
        CustomerInterest {
            public Object get(PersonEOImpl obj) {
                return obj.getCustomerInterest();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setAttributeInternal(index(), value);
            }
        }
        ,
        CustomerIdentification {
            public Object get(PersonEOImpl obj) {
                return obj.getCustomerIdentification();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setCustomerIdentification((EntityImpl)value);
            }
        }
        ,
        CustomerIdentification1 {
            public Object get(PersonEOImpl obj) {
                return obj.getCustomerIdentification1();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setAttributeInternal(index(), value);
            }
        }
        ,
        ContactMethodsVA {
            public Object get(PersonEOImpl obj) {
                return obj.getContactMethodsVA();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setAttributeInternal(index(), value);
            }
        }
        ,
        PersonTypesVA {
            public Object get(PersonEOImpl obj) {
                return obj.getPersonTypesVA();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setAttributeInternal(index(), value);
            }
        }
        ,
        MaritalStatusVA {
            public Object get(PersonEOImpl obj) {
                return obj.getMaritalStatusVA();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setAttributeInternal(index(), value);
            }
        }
        ,
        GenderVA {
            public Object get(PersonEOImpl obj) {
                return obj.getGenderVA();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setAttributeInternal(index(), value);
            }
        }
        ,
        PersonTitleTypesVA {
            public Object get(PersonEOImpl obj) {
                return obj.getPersonTitleTypesVA();
            }

            public void put(PersonEOImpl obj, Object value) {
                obj.setAttributeInternal(index(), value);
            }
        }
        ;
        private static AttributesEnum[] vals = null;
        private static int firstIndex = 0;

        /**
         * @param object
         * @return
         */
        public abstract Object get(PersonEOImpl object);

        /**
         * @param object
         * @param value
         */
        public abstract void put(PersonEOImpl object, Object value);

        /**
         * @return
         */
        public int index() {
            return AttributesEnum.firstIndex() + ordinal();
        }

        /**
         * @return
         */
        public static int firstIndex() {
            return firstIndex;
        }

        /**
         * @return
         */
        public static int count() {
            return AttributesEnum.firstIndex() + AttributesEnum.staticValues().length;
        }

        /**
         * @return
         */
        public static AttributesEnum[] staticValues() {
            if (vals == null) {
                vals = AttributesEnum.values();
            }
            return vals;
        }
    }


    public static final int PERSONID = AttributesEnum.PersonId.index();
    public static final int PRINCIPALNAME = AttributesEnum.PrincipalName.index();
    public static final int TITLE = AttributesEnum.Title.index();
    public static final int FIRSTNAME = AttributesEnum.FirstName.index();
    public static final int LASTNAME = AttributesEnum.LastName.index();
    public static final int PERSONTYPECODE = AttributesEnum.PersonTypeCode.index();
    public static final int SUPPLIERID = AttributesEnum.SupplierId.index();
    public static final int PROVISIONEDFLAG = AttributesEnum.ProvisionedFlag.index();
    public static final int PRIMARYADDRESSID = AttributesEnum.PrimaryAddressId.index();
    public static final int REGISTEREDDATE = AttributesEnum.RegisteredDate.index();
    public static final int MEMBERSHIPID = AttributesEnum.MembershipId.index();
    public static final int EMAIL = AttributesEnum.Email.index();
    public static final int CONFIRMEDEMAIL = AttributesEnum.ConfirmedEmail.index();
    public static final int PHONENUMBER = AttributesEnum.PhoneNumber.index();
    public static final int MOBILEPHONENUMBER = AttributesEnum.MobilePhoneNumber.index();
    public static final int CREDITLIMIT = AttributesEnum.CreditLimit.index();
    public static final int DATEOFBIRTH = AttributesEnum.DateOfBirth.index();
    public static final int MARITALSTATUSCODE = AttributesEnum.MaritalStatusCode.index();
    public static final int GENDER = AttributesEnum.Gender.index();
    public static final int CHILDRENUNDER18 = AttributesEnum.ChildrenUnder18.index();
    public static final int APPROXIMATEINCOME = AttributesEnum.ApproximateIncome.index();
    public static final int CONTACTMETHODCODE = AttributesEnum.ContactMethodCode.index();
    public static final int CONTACTABLEFLAG = AttributesEnum.ContactableFlag.index();
    public static final int CONTACTBYAFFILLIATESFLAG = AttributesEnum.ContactByAffilliatesFlag.index();
    public static final int CREATEDBY = AttributesEnum.CreatedBy.index();
    public static final int CREATIONDATE = AttributesEnum.CreationDate.index();
    public static final int LASTUPDATEDBY = AttributesEnum.LastUpdatedBy.index();
    public static final int LASTUPDATEDATE = AttributesEnum.LastUpdateDate.index();
    public static final int OBJECTVERSIONID = AttributesEnum.ObjectVersionId.index();
    public static final int ADDRESS = AttributesEnum.Address.index();
    public static final int MEMBERSHIPBASE = AttributesEnum.MembershipBase.index();
    public static final int COUPONUSAGE = AttributesEnum.CouponUsage.index();
    public static final int PAYMENTOPTION = AttributesEnum.PaymentOption.index();
    public static final int ADDRESSUSAGE = AttributesEnum.AddressUsage.index();
    public static final int ORDER = AttributesEnum.Order.index();
    public static final int CUSTOMERINTEREST = AttributesEnum.CustomerInterest.index();
    public static final int CUSTOMERIDENTIFICATION = AttributesEnum.CustomerIdentification.index();
    public static final int CUSTOMERIDENTIFICATION1 = AttributesEnum.CustomerIdentification1.index();
    public static final int CONTACTMETHODSVA = AttributesEnum.ContactMethodsVA.index();
    public static final int PERSONTYPESVA = AttributesEnum.PersonTypesVA.index();
    public static final int MARITALSTATUSVA = AttributesEnum.MaritalStatusVA.index();
    public static final int GENDERVA = AttributesEnum.GenderVA.index();
    public static final int PERSONTITLETYPESVA = AttributesEnum.PersonTitleTypesVA.index();

    /**This is the default constructor (do not remove).
     */
    public PersonEOImpl() {
    }


    /**
     * @return the definition object for this instance class.
     */
    public static synchronized EntityDefImpl getDefinitionObject() {
        if (mDefinitionObject == null) {
            mDefinitionObject = EntityDefImpl.findDefObject("oracle.fodemo.storefront.entities.PersonEO");
        }
        return mDefinitionObject;
    }

    /**Gets the attribute value for PersonId, using the alias name PersonId.
     * @return
     */
    public DBSequence getPersonId() {
        return (DBSequence)getAttributeInternal(PERSONID);
    }

    /**Sets <code>value</code> as the attribute value for PersonId.
     * @param value
     */
    public void setPersonId(DBSequence value) {
        setAttributeInternal(PERSONID, value);
    }

    /**Gets the attribute value for PrincipalName, using the alias name PrincipalName.
     * @return
     */
    public String getPrincipalName() {
        return (String)getAttributeInternal(PRINCIPALNAME);
    }

    /**Sets <code>value</code> as the attribute value for PrincipalName.
     * @param value
     */
    public void setPrincipalName(String value) {
        setAttributeInternal(PRINCIPALNAME, value);
    }

    /**Gets the attribute value for Title, using the alias name Title.
     * @return
     */
    public String getTitle() {
        return (String)getAttributeInternal(TITLE);
    }

    /**Sets <code>value</code> as the attribute value for Title.
     * @param value
     */
    public void setTitle(String value) {
        setAttributeInternal(TITLE, value);
    }

    /**Gets the attribute value for FirstName, using the alias name FirstName.
     * @return
     */
    public String getFirstName() {
        return (String)getAttributeInternal(FIRSTNAME);
    }

    /**Sets <code>value</code> as the attribute value for FirstName.
     * @param value
     */
    public void setFirstName(String value) {
        setAttributeInternal(FIRSTNAME, value);
    }

    /**Gets the attribute value for LastName, using the alias name LastName.
     * @return
     */
    public String getLastName() {
        return (String)getAttributeInternal(LASTNAME);
    }

    /**Sets <code>value</code> as the attribute value for LastName.
     * @param value
     */
    public void setLastName(String value) {
        setAttributeInternal(LASTNAME, value);
    }

    /**Gets the attribute value for PersonTypeCode, using the alias name PersonTypeCode.
     * @return
     */
    public String getPersonTypeCode() {
        return (String)getAttributeInternal(PERSONTYPECODE);
    }

    /**Sets <code>value</code> as the attribute value for PersonTypeCode.
     * @param value
     */
    public void setPersonTypeCode(String value) {
        setAttributeInternal(PERSONTYPECODE, value);
    }

    /**Gets the attribute value for SupplierId, using the alias name SupplierId.
     * @return
     */
    public Number getSupplierId() {
        return (Number)getAttributeInternal(SUPPLIERID);
    }

    /**Sets <code>value</code> as the attribute value for SupplierId.
     * @param value
     */
    public void setSupplierId(Number value) {
        setAttributeInternal(SUPPLIERID, value);
    }

    /**Gets the attribute value for ProvisionedFlag, using the alias name ProvisionedFlag.
     * @return
     */
    public String getProvisionedFlag() {
        return (String)getAttributeInternal(PROVISIONEDFLAG);
    }

    /**Sets <code>value</code> as the attribute value for ProvisionedFlag.
     * @param value
     */
    public void setProvisionedFlag(String value) {
        setAttributeInternal(PROVISIONEDFLAG, value);
    }

    /**Gets the attribute value for PrimaryAddressId, using the alias name PrimaryAddressId.
     * @return
     */
    public Number getPrimaryAddressId() {
        return (Number)getAttributeInternal(PRIMARYADDRESSID);
    }

    /**Sets <code>value</code> as the attribute value for PrimaryAddressId.
     * @param value
     */
    public void setPrimaryAddressId(Number value) {
        setAttributeInternal(PRIMARYADDRESSID, value);
    }

    /**Gets the attribute value for RegisteredDate, using the alias name RegisteredDate.
     * @return
     */
    public Date getRegisteredDate() {
        return (Date)getAttributeInternal(REGISTEREDDATE);
    }

    /**Sets <code>value</code> as the attribute value for RegisteredDate.
     * @param value
     */
    public void setRegisteredDate(Date value) {
        setAttributeInternal(REGISTEREDDATE, value);
    }

    /**Gets the attribute value for MembershipId, using the alias name MembershipId.
     * @return
     */
    public Number getMembershipId() {
        return (Number)getAttributeInternal(MEMBERSHIPID);
    }

    /**Sets <code>value</code> as the attribute value for MembershipId.
     * @param value
     */
    public void setMembershipId(Number value) {
        setAttributeInternal(MEMBERSHIPID, value);
    }

    /**Gets the attribute value for Email, using the alias name Email.
     * @return
     */
    public String getEmail() {
        return (String)getAttributeInternal(EMAIL);
    }

    /**Sets <code>value</code> as the attribute value for Email.
     * @param value
     */
    public void setEmail(String value) {
        setAttributeInternal(EMAIL, value);
    }

    /**Gets the attribute value for ConfirmedEmail, using the alias name ConfirmedEmail.
     * @return
     */
    public String getConfirmedEmail() {
        return (String)getAttributeInternal(CONFIRMEDEMAIL);
    }

    /**Sets <code>value</code> as the attribute value for ConfirmedEmail.
     * @param value
     */
    public void setConfirmedEmail(String value) {
        setAttributeInternal(CONFIRMEDEMAIL, value);
    }

    /**Gets the attribute value for PhoneNumber, using the alias name PhoneNumber.
     * @return
     */
    public String getPhoneNumber() {
        return (String)getAttributeInternal(PHONENUMBER);
    }

    /**Sets <code>value</code> as the attribute value for PhoneNumber.
     * @param value
     */
    public void setPhoneNumber(String value) {
        setAttributeInternal(PHONENUMBER, value);
    }

    /**Gets the attribute value for MobilePhoneNumber, using the alias name MobilePhoneNumber.
     * @return
     */
    public String getMobilePhoneNumber() {
        return (String)getAttributeInternal(MOBILEPHONENUMBER);
    }

    /**Sets <code>value</code> as the attribute value for MobilePhoneNumber.
     * @param value
     */
    public void setMobilePhoneNumber(String value) {
        setAttributeInternal(MOBILEPHONENUMBER, value);
    }

    /**Gets the attribute value for CreditLimit, using the alias name CreditLimit.
     * @return
     */
    public Number getCreditLimit() {
        return (Number)getAttributeInternal(CREDITLIMIT);
    }

    /**Sets <code>value</code> as the attribute value for CreditLimit.
     * @param value
     */
    public void setCreditLimit(Number value) {
        setAttributeInternal(CREDITLIMIT, value);
    }

    /**Gets the attribute value for DateOfBirth, using the alias name DateOfBirth.
     * @return
     */
    public Date getDateOfBirth() {
        return (Date)getAttributeInternal(DATEOFBIRTH);
    }

    /**Sets <code>value</code> as the attribute value for DateOfBirth.
     * @param value
     */
    public void setDateOfBirth(Date value) {
        setAttributeInternal(DATEOFBIRTH, value);
    }

    /**Gets the attribute value for MaritalStatusCode, using the alias name MaritalStatusCode.
     * @return
     */
    public String getMaritalStatusCode() {
        return (String)getAttributeInternal(MARITALSTATUSCODE);
    }

    /**Sets <code>value</code> as the attribute value for MaritalStatusCode.
     * @param value
     */
    public void setMaritalStatusCode(String value) {
        setAttributeInternal(MARITALSTATUSCODE, value);
    }

    /**Gets the attribute value for Gender, using the alias name Gender.
     * @return
     */
    public String getGender() {
        return (String)getAttributeInternal(GENDER);
    }

    /**Sets <code>value</code> as the attribute value for Gender.
     * @param value
     */
    public void setGender(String value) {
        setAttributeInternal(GENDER, value);
    }

    /**Gets the attribute value for ChildrenUnder18, using the alias name ChildrenUnder18.
     * @return
     */
    public Number getChildrenUnder18() {
        return (Number)getAttributeInternal(CHILDRENUNDER18);
    }

    /**Sets <code>value</code> as the attribute value for ChildrenUnder18.
     * @param value
     */
    public void setChildrenUnder18(Number value) {
        setAttributeInternal(CHILDRENUNDER18, value);
    }

    /**Gets the attribute value for ApproximateIncome, using the alias name ApproximateIncome.
     * @return
     */
    public Number getApproximateIncome() {
        return (Number)getAttributeInternal(APPROXIMATEINCOME);
    }

    /**Sets <code>value</code> as the attribute value for ApproximateIncome.
     * @param value
     */
    public void setApproximateIncome(Number value) {
        setAttributeInternal(APPROXIMATEINCOME, value);
    }

    /**Gets the attribute value for ContactMethodCode, using the alias name ContactMethodCode.
     * @return
     */
    public String getContactMethodCode() {
        return (String)getAttributeInternal(CONTACTMETHODCODE);
    }

    /**Sets <code>value</code> as the attribute value for ContactMethodCode.
     * @param value
     */
    public void setContactMethodCode(String value) {
        setAttributeInternal(CONTACTMETHODCODE, value);
    }

    /**Gets the attribute value for ContactableFlag, using the alias name ContactableFlag.
     * @return
     */
    public String getContactableFlag() {
        return (String)getAttributeInternal(CONTACTABLEFLAG);
    }

    /**Sets <code>value</code> as the attribute value for ContactableFlag.
     * @param value
     */
    public void setContactableFlag(String value) {
        setAttributeInternal(CONTACTABLEFLAG, value);
    }

    /**Gets the attribute value for ContactByAffilliatesFlag, using the alias name ContactByAffilliatesFlag.
     * @return
     */
    public String getContactByAffilliatesFlag() {
        return (String)getAttributeInternal(CONTACTBYAFFILLIATESFLAG);
    }

    /**Sets <code>value</code> as the attribute value for ContactByAffilliatesFlag.
     * @param value
     */
    public void setContactByAffilliatesFlag(String value) {
        setAttributeInternal(CONTACTBYAFFILLIATESFLAG, value);
    }

    /**Gets the attribute value for CreatedBy, using the alias name CreatedBy.
     * @return
     */
    public String getCreatedBy() {
        return (String)getAttributeInternal(CREATEDBY);
    }

    /**Sets <code>value</code> as the attribute value for CreatedBy.
     * @param value
     */
    public void setCreatedBy(String value) {
        setAttributeInternal(CREATEDBY, value);
    }

    /**Gets the attribute value for CreationDate, using the alias name CreationDate.
     * @return
     */
    public Date getCreationDate() {
        return (Date)getAttributeInternal(CREATIONDATE);
    }

    /**Gets the attribute value for LastUpdatedBy, using the alias name LastUpdatedBy.
     * @return
     */
    public String getLastUpdatedBy() {
        return (String)getAttributeInternal(LASTUPDATEDBY);
    }

    /**Sets <code>value</code> as the attribute value for LastUpdatedBy.
     * @param value
     */
    public void setLastUpdatedBy(String value) {
        setAttributeInternal(LASTUPDATEDBY, value);
    }

    /**Gets the attribute value for LastUpdateDate, using the alias name LastUpdateDate.
     * @return
     */
    public Date getLastUpdateDate() {
        return (Date)getAttributeInternal(LASTUPDATEDATE);
    }

    /**Gets the attribute value for ObjectVersionId, using the alias name ObjectVersionId.
     * @return
     */
    public Number getObjectVersionId() {
        return (Number)getAttributeInternal(OBJECTVERSIONID);
    }

    /**getAttrInvokeAccessor: generated method. Do not modify.
     * @param index
     * @param attrDef
     * @return
     * @throws Exception
     */
    protected Object getAttrInvokeAccessor(int index, 
                                           AttributeDefImpl attrDef) throws Exception {
        if ((index >= AttributesEnum.firstIndex()) && (index < AttributesEnum.count())) {
            return AttributesEnum.staticValues()[index - AttributesEnum.firstIndex()].get(this);
        }
        return super.getAttrInvokeAccessor(index, attrDef);
    }

    /**setAttrInvokeAccessor: generated method. Do not modify.
     * @param index
     * @param value
     * @param attrDef
     * @throws Exception
     */
    protected void setAttrInvokeAccessor(int index, Object value, 
                                         AttributeDefImpl attrDef) throws Exception {
        if ((index >= AttributesEnum.firstIndex()) && (index < AttributesEnum.count())) {
            AttributesEnum.staticValues()[index - AttributesEnum.firstIndex()].put(this, value);
            return;
        }
        super.setAttrInvokeAccessor(index, value, attrDef);
    }

    /**Gets the associated entity AddressEOImpl.
     * @return
     */
    public AddressEOImpl getAddress() {
        return (AddressEOImpl)getAttributeInternal(ADDRESS);
    }

    /**Sets <code>value</code> as the associated entity AddressEOImpl.
     * @param value
     */
    public void setAddress(AddressEOImpl value) {
        setAttributeInternal(ADDRESS, value);
    }

    /**Gets the associated entity oracle.jbo.server.EntityImpl.
     * @return
     */
    public EntityImpl getMembershipBase() {
        return (EntityImpl)getAttributeInternal(MEMBERSHIPBASE);
    }

    /**Sets <code>value</code> as the associated entity oracle.jbo.server.EntityImpl.
     * @param value
     */
    public void setMembershipBase(EntityImpl value) {
        setAttributeInternal(MEMBERSHIPBASE, value);
    }

    /**Gets the associated entity oracle.jbo.RowIterator.
     * @return
     */
    public RowIterator getCouponUsage() {
        return (RowIterator)getAttributeInternal(COUPONUSAGE);
    }

    /**Gets the associated entity oracle.jbo.RowIterator.
     * @return
     */
    public RowIterator getPaymentOption() {
        return (RowIterator)getAttributeInternal(PAYMENTOPTION);
    }

    /**Gets the associated entity oracle.jbo.RowIterator.
     * @return
     */
    public RowIterator getAddressUsage() {
        return (RowIterator)getAttributeInternal(ADDRESSUSAGE);
    }

    /**Gets the associated entity oracle.jbo.RowIterator.
     * @return
     */
    public RowIterator getOrder() {
        return (RowIterator)getAttributeInternal(ORDER);
    }

    /**Gets the associated entity oracle.jbo.RowIterator.
     * @return
     */
    public RowIterator getCustomerInterest() {
        return (RowIterator)getAttributeInternal(CUSTOMERINTEREST);
    }

    /**Gets the associated entity oracle.jbo.server.EntityImpl.
     * @return
     */
    public EntityImpl getCustomerIdentification() {
        return (EntityImpl)getAttributeInternal(CUSTOMERIDENTIFICATION);
    }

    /**Sets <code>value</code> as the associated entity oracle.jbo.server.EntityImpl.
     * @param value
     */
    public void setCustomerIdentification(EntityImpl value) {
        setAttributeInternal(CUSTOMERIDENTIFICATION, value);
    }

    /**Gets the associated entity oracle.jbo.RowIterator.
     * @return
     */
    public RowIterator getCustomerIdentification1() {
        return (RowIterator)getAttributeInternal(CUSTOMERIDENTIFICATION1);
    }

    /**Gets the view accessor <code>RowSet</code> ContactMethodsVA.
     * @return
     */
    public RowSet getContactMethodsVA() {
        return (RowSet)getAttributeInternal(CONTACTMETHODSVA);
    }

    /**Gets the view accessor <code>RowSet</code> PersonTypesVA.
     * @return
     */
    public RowSet getPersonTypesVA() {
        return (RowSet)getAttributeInternal(PERSONTYPESVA);
    }

    /**Gets the view accessor <code>RowSet</code> MaritalStatusVA.
     * @return
     */
    public RowSet getMaritalStatusVA() {
        return (RowSet)getAttributeInternal(MARITALSTATUSVA);
    }

    /**Gets the view accessor <code>RowSet</code> GenderVA.
     * @return
     */
    public RowSet getGenderVA() {
        return (RowSet)getAttributeInternal(GENDERVA);
    }

    /**Gets the view accessor <code>RowSet</code> PersonTitleTypesVA.
     * @return
     */
    public RowSet getPersonTitleTypesVA() {
        return (RowSet)getAttributeInternal(PERSONTITLETYPESVA);
    }


    /**
     * @param personId key constituent

     * @return a Key object based on given key constituents.
     */
    public static Key createPrimaryKey(DBSequence personId) {
        return new Key(new Object[]{personId});
    }

    /**
     * @param e
     */
    @Override
    public void postChanges(TransactionEvent e) {
        if (getPostState() == STATUS_NEW) {
        /*
        * Get a rowset of addresses related
        * to this new person before calling super
        */
        newPersonBeforePost = (RowSet)getAddressUsage();
        newPersonBeforePost1 = (RowSet)getPaymentOption();
        }
        super.postChanges(e);
        }

    @Override
    protected void refreshFKInNewContainees() {
        if (newPersonBeforePost1 != null) {
            Number newPersonId = getPersonId().getSequenceNumber();
            /*
        * Process the rowset of products that referenced
        * the new person prior to posting, and update their
        * PersonId attribute to reflect the refreshed PersonId value
        * that was assigned by a database sequence during posting.
        */
            while (newPersonBeforePost.hasNext()) {
                AddressUsageEOImpl address =
                    (AddressUsageEOImpl)newPersonBeforePost.next();
                address.setAssociatedOwnerId(newPersonId);
            }
            while (newPersonBeforePost1.hasNext()) {
                PaymentOptionEOImpl pmt_option =
                    (PaymentOptionEOImpl)newPersonBeforePost1.next();
                pmt_option.setCustomerId(newPersonId);
           }
            newPersonBeforePost = null;
            newPersonBeforePost1 = null;
        }

    }
}
