|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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 any| Method Detail |
|---|
public void accept(CobolElementVisitor cev)
throws HostException
accept in interface ICobolBindingcev - The visitor
HostException - visitor request cannot be acceptedpublic int calcByteLength()
calcByteLength in interface ICobolBindingpublic List<ICobolBinding> getChildrenList()
getChildrenList in interface ICobolComplexBindingpublic void setChildrenList(List<ICobolBinding> children)
children - the children list to setpublic void storeCounter(ICobolNumericBinding counter)
storeCounter in interface ICobolComplexBindingcounter - the counter to add to children listpublic void storeCounter(ICobolBinding counter)
storeCounter in interface ICobolComplexBindingcounter - the counter to add to children list
public void setCounterValue(String cobolName,
int count)
throws HostException
setCounterValue in interface ICobolComplexBindingcobolName - cobol name of the countercount - the array or list size
HostException - if counter cannot be updated
public int getCounterValue(String cobolName)
throws HostException
getCounterValue in interface ICobolComplexBindingcobolName - cobol name of the counter
HostException - if counter cannot be queried
public ICobolNumericBinding getCounter(String cobolName)
throws HostException
getCounter in interface ICobolComplexBindingcobolName - cobol name of the counter
HostException - if counter cannot be queried
protected ICobolNumericBinding getCounterInChildren(List<ICobolBinding> children,
String cobolName)
throws HostException
children - the list of children element to searchcobolName - the COBOL name we are looking for
HostExceptionpublic 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 ICobolComplexBindingHostException - if initialization fails
public 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 ICobolComplexBindingindex - the position of the child in the complex element child list
HostException - if bound object values cannot be set
public void createJaxbObject()
throws HostException
createJaxbObject in interface ICobolComplexBindingHostException - if initialization fails
public void setJaxbPropertyValue(int index)
throws HostException
setJaxbPropertyValue in interface ICobolComplexBindingindex - the position of the child in the complex element child list
HostException - if bound object values cannot be setpublic String getValueObjectClassName()
getValueObjectClassName in interface ICobolComplexBindingpublic void setValueObjectClassName(String valueObjectClassName)
setValueObjectClassName in interface ICobolComplexBindingvalueObjectClassName - the fully qualified bound value object class
name to setpublic String getValueObjectsFactoryClassName()
getValueObjectsFactoryClassName in interface ICobolComplexBindingpublic void setValueObjectsFactoryClassName(String valueObjectsFactoryClassName)
setValueObjectsFactoryClassName in interface ICobolComplexBindingvalueObjectsFactoryClassName - 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 | |||||||||