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.shoppingadvisor
Interface CustomerProfile

public interface CustomerProfile
extends Entity

This class stores a list of qualities desired by a particular customer

     Primary Key = theory.smart.ebusiness.shoppingadvisor.CustomerProfilePk

                      customerKey
     [CustomerProfile] <*>------> [String] (Primary Key)

                      quality (List)
     [CustomerProfile] <*>------> [theory.smart.axiom.units.Quality]
                         0..*

                      customer
     [CustomerProfile] <>------> [theory.smart.ebusiness.customer.Customer]

See Also:
  `CustomerProfilePk`, `CustomerProfileHome`, `CustomerProfileImpl`, `CustomerProfileValue`

Method Summary
`void` | `addFirstQuality(Quality quality)` Inserts the given quality at the beginning of the quality list.
`void` | `addLastQuality(Quality quality)` Appends the given quality to the end of the quality list.
`boolean` | `addQualities(int index, com.sun.java.util.collections.LinkedList qualities)` Inserts all of the qualities in the specified collection into this list, starting at the specified position.
`boolean` | `addQualities(com.sun.java.util.collections.LinkedList qualities)` Appends all of the qualities in the specified collection to the end of the quality list, in the order that they are returned by the specified collection's iterator.
`void` | `addQuality(int index, Quality quality)` Inserts the specified quality at the specified position in the quality list.
`boolean` | `addQuality(Quality quality)` Appends the specified quality to the end of the quality list.
`void` | `applyItem(Item item, double weight)` Average in the qualties of this item into the customers profile.
`void` | `applyQualities(com.sun.java.util.collections.Collection qualities, double weight)` Apply a list of qualities to the customers profile.
`void` | `applyQuality(Quality quality, double weight)` Apply a quality to the customers profile.
`boolean` | `containsQuality(Quality quality)` Returns `true` if the quality list contains the specified element.
`Customer` | `getCustomer()` Get the remote object reference of customer
`java.lang.String` | `getCustomerKey()`
`CustomerProfileValue` | `getCustomerProfileByValue()` Get all of CustomerProfile's attributes.
`Quality` | `getFirstQuality()` Returns the first quality in the quality list.
`Quality` | `getLastQuality()` Returns the last quality in the quality list.
`int` | `getNumberOfQualities()` Returns the number of qualities in the quality list.
`com.sun.java.util.collections.LinkedList` | `getQualities()` Returns all of the qualities in the quality list.
`com.sun.java.util.collections.LinkedList` | `getQualities(int fromIndex, int toIndex)` Returns a view of the portion of the quality list between `fromIndex`, inclusive, and `toIndex`, exclusive.
`Quality` | `getQuality(int index)` Returns the quality at the specified position in the quality list.
`int` | `indexOfQuality(Quality quality)` Returns the index in the quality list of the first occurrence of the specified element, or -1 if the quality list does not contain this element.
`boolean` | `isQualitiesEmtpy()` Returns `true` if the quality list contains no qualities.
`int` | `lastIndexOfQuality(Quality quality)` Returns the index in the quality list of the last occurrence of the specified element, or -1 if the quality list does not contain this element.
`void` | `removeAllQualities()` Removes all of the qualities from the quality list.
`Quality` | `removeFirstQuality()` Removes and returns the first quality from the quality list.
`Quality` | `removeLastQuality()` Removes and returns the last quality from the quality list.
`Quality` | `removeQuality(int index)` Removes the quality at the specified position in the quality list.
`boolean` | `removeQuality(Quality quality)` Removes the first occurrence of the specified quality in the quality list.
`void` | `setCustomer(Customer customer)` Set the remote object reference of customer
`void` | `setCustomerProfileByValue(CustomerProfileValue value)` Set all of CustomerProfile's attributes to the passed in value.
`Quality` | `setQuality(int index, Quality quality)` Replaces the quality at the specified position in the quality list with the specified element.

Methods inherited from interface javax.ejb.EJBObject
`getEJBHome, getHandle, getPrimaryKey, isIdentical, remove`

Method Detail

### getCustomerProfileByValue

    public CustomerProfileValue getCustomerProfileByValue()
                                                   throws java.rmi.RemoteException

  Get all of CustomerProfile's attributes.
  Returns:
    CustomerProfileValue the CustomerProfile value object

### setCustomerProfileByValue

    public void setCustomerProfileByValue(CustomerProfileValue value)
                                   throws java.rmi.RemoteException

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

### getCustomerKey

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

### addQuality

    public void addQuality(int index,
                           Quality quality)
                    throws java.rmi.RemoteException

  Inserts the specified quality at the specified position in the quality list. Shifts the quality currently at that position (if any) and any subsequent qualities to the right (adds one to their indices).
  Parameters:
    `index` - index at which the specified quality is to be inserted.
    `quality` - quality to be inserted.
  Throws:
    IndexOutOfBoundsException - if the specified index is out of range (`index < 0 || index > size()`).

### addQuality

    public boolean addQuality(Quality quality)
                       throws java.rmi.RemoteException

  Appends the specified quality to the end of the quality list.
  Parameters:
    `quality` - quality to be appended to the quality list.
  Returns:
    `true` (as per the general contract of `Collection.add`).

### addQualities

    public boolean addQualities(int index,
                                com.sun.java.util.collections.LinkedList qualities)
                         throws java.rmi.RemoteException

  Inserts all of the qualities in the specified collection into this list, starting at the specified position. Shifts the element currently at that position (if any) and any subsequent qualities to the right (increases their indices). The new qualities will appear in the quality list in the order that they are returned by the specified collection's iterator.
  Parameters:
    `index` - index at which to insert first element from the specified collection.
    `qualities` - qualities to be inserted into the quality list.
  Throws:
    IndexOutOfBoundsException - if the specified index is out of range (`index < 0 || index > size()`).

### addQualities

    public boolean addQualities(com.sun.java.util.collections.LinkedList qualities)
                         throws java.rmi.RemoteException

  Appends all of the qualities in the specified collection to the end of the quality list, in the order that they are returned by the specified collection's iterator. The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified Collection is the quality list, and the quality list is nonempty.)
  Parameters:
    `qualities` - qualities to be inserted into the quality list.
  Throws:
    IndexOutOfBoundsException - if the specified index is out of range (`index < 0 || index > size()`).

### addFirstQuality

    public void addFirstQuality(Quality quality)
                         throws java.rmi.RemoteException

  Inserts the given quality at the beginning of the quality list.

### addLastQuality

    public void addLastQuality(Quality quality)
                        throws java.rmi.RemoteException

  Appends the given quality to the end of the quality list. (Identical in function to the `add` method; included only for consistency.)

### containsQuality

    public boolean containsQuality(Quality quality)
                            throws java.rmi.RemoteException

  Returns `true` if the quality list contains the specified element. More formally, returns `true` if and only if the quality list contains at least one quality `e` such that `(o==null ? e==null : o.equals(e))`.
  Parameters:
    `quality` - quality whose presence in the quality list is to be tested.
  Returns:
    `true` if the quality list contains the specified element.

### getQuality

    public Quality getQuality(int index)
                       throws java.rmi.RemoteException

  Returns the quality at the specified position in the quality list.
  Parameters:
    `index` - index of quality to return.
  Returns:
    the quality at the specified position in the quality list.
  Throws:
    IndexOutOfBoundsException - if the specified index is is out of range (`index < 0 || index >= size()`).

### getQualities

    public com.sun.java.util.collections.LinkedList getQualities(int fromIndex,
                                                                 int toIndex)
                                                          throws java.rmi.RemoteException

  Returns a view of the portion of the quality list between `fromIndex`, inclusive, and `toIndex`, exclusive.
  Parameters:
    `fromIndex` - low endpoint (inclusive) of the subList.
    `toKey` - high endpoint (exclusive) of the subList.
  Returns:
    a view of the specified range within the quality list.
  Throws:
    IndexOutOfBoundsException - endpoint index value out of range `(fromIndex < 0 || toIndex > size)`
    java.lang.IllegalArgumentException - endpoint indices out of order `(fromIndex > toIndex)`

### getQualities

    public com.sun.java.util.collections.LinkedList getQualities()
                                                          throws java.rmi.RemoteException

  Returns all of the qualities in the quality list.
  Returns:
    all of the qualities in the quality list.

### getFirstQuality

    public Quality getFirstQuality()
                            throws java.rmi.RemoteException

  Returns the first quality in the quality list.
  Returns:
    the first quality in the quality list.

### getLastQuality

    public Quality getLastQuality()
                           throws java.rmi.RemoteException

  Returns the last quality in the quality list.
  Returns:
    the last quality in the quality list.
  Throws:
    NoSuchElementException - if the quality list is empty.

### getNumberOfQualities

    public int getNumberOfQualities()
                             throws java.rmi.RemoteException

  Returns the number of qualities in the quality list.
  Returns:
    the number of qualities in the quality list.

### indexOfQuality

    public int indexOfQuality(Quality quality)
                       throws java.rmi.RemoteException

  Returns the index in the quality list of the first occurrence of the specified element, or -1 if the quality list does not contain this element. More formally, returns the lowest index i such that `(o==null ? get(i)==null : o.equals(get(i)))`, or -1 if there is no such index.
  Parameters:
    `quality` - quality to search for.
  Returns:
    the index in the quality list of the first occurrence of the specified element, or -1 if the quality list does not contain this element.

### isQualitiesEmtpy

    public boolean isQualitiesEmtpy()
                             throws java.rmi.RemoteException

  Returns `true` if the quality list contains no qualities.

  Returns:
    `true` if the quality list contains no qualities.

### lastIndexOfQuality

    public int lastIndexOfQuality(Quality quality)
                           throws java.rmi.RemoteException

  Returns the index in the quality list of the last occurrence of the specified element, or -1 if the quality list does not contain this element. More formally, returns the highest index i such that `(o==null ? get(i)==null : o.equals(get(i)))`, or -1 if there is no such index.
  Parameters:
    `quality` - quality to search for.
  Returns:
    the index in the quality list of the last occurrence of the specified element, or -1 if the quality list does not contain this element.

### removeAllQualities

    public void removeAllQualities()
                            throws java.rmi.RemoteException

  Removes all of the qualities from the quality list.

### removeQuality

    public Quality removeQuality(int index)
                          throws java.rmi.RemoteException

  Removes the quality at the specified position in the quality list. Shifts any subsequent qualities to the left (subtracts one from their indices). Returns the quality that was removed from the quality list.
  Parameters:
    `index` - the index of the quality to removed.
  Returns:
    the quality previously at the specified position.
  Throws:
    IndexOutOfBoundsException - if the specified index is out of range (`index < 0 || index >= size()`).

### removeQuality

    public boolean removeQuality(Quality quality)
                          throws java.rmi.RemoteException

  Removes the first occurrence of the specified quality in the quality list. If the quality list does not contain the element, it is unchanged. More formally, removes the quality with the lowest index `i` such that `(o==null ? get(i)==null : o.equals(get(i)))` (if such an quality exists).
  Parameters:
    `quality` - quality to be removed from the quality list, if present.
  Returns:
    `true` if the quality list contained the specified element.

### removeFirstQuality

    public Quality removeFirstQuality()
                               throws java.rmi.RemoteException

  Removes and returns the first quality from the quality list.
  Returns:
    the first quality from the quality list.
  Throws:
    NoSuchElementException - if the quality list is empty.

### removeLastQuality

    public Quality removeLastQuality()
                              throws java.rmi.RemoteException

  Removes and returns the last quality from the quality list.
  Returns:
    the last quality from the quality list.
  Throws:
    NoSuchElementException - if the quality list is empty.

### setQuality

    public Quality setQuality(int index,
                              Quality quality)
                       throws java.rmi.RemoteException

  Replaces the quality at the specified position in the quality list with the specified element.
  Parameters:
    `index` - index of quality to replace.
    `quality` - quality to be stored at the specified position.
  Returns:
    the quality previously at the specified position.
  Throws:
    IndexOutOfBoundsException - if the specified index is out of range (`index < 0 || index >= size()`).

### getCustomer

    public Customer getCustomer()
                         throws java.rmi.RemoteException

  Get the remote object reference of customer
  Returns:
    customer.

### setCustomer

    public void setCustomer(Customer customer)
                     throws java.rmi.RemoteException

  Set the remote object reference of customer
  Parameters:
    `customers` - customer to be added

### applyItem

    public void applyItem(Item item,
                          double weight)
                   throws java.rmi.RemoteException

  Average in the qualties of this item into the customers profile. The weight will enable the user of the class to rank the importance of the item to the customer. The decision is made by the programmer. An example of this would be that a purchase might be a 1.0 in which case the qualities are averaged in at their actual value. Alternatively if the user requested detail on that item it could be applied with a weight of 0.5 and the values would be halved before they are added in.

### applyQuality

    public void applyQuality(Quality quality,
                             double weight)
                      throws java.rmi.RemoteException

  Apply a quality to the customers profile. The weight will enable the user of the class to rank the importance of the item to the customer.

### applyQualities

    public void applyQualities(com.sun.java.util.collections.Collection qualities,
                               double weight)
                        throws java.rmi.RemoteException

  Apply a list of qualities to the customers profile. The weight will enable the user of the class to rank the importance of the item to the customer.

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.