isObjID()

The system function JavaLib.isObjID returns a value (1 for true, 0 for false) to indicate whether a specified identifier is in the object space. JavaLib.isObjID is one of several Java™ access functions.

  JavaLib.isObjID(identifier javaObjId in)
  returns (result INT)
result
A numeric item that receives one of two values: 1 for true, 0 for false. Use of a non-numeric item causes an error at validation time.
identifier

An identifier that refers to an object in the object space.

This argument is either a string literal or an item of type CHAR, DBCHAR, MBCHAR, or UNICODE. The identifier must be cast to objID. EGL strips single- and double-byte blanks from the beginning and end of the argument value, which is case sensitive.

An example is as follows:
  // test whether an object is non-existent
  // and process accordingly
  isPresent = JavaLib.isObjID( (objId)valueId );
  
  if( isPresent == 0 )
    error = 27;
  end 

No runtime errors are associated with JavaLib.isObjID.

Related concepts
Syntax diagram for EGL functions
Java access functions

Related tasks
Syntax diagram for EGL statements and commands

Related reference
EGL library JavaLib
getField()
invoke()
isNull()
qualifiedTypeName()
remove()
removeAll()
setField()
store()
storeCopy()
storeField()
storeNew()

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.