Overview | Package | Class | Tree | Deprecated | Index | Help
| bea Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## theory.smart.ebusiness.customer
Class CustomerImpl

    java.lang.Object
      |
      +--theory.smart.foundation.EntityImpl
            |
            +--theory.smart.axiom.contact.StakeholderImpl
                  |
                  +--theory.smart.axiom.contact.PersonImpl
                        |
                        +--theory.smart.ebusiness.customer.CustomerImpl

public class CustomerImpl
extends PersonImpl

Stores the information required to do business with a customer. It inherits most attributes from the Person object and adds the ability to authenticate and to bill for product via a credit card.

     Primary Key = theory.smart.ebusiness.customer.CustomerPk

See Also:
  `Customer`, `CustomerHome`, `CustomerValue`, Serialized Form

Field Summary
`com.sun.java.util.collections.TreeMap` | `creditCards` creditCard (Map) [Customer] <*>------> [`theory.smart.axiom.contact.CreditCard`] 0..*
`java.lang.String` | `password` password [Customer] <*>------> [`String`]

Fields inherited from class theory.smart.axiom.contact.PersonImpl
`dob, firstName, lastName, maritalStatus, middleName, motherMaidenName, ssn, suffix, title`

Fields inherited from class theory.smart.axiom.contact.StakeholderImpl
`addresses, description, emails, faxes, identifier, phones, primaryName, urls`

Fields inherited from class theory.smart.foundation.EntityImpl
`ctx, isDirty, isLoaded`

Constructor Summary
`CustomerImpl()`

Method Summary
`boolean` | `authenticate(java.lang.String password)` Verify that the password specified matches the customers password.
`boolean` | `containsCreditCardKey(java.lang.String key)` Returns `true` if the creditCard map contains a creditCard for the specified key.
`boolean` | `containsCreditCardValue(CreditCard creditCard)` Returns `true` if the creditCard map maps one or more keys to the specified creditCard.
`void` | `ejbActivate()` ejbActivate method.
`CustomerPk` | `ejbCreate(CustomerPk customerPk)`
`protected void` | `ejbCreateInitVars(CustomerPk customerPk)`
`java.util.Enumeration` | `ejbFindAll()`
`CustomerPk` | `ejbFindByPrimaryKey(CustomerPk pk)`
`void` | `ejbLoad()` ejbLoad method.
`void` | `ejbPassivate()` ejbPassivate method.
`void` | `ejbPostCreate(CustomerPk customerPk)`
`void` | `ejbRemove()` ejbRemove method.
`void` | `ejbStore()` ejbStore method.
`CreditCard` | `getCreditCardByKey(java.lang.String key)` Returns the creditCard to which the creditCard map maps the specified key.
`com.sun.java.util.collections.TreeMap` | `getCreditCards()` Returns a copy all of the creditCards from the specified map to the creditCard map.
`CustomerValue` | `getCustomerByValue()` Get all of Customer's attributes.
`int` | `getNumberOfCreditCards()` Returns the number of key-value mappings in the creditCard map.
`java.lang.String` | `getPassword()` Get the value of password
`boolean` | `isCreditCardsEmpty()` Returns `true` if the creditCard map contains no key-value mappings.
`void` | `putCreditCard(java.lang.String key, CreditCard creditCard)` Associates the specified creditCard with the specified key in the creditCard map.
`void` | `putCreditCards(com.sun.java.util.collections.TreeMap creditCards)` Copies all of the creditCards from the specified creditCard map to this creditCard map.
`void` | `removeAllCreditCards()` Removes all creditCards from this creditCard map.
`CreditCard` | `removeCreditCardByKey(java.lang.String key)` Removes the creditCard for this key from this creditCard map if present.
`void` | `setCustomerByValue(CustomerValue value)` Set all of Customer's attributes to the passed in value.
`void` | `setEntityContext(EntityContext ctx)` setEntityContext method.
`void` | `setPassword(java.lang.String password)` Set the value of password
`void` | `unsetEntityContext()` unsetEntityContext method.

Methods inherited from class theory.smart.axiom.contact.PersonImpl
`ejbCreate, ejbCreateInitVars, ejbFindByPrimaryKey, ejbPostCreate, getDob, getFirstName, getLastName, getMaritalStatus, getMiddleName, getMotherMaidenName, getPersonByValue, getSsn, getSuffix, getTitle, setDob, setFirstName, setLastName, setMaritalStatus, setMiddleName, setMotherMaidenName, setPersonByValue, setSsn, setSuffix, setTitle`

Methods inherited from class theory.smart.axiom.contact.StakeholderImpl
`addFax, addFax, addFaxes, addFaxes, addFirstFax, addLastFax, containsAddressKey, containsAddressValue, containsEmailKey, containsEmailValue, containsFax, containsPhoneKey, containsPhoneValue, containsUrlKey, containsUrlValue, ejbCreate, ejbCreateInitVars, ejbFindByPrimaryKey, ejbPostCreate, getAddressByKey, getAddresses, getDescription, getEmailByKey, getEmails, getFax, getFaxes, getFaxes, getFirstFax, getIdentifier, getLastFax, getNamedAddress, getNumberOfAddresses, getNumberOfEmails, getNumberOfFaxes, getNumberOfPhones, getNumberOfUrls, getPhoneByKey, getPhones, getPrimaryAddress, getStakeholderByValue, getUrlByKey, getUrls, indexOfFax, isAddressesEmpty, isEmailsEmpty, isFaxesEmtpy, isPhonesEmpty, isUrlsEmpty, lastIndexOfFax, putAddress, putAddresses, putEmail, putEmails, putPhone, putPhones, putUrl, putUrls, removeAddressByKey, removeAllAddresses, removeAllEmails, removeAllFaxes, removeAllPhones, removeAllUrls, removeEmailByKey, removeFax, removeFax, removeFirstFax, removeLastFax, removePhoneByKey, removeUrlByKey, setDescription, setFax, setPrimaryAddress, setStakeholderByValue`

Methods inherited from class theory.smart.foundation.EntityImpl
`ejbCreate, ejbCreateInitVars, ejbPostCreate, getEntityContext, isModified`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### password

    public java.lang.String password

                        password
       [Customer] <*>------> [String]

### creditCards

    public com.sun.java.util.collections.TreeMap creditCards

                        creditCard (Map)
       [Customer] <*>------> [theory.smart.axiom.contact.CreditCard]
                           0..*

Constructor Detail

### CustomerImpl

    public CustomerImpl()
                 throws CreateException

Method Detail

### getCustomerByValue

    public CustomerValue getCustomerByValue()
                                     throws java.rmi.RemoteException

  Get all of Customer's attributes.
  Returns:
    CustomerValue the Customer value object

### setCustomerByValue

    public void setCustomerByValue(CustomerValue value)
                            throws java.rmi.RemoteException

  Set all of Customer's attributes to the passed in value. Note: Primary key attributes are not set.
  Parameters:
    `CustomerValue` - the Customer value object

### ejbCreate

    public CustomerPk ejbCreate(CustomerPk customerPk)
                         throws CreateException,
                                java.rmi.RemoteException

### ejbCreateInitVars

    protected void ejbCreateInitVars(CustomerPk customerPk)
                              throws CreateException,
                                     java.rmi.RemoteException

### ejbPostCreate

    public void ejbPostCreate(CustomerPk customerPk)
                       throws CreateException,
                              java.rmi.RemoteException

### ejbLoad

    public void ejbLoad()
                 throws java.rmi.RemoteException

  Description copied from class: EntityImpl
  ejbLoad method.
  Overrides:
    ejbLoad in class PersonImpl

### ejbStore

    public void ejbStore()
                  throws java.rmi.RemoteException

  Description copied from class: EntityImpl
  ejbStore method.
  Overrides:
    ejbStore in class PersonImpl

### ejbRemove

    public void ejbRemove()
                   throws java.rmi.RemoteException,
                          RemoveException

  Description copied from class: EntityImpl
  ejbRemove method.
  Overrides:
    ejbRemove in class PersonImpl

### ejbActivate

    public void ejbActivate()
                     throws java.rmi.RemoteException

  Description copied from class: EntityImpl
  ejbActivate method.
  Overrides:
    ejbActivate in class PersonImpl

### ejbPassivate

    public void ejbPassivate()
                      throws java.rmi.RemoteException

  Description copied from class: EntityImpl
  ejbPassivate method.
  Overrides:
    ejbPassivate in class PersonImpl

### setEntityContext

    public void setEntityContext(EntityContext ctx)
                          throws java.rmi.RemoteException

  Description copied from class: EntityImpl
  setEntityContext method.
  Overrides:
    setEntityContext in class PersonImpl

### unsetEntityContext

    public void unsetEntityContext()
                            throws java.rmi.RemoteException

  Description copied from class: EntityImpl
  unsetEntityContext method.
  Overrides:
    unsetEntityContext in class PersonImpl

### ejbFindByPrimaryKey

    public CustomerPk ejbFindByPrimaryKey(CustomerPk pk)
                                   throws FinderException,
                                          java.rmi.RemoteException

### ejbFindAll

    public java.util.Enumeration ejbFindAll()
                                     throws FinderException,
                                            java.rmi.RemoteException

  Overrides:
    ejbFindAll in class PersonImpl

### getPassword

    public java.lang.String getPassword()
                                 throws java.rmi.RemoteException

  Get the value of password
  Returns:
    password.

### setPassword

    public void setPassword(java.lang.String password)
                     throws java.rmi.RemoteException

  Set the value of password
  Parameters:
    `password` - password to be added

### containsCreditCardKey

    public boolean containsCreditCardKey(java.lang.String key)
                                  throws java.rmi.RemoteException

  Returns `true` if the creditCard map contains a creditCard for the specified key.
  Parameters:
    `key` - key whose presence in the creditCard map is to be tested.
  Returns:
    `true` if the creditCard map contains a creditCard for the specified key.
  Throws:
    ClassCastException - if the key cannot be compared with the keys currently in the map.
    NullPointerException - key is `null` and the creditCard map uses natural ordering, or its comparator does not tolerate `null` keys.

### containsCreditCardValue

    public boolean containsCreditCardValue(CreditCard creditCard)
                                    throws java.rmi.RemoteException

  Returns `true` if the creditCard map maps one or more keys to the specified creditCard. This operation will probably require linear time.
  Parameters:
    `creditCard` - value of creditCard whose presence in the creditCard map is to be tested.

### getCreditCardByKey

    public CreditCard getCreditCardByKey(java.lang.String key)
                                  throws java.rmi.RemoteException

  Returns the creditCard to which the creditCard map maps the specified key. Returns `null` if the map contains no creditCard for this key. A return value of `null` does not necessarily indicate that the map contains no creditCard for the key; it's also possible that the map explicitly maps the key to `null`. The `containsKey` operation may be used to distinguish these two cases.
  Parameters:
    `key` - key whose associated creditCard is to be returned.
  Returns:
    the creditCard to which the creditCard map maps the specified key, or `null` if the map contains no creditCard for the key.
  Throws:
    ClassCastException - key cannot be compared with the keys currently in the map.
    NullPointerException - key is `null` and the creditCard map uses natural ordering, or its comparator does not tolerate `null` keys.
  See Also:
    `#containsKey(Object)`

### getCreditCards

    public com.sun.java.util.collections.TreeMap getCreditCards()
                                                         throws java.rmi.RemoteException

  Returns a copy all of the creditCards from the specified map to the creditCard map. These creditCards replace any creditCards that the creditCard map had for any of the keys currently in the specified map.
  Parameters:
    `creditCards` - a copy of the creditCards.
  Throws:
    ClassCastException - class of a key or creditCard in the specified map prevents it from being stored in the creditCard map.
    NullPointerException - the creditCard map does not permit `null` keys and a specified key is `null`.

### getNumberOfCreditCards

    public int getNumberOfCreditCards()
                               throws java.rmi.RemoteException

  Returns the number of key-value mappings in the creditCard map.
  Returns:
    the number of key-value mappings in the creditCard map.

### isCreditCardsEmpty

    public boolean isCreditCardsEmpty()
                               throws java.rmi.RemoteException

  Returns `true` if the creditCard map contains no key-value mappings.

  Returns:
    `true` if the creditCard map contains no key-value mappings.

### putCreditCard

    public void putCreditCard(java.lang.String key,
                              CreditCard creditCard)
                       throws java.rmi.RemoteException

  Associates the specified creditCard with the specified key in the creditCard map. If the map previously contained a creditCard for this key, the old creditCard is replaced.
  Parameters:
    `key` - key with which the specified creditCard is to be associated.
    `creditCard` - creditCard to be associated with the specified key.
  Throws:
    ClassCastException - key cannot be compared with the keys currently in the map.
    NullPointerException - key is `null` and the creditCard map uses natural order, or its comparator does not tolerate `null` keys.

### putCreditCards

    public void putCreditCards(com.sun.java.util.collections.TreeMap creditCards)
                        throws java.rmi.RemoteException

  Copies all of the creditCards from the specified creditCard map to this creditCard map. These creditCards replace any creditCards that this creditCard map had for any of the keys currently in the specified map.
  Parameters:
    `creditCard` - CreditCards to be stored in the creditCard map.
  Throws:
    ClassCastException - class of a key or creditCard in the specified map prevents it from being stored in the creditCard map.
    NullPointerException - the creditCard map does not permit `null` keys and a specified key is `null`.

### removeAllCreditCards

    public void removeAllCreditCards()
                              throws java.rmi.RemoteException

  Removes all creditCards from this creditCard map.

### removeCreditCardByKey

    public CreditCard removeCreditCardByKey(java.lang.String key)
                                     throws java.rmi.RemoteException

  Removes the creditCard for this key from this creditCard map if present.
  Parameters:
    `key` - key with which the specified creditCard is associated.
  Returns:
    previous creditCard associated with specified key, or `null` if there was no creditCard for key. A `null` return can also indicate that the map previously associated `null` with the specified key.
  Throws:
    ClassCastException - key cannot be compared with the keys currently in the map.
    NullPointerException - key is `null` and the creditCard map uses natural order, or its comparator does not tolerate `null` keys.

### authenticate

    public boolean authenticate(java.lang.String password)
                         throws java.rmi.RemoteException

  Verify that the password specified matches the customers password. Returns true if password matches and false otherwise.

Overview | Package | Class | Tree | Deprecated | Index | Help
| bea Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

© Copyright 2000 bea Systems, Inc. All rights reserved.