Previous Topic Next topic Print topic


Object property

Object properties provide a special syntax to get information out of and pass information back into an object. The mechanisms for accessing object properties are get property methods and set property methods. A get property method is a method explicitly defined with the GET PROPERTY phrase or a method implicitly generated for a data item described with the PROPERTY clause; a set property method is a method explicitly defined with the SET PROPERTY phrase or a method implicitly generated for a data item described with the PROPERTY clause.
ISO2002MF 

General Format for Format 1

   property-name-1 OF identifier-1
ISO2002MFNETJVM 

General Format for Format 2

  identifier-1::literal-1 

Syntax Rules

  1. ISO2002 Property-name-1 must be an object property specified in the Repository paragraph.
  2. ISO2002 Identifier-1 must be an object reference; neither a universal object reference, nor the predefined object reference NULL can be specified.
  3. ISO2002 If the object property is used as a sending item, a get property method must exist for property-name-1 in the object referenced by identifier-1.
  4. ISO2002 If the object property is used as a receiving item, a set property method must exist for property-name-1 in the object referenced by identifier-1.
  5. ISO2002 The description of an object property used as a sending item is the same as the description of the returning item of the get property method. This object property can be specified wherever a data item with that description would be valid as a sending item.
  6. ISO2002 The description of an object property used as a receiving item is the same as the description of the using parameter of the set property method. This object property may be specified wherever a data item with that description would be valid as a receiving item.
  7. ISO2002 The data description of the item specified in the RETURNING phrase of the get property method must be the same as the data description of the item specified as the USING parameter of the set property method.
  8. NETJVM Literal-1 must specify the name of a property of the object referenced by identifier-1.

General Rules

  1. ISO2002 When an object property is used only as a sending item, a conceptual temporary data item, temp-1 is used in its place. The value of the property is determined as though the associated get property method were invoked, in accordance with the rules of the INVOKE statement, and the returned value placed in temp-1. The data description of temp-1 is the same as the data description of the item specified in the RETURNING phrase of the get property method.
  2. ISO2002 When an object property is used only as a receiving item, a conceptual temporary data item, temp-2, is used in its place. The value of the property is assigned as though the associated set property method were invoked, in accordance with the rules of the INVOKE statement, passing the content of temp-2 as the parameter. The data description of temp-2 is the same as the data description of the item specified as the USING parameter of the set property method.
  3. ISO2002 When an object property is used as both a sending item and a receiving item, conceptual temporary data items temp-1 and temp-2 are used in its place; temp-1 and temp-2 are the same temporary data item, where temp-2 redefines temp-1. For sending operations, the value of the property is determined in the same manner as for sending items in general rule 1; for receiving operations, the value of the property is assigned in the same manner as for receiving items in general rule 2. The data descriptions of temp-1 and temp-2 are the same as the data description of the item specified in the RETURNING phrase of the get property method.
Previous Topic Next topic Print topic