public class BODFactory
extends org.apache.commons.jxpath.AbstractFactory
List
is supported for indexed properties. A noun can has a List
property, such as setProp(List prop) and getProp(List prop). In this case, the noun must provide an indexedProperty so that
the factory knows what type will be contained in the list. For example, getProp(index, GiftRegistryVO noun)
indicates
that the list contains GiftRegistryVO. Either a read property or a write property will be ok.
AbstractFactory
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
BODFactory()
Constructs a factory
|
Modifier and Type | Method and Description |
---|---|
boolean |
createObject(org.apache.commons.jxpath.JXPathContext context,
org.apache.commons.jxpath.Pointer pointer,
java.lang.Object parent,
java.lang.String name,
int index)
Creates an object that is corresponding to the JavaBean property parent.name.
|
java.lang.Class |
getNounType()
Gets the type of the noun for the converted
BusinessObjectDocument |
void |
setNounType(java.lang.Class nounType)
Sets the type of the noun this factory currently is handling
|
public static final java.lang.String COPYRIGHT
public void setNounType(java.lang.Class nounType)
nounType
- the type of the noun the factory is creating object forpublic java.lang.Class getNounType()
BusinessObjectDocument
public boolean createObject(org.apache.commons.jxpath.JXPathContext context, org.apache.commons.jxpath.Pointer pointer, java.lang.Object parent, java.lang.String name, int index)
List
,
an array, or an indexed property. In this case, the underline collection of property will always be expanded to size index+1.
Then, the property indexed by the given index can be stored. For example, if the index is 6, then corresponding getServiceMapper
user's
responsibility to make sure they are able to handle those placeholders.createObject
in class org.apache.commons.jxpath.AbstractFactory
context
- the context of the JXPathpointer
- the Pointer
that points to the current property to be created.parent
- the parent of the property to be createdname
- the name of the propertyindex
- the index of the property, if the property is in a collection.AbstractFactory.createObject(org.apache.commons.jxpath.JXPathContext, org.apache.commons.jxpath.Pointer, java.lang.Object, java.lang.String, int)