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 TypeMethodDescriptionvoidaddFieldSchemaInfoToClass(commonj.sdo.Type tableType, ProDataGraphMetaData dgmd) static ProDataObjectMetaDatabuildTableFromXML(Element tableElement) booleanintgetExtent(int field) intgetFieldInitialValue(int field) getFieldLabel(int field) getFieldName(int field) booleanprotected intintgetProType(int field) protected StringintgetUserOrder(int field) intgetXMLMapping(int field) protected voidvoidsetFieldInitialValue(int field, String initValue) voidsetFieldLabel(int field, String label) voidsetFieldMetaData(int fieldNum, String name, int extent, int proType, int userOrder, int xmlMapping) Sets the MetaData for a field of the input ProDataObject.voidsetNoSchemaMarshal(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 voidsetTableErrorString(String errStr) protected voidwriteAnnotationXML(Document document, Element appInfoElement, ProDataGraphMetaData dgmd) protected voidprotected voidwriteXMLForNonUniqueIndexes(Document document, Element appInfoElement, ProDataGraphMetaData dgmd) protected voidwriteXMLForUniqueIndexes(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, validateFldMethods 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:
getFieldCountin 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:
getUserOrderin classDataObjectMetaData- Parameters:
field- 0-based field index- Returns:
- User order position of specified field
-
getXMLMapping
public int getXMLMapping(int field) - Overrides:
getXMLMappingin 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:
getFieldNamein classDataObjectMetaData- Parameters:
field- 0-based field index- Returns:
- Field's name
- Throws:
ProDataException
-
getFieldLabel
- Overrides:
getFieldLabelin classDataObjectMetaData- Throws:
ProDataException
-
setFieldLabel
- Overrides:
setFieldLabelin classDataObjectMetaData- Throws:
ProDataException
-
getFieldInitialValue
- Overrides:
getFieldInitialValuein classDataObjectMetaData- Throws:
ProDataException
-
setFieldInitialValue
- Overrides:
setFieldInitialValuein 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
-