com.bankframe.examples.txnhandler.connector.coboltest.parser.cobol
Class CobolElementryDataItem

java.lang.Object
  |
  +--com.bankframe.examples.txnhandler.connector.coboltest.parser.cobol.CobolElementryDataItem

public class CobolElementryDataItem
extends java.lang.Object

This class represents a Cobol Element Data Item


Constructor Summary
CobolElementryDataItem(short level, java.lang.String name, java.lang.String dataType)
          CobolElementryDataItem Consructor
 
Method Summary
 void addCobolCondition(CobolCondition condition)
          This method adds a Cobol condition to the dataitem.
 java.util.Collection getCobolConditions()
          This method gets the Cobol Conditions for this dataitem.
 java.lang.String getDataType()
          This method gets the data type of this data item.
 long getLength()
          This method returns the length of the data iten in bytes.
 short getLevel()
          This method gets the Cobol level number of this data item.
 long getMaximumLength()
          This method gets the total maximum length of this data item.
 java.lang.String getName()
          This method gets the name of this data item.
 long getNumberOfElementsAfterDecimal()
          This method gets the number of elements after the decimal point return the number of elements after the decimal point
 long getNumberOfElementsBeforeDecimal()
          This method gets the number of elements before the decimal point return the number of elements before the decimal point
 long getOffset()
          This method returns the offset of this dataitem in its storage place.
 long getSequence()
          This method gets the data type of this data item.
 java.lang.String getUsage()
          This method return the usage type.
 java.lang.String getValue()
          This method gets the values assinged to the data item if there is one.
 boolean isAlphabetic()
          This method determines if the data item is alphabetic.
 boolean isAlphaNumeric()
          This method determines if the data item is alphanumeric.
 boolean isFiller()
          This method determines if this data item is a record filler.
 boolean isHasUsage()
          This method determines if this data item has a usage.
 boolean isNumeric()
          This method determines if the data item is numeric.
 boolean isSigned()
          This method determines if the data item is signed ie.
 void setAlphabetic()
          This method set the data item as alphanumeric.
 void setAlphanumeric()
          This method set the data item as Alphanumeric.
 void setDataType(java.lang.String dataType)
          This method sets the data type of this data item.
 void setHasUsage(boolean hasUsage)
          This method is used for set up hasUsage.
 void setIsFiller(boolean isfiller)
          Insert the method's description here.
 void setLength(long length)
          This method is used for set up length.
 void setName(java.lang.String name)
          This method sets the name of this data item.
 void setNumberOfElementsAfterDecimal(long elements)
          This method sets the number of elements after the decimal point
 void setNumberOfElementsBeforeDecimal(long elements)
          This method sets the number of elements before the decimal point return the number of elements before the decimal point
 void setNumeric()
          This method set the data item as numeric.
 void setOffset(long offset)
          This method is used for set up offset.
 void setParent(CobolGroup parentGroup)
          This method set the reference to the COBOL group which is the parent of this item.
 void setSequence()
          This method is used for set up offset.
 void setSigned()
          This method flags this data item to be a signed data item.
 void setUsage(java.lang.String usage)
          This method is used for set up usage.
 void setValue(java.lang.String value)
          This method sets the values assinged to this data item.
 java.lang.String toString()
           
 java.lang.String toString(int lvl)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CobolElementryDataItem

public CobolElementryDataItem(short level,
                              java.lang.String name,
                              java.lang.String dataType)
                       throws InvalidCobolLevelException
CobolElementryDataItem Consructor

Method Detail

addCobolCondition

public void addCobolCondition(CobolCondition condition)
This method adds a Cobol condition to the dataitem. A condition is a possible allowed value the dataitem can have.

Parameters:
condition - the CobolCondition.

getCobolConditions

public java.util.Collection getCobolConditions()
This method gets the Cobol Conditions for this dataitem.

Returns:
the conditions for this dataitem.

getDataType

public java.lang.String getDataType()
This method gets the data type of this data item.

Returns:
the data item data type.

getLength

public long getLength()
This method returns the length of the data iten in bytes.

Returns:
int

getLevel

public short getLevel()
This method gets the Cobol level number of this data item.

Returns:
the record level number.

getMaximumLength

public long getMaximumLength()
This method gets the total maximum length of this data item. A data item maximum length is, its length when all of it possible data allocation is used eg. PIC 9(5)V99 -> 99999.99 -> (8), S9(5)V99 -> -99999.99 -> (9).

Returns:
the maximum length of this

getName

public java.lang.String getName()
This method gets the name of this data item.

Returns:
the name of this dataitem.

getNumberOfElementsAfterDecimal

public long getNumberOfElementsAfterDecimal()
This method gets the number of elements after the decimal point return the number of elements after the decimal point


getNumberOfElementsBeforeDecimal

public long getNumberOfElementsBeforeDecimal()
This method gets the number of elements before the decimal point return the number of elements before the decimal point


getOffset

public long getOffset()
This method returns the offset of this dataitem in its storage place.

Returns:
long the number of the bytes from its starting point.

getSequence

public long getSequence()
This method gets the data type of this data item.

Returns:
the data item data type.

getUsage

public java.lang.String getUsage()
This method return the usage type.

Returns:
String

getValue

public java.lang.String getValue()
This method gets the values assinged to the data item if there is one.

Returns:
the data item value.

isAlphabetic

public boolean isAlphabetic()
This method determines if the data item is alphabetic. i.e it can contain alphabet characters only.

Returns:
true if the dataitem is alphabetic otherwise false.

isAlphaNumeric

public boolean isAlphaNumeric()
This method determines if the data item is alphanumeric. i.e it can contain numbers and characters.

Returns:
true if the dataitem is alphanumeric otherwise false.

isFiller

public boolean isFiller()
This method determines if this data item is a record filler. i.e. its purpose is to fill spaces in a record.

Returns:
true if the data item is a filler otherwise false

isHasUsage

public boolean isHasUsage()
This method determines if this data item has a usage.

Returns:
true if it has

isNumeric

public boolean isNumeric()
This method determines if the data item is numeric.

Returns:
true if the dataitem is numeric otherwise false.

isSigned

public boolean isSigned()
This method determines if the data item is signed ie. allows negative and positive values

Returns:
true if the field is signed.

setAlphabetic

public void setAlphabetic()
This method set the data item as alphanumeric. i.e it can contain numbers and characters.


setAlphanumeric

public void setAlphanumeric()
This method set the data item as Alphanumeric.


setDataType

public void setDataType(java.lang.String dataType)
This method sets the data type of this data item.

Parameters:
dataType - the data item data type.

setHasUsage

public void setHasUsage(boolean hasUsage)
This method is used for set up hasUsage.

Parameters:
hasUsage - boolean

setIsFiller

public void setIsFiller(boolean isfiller)
Insert the method's description here. Creation date: (8/9/2001 9:53:21 AM)

Parameters:
isfiller - boolean

setLength

public void setLength(long length)
This method is used for set up length.

Parameters:
length - int

setName

public void setName(java.lang.String name)
This method sets the name of this data item.

Parameters:
name - the name of this dataitem.

setNumberOfElementsAfterDecimal

public void setNumberOfElementsAfterDecimal(long elements)
This method sets the number of elements after the decimal point


setNumberOfElementsBeforeDecimal

public void setNumberOfElementsBeforeDecimal(long elements)
This method sets the number of elements before the decimal point return the number of elements before the decimal point


setNumeric

public void setNumeric()
This method set the data item as numeric.


setOffset

public void setOffset(long offset)
This method is used for set up offset.

Parameters:
offset - long

setParent

public void setParent(CobolGroup parentGroup)
This method set the reference to the COBOL group which is the parent of this item.

Parameters:
parentGroup - the CoboGroup which is the parent of this item.

setSequence

public void setSequence()
This method is used for set up offset.


setSigned

public void setSigned()
This method flags this data item to be a signed data item. A signed data item can hold positive and negitive values.


setUsage

public void setUsage(java.lang.String usage)
This method is used for set up usage.

Parameters:
usage - String

setValue

public void setValue(java.lang.String value)
This method sets the values assinged to this data item.

Parameters:
value - the value to assing to this data item

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(int lvl)


Copyright © 2005 Siebel Systems, Inc. All rights reserved.