Get the field that this KeyField points to.
@param areaDesc KeyArea type File/Temp/Start/End.
@return The field.
499789
public BaseField getField(int iAreaDesc)
    {
        switch (iAreaDesc)
        {
        default:
        case DBConstants.FILE_KEY_AREA:
            return m_field;
        case DBConstants.TEMP_KEY_AREA:
            if (m_fieldTempParam == null)
            {
                try   {
                    m_fieldTempParam = (BaseField)m_field.clone();  // Buffer areas
                    m_fieldTempParam.setFieldName(new String(m_field.getFieldName(false, false) + "Temp"));
                    m_fieldTempParam.setNullable(true);
                } catch (CloneNotSupportedException ex)   {
                    m_fieldTempParam = null;
                }
            }
            return m_fieldTempParam;
        case DBConstants.START_SELECT_KEY:
            if (m_fieldStartParam == null)
            {
                try   {
                    m_fieldStartParam = (BaseField)m_field.clone();   // Buffer areas
                    m_fieldStartParam.setFieldName(new String(m_field.getFieldName(false, false) + "Start"));
                    m_fieldStartParam.setNullable(true);
                } catch (CloneNotSupportedException ex)   {
                    m_fieldStartParam = null;
                }
            }
            return m_fieldStartParam;
        case DBConstants.END_SELECT_KEY:
            if (m_fieldEndParam == null)
            {
                try   {
                    m_fieldEndParam = (BaseField)m_field.clone();
                    m_fieldEndParam.setFieldName(new String(m_field.getFieldName(false, false) + "End"));
                    m_fieldEndParam.setNullable(true);
                } catch (CloneNotSupportedException ex)   {
                    m_fieldEndParam = null;
                }
            }
            return m_fieldEndParam;
        }
    }
799231
public static <S> PAreaBD<S> toPAreaBD(final AreaBD a)
  {
    Objects.requireNonNull(a, "area");
    return PAreaBD.of(a.minimumX(), a.maximumX(), a.minimumY(), a.maximumY());
  }
657880
private Object getFieldValue(Field field) {
        try {
            field.setAccessible(true);
            return field.get(this);
        } catch (IllegalArgumentException | IllegalAccessException e) {
            LOGGER.error("Can't access to field value", e);
            return null;
        }
    }
284569
public KeyArea setupKey(int iKeyArea)
    {
        KeyArea keyArea = null;
        if (iKeyArea == DBConstants.MAIN_KEY_FIELD)
        {
            keyArea = this.makeIndex(DBConstants.UNIQUE, DBConstants.PRIMARY_KEY);
            keyArea.addKeyField(DBConstants.MAIN_FIELD, DBConstants.ASCENDING);
        }
        return keyArea;
    }
1367528
public Field getField() {
        if (field == null) return null;

        try {
            // Note: sun.reflect.ReflectionFactory is not available in Android API
            return field.getDeclaringClass().getDeclaredField(field.getName());
        } catch (NoSuchFieldException e) {
            throw new ReflectionException(e.getMessage(), e);// Not Reproducible
        }
    }
142849
public KeyArea setupKey(int iKeyArea)
    {
        KeyArea keyArea = null;
        if (iKeyArea == 0)
        {
            keyArea = this.makeIndex(DBConstants.UNIQUE, ID_KEY);
            keyArea.addKeyField(ID, DBConstants.ASCENDING);
        }
        if (iKeyArea == 1)
        {
            keyArea = this.makeIndex(DBConstants.NOT_UNIQUE, PARENT_PROJECT_TASK_ID_KEY);
            keyArea.addKeyField(PARENT_PROJECT_TASK_ID, DBConstants.ASCENDING);
            keyArea.addKeyField(START_DATE_TIME, DBConstants.ASCENDING);
            keyArea.addKeyField(SEQUENCE, DBConstants.ASCENDING);
            keyArea.addKeyField(NAME, DBConstants.ASCENDING);
        }
        if (keyArea == null)
            keyArea = super.setupKey(iKeyArea);     
        return keyArea;
    }
902674
public KeyArea setupKey(int iKeyArea)
    {
        KeyArea keyArea = null;
        if (iKeyArea == 0)
        {
            keyArea = this.makeIndex(DBConstants.UNIQUE, ID_KEY);
            keyArea.addKeyField(ID, DBConstants.ASCENDING);
        }
        if (iKeyArea == 1)
        {
            keyArea = this.makeIndex(DBConstants.UNIQUE, FILE_NAME_KEY);
            keyArea.addKeyField(FILE_NAME, DBConstants.ASCENDING);
        }
        if (keyArea == null)
            keyArea = super.setupKey(iKeyArea);     
        return keyArea;
    }
1352425
public KeyArea setupKey(int iKeyArea)
    {
        KeyArea keyArea = null;
        if (iKeyArea == 0)
        {
            keyArea = this.makeIndex(DBConstants.UNIQUE, ID_KEY);
            keyArea.addKeyField(ID, DBConstants.ASCENDING);
        }
        if (iKeyArea == 1)
        {
            keyArea = this.makeIndex(DBConstants.NOT_UNIQUE, START_DATE_TIME_KEY);
            keyArea.addKeyField(START_DATE_TIME, DBConstants.ASCENDING);
        }
        if (iKeyArea == 2)
        {
            keyArea = this.makeIndex(DBConstants.NOT_UNIQUE, ANNIV_MASTER_ID_KEY);
            keyArea.addKeyField(ANNIV_MASTER_ID, DBConstants.ASCENDING);
            keyArea.addKeyField(START_DATE_TIME, DBConstants.ASCENDING);
        }
        if (iKeyArea == 3)
        {
            keyArea = this.makeIndex(DBConstants.NOT_UNIQUE, CALENDAR_CATEGORY_ID_KEY);
            keyArea.addKeyField(CALENDAR_CATEGORY_ID, DBConstants.ASCENDING);
            keyArea.addKeyField(START_DATE_TIME, DBConstants.ASCENDING);
        }
        if (keyArea == null)
            keyArea = super.setupKey(iKeyArea);     
        return keyArea;
    }
1086184
public int getDefaultDisplayFieldSeq()
    {
        String iKeyOrder = this.getDefaultScreenKeyArea();
        if (iKeyOrder == null)
        {
            for (int i = 0; i < this.getFieldCount(); i++)
            {
            	if (this.getField(i).isHidden())
            		continue;
                if (this.getField(i) instanceof StringField)
                    return i;
            }
            return DBConstants.MAIN_FIELD + 1;
        }
        for (int i = 0; i < this.getFieldCount(); i++)
        {
            if (this.getField(i) == this.getKeyArea(iKeyOrder).getField(DBConstants.FILE_KEY_AREA))
                return i;
        }
        return DBConstants.MAIN_FIELD + 1;
    }
548965
JSField getFieldDef(int accessor, boolean mustBePresent) {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "getFieldDef", new Object[]{Integer.valueOf(accessor), Boolean.valueOf(mustBePresent)});

    if (mustBePresent) {
      if ((map == null) || (map.fields[accessor] == null)) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.exit(this, tc, "getFieldDef", null);
        return null;
      }
    }

    JSField result = fields[accessor];
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.exit(this, tc, "getFieldDef", result);
    return result;
  }
70325
public static String getMapFieldKeyType(Field field) {
        FieldType type = field.getType();
        if (!(type instanceof Message)) {
            throw new IllegalArgumentException(field.toString());
        }
        Message entryType = (Message) type;
        ScalarFieldType keyType = (ScalarFieldType) entryType.getField(MAP_ENTRY_KEY).getType();
        return ScalarFieldTypeUtil.getWrapperType(keyType);
    }
1293622
public FieldDescriptorDef getField(String name)
    {
        FieldDescriptorDef fieldDef = null;

        for (Iterator it = _fields.iterator(); it.hasNext(); )
        {
            fieldDef = (FieldDescriptorDef)it.next();
            if (fieldDef.getName().equals(name))
            {
                return fieldDef;
            }
        }
        return null;
    }
1106339
private TaskField getTaskField(int field)
   {
      TaskField result = MPPTaskField14.getInstance(field);

      if (result != null)
      {
         switch (result)
         {
            case START_TEXT:
            {
               result = TaskField.START;
               break;
            }

            case FINISH_TEXT:
            {
               result = TaskField.FINISH;
               break;
            }

            case DURATION_TEXT:
            {
               result = TaskField.DURATION;
               break;
            }

            default:
            {
               break;
            }
         }
      }

      return result;
   }
692333
public Field getField(String fieldName) {
		final PropDesc desc = this.propMap.get(fieldName);
		return null == desc ? null : desc.getField();
	}
3857
public void handleEndKey()
    {
        KeyArea keyArea = this.getKeyArea(-1);
        if (keyArea == null)
            return;
        BaseBuffer buffer = new VectorBuffer(null);
        boolean[] rgbModified = keyArea.getModified();
        boolean[] rgbNullable = keyArea.setNullable(true);
        keyArea.setupKeyBuffer(buffer, DBConstants.FILE_KEY_AREA);
        keyArea.zeroKeyFields(DBConstants.END_SELECT_KEY);      // Set the key fields to a large value
        BaseListener  nextListener = this.getNextEnabledListener();
        if (nextListener != null)
            ((FileListener)nextListener).doEndKey();
        else
            this.doEndKey();
        keyArea.setNullable(rgbNullable);
        keyArea.setModified(rgbModified);
        keyArea.reverseKeyBuffer(buffer, DBConstants.FILE_KEY_AREA);
    }
573296
Rule FieldArea() {
		return Sequence(String("A:"),
				ZeroOrMore(WSP()).suppressNode(),
				TexText(), HeaderEol()).label(FieldArea);
	}
715903
protected String getFieldKey(Field field, Class<? extends ActionBean> actionBeanClass) {
        // Use key attribute if it is defined.
        String sessionKey = ((Session)field.getAnnotation(Session.class)).key();
        if (sessionKey != null && !"".equals(sessionKey)) {
            return sessionKey;
        }
        else {
            // Use default key since no custom key is defined.
            return actionBeanClass + "#" + field.getName();
        }
    }