com.legstar.coxb
Interface ICobolComplexBinding

All Superinterfaces:
ICobolBinding, ICobolElement
All Known Implementing Classes:
CComplexBinding

public interface ICobolComplexBinding
extends ICobolBinding

This interface groups methods that are common to complex elements that are not arrays.

Author:
Fady Moussallam

Method Summary
 void createJaxbObject()
          Deprecated. Requests complex binding to create an instance of its bound jaxb object. Since bindings can now be bound to arbitrary value objects, use method createValueObject instead of this one.
 void createValueObject()
          Requests complex binding to create an instance of its bound object.
 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.
 int getCounterValue(String cobolName)
          Get the value of a specific counter either from us or one of our ancestors.
 int getDynamicCountersCount()
           
 Object getObjectFactory()
           
 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 setChildrenValues()
          Requests complex binding to set its children values from bound Jaxb objects values.
 void setCounterValue(String cobolName, int count)
          Set the value of a specific counter either in us or in one of our ancestors.
 void setJaxbPropertyValue(int index)
          Deprecated. Request complex binding to set a property of the bound Jaxb object to the value of a corresponding child. Since bindings can now be bound to arbitrary value objects, use method setPropertyValue instead of this one.
 void setObjectFactory(Object objectFactory)
           
 void setPropertyValue(int index)
          Request complex binding to set a property of the bound value object to the value of a corresponding child.
 void setValueObjectClassName(String valueObjectClassName)
           
 void setValueObjectsFactoryClassName(String valueObjectsFactoryClassName)
           
 void storeCounter(ICobolBinding counter)
          Deprecated. This is kept for backward compatibility but should not be used. Use storeCounter(final ICobolNumericBinding counter) instead which is strongly typed (counters must be numeric).
 void storeCounter(ICobolNumericBinding counter)
          Store a new counter as a child of the root complex element.
 
Methods inherited from interface com.legstar.coxb.ICobolBinding
accept, calcByteLength, getBindingName, getJaxbName, getJaxbType, getObjectValue, getParentBinding, isBound, isSet, setObjectValue
 
Methods inherited from interface com.legstar.coxb.ICobolElement
getByteLength, getCobolName, getCobolType, getDefaultValue, getDependingOn, getFractionDigits, getLevelNumber, getMarshalChoiceStrategyClassName, getMaxOccurs, getMinOccurs, getPicture, getRedefines, getSrceLine, getTotalDigits, getUnmarshalChoiceStrategyClassName, getUsage, isCustomVariable, isJustifiedRight, isODOObject, isRedefined, isSigned, isSignLeading, isSignSeparate, setByteLength, setCobolName, setCobolType, setDefaultValue, setDependingOn, setFractionDigits, setIsCustomVariable, setIsJustifiedRight, setIsODOObject, setIsRedefined, setIsSigned, setIsSignLeading, setIsSignSeparate, setLevelNumber, setMarshalChoiceStrategyClassName, setMaxOccurs, setMinOccurs, setPicture, setRedefines, setSrceLine, setTotalDigits, setUnmarshalChoiceStrategyClassName, setUsage
 

Method Detail

createJaxbObject

void createJaxbObject()
                      throws HostException
Deprecated. Requests complex binding to create an instance of its bound jaxb object. Since bindings can now be bound to arbitrary value objects, use method createValueObject instead of this one.

Throws:
HostException - if initialization fails

createValueObject

void createValueObject()
                       throws HostException
Requests complex binding to create an instance of its bound object.

Throws:
HostException - if initialization fails

setChildrenValues

void setChildrenValues()
                       throws HostException
Requests complex binding to set its children values from bound Jaxb objects values.

Throws:
HostException - if reading from bound object values fails

setJaxbPropertyValue

void setJaxbPropertyValue(int index)
                          throws HostException
Deprecated. Request complex binding to set a property of the bound Jaxb object to the value of a corresponding child. Since bindings can now be bound to arbitrary value objects, use method setPropertyValue instead of this one.

Parameters:
index - the position of the child in the complex element child list
Throws:
HostException - if bound object values cannot be set

setPropertyValue

void setPropertyValue(int index)
                      throws HostException
Request complex binding to set a property of the bound value object to the value of a corresponding child.

Parameters:
index - the position of the child in the complex element child list
Throws:
HostException - if bound object values cannot be set

getChildrenList

List<ICobolBinding> getChildrenList()
                                    throws HostException
Request a list of children from this complex binding.

Returns:
Ordered list of children
Throws:
HostException - if list cannot be created

getObjectFactory

Object getObjectFactory()
Returns:
the java object factory for bound objects creation

setObjectFactory

void setObjectFactory(Object objectFactory)
Parameters:
objectFactory - the java object factory for bound objects creation

getDynamicCountersCount

int getDynamicCountersCount()
Returns:
the number of dynamic counters this complex element is handling

storeCounter

void storeCounter(ICobolNumericBinding counter)
Store a new counter as a child of the root complex element. If this complex element is root (has no parent), the counter is inserted at the beginning of the children list in order to ensure that it is not variably located in the corresponding Cobol layout. If this is not a root element, the request is propagated up to parent.

Parameters:
counter - the counter to add to children list

storeCounter

void storeCounter(ICobolBinding counter)
Deprecated. This is kept for backward compatibility but should not be used. Use storeCounter(final ICobolNumericBinding counter) instead which is strongly typed (counters must be numeric).

Parameters:
counter - the counter to add to children list

setCounterValue

void setCounterValue(String cobolName,
                     int count)
                     throws HostException
Set the value of a specific counter either in us or in one of our ancestors.

Parameters:
cobolName - cobol name of the counter
count - the array or list size
Throws:
HostException - if counter cannot be updated

getCounter

ICobolNumericBinding getCounter(String cobolName)
                                throws HostException
Get a specific counter either from us or one of our ancestors.

Parameters:
cobolName - cobol name of the counter
Returns:
the counter binding element
Throws:
HostException - if counter cannot be queried

getCounterValue

int getCounterValue(String cobolName)
                    throws HostException
Get the value of a specific counter either from us or one of our ancestors.

Parameters:
cobolName - cobol name of the counter
Returns:
the array or list size
Throws:
HostException - if counter cannot be queried

getValueObjectClassName

String getValueObjectClassName()
Complex bindings can be bound to JAXB objects or arbitrary POJOs jointly referred to as value objects. This property is the fully qualified java class name of the bound value object.

Returns:
the fully qualified bound value object class name

setValueObjectClassName

void setValueObjectClassName(String valueObjectClassName)
Parameters:
valueObjectClassName - the fully qualified bound value object class name to set

getValueObjectsFactoryClassName

String getValueObjectsFactoryClassName()
Optional factory class name used to create bound value objects. If null, value objects are assumed to have a no-argument constructor.

Returns:
the factory class name used to create bound value objects

setValueObjectsFactoryClassName

void setValueObjectsFactoryClassName(String valueObjectsFactoryClassName)
Parameters:
valueObjectsFactoryClassName - the factory class name used to create bound value objects to set


Copyright © 2015 LegSem. All Rights Reserved.