# DataTypeEnum.java

    /*
    ** Module   : DataTypeEnum.java
    ** Abstract : Implementation of the OpenEdge.Core.DataTypeEnum builtin class.
    **
    ** Copyright (c) 2019-2022, Golden Code Development Corporation.
    **
    ** -#- -I- --Date-- -------------------------------Description--------------------------------
    ** 001 CA  20190423 Created the first version, by converting the legacy skeleton .cls file and
    **                  using that output.
    ** 002 CA  20190508 Fixed the converted package.
    **     RFB 20191022 Added LegacyResource annotation
    ** 003 CA  20191024 Added method support levels and updated the class support level.
    ** 004 ME  20200730 Add enums by converting skeleton (OE12.2).
    ** 005 CA  20210221 Fixed 'qualified', 'extent' and 'returns' annotations at the legacy
    **                  signature.
    ** 006 VVT 20221213 An underscore character appended to the field names matching BDT names. See #6993.
    */

    /*
    ** This program is free software: you can redistribute it and/or modify
    ** it under the terms of the GNU Affero General Public License as
    ** published by the Free Software Foundation, either version 3 of the
    ** License, or (at your option) any later version.
    **
    ** This program is distributed in the hope that it will be useful,
    ** but WITHOUT ANY WARRANTY; without even the implied warranty of
    ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    ** GNU Affero General Public License for more details.
    **
    ** You may find a copy of the GNU Affero GPL version 3 at the following
    ** location: https://www.gnu.org/licenses/agpl-3.0.en.html
    **
    ** Additional terms under GNU Affero GPL version 3 section 7:
    **
    **   Under Section 7 of the GNU Affero GPL version 3, the following additional
    **   terms apply to the works covered under the License.  These additional terms
    **   are non-permissive additional terms allowed under Section 7 of the GNU
    **   Affero GPL version 3 and may not be removed by you.
    **
    **   0. Attribution Requirement.
    **
    **     You must preserve all legal notices or author attributions in the covered
    **     work or Appropriate Legal Notices displayed by works containing the covered
    **     work.  You may not remove from the covered work any author or developer
    **     credit already included within the covered work.
    **
    **   1. No License To Use Trademarks.
    **
    **     This license does not grant any license or rights to use the trademarks
    **     Golden Code, FWD, any Golden Code or FWD logo, or any other trademarks
    **     of Golden Code Development Corporation. You are not authorized to use the
    **     name Golden Code, FWD, or the names of any author or contributor, for
    **     publicity purposes without written authorization.
    **
    **   2. No Misrepresentation of Affiliation.
    **
    **     You may not represent yourself as Golden Code Development Corporation or FWD.
    **
    **     You may not represent yourself for publicity purposes as associated with
    **     Golden Code Development Corporation, FWD, or any author or contributor to
    **     the covered work, without written authorization.
    **
    **   3. No Misrepresentation of Source or Origin.
    **
    **     You may not represent the covered work as solely your work.  All modified
    **     versions of the covered work must be marked in a reasonable way to make it
    **     clear that the modified work is not originating from Golden Code Development
    **     Corporation or FWD.  All modified versions must contain the notices of
    **     attribution required in this license.
    */

    package com.goldencode.p2j.oo.core;

    import com.goldencode.p2j.util.*;
    import com.goldencode.p2j.oo.lang.*;

    import static com.goldencode.p2j.report.ReportConstants.*;
    import static com.goldencode.p2j.util.InternalEntry.Type;

    /**
     * Business logic (converted to Java from the 4GL source code
     * in OpenEdge/Core/DataTypeEnum.cls).
     */
    @LegacyResource(resource = "OpenEdge.Core.DataTypeEnum")
    @LegacyResourceSupport(supportLvl = CVT_LVL_FULL|RT_LVL_FULL)
    public final class DataTypeEnum
    extends LegacyEnum
    {
       @LegacySignature(type = Type.VARIABLE, name = "None")
       public static final object<? extends DataTypeEnum> none;

       @LegacySignature(type = Type.VARIABLE, name = "Character")
       public static final object<? extends DataTypeEnum> character_;

       @LegacySignature(type = Type.VARIABLE, name = "Default")
       public static final object<? extends DataTypeEnum> default_;

       @LegacySignature(type = Type.VARIABLE, name = "CharacterArray")
       public static final object<? extends DataTypeEnum> characterArray;

       @LegacySignature(type = Type.VARIABLE, name = "LongChar")
       public static final object<? extends DataTypeEnum> longChar;

       @LegacySignature(type = Type.VARIABLE, name = "LongCharArray")
       public static final object<? extends DataTypeEnum> longCharArray;

       @LegacySignature(type = Type.VARIABLE, name = "Integer")
       public static final object<? extends DataTypeEnum> integer_;

       @LegacySignature(type = Type.VARIABLE, name = "IntegerArray")
       public static final object<? extends DataTypeEnum> integerArray;

       @LegacySignature(type = Type.VARIABLE, name = "Int64")
       public static final object<? extends DataTypeEnum> int64_;

       @LegacySignature(type = Type.VARIABLE, name = "Int64Array")
       public static final object<? extends DataTypeEnum> int64Array;

       @LegacySignature(type = Type.VARIABLE, name = "Decimal")
       public static final object<? extends DataTypeEnum> decimal_;

       @LegacySignature(type = Type.VARIABLE, name = "DecimalArray")
       public static final object<? extends DataTypeEnum> decimalArray;

       @LegacySignature(type = Type.VARIABLE, name = "Logical")
       public static final object<? extends DataTypeEnum> logical_;

       @LegacySignature(type = Type.VARIABLE, name = "LogicalArray")
       public static final object<? extends DataTypeEnum> logicalArray;

       @LegacySignature(type = Type.VARIABLE, name = "Rowid")
       public static final object<? extends DataTypeEnum> rowid_;

       @LegacySignature(type = Type.VARIABLE, name = "RowidArray")
       public static final object<? extends DataTypeEnum> rowidArray;

       @LegacySignature(type = Type.VARIABLE, name = "Recid")
       public static final object<? extends DataTypeEnum> recid_;

       @LegacySignature(type = Type.VARIABLE, name = "RecidArray")
       public static final object<? extends DataTypeEnum> recidArray;

       @LegacySignature(type = Type.VARIABLE, name = "Date")
       public static final object<? extends DataTypeEnum> date_;

       @LegacySignature(type = Type.VARIABLE, name = "DateArray")
       public static final object<? extends DataTypeEnum> dateArray;

       @LegacySignature(type = Type.VARIABLE, name = "Datetime")
       public static final object<? extends DataTypeEnum> datetime_;

       @LegacySignature(type = Type.VARIABLE, name = "DatetimeArray")
       public static final object<? extends DataTypeEnum> datetimeArray;

       @LegacySignature(type = Type.VARIABLE, name = "Datetime-TZ")
       public static final object<? extends DataTypeEnum> datetimeTz;

       @LegacySignature(type = Type.VARIABLE, name = "DatetimeTZ")
       public static final object<? extends DataTypeEnum> datetimeTz_2;

       @LegacySignature(type = Type.VARIABLE, name = "DatetimeTZArray")
       public static final object<? extends DataTypeEnum> datetimeTzarray;

       @LegacySignature(type = Type.VARIABLE, name = "Raw")
       public static final object<? extends DataTypeEnum> raw_;

       @LegacySignature(type = Type.VARIABLE, name = "RawArray")
       public static final object<? extends DataTypeEnum> rawArray;

       @LegacySignature(type = Type.VARIABLE, name = "Memptr")
       public static final object<? extends DataTypeEnum> memptr_;

       @LegacySignature(type = Type.VARIABLE, name = "MemptrArray")
       public static final object<? extends DataTypeEnum> memptrArray;

       @LegacySignature(type = Type.VARIABLE, name = "Handle")
       public static final object<? extends DataTypeEnum> handle;

       @LegacySignature(type = Type.VARIABLE, name = "HandleArray")
       public static final object<? extends DataTypeEnum> handleArray;

       @LegacySignature(type = Type.VARIABLE, name = "BLOB")
       public static final object<? extends DataTypeEnum> blob;

       @LegacySignature(type = Type.VARIABLE, name = "CLOB")
       public static final object<? extends DataTypeEnum> clob;

       @LegacySignature(type = Type.VARIABLE, name = "Com-Handle")
       public static final object<? extends DataTypeEnum> comHandle;

       @LegacySignature(type = Type.VARIABLE, name = "ComHandle")
       public static final object<? extends DataTypeEnum> comHandle_2;

       @LegacySignature(type = Type.VARIABLE, name = "ComHandleArray")
       public static final object<? extends DataTypeEnum> comHandleArray;

       @LegacySignature(type = Type.VARIABLE, name = "Dataset")
       public static final object<? extends DataTypeEnum> dataset;

       @LegacySignature(type = Type.VARIABLE, name = "Buffer")
       public static final object<? extends DataTypeEnum> buffer;

       @LegacySignature(type = Type.VARIABLE, name = "Temp-Table")
       public static final object<? extends DataTypeEnum> tempTable;

       @LegacySignature(type = Type.VARIABLE, name = "TempTable")
       public static final object<? extends DataTypeEnum> tempTable_2;

       @LegacySignature(type = Type.VARIABLE, name = "Client-Principal")
       public static final object<? extends DataTypeEnum> clientPrincipal;

       @LegacySignature(type = Type.VARIABLE, name = "ClientPrincipal")
       public static final object<? extends DataTypeEnum> clientPrincipal_2;

       @LegacySignature(type = Type.VARIABLE, name = "ProgressLangObject")
       public static final object<? extends DataTypeEnum> progressLangObject;

       @LegacySignature(type = Type.VARIABLE, name = "Enumeration")
       public static final object<? extends DataTypeEnum> enumeration;

       @LegacySignature(type = Type.VARIABLE, name = "Enum")
       public static final object<? extends DataTypeEnum> enum_;

       @LegacySignature(type = Type.VARIABLE, name = "Class")
       public static final object<? extends DataTypeEnum> class_;

       @LegacySignature(type = Type.VARIABLE, name = "ClassArray")
       public static final object<? extends DataTypeEnum> classArray;

       @LegacySignature(type = Type.VARIABLE, name = "Stream")
       public static final object<? extends DataTypeEnum> stream;

       @LegacySignature(type = Type.VARIABLE, name = "Row-State")
       public static final object<? extends DataTypeEnum> rowState;

       @LegacySignature(type = Type.VARIABLE, name = "RowState")
       public static final object<? extends DataTypeEnum> rowState_2;

       @LegacySignature(type = Type.VARIABLE, name = "X-Document")
       public static final object<? extends DataTypeEnum> xDocument;

       @LegacySignature(type = Type.VARIABLE, name = "XmlDocument")
       public static final object<? extends DataTypeEnum> xmlDocument;

       @LegacySignature(type = Type.VARIABLE, name = "X-Noderef")
       public static final object<? extends DataTypeEnum> xNoderef;

       @LegacySignature(type = Type.VARIABLE, name = "XmlNodeRef")
       public static final object<? extends DataTypeEnum> xmlNodeRef;

       static
       {
          registerEnum(DataTypeEnum.class, DataTypeEnum::new, "OpenEdge.Core.DataTypeEnum");

          none = createEnum(DataTypeEnum.class, "None", 1L);
          character_ = createEnum(DataTypeEnum.class, "Character", 2L);
          default_ = createEnum(DataTypeEnum.class, "Default", 2L);
          characterArray = createEnum(DataTypeEnum.class, "CharacterArray", 3L);
          longChar = createEnum(DataTypeEnum.class, "LongChar", 4L);
          longCharArray = createEnum(DataTypeEnum.class, "LongCharArray", 5L);
          integer_ = createEnum(DataTypeEnum.class, "Integer", 6L);
          integerArray = createEnum(DataTypeEnum.class, "IntegerArray", 7L);
          int64_ = createEnum(DataTypeEnum.class, "Int64", 8L);
          int64Array = createEnum(DataTypeEnum.class, "Int64Array", 9L);
          decimal_ = createEnum(DataTypeEnum.class, "Decimal", 10L);
          decimalArray = createEnum(DataTypeEnum.class, "DecimalArray", 11L);
          logical_ = createEnum(DataTypeEnum.class, "Logical", 12L);
          logicalArray = createEnum(DataTypeEnum.class, "LogicalArray", 13L);
          rowid_ = createEnum(DataTypeEnum.class, "Rowid", 14L);
          rowidArray = createEnum(DataTypeEnum.class, "RowidArray", 15L);
          recid_ = createEnum(DataTypeEnum.class, "Recid", 16L);
          recidArray = createEnum(DataTypeEnum.class, "RecidArray", 17L);
          date_ = createEnum(DataTypeEnum.class, "Date", 18L);
          dateArray = createEnum(DataTypeEnum.class, "DateArray", 19L);
          datetime_ = createEnum(DataTypeEnum.class, "Datetime", 20L);
          datetimeArray = createEnum(DataTypeEnum.class, "DatetimeArray", 21L);
          datetimeTz = createEnum(DataTypeEnum.class, "Datetime-TZ", 22L);
          datetimeTz_2 = createEnum(DataTypeEnum.class, "DatetimeTZ", 22L);
          datetimeTzarray = createEnum(DataTypeEnum.class, "DatetimeTZArray", 23L);
          raw_ = createEnum(DataTypeEnum.class, "Raw", 24L);
          rawArray = createEnum(DataTypeEnum.class, "RawArray", 25L);
          memptr_ = createEnum(DataTypeEnum.class, "Memptr", 26L);
          memptrArray = createEnum(DataTypeEnum.class, "MemptrArray", 27L);
          handle = createEnum(DataTypeEnum.class, "Handle", 28L);
          handleArray = createEnum(DataTypeEnum.class, "HandleArray", 29L);
          blob = createEnum(DataTypeEnum.class, "BLOB", 30L);
          clob = createEnum(DataTypeEnum.class, "CLOB", 31L);
          comHandle = createEnum(DataTypeEnum.class, "Com-Handle", 32L);
          comHandle_2 = createEnum(DataTypeEnum.class, "ComHandle", 32L);
          comHandleArray = createEnum(DataTypeEnum.class, "ComHandleArray", 33L);
          dataset = createEnum(DataTypeEnum.class, "Dataset", 34L);
          buffer = createEnum(DataTypeEnum.class, "Buffer", 35L);
          tempTable = createEnum(DataTypeEnum.class, "Temp-Table", 36L);
          tempTable_2 = createEnum(DataTypeEnum.class, "TempTable", 36L);
          clientPrincipal = createEnum(DataTypeEnum.class, "Client-Principal", 37L);
          clientPrincipal_2 = createEnum(DataTypeEnum.class, "ClientPrincipal", 37L);
          progressLangObject = createEnum(DataTypeEnum.class, "ProgressLangObject", 38L);
          enumeration = createEnum(DataTypeEnum.class, "Enumeration", 39L);
          enum_ = createEnum(DataTypeEnum.class, "Enum", 39L);
          class_ = createEnum(DataTypeEnum.class, "Class", 40L);
          classArray = createEnum(DataTypeEnum.class, "ClassArray", 41L);
          stream = createEnum(DataTypeEnum.class, "Stream", 42L);
          rowState = createEnum(DataTypeEnum.class, "Row-State", 43L);
          rowState_2 = createEnum(DataTypeEnum.class, "RowState", 43L);
          xDocument = createEnum(DataTypeEnum.class, "X-Document", 44L);
          xmlDocument = createEnum(DataTypeEnum.class, "XmlDocument", 44L);
          xNoderef = createEnum(DataTypeEnum.class, "X-Noderef", 45L);
          xmlNodeRef = createEnum(DataTypeEnum.class, "XmlNodeRef", 45L);
       }

       private DataTypeEnum(final String name, final Long value)
       {
          super(name, value);
       }

       @LegacySignature(returns = "OBJECT", type = Type.METHOD, name = "GetEnum", qualified = "openedge.core.datatypeenum", parameters =
       {
          @LegacyParameter(name = "val", type = "INT64", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_FULL)
       public static object<DataTypeEnum> getEnum(int64 val)
       {
          return getEnum(DataTypeEnum.class, val);
       }

       @LegacySignature(returns = "OBJECT", type = Type.METHOD, name = "GetEnum", qualified = "openedge.core.datatypeenum", parameters =
       {
          @LegacyParameter(name = "val", type = "CHARACTER", mode = "INPUT")
       })
       @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_FULL)
       public static object<DataTypeEnum> getEnum(character val)
       {
          return getEnum(DataTypeEnum.class, val);
       }
    }