This constructor is used to create an instance for an entity with specific types of fields.
import com.compuware.uniface.*; UnifaceEntity (int fieldTypes)
fieldTypes—an array containing the types of each of the fields required. The array is numbered starting with zero, which is an exception to the general Uniface convention.
|UTYPE_DATETIME||Uniface date time|
Returns an empty entity, that is, with no occurrences.
Uniface entities are usually returned through parameters in Uniface operations, but they can also be created from Java using this class. Use the
UnifaceEntity class to:
- Get entity information, such as the number of fields and the current number of occurrences
- Create new occurrences
- Remove occurrences
- Get data from and set data in fields of a specific occurrence
is used to specify entity parameters from Java. The Java
UnifaceEntity object is passed to
Uniface as a Java object (
and from Uniface to Java as a Java object (
is a local copy only.
passed by value, not by reference. When entity data is passed as
parameter, all occurrences are considered new data. A subsequent
store from ProcScript, therefore, most likely
duplicate key errors.
To specify an entity named UE, with two fields, the first field of type String and the second of type Numeric, you would use the following code:
int fieldTypes  = new int ; fieldTypes = Values.UTYPE_STRING; fieldTypes = Values.UTYPE_NUMERIC; UnifaceEntity UE = new UnifaceEntity(fieldTypes);
fieldTypes array is numbered starting from zero. This is an exception to the general
Uniface convention. In addition, non-database fields
are not transported through the URB interface—if you need to access
an entity that contains non-database fields, you should omit them from the