Package com.progress.open4gl
Class ProDataObjectMetaData
java.lang.Object
com.progress.open4gl.dynamicapi.MetaDataBase
com.progress.open4gl.dynamicapi.DataObjectMetaData
com.progress.open4gl.ProDataObjectMetaData
- All Implemented Interfaces:
Serializable
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:
-
Field Summary
Fields inherited from class com.progress.open4gl.dynamicapi.DataObjectMetaData
m_bufferName, m_flag, m_noSchemaMarshal, m_numFields, m_numIndexes, m_rsmd, m_tableErrorString
-
Constructor Summary
ConstructorsConstructorDescriptionProDataObjectMetaData
(String tableName, int numFields, boolean bimageFlag, int numIndexes, String multiIxCols, String xmlNamespace, String xmlPrefix) Creates ProDataObjectMetaData (table definition) with specified data. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFieldSchemaInfoToClass
(commonj.sdo.Type tableType, ProDataGraphMetaData dgmd) static ProDataObjectMetaData
buildTableFromXML
(Element tableElement) boolean
int
getExtent
(int field) int
getFieldInitialValue
(int field) getFieldLabel
(int field) getFieldName
(int field) boolean
protected int
int
getProType
(int field) protected String
int
getUserOrder
(int field) int
getXMLMapping
(int field) protected void
void
setFieldInitialValue
(int field, String initValue) void
setFieldLabel
(int field, String label) void
setFieldMetaData
(int fieldNum, String name, int extent, int proType, int userOrder, int xmlMapping) 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
(String errStr) protected void
writeAnnotationXML
(Document document, Element appInfoElement, ProDataGraphMetaData dgmd) protected void
protected void
writeXMLForNonUniqueIndexes
(Document document, Element appInfoElement, ProDataGraphMetaData dgmd) protected void
writeXMLForUniqueIndexes
(Document document, Element outerElement) Methods inherited from class com.progress.open4gl.dynamicapi.DataObjectMetaData
buildIndexesFromXML, findIndex, getColumnCount, getColumnExtent, getFieldExtent, getFieldIndex, getFlag, getFlag, getIndexes, getMultiIndexCols, getNumIndexes, getPrimeUniqueName, getProColumnType, getProFieldType, getResultSetMetaData, hasTableError, print, setFieldDesc, setFieldDesc, setFieldDesc, setFlag, setMultiIndexCols, setNumIndexes, setPrimeUniqueName, validate, validateFld
Methods inherited from class com.progress.open4gl.dynamicapi.MetaDataBase
getTypeCode
-
Constructor Details
-
ProDataObjectMetaData
public ProDataObjectMetaData(String tableName, int numFields, boolean bimageFlag, int numIndexes, String multiIxCols, String xmlNamespace, String xmlPrefix) Creates ProDataObjectMetaData (table definition) with specified data.- Parameters:
numFields
- Number of fieldsbimageFlag
- True if BEFORE-TABLE defined in 4GL (for table), else FalsetableName
- Table name in 4GLxmlNamespace
- Namespace for XML SerializationxmlPrefix
- Prefix for XML Serialization
-
-
Method Details
-
setFieldMetaData
public void setFieldMetaData(int fieldNum, String name, int extent, int proType, int userOrder, int xmlMapping) throws ProDataException Sets the MetaData for a field of the input ProDataObject.- Parameters:
fieldNum
- 1-based field number of the field to set schema forname
- Field's nameextent
- 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
-
getTableName
- Returns:
- Table name
-
getBImageFlag
public boolean getBImageFlag()- Returns:
- BeforeImage value (4GL Table BEFORE-TABLE attribute). If true, table is updateable.
-
getFieldCount
public int getFieldCount()- Overrides:
getFieldCount
in classDataObjectMetaData
- Returns:
- Number of fields
-
getNoSchemaMarshal
public boolean getNoSchemaMarshal()- Returns:
- True if the table data will not be marshaled with schema info to the AppServer, else it returns False.
-
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
-
getUserOrder
public int getUserOrder(int field) - Overrides:
getUserOrder
in classDataObjectMetaData
- Parameters:
field
- 0-based field index- Returns:
- User order position of specified field
-
getXMLMapping
public int getXMLMapping(int field) - Overrides:
getXMLMapping
in classDataObjectMetaData
-
getProType
- Parameters:
field
- 0-based field index- Returns:
- Field's data type (found in com.progress.open4gl.Parameter) for specified field
- Throws:
ProDataException
-
getExtent
- Parameters:
field
- 0-based field index- Returns:
- Extent value for specified field. If not an array field, returns 0.
- Throws:
ProDataException
-
getFieldName
- Overrides:
getFieldName
in classDataObjectMetaData
- Parameters:
field
- 0-based field index- Returns:
- Field's name
- Throws:
ProDataException
-
getFieldLabel
- Overrides:
getFieldLabel
in classDataObjectMetaData
- Throws:
ProDataException
-
setFieldLabel
- Overrides:
setFieldLabel
in classDataObjectMetaData
- Throws:
ProDataException
-
getFieldInitialValue
- Overrides:
getFieldInitialValue
in classDataObjectMetaData
- Throws:
ProDataException
-
setFieldInitialValue
- Overrides:
setFieldInitialValue
in classDataObjectMetaData
- Throws:
ProDataException
-
getTableErrorString
-
setTableErrorString
-
getNumRefs
protected int getNumRefs() -
incrNumRefs
protected void incrNumRefs() -
addFieldSchemaInfoToClass
public void addFieldSchemaInfoToClass(commonj.sdo.Type tableType, ProDataGraphMetaData dgmd) throws ProDataException - Throws:
ProDataException
-
writeXML
- Throws:
ProDataException
-
writeXMLForUniqueIndexes
-
writeAnnotationXML
protected void writeAnnotationXML(Document document, Element appInfoElement, ProDataGraphMetaData dgmd) -
writeXMLForNonUniqueIndexes
protected void writeXMLForNonUniqueIndexes(Document document, Element appInfoElement, ProDataGraphMetaData dgmd) -
buildTableFromXML
- Throws:
ProDataException
-