Package org.kie.api.definition.type

## Interface FactField

- All Superinterfaces:
    `java.io.Externalizable`, `java.io.Serializable`

      public interface FactField
      extends java.io.Externalizable

  A field from a declared fact type

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.Object` | `get​(java.lang.Object bean)` |
    `java.util.List<Annotation>` | `getFieldAnnotations()` | Returns the list of field-level annotations used in this field definition
    `int` | `getIndex()` | Returns the index of this field in the field list for the defining fact type.
    `java.util.Map<java.lang.String,​java.lang.Object>` | `getMetaData()` | Returns the annotations of this field definition as key-value pairs.
    `java.lang.String` | `getName()` |
    `java.lang.Class<?>` | `getType()` |
    `boolean` | `isKey()` |
    `void` | `set​(java.lang.Object bean, java.lang.Object value)` | Sets the value of this field in the given fact.

    - ### Methods inherited from interface java.io.Externalizable

      `readExternal, writeExternal`

- - ### Method Detail

    - #### getType

          java.lang.Class<?> getType()

      Returns:
        type of this field.

    - #### getName

          java.lang.String getName()

      Returns:
        name of this field.

    - #### isKey

          boolean isKey()

      Returns:
        true if this field is a key field. A key field is included in hashcode() calculation and on the equals() method evaluation. Non-key fields are not checked in this method.

    - #### set

          void set​(java.lang.Object bean,
                   java.lang.Object value)

      Sets the value of this field in the given fact.
      Parameters:
        `bean` - fact on which to set the field.
        `value` - the value to set on the field.

    - #### get

          java.lang.Object get​(java.lang.Object bean)

      Parameters:
        `bean` - the fact from which the field will be read.
      Returns:
        the value of this field on the given fact.

    - #### getIndex

          int getIndex()

      Returns the index of this field in the field list for the defining fact type. The list (and thus the index) takes into account the fields inherited from the parent class, if any.
      Returns:
        the index of this field in the defining type

    - #### getFieldAnnotations

          java.util.List<Annotation> getFieldAnnotations()

      Returns the list of field-level annotations used in this field definition
      Returns:
        the list of field-level annotations

    - #### getMetaData

          java.util.Map<java.lang.String,​java.lang.Object> getMetaData()

      Returns the annotations of this field definition as key-value pairs.
      Returns:
        a key-value map of the field-level annotations