Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.commerce.ebusiness.discount.association
Interface DiscountAssociationMgr

All Superinterfaces
  javax.ejb.EJBObject, Remote

Deprecated

    @Deprecated
    public interface DiscountAssociationMgr

extends javax.ejb.EJBObject

This interface defines the public interface of the `DiscountAssociationMgr` service. This service is responsible for associating `Customer`s, using thier `CustomerPK`, with discounts. Once the association has been made the number of times the customer has used the discount is tracked. The user can only use the discount up to the number of time specified in the discount's `allowedUses`field. There is a minor difference in the way user's become associated with discounts depending on whether the discount is global or not. For non-global discounts the user must be associated with the discount, prior to attempting to use it, using either of this class's `add` methods. The discount can then be used, which from the point of view of this service means calling this class's `updateUses` method. This method is called by the pricing service. In the case of global discounts, which by definition are available to all customers the pricing serivce simply calls `updateUsesGlobal`. This method call will create the association, setting the use count to 1, if one does not already exist or attempt to the use count if the association already exists. In either case if a call to `updateUses` or `updateUsesGlobal` would cause the association's use count to exceed the discount's allowed uses limit those methods will throw a `UseCountLimitException` and not update the association's use count.``

Method Summary
`void` | `add(CustomerPk user, QualificationDiscountId discountId, String description)` Deprecated Creates an association between the `Customer` specified by the `user` parameter and the discount specified by the `discountId` parameter.
`void` | `add(CustomerPk user, String applicationName, String discountName, String description)` Deprecated Creates an association between the `Customer` specified by the `user` parameter and the discount specified by the `setName` and `discountName` parameters.
`int` | `archive()` Deprecated Not currently implemented, throws UnsupportedOperationException if called
`DeleteResults` | `delete(QualificationDiscountId discountId)` Deprecated Delete the associations for the given discount ID.
`DeleteResults` | `delete(String applicationName, String discountName)` Deprecated Delete the associations for the given discount described by set name and discount name
`int` | `prune()` Deprecated Not currently implemented, throws UnsupportedOperationException if called
`int` | `prune(QualificationDiscountId discountId)` Deprecated Not currently implemented, throws UnsupportedOperationException if called
`Set` | `queryGlobal(CustomerPk user, Set idSet)` Deprecated Gets all of the `user`'s discount associations where the discount in the association is global
`Set` | `queryUser(CustomerPk user, Set idSet)` Deprecated Gets all of the `user`'s discount associations where the discount in the association is non-global
`void` | `updateUses(CustomerPk user, Set discountIds)` Deprecated Updates the use count for each of the associations for this `user` whose discount id is in the `Set` specified by `discountIds`.
`void` | `updateUsesGlobal(CustomerPk user, Set discountIds)` Deprecated Updates the use count for each of the associations for this `user` whose discount id is in the `Set` specified by `discountIds`.

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

Method Detail

### add

    void add(CustomerPk user,
             QualificationDiscountId discountId,
             String description)
             throws RemoteException,
                    DiscountNotFoundException,
                    InvalidAssociationException,
                    AssociationCreationException

  Deprecated
  Creates an association between the `Customer` specified by the `user` parameter and the discount specified by the `discountId` parameter. An optional `description` may also be supplied that should indicate how or why the association was created. Only non-global discounts can be associated with a user through this method call. Any attempt to specify a global discount will result in an InvalidAssociationException being thrown.

  Parameters
    `user` - the `CustomerPk` of the customer being associated with the discount specified by `discountId`
    `discountId` - the `QualificationDiscountId` of the discount being associated with the customer specified by `user`
    `description` - a `String` describing how or why the association is being created
  Throws
    `AssociationCreationException` - if the association could not be created due to a system level failure
    `InvalidAssociationException` - if the discount specified is global
    `DiscountNotFoundException` - if the specified discount cannot be found.
    `RemoteException` - on a communication error or other system level failure

### add

    void add(CustomerPk user,
             String applicationName,
             String discountName,
             String description)
             throws RemoteException,
                    DiscountNotFoundException,
                    InvalidAssociationException,
                    AssociationCreationException

  Deprecated
  Creates an association between the `Customer` specified by the `user` parameter and the discount specified by the `setName` and `discountName` parameters. An optional `description` may also be supplied that should indicate how or why the association was created. Only non-global discounts can be associated with a user through this method call. Any attempt to specify a global discount will result in an InvalidAssociationException being thrown.

  Parameters
    `user` - the `CustomerPk` of the customer being associated with the discount specified by `setName` and `discountName`
    `applicationName` - the current J2EE application name
    `discountName` - the discount name of the discount being associated with the customer specified by `user`
    `description` - a `String` describing how or why the association is being created
  Throws
    `AssociationCreationException` - if the association coul not be created due to a system level failure
    `InvalidAssociationException` - if the discount specified is global
    `DiscountNotFoundException` - if the specified discount cannot be found.
    `RemoteException` - on a communication error or other system level failure

### queryUser

    Set queryUser(CustomerPk user,
                  Set idSet)
                  throws RemoteException

  Deprecated
  Gets all of the `user`'s discount associations where the discount in the association is non-global

  Parameters
    `user` - the `CustomerPk` of the customer whose discount associations are being fetched
    `idSet` - an empty `Set` into which the results of this method call are placed. Anything previously in the set is deleted.
  Returns
    a `Set`, the one passed in the `idSet`paramter, of `DiscountAssociation` objects that have the specified `user` as an element. The set will be empty if there are no discount associations for the `user```
  Throws
    `RemoteException` - on a communication error or other system level failure

### queryGlobal

    Set queryGlobal(CustomerPk user,
                    Set idSet)
                    throws RemoteException

  Deprecated
  Gets all of the `user`'s discount associations where the discount in the association is global

  Parameters
    `user` - the `CustomerPk` of the customer whose discount associations are being fetched
    `idSet` - an empty `Set` into which the results of this method call are placed. Anything previously in the set is deleted.
  Returns
    a `Set`, the one passed in the `idSet`paramter, of `DiscountAssociation` objects that have the specified `user` as an element. The set will be empty if there are no discount associations for the `user```
  Throws
    `RemoteException` - on a communication error or other system level failure

### updateUses

    void updateUses(CustomerPk user,
                    Set discountIds)
                    throws RemoteException,
                           DiscountNotFoundException,
                           InvalidAssociationException,
                           UseCountLimitException,
                           AssociationNotFoundException

  Deprecated
  Updates the use count for each of the associations for this `user` whose discount id is in the `Set` specified by `discountIds`. If any of the association updates results in the association's use count exceeding the discount's allowed uses a `UseCountLimitException` is thrown. This method call is intended for updating associations whose discount is non-global. If any of the discounts specified in the `discountIds` set are global an InvalidAssociationException is thrown. All of the discount associations specified must have already been created using one of this class's add methods.

  Parameters
    `user` - the `CustomerPk` of the customer whose discount associations are being updated
    `discountIds` - a `Set` of `QualificationDiscountId`s that specifies which of the `user`'s associations to update
  Throws
    `AssociationNotFoundException` - if the association specified by the `user` and any of the `QualificationDiscountId`s in `discountIds` can not be found
    `UseCountLimitException` - if the use count limit has been reached
    `InvalidAssociationException` - if any of the discounts specified in `discountIds` are global
    `DiscountNotFoundException` - if any of the discounts specified in `discountIds` can not be found
    `RemoteException` - on a communication error or other system level failure

### updateUsesGlobal

    void updateUsesGlobal(CustomerPk user,
                          Set discountIds)
                          throws RemoteException,
                                 DiscountNotFoundException,
                                 InvalidAssociationException,
                                 UseCountLimitException,
                                 AssociationCreationException

  Deprecated
  Updates the use count for each of the associations for this `user` whose discount id is in the `Set` specified by `discountIds`. If any of the association updates results in the association's use count exceeding the discount's allowed uses a `UseCountLimitException` is thrown. This method call is intended for updating associations whose discount is global. If any of the discounts specified in the `discountIds` set are non-global an InvalidAssociationException is thrown. This method is slightly different from `updateUses` in that if the association specified doesn't already exists an attempt will be made to create it setting it's intial use count to 1.

  Parameters
    `user` - the `CustomerPk` of the customer whose discount associations are being updated
    `discountIds` - a `Set` of `QualificationDiscountId`s that specifies which of the `user`'s associations to update
  Throws
    `AssociationCreationException` - if a non-existant association was specified but it could not be created
    `UseCountLimitException` - if the use count limit has been reached
    `InvalidAssociationException` - if any of the discounts specified in `discountIds` are non-global
    `DiscountNotFoundException` - if any of the discounts specified in `discountIds` can not be found
    `RemoteException` - on a communication error or other system level failure

### delete

    DeleteResults delete(QualificationDiscountId discountId)
                         throws RemoteException,
                                AssociationDeleteException

  Deprecated
  Delete the associations for the given discount ID.

  Parameters
    `discountId` - the discount id for which the associations should be deleted
  Returns
    a DeleteResults object that describes the associations deleted and those failed to be deleted.
  Throws
    `AssociationDeleteException` - if any failures were encountered during the delete operation. See the DeleteResults object in the exception for specifics.
    `RemoteException`
  See Also
    `DeleteResults`

### delete

    DeleteResults delete(String applicationName,
                         String discountName)
                         throws RemoteException,
                                AssociationDeleteException

  Deprecated
  Delete the associations for the given discount described by set name and discount name

  Parameters
    `applicationName` - the current J2EE application name
    `discountName` - the name of the discount.
  Returns
    a DeleteResults object that describes the associations deleted and those failed to be deleted.
  Throws
    `AssociationDeleteException` - if any failures were encountered during the delete operation. See the DeleteResults object in the exception for specifics.
    `RemoteException`
  See Also
    `DeleteResults`

### prune

    int prune()
              throws RemoteException

  Deprecated
  Not currently implemented, throws UnsupportedOperationException if called

  Throws
    `UnsupportedOperationException` - always
    `RemoteException` - on a communication error or other system level failure

### prune

    int prune(QualificationDiscountId discountId)
              throws RemoteException

  Deprecated
  Not currently implemented, throws UnsupportedOperationException if called

  Throws
    `UnsupportedOperationException` - always
    `RemoteException` - on a communication error or other system level failure

### archive

    int archive()
                throws RemoteException

  Deprecated
  Not currently implemented, throws UnsupportedOperationException if called

  Throws
    `UnsupportedOperationException` - always
    `RemoteException` - on a communication error or other system level failure

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.