Package com.portal.bas
Class PDataFieldSpecification
java.lang.Object
com.portal.bas.PFieldSpecification
com.portal.bas.PDataFieldSpecification
- All Implemented Interfaces:
Serializable
PDataFieldSpecification
is a non-compound form of
PFieldSpecification
. PDataFieldSpecification
is used to
specify fields to include in an flist. It can be created from a string
description of the form "FldStartT" for a field in the root of the flist, or
"FldNameinfo[0].FldFirstName" for a field in a substruct or single array
element field of an flist. The form "FldNameinfo[all]" describes a whole array.
You can also access fields in other linked flists by using a POID
field of the form "FldAccount.FldNameinfo[any].FldLastName" (which also
shows how to access the first element of an array). This string is
broken down into a list of individual fields to be accessed in order.- Version:
- 6
- Author:
- Larry Lynch-Freshner
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Iterates through the list of of fields in the specification. -
Field Summary
Fields inherited from class com.portal.bas.PFieldSpecification
ELEM_ALL, ELEM_ANY
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Appends the specification to the current specification.void
getArrayEnumeration
(PCachedContext conn, PModelHandle forModel) Enumerates all the elements in an open array.getArrayEnumeration
(PInfranetConnectionImpl conn, PModelHandle forModel) Gets the specification of the array part of this specification (the last field in the access list is the array).Gets a specification of the fields accessed in each element of the array specified.Gets theField
object for the last field in the specification.Gets an iterator for each field in this specification.getSpecForElement
(int index) Given a specific element, returns a field specification for that element of the array specified by this specification.Gets a specification object that represents just the last field.Gets a specification for the field before the final field of this specification.boolean
isArray()
Determines whether one of the fields in the list is an open array.boolean
isSimple()
Determines whether the specification consists of a single field.toString()
Gets aString
representation of this specification.
-
Method Details
-
append
Appends the specification to the current specification. Used to create a single specification from two specifications. For example, when an array specification is resolved to a specific element of that array, the specification for the element has the specification for the field within the element appended to it.- Parameters:
spec
- the specification to append
-
getSpecLessLastField
Gets a specification for the field before the final field of this specification.- Returns:
- A new
FieldSpecification
.
-
getSpecForLastField
Gets a specification object that represents just the last field.- Returns:
- A new
PDataFieldSpecification
.
-
getLastField
Gets theField
object for the last field in the specification.- Returns:
- The last
Field
object.
-
isSimple
public boolean isSimple()Determines whether the specification consists of a single field.- Returns:
- True if there is only one field item in the list; false otherwise.
-
isArray
public boolean isArray()Determines whether one of the fields in the list is an open array. An open array is described by using the word "all" for an element.- Returns:
- True for an array specification; false otherwise.
-
getArrayEnumeration
public Enumeration getArrayEnumeration(PCachedContext conn, PModelHandle forModel) throws PBadFieldDescriptionException, RemoteException, EBufException Enumerates all the elements in an open array. Each enumeration returns a specification for that element. This method requires an Portal connection and a real model to determine which elements are actually present.- Parameters:
conn
- an Portal connection objectforModel
- the model from which to get the actual array to enumerate- Returns:
- An
Enumeration
object for the array elements. - Throws:
EBufException
- thrown for Portal errorsPBadFieldDescriptionException
- thrown if the array described in this specification is not actually presentRemoteException
- thrown for other errors
-
getArrayEnumeration
public Enumeration getArrayEnumeration(PInfranetConnectionImpl conn, PModelHandle forModel) throws PBadFieldDescriptionException, RemoteException, EBufException -
getArrayPart
Gets the specification of the array part of this specification (the last field in the access list is the array).- Returns:
- The new
PDataFieldSpecification
.
-
getFieldSpecOfArray
Gets a specification of the fields accessed in each element of the array specified.- Returns:
- The new specification.
-
getSpecForElement
Given a specific element, returns a field specification for that element of the array specified by this specification.- Parameters:
index
- the index to use in the specification- Returns:
- The new specification.
-
getLevelIterator
Gets an iterator for each field in this specification.- Returns:
- A
SpecIterator
object.
-
toString
Gets aString
representation of this specification. -
destructor
public void destructor()
-