Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, 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.shoppingcart.model
Class CartTotalModel

    java.lang.Object
      com.bea.p13n.model.Model
          com.bea.p13n.model.XmlObjectModel
              com.bea.p13n.rules.model.ClauseModel
                  com.bea.commerce.ebusiness.shoppingcart.model.CartTotalModel

All Implemented Interfaces
  Serializable, Cloneable

    public class CartTotalModel

extends ClauseModel

A clause model to represent if the shopping cart contains a certain monetary amount.

See Also
  Serialized Form

Nested Class Summary
`static class` | `CartTotalModel.Recognizer` An object which can recognize CartTotalModel's from xml structure.

Nested classes/interfaces inherited from class com.bea.p13n.model.Model
`Model.ChangeEvent, Model.ChangeListener, Model.ChangeSupport, Model.Debug`

Field Summary
`static String` | `CLAUSE_TYPE` The standard clause type for this kind of model.
`static String[]` | `validOperatorNames` The corresponding schema localPart names of the valid operators.
`static Operator[]` | `validOperators` The operator that are valid for this ClauseModel.

Fields inherited from class com.bea.p13n.rules.model.ClauseModel
`clauseType`

Fields inherited from class com.bea.p13n.model.XmlObjectModel
`copyRootXmlObject, instanceUri, isComplete`

Fields inherited from class com.bea.p13n.model.Model
`childrenModels, docModel, parentModel, roChildrenModels`

Constructor Summary
`CartTotalModel()`

Method Summary
`void` | `clearCachedData()` Clear any cached data.
`org.apache.xmlbeans.XmlObject` | `createNewXmlObject(String clauseType)` Create a new branch model xml structure.
`protected boolean` | `determineIsComplete()` This is complete if it has a valid operator and monetary value set.
`Operator` | `getOperator()` Get the operator for comparing the total of the shopping cart.
`Number` | `getValue()` Get the monetary value to check for in the shopping cart.
`static boolean` | `isValidOperator(Operator check)` Check if the specified Operator is valid for this model.
`void` | `setOperator(Operator op)` Set the operator for comparing the total of the shopping cart.
`void` | `setValue(Number val)` Set the monetary value to check for in the shopping cart.
`void` | `setXmlObject(String clauseType, org.apache.xmlbeans.XmlObject clause)` Set the root xml object for this model.

Methods inherited from class com.bea.p13n.rules.model.ClauseModel
`addBranch, addLiteral, addMethod, addMethodOrOperator, addOperator, addVariable, addVariableBinding, copy, getClauseType, getContainingRuleModel, getCopyXmlObject, initializeNew, isInActions, isInConditions, isValidTypeAlias, isValidVariableName, makeSafeCopy, toString`

Methods inherited from class com.bea.p13n.model.XmlObjectModel
`checkElement, childAdded, childRemoved, fixQName, getApplicationInstanceUri, getChild, getDocument, getLocalName, getParent, getQName, getRootXmlObject, isComplete, isNil, preRemove, propertyChanged, removeAllChildren, removeChild, setApplicationInstanceUri, setIsComplete, setIsComplete, setParent, setRootXmlObject`

Methods inherited from class com.bea.p13n.model.Model
`addChangeListener, addChild, addChild, clone, doubleEquals, equals, getChildren, getDebug, getDebug, getDocument, getParent, longEquals, removeChangeListener, removeChild, removeChild, removeEmpties, setDocument`

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

Field Detail

### CLAUSE_TYPE

    public static final String CLAUSE_TYPE

  The standard clause type for this kind of model.

  See Also
    Constants Summary

### validOperators

    public static final Operator[] validOperators

  The operator that are valid for this ClauseModel.

### validOperatorNames

    public static final String[] validOperatorNames

  The corresponding schema localPart names of the valid operators.

Constructor Detail

### CartTotalModel

    public CartTotalModel()

Method Detail

### isValidOperator

    public static final boolean isValidOperator(Operator check)

  Check if the specified Operator is valid for this model.

  See Also
    `validOperators`, `setOperator(com.bea.p13n.model.Operator)`

### setXmlObject

    public void setXmlObject(String clauseType,
                             org.apache.xmlbeans.XmlObject clause)
                      throws IllegalArgumentException

  Set the root xml object for this model.

  Overrides:
    `setXmlObject` in class `ClauseModel`
  Parameters
    `clauseType` - the clause type of the clause.
    `clause` - the root xml object of the clause.
  Throws
    `IllegalArgumentException` - if clause is not of the right structure.

### createNewXmlObject

    public org.apache.xmlbeans.XmlObject createNewXmlObject(String clauseType)
                                                     throws IllegalArgumentException

  Create a new branch model xml structure.

  Specified by:
    `createNewXmlObject` in class `ClauseModel`
  Parameters
    `clauseType` - the clause type of the clause.
  Returns
    a new, empty initialize root object.
  Throws
    `IllegalArgumentException` - thrown on an unsupproted clauseType.

### clearCachedData

    public void clearCachedData()

  Clear any cached data.

  Specified by:
    `clearCachedData` in class `XmlObjectModel`

### getOperator

    public Operator getOperator()

  Get the operator for comparing the total of the shopping cart.

  Returns
    the operator, or null if invalid.
  See Also
    `validOperators`

### setOperator

    public void setOperator(Operator op)

  Set the operator for comparing the total of the shopping cart. Only `valid operators` are supported.

  Parameters
    `op` - the operator.

### getValue

    public Number getValue()

  Get the monetary value to check for in the shopping cart. The doubleValue() of the return should be checked.

  Returns
    the value, null if not set.

### setValue

    public void setValue(Number val)

  Set the monetary value to check for in the shopping cart. The doubleValue() of the val will be used.

  Parameters
    `val` - the value, null to unset.

### determineIsComplete

    protected boolean determineIsComplete()

  This is complete if it has a valid operator and monetary value set.

  Overrides:
    `determineIsComplete` in class `XmlObjectModel`

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, 2009, 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.