com.progress.open4gl
Class ProDataObjectMetaData

java.lang.Object
  extended bycom.progress.open4gl.dynamicapi.MetaDataBase
      extended bycom.progress.open4gl.dynamicapi.DataObjectMetaData
          extended bycom.progress.open4gl.ProDataObjectMetaData
All Implemented Interfaces:
java.io.Serializable

public class ProDataObjectMetaData
extends com.progress.open4gl.dynamicapi.DataObjectMetaData

Allows client to access as well as specify the schema for ProDataObject (temp-table) within a ProDataGraph. It represents a temp-table within a 4GL ProDataSet.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.progress.open4gl.dynamicapi.DataObjectMetaData
m_bufferName, m_flag, m_isFldUnique, m_noSchemaMarshal, m_numFields, m_numIndexes, m_rsmd, m_tableErrorString
 
Constructor Summary
ProDataObjectMetaData(int numFields, boolean bimageFlag, java.lang.String tableName, java.lang.String XMLNamespace, java.lang.String XMLPrefix)
          Creates ProDataObjectMetaData (table definition) with specified data.
 
Method Summary
protected  void addFieldSchemaInfoToClass(EClass ttClass, ProDataGraphMetaData dgMetaData)
           
 boolean getBImageFlag()
           
 int getExtent(int field)
           
 int getFieldCount()
           
protected  int getFieldExtent(int field)
           
protected  int getFieldIndex(java.lang.String name)
           
 java.lang.String getFieldName(int field)
           
 boolean getNoSchemaMarshal()
           
 int getProType(int field)
           
protected  java.lang.String getTableErrorString()
           
 java.lang.String getTableName()
           
 int getUserOrder(int field)
           
 int getXMLMapping(int field)
           
protected  boolean hasTableError()
           
 void setFieldMetaData(int fieldNum, java.lang.String name, int extent, int proType, int userOrder, int xmlMapping, boolean isUnique)
          Sets the MetaData for a field of the input ProDataObject.
 void setNoSchemaMarshal(boolean noSchemaMarshal)
          If flag is set to true, when table's data is marshaled to AppServer, it is sent without schema info (suppresses index descriptions and all field info)
protected  void setTableErrorString(java.lang.String errStr)
           
 
Methods inherited from class com.progress.open4gl.dynamicapi.DataObjectMetaData
getColumnCount, getColumnExtent, getFlag, getMultiIndexCols, getNumIndexes, getPrimeIxCols, getPrimeUniqueColumns, getPrimeUniqueName, getProColumnType, getProFieldType, getResultSetMetaData, print, setFieldDesc, setFlag, setIndexInfo, setMultiIndexCols, setNumIndexes, setPrimeUniqueName, validate, validateFld
 
Methods inherited from class com.progress.open4gl.dynamicapi.MetaDataBase
getTypeCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProDataObjectMetaData

public ProDataObjectMetaData(int numFields,
                             boolean bimageFlag,
                             java.lang.String tableName,
                             java.lang.String XMLNamespace,
                             java.lang.String XMLPrefix)
Creates ProDataObjectMetaData (table definition) with specified data.

Parameters:
numFields - Number of fields
bimageFlag - True if BEFORE-TABLE defined in 4GL (for table), else False
tableName - Table name in 4GL
XMLNamespace - Namespace for XML Serialization
XMLPrefix - Prefix for XML Serialization
Method Detail

addFieldSchemaInfoToClass

protected void addFieldSchemaInfoToClass(EClass ttClass,
                                         ProDataGraphMetaData dgMetaData)
                                  throws ProDataException
Throws:
ProDataException

getBImageFlag

public boolean getBImageFlag()
Returns:
BeforeImage value (4GL Table BEFORE-TABLE attribute). If true, table is updateable.

getExtent

public int getExtent(int field)
              throws ProDataException
Parameters:
field - 0-based field index
Returns:
Extent value for specified field. If not an array field, returns 0.
Throws:
ProDataException

getFieldCount

public int getFieldCount()
Returns:
Number of fields

getFieldExtent

protected int getFieldExtent(int field)
                      throws ProDataException
Throws:
ProDataException

getFieldIndex

protected int getFieldIndex(java.lang.String name)
                     throws ProDataException
Throws:
ProDataException

getFieldName

public java.lang.String getFieldName(int field)
                              throws ProDataException
Parameters:
field - 0-based field index
Returns:
Field's name
Throws:
ProDataException

getNoSchemaMarshal

public boolean getNoSchemaMarshal()
Returns:
True if the table data will not be marshaled with schema info to the AppServer, else it returns False.

getProType

public int getProType(int field)
               throws ProDataException
Parameters:
field - 0-based field index
Returns:
Field's data type (found in com.progress.open4gl.Parameter) for specified field
Throws:
ProDataException

getTableErrorString

protected java.lang.String getTableErrorString()

getTableName

public java.lang.String getTableName()
Returns:
Table name

getUserOrder

public int getUserOrder(int field)
                 throws ProDataException
Parameters:
field - 0-based field index
Returns:
User order position of specified field
Throws:
ProDataException

getXMLMapping

public int getXMLMapping(int field)
                  throws ProDataException
Throws:
ProDataException

hasTableError

protected boolean hasTableError()

setFieldMetaData

public void setFieldMetaData(int fieldNum,
                             java.lang.String name,
                             int extent,
                             int proType,
                             int userOrder,
                             int xmlMapping,
                             boolean isUnique)
                      throws ProDataException
Sets the MetaData for a field of the input ProDataObject.

Parameters:
fieldNum - 1-based field number of the field to set schema for
name - Field's name
extent - Field's extent. If field is not an array field, this should be 0.
proType - Field's data type - one of the PRO_XXX constants supplied by com.progress.open4gl.Parameter.
Throws:
ProDataException

setNoSchemaMarshal

public void setNoSchemaMarshal(boolean noSchemaMarshal)
If flag is set to true, when table's data is marshaled to AppServer, it is sent without schema info (suppresses index descriptions and all field info)

Parameters:
noSchemaMarshal - flag

setTableErrorString

protected void setTableErrorString(java.lang.String errStr)