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.p13n.rules.model
Class InstanceMethodModel

    java.lang.Object
      com.bea.p13n.model.Model
          com.bea.p13n.model.XmlObjectModel
              com.bea.p13n.rules.model.ClauseModel
                  com.bea.p13n.rules.model.MethodCallModel
                      com.bea.p13n.rules.model.NamedMethodCallModel
                          com.bea.p13n.rules.model.InstanceMethodModel

All Implemented Interfaces
  BoundVariableProvider, Serializable, Cloneable

    public class InstanceMethodModel

extends NamedMethodCallModel
implements BoundVariableProvider

A rule clause representing an invocation of a method on an instance of a class bound to a variable. This can be used an action, and as a condition if the return value of the method is a boolean. The arguments of an instance method call can be:

- literals: BigInteger, BigDecimal, Double, Float, Integer, Long, Boolean, Strings
- VariableArgument (only if an action in a rule without OR'ed conditions).
- PropertyRefArgument (only if an action in a rule without OR'ed conditions).
- UnknownArgument

See Also
  Serialized Form

Nested Class Summary
`static class` | `InstanceMethodModel.Recognizer` An object which can recognize the structure for this model.

Nested classes/interfaces inherited from class com.bea.p13n.rules.model.MethodCallModel
`MethodCallModel.PropertyRefArgument, MethodCallModel.UnknownArgument, MethodCallModel.VariableArgument`

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 clause type for this.

Fields inherited from class com.bea.p13n.rules.model.MethodCallModel
`LITERAL_NAMESPACE_URI`

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
`InstanceMethodModel()`

Method Summary
`void` | `clearCachedData()` Clear any cached data.
`org.apache.xmlbeans.XmlObject` | `createNewXmlObject(String clauseType)` Create a new, empty root object for the specified clauseType.
`boolean` | `determineArgumentIsComplete(Object arg)` Tell if an argument is not complete.
`protected boolean` | `determineIsComplete()` Override to include a check to make sure the variable name and type-alias is valid.
`Collection<MethodCallModel.VariableArgument>` | `getBoundVariables()` Provide bound variable information for this clause.
`protected com.bea.p13n.expression.schema.InstanceMethod` | `getInstanceMethod()`
`protected com.bea.p13n.expression.schema.MethodArgumentList` | `getMethodArgumentListFromXmlObject(boolean create)` Get the MethodArgumentList from the underlying method call XmlObject
`protected String` | `getMethodNameFromXmlObject()` Get the method name from the underlying method call XmlObject.
`String` | `getTypeAlias()` Get the fully-qualified java class name the method belongs to.
`String` | `getVariableName()` Get the name of the variable upon which the method will be called.
`protected void` | `removeMethodArgumentListFromXmlObject()` Remove the MethodArgumentList from the underlying XmlObject.
`protected void` | `setMethodNameToXmlObject(String methodName)` Set the method name to the underlying method call XmlObject.
`void` | `setTypeAlias(String typeAlias)` Set the fully-qualified java class name the method belongs to.
`void` | `setVariableName(String varName)` Get the name of the variable upon which the method will be called.
`void` | `setXmlObject(String clauseType, org.apache.xmlbeans.XmlObject clause)` Initialize this clause model with a type and a root object.

Methods inherited from class com.bea.p13n.rules.model.NamedMethodCallModel
`getMethodName, isValidMethodName, setMethodName`

Methods inherited from class com.bea.p13n.rules.model.MethodCallModel
`convertArgToXmlObject, convertXmlObjectArg, findPropertySetType, getMethodArguments, getMethodArgumentsNoCache, setMethodArguments, setParent, unsupportedObjectArg, unsupportedXmlObjectArg`

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, 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 clause type for this.

  See Also
    Constants Summary

Constructor Detail

### InstanceMethodModel

    public InstanceMethodModel()

Method Detail

### createNewXmlObject

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

  Description copied from class: `ClauseModel`
  Create a new, empty root object for the specified clauseType.

  Subclasses need to implement this to create an appropriately typed and filled root XmlObject which represents the ClauseModel. The return value from this needs to be accepted from `ClauseModel.setXmlObject(java.lang.String, org.apache.xmlbeans.XmlObject)` for the specified clauseType.

  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.

### setXmlObject

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

  Description copied from class: `ClauseModel`
  Initialize this clause model with a type and a root object.

  This will fire `ChangeEvents` for clauseType and rootXmlObject.

  Subclasses should override to call super.setXmlObject() and do any type checking and verification.

  It is not expected that ClauseModel's are valid after an call to this method which throws an exception, although the caller could recall this method with valid data.

  Overrides:
    `setXmlObject` in class `ClauseModel`
  Parameters
    `clauseType` - the clause type of the clause.
    `clause` - the root xml object of the clause.
  Throws
    `IllegalArgumentException` - thrown if the clause is not valid for the ClauseModel or clauseType.

### determineIsComplete

    protected boolean determineIsComplete()

  Override to include a check to make sure the variable name and type-alias is valid.

  Overrides:
    `determineIsComplete` in class `NamedMethodCallModel`
  See Also
    `ClauseModel.isValidTypeAlias(String)`, `ClauseModel.isValidVariableName(String)`

### determineArgumentIsComplete

    public boolean determineArgumentIsComplete(Object arg)

  Description copied from class: `MethodCallModel`
  Tell if an argument is not complete. Subclasses that handle additional argument classes should override this method appropriately.

  Overrides:
    `determineArgumentIsComplete` in class `MethodCallModel`

### clearCachedData

    public void clearCachedData()

  Description copied from class: `NamedMethodCallModel`
  Clear any cached data. Subclasses can override if they have additional cached data.

  Overrides:
    `clearCachedData` in class `NamedMethodCallModel`

### getInstanceMethod

    protected com.bea.p13n.expression.schema.InstanceMethod getInstanceMethod()

### getMethodNameFromXmlObject

    protected String getMethodNameFromXmlObject()

  Description copied from class: `NamedMethodCallModel`
  Get the method name from the underlying method call XmlObject.

  Specified by:
    `getMethodNameFromXmlObject` in class `NamedMethodCallModel`

### setMethodNameToXmlObject

    protected void setMethodNameToXmlObject(String methodName)

  Description copied from class: `NamedMethodCallModel`
  Set the method name to the underlying method call XmlObject.

  Specified by:
    `setMethodNameToXmlObject` in class `NamedMethodCallModel`

### getMethodArgumentListFromXmlObject

    protected com.bea.p13n.expression.schema.MethodArgumentList getMethodArgumentListFromXmlObject(boolean create)

  Description copied from class: `MethodCallModel`
  Get the MethodArgumentList from the underlying method call XmlObject

  Specified by:
    `getMethodArgumentListFromXmlObject` in class `MethodCallModel`
  Parameters
    `create` - true to create if not currently set, false to return null if currently set.
  Returns
    the MethodArgumentList, or null if not set and create==false.

### removeMethodArgumentListFromXmlObject

    protected void removeMethodArgumentListFromXmlObject()

  Description copied from class: `MethodCallModel`
  Remove the MethodArgumentList from the underlying XmlObject.

  Specified by:
    `removeMethodArgumentListFromXmlObject` in class `MethodCallModel`

### getVariableName

    public String getVariableName()

  Get the name of the variable upon which the method will be called.

### setVariableName

    public void setVariableName(String varName)

  Get the name of the variable upon which the method will be called.

### getTypeAlias

    public String getTypeAlias()

  Get the fully-qualified java class name the method belongs to.

### setTypeAlias

    public void setTypeAlias(String typeAlias)

  Set the fully-qualified java class name the method belongs to.

### getBoundVariables

    public Collection<MethodCallModel.VariableArgument> getBoundVariables()

  Provide bound variable information for this clause.

  Specified by:
    `getBoundVariables` in interface `BoundVariableProvider`
  Returns
    the bound variable information, null or empty for none.
  See Also
    `getVariableName()`, `getTypeAlias();`

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.