com.ibm.openpages.api.resource

## Interface IField

- All Known Subinterfaces:
    IBooleanField, ICurrencyField, IDateField, IEnumAnswersField, IEnumField, IFloatField, IIdField, IIntegerField, IMultiEnumField, IReferenceField, IStringField

      public interface IField

  Represents the base of a field.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canRead()` For this field instance, evaluates any Field Level Security Rules that apply to the current user's Context and returns true if the user has permission to read the field value.
    `boolean` | `canWrite()` For this field instance, evaluates any Field Level Security Rules that apply to the current user's Context and returns true if the user has permission to write to the field value during an update.
    `java.util.List<TBCalcLog>` | `getCalcLogs()` Returns a list of calculation error/warning results if there is, such as insufficient information.
    `DataType` | `getDataType()` Returns the data type for this field.
    `IFieldDefinition` | `getFieldDefinition()` Returns the field definition.
    `Id` | `getId()` Returns the id for this field.
    `java.lang.String` | `getName()` Returns the system name for this field.
    `java.lang.Boolean` | `hasCalcInQueue()` Returns whether the field value is stale and it is updated by the asynchronous calculations.
    `boolean` | `hasChanged()` Checks if the field value has changed.
    `boolean` | `isEncrypted()` Determines whether the field definition is configured to be encrypted in the database.
    `boolean` | `isNull()` Checks if the field value is null.

- - ### Method Detail

    - #### getFieldDefinition

          IFieldDefinition getFieldDefinition()

      Returns the field definition.
      Returns:
        the field definition

    - #### getDataType

          DataType getDataType()

      Returns the data type for this field.
      Returns:
        the data type for this field

    - #### getName

          java.lang.String getName()

      Returns the system name for this field.
      Returns:
        the system name for this field

    - #### getId

          Id getId()

      Returns the id for this field.
      Returns:
        the id for this field

    - #### isNull

          boolean isNull()

      Checks if the field value is null.
      Returns:
        true if the field value is null, otherwise false

    - #### hasChanged

          boolean hasChanged()

      Checks if the field value has changed.
      Returns:
        true if the field has changed, otherwise false

    - #### canRead

          boolean canRead()

      For this field instance, evaluates any Field Level Security Rules that apply to the current user's Context and returns true if the user has permission to read the field value. This evaluation is only performed on IField instances returned from IResourceService and related objects (e.g. IGRCObject), For an IField returned from IQueryService query, this method will not evaluate the permissions and the flag will return the default value of true. Field Level Security rules are still enforced at the Query Service layer to restrict read access to the data.

      This method does not consider the user's Profile configuration or Field Dependencies for the field. This check is not applicable to System Fields, Name, Description, Created By, etc.

      Returns:
        true if the user has the ability to read the field value. Default is true.
      Since:
        7.1.0.0

    - #### canWrite

          boolean canWrite()

      For this field instance, evaluates any Field Level Security Rules that apply to the current user's Context and returns true if the user has permission to write to the field value during an update. This evaluation is only performed on IField instances returned from IResourceService and related interfaces (e.g. IGRCObject). For an IField returned from IQueryService query, this method will not evaluate the permissions and the flag will return the default value of true.

      This method does not consider the user's Profile configuration or Field Dependencies for the field. This check is not applicable to System Fields, Name, Description, Created By, etc.

      Returns:
        true if the user has the ability to write to the field value. Default is true.
      Since:
        7.1.0.0

    - #### isEncrypted

          boolean isEncrypted()

      Determines whether the field definition is configured to be encrypted in the database. Default is false.

      Returns:
        true if the field is configured to be encrypted in the database
      Since:
        7.1.0.0

    - #### hasCalcInQueue

          java.lang.Boolean hasCalcInQueue()

      Returns whether the field value is stale and it is updated by the asynchronous calculations. It is only available when the GRC Object is fetched with `GRCObjectFilter.getIncludeCalcStatus()` value true.
      Returns:
      Since:
        8.2

    - #### getCalcLogs

          java.util.List<TBCalcLog> getCalcLogs()

      Returns a list of calculation error/warning results if there is, such as insufficient information. It is only available when the GRC Object is fetched with `GRCObjectFilter.getIncludeCalcStatus()` value true.
      Returns:
        a list of calculation errors or warnings
      Since:
        8.2

Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2020. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.