|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.legstar.coxb.common.CBinding com.legstar.coxb.common.CComplexBinding
public abstract class CComplexBinding
This class is a superclass of all other complex element types implementing binding between a java type and cobol.
Constructor Summary | |
---|---|
CComplexBinding(String bindingName,
String jaxbName,
Class<?> jaxbType,
CobolElement cobolAnnotations,
ICobolComplexBinding parentBinding)
Constructor for a cobol complex element to java binding. |
Method Summary | |
---|---|
void |
accept(CobolElementVisitor cev)
Visitor pattern accept method. |
int |
calcByteLength()
The method calculates the exact host byte length for this Cobol binding. |
void |
createJaxbObject()
Deprecated. |
void |
createValueObject()
This method is meant to be overridden. |
List<ICobolBinding> |
getChildrenList()
Request a list of children from this complex binding. |
ICobolNumericBinding |
getCounter(String cobolName)
Get a specific counter either from us or one of our ancestors. |
protected ICobolNumericBinding |
getCounterInChildren(List<ICobolBinding> children,
String cobolName)
Descend the children of a complex or choice element looking for a counter with the corresponding COBOL name. |
int |
getCounterValue(String cobolName)
Get the value of a specific counter either from us or one of our ancestors. |
int |
getDynamicCountersCount()
|
String |
getValueObjectClassName()
Complex bindings can be bound to JAXB objects or arbitrary POJOs jointly referred to as value objects. |
String |
getValueObjectsFactoryClassName()
Optional factory class name used to create bound value objects. |
void |
setChildrenList(List<ICobolBinding> children)
|
void |
setCounterValue(String cobolName,
int count)
When a list size is known, this method updates the corresponding counter (if any). |
void |
setJaxbPropertyValue(int index)
Deprecated. |
void |
setPropertyValue(int index)
This method is meant to be overridden. |
void |
setValueObjectClassName(String valueObjectClassName)
|
void |
setValueObjectsFactoryClassName(String valueObjectsFactoryClassName)
|
void |
storeCounter(ICobolBinding counter)
|
void |
storeCounter(ICobolNumericBinding counter)
Store a new counter as a child of the root complex element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.legstar.coxb.ICobolComplexBinding |
---|
getObjectFactory, setChildrenValues, setObjectFactory |
Methods inherited from interface com.legstar.coxb.ICobolBinding |
---|
getBindingName, getJaxbName, getJaxbType, getObjectValue, getParentBinding, isBound, isSet, setObjectValue |
Constructor Detail |
---|
public CComplexBinding(String bindingName, String jaxbName, Class<?> jaxbType, CobolElement cobolAnnotations, ICobolComplexBinding parentBinding)
bindingName
- the identifier for this bindingjaxbName
- the name of the bound java propertyjaxbType
- the type of the bound java propertycobolAnnotations
- the cobol annotations for this elementparentBinding
- a reference to the parent binding if anyMethod Detail |
---|
public void accept(CobolElementVisitor cev) throws HostException
accept
in interface ICobolBinding
cev
- The visitor
HostException
- visitor request cannot be acceptedpublic int calcByteLength()
calcByteLength
in interface ICobolBinding
public List<ICobolBinding> getChildrenList()
getChildrenList
in interface ICobolComplexBinding
public void setChildrenList(List<ICobolBinding> children)
children
- the children list to setpublic void storeCounter(ICobolNumericBinding counter)
storeCounter
in interface ICobolComplexBinding
counter
- the counter to add to children listpublic void storeCounter(ICobolBinding counter)
storeCounter
in interface ICobolComplexBinding
counter
- the counter to add to children listpublic void setCounterValue(String cobolName, int count) throws HostException
setCounterValue
in interface ICobolComplexBinding
cobolName
- cobol name of the countercount
- the array or list size
HostException
- if counter cannot be updatedpublic int getCounterValue(String cobolName) throws HostException
getCounterValue
in interface ICobolComplexBinding
cobolName
- cobol name of the counter
HostException
- if counter cannot be queriedpublic ICobolNumericBinding getCounter(String cobolName) throws HostException
getCounter
in interface ICobolComplexBinding
cobolName
- cobol name of the counter
HostException
- if counter cannot be queriedprotected ICobolNumericBinding getCounterInChildren(List<ICobolBinding> children, String cobolName) throws HostException
children
- the list of children element to searchcobolName
- the COBOL name we are looking for
HostException
public int getDynamicCountersCount()
getDynamicCountersCount
in interface ICobolComplexBinding
public void createValueObject() throws HostException
createJaxbObject
Requests complex binding to create an instance of its bound
object.
createValueObject
in interface ICobolComplexBinding
HostException
- if initialization failspublic void setPropertyValue(int index) throws HostException
setJaxbPropertyValue
Request complex binding to set a property of the bound value object
to the value of a corresponding child.
setPropertyValue
in interface ICobolComplexBinding
index
- the position of the child in the complex element child list
HostException
- if bound object values cannot be setpublic void createJaxbObject() throws HostException
createJaxbObject
in interface ICobolComplexBinding
HostException
- if initialization failspublic void setJaxbPropertyValue(int index) throws HostException
setJaxbPropertyValue
in interface ICobolComplexBinding
index
- the position of the child in the complex element child list
HostException
- if bound object values cannot be setpublic String getValueObjectClassName()
getValueObjectClassName
in interface ICobolComplexBinding
public void setValueObjectClassName(String valueObjectClassName)
setValueObjectClassName
in interface ICobolComplexBinding
valueObjectClassName
- the fully qualified bound value object class
name to setpublic String getValueObjectsFactoryClassName()
getValueObjectsFactoryClassName
in interface ICobolComplexBinding
public void setValueObjectsFactoryClassName(String valueObjectsFactoryClassName)
setValueObjectsFactoryClassName
in interface ICobolComplexBinding
valueObjectsFactoryClassName
- the factory class name used to create
bound value objects to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |