Class PDataFieldSpecification

java.lang.Object
com.portal.bas.PFieldSpecification
com.portal.bas.PDataFieldSpecification
All Implemented Interfaces:
Serializable

public class PDataFieldSpecification extends PFieldSpecification implements 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:
  • Method Details

    • append

      public void append(PDataFieldSpecification spec)
      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

      public PDataFieldSpecification getSpecLessLastField()
      Gets a specification for the field before the final field of this specification.
      Returns:
      A new FieldSpecification.
    • getSpecForLastField

      public PDataFieldSpecification getSpecForLastField()
      Gets a specification object that represents just the last field.
      Returns:
      A new PDataFieldSpecification.
    • getLastField

      public Field getLastField()
      Gets the Field 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

      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 object
      forModel - the model from which to get the actual array to enumerate
      Returns:
      An Enumeration object for the array elements.
      Throws:
      EBufException - thrown for Portal errors
      PBadFieldDescriptionException - thrown if the array described in this specification is not actually present
      RemoteException - thrown for other errors
    • getArrayEnumeration

      Throws:
      PBadFieldDescriptionException
      RemoteException
      EBufException
    • getArrayPart

      public PDataFieldSpecification 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

      public PDataFieldSpecification getFieldSpecOfArray()
      Gets a specification of the fields accessed in each element of the array specified.
      Returns:
      The new specification.
    • getSpecForElement

      public PDataFieldSpecification getSpecForElement(int index)
      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

      public PDataFieldSpecification.SpecIterator getLevelIterator()
      Gets an iterator for each field in this specification.
      Returns:
      A SpecIterator object.
    • toString

      public String toString()
      Gets a String representation of this specification.
      Overrides:
      toString in class Object
      Returns:
      A String with the specification description.
    • destructor

      public void destructor()