Enum DataType

  • All Implemented Interfaces:
    Serializable, Comparable<DataType>

    public enum DataType
    extends Enum<DataType>
    Represents all data types that can be referenced from a Visualforce page. This enum consolidates the data types available to CustomFields and Apex. It uses the naming convention of CustomFields. See https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_field_types.htm#meta_type_fieldtype
    • Enum Constant Detail

      • AutoNumber

        public static final DataType AutoNumber
      • Checkbox

        public static final DataType Checkbox
      • Currency

        public static final DataType Currency
      • Date

        public static final DataType Date
      • DateTime

        public static final DataType DateTime
      • Email

        public static final DataType Email
      • EncryptedText

        public static final DataType EncryptedText
      • ExternalLookup

        public static final DataType ExternalLookup
      • File

        public static final DataType File
      • Hierarchy

        public static final DataType Hierarchy
      • Html

        public static final DataType Html
      • IndirectLookup

        public static final DataType IndirectLookup
      • Location

        public static final DataType Location
      • LongTextArea

        public static final DataType LongTextArea
      • Lookup

        public static final DataType Lookup
      • MasterDetail

        public static final DataType MasterDetail
      • MetadataRelationship

        public static final DataType MetadataRelationship
      • MultiselectPicklist

        public static final DataType MultiselectPicklist
      • Note

        public static final DataType Note
      • Number

        public static final DataType Number
      • Percent

        public static final DataType Percent
      • Phone

        public static final DataType Phone
      • Picklist

        public static final DataType Picklist
      • Summary

        public static final DataType Summary
      • Text

        public static final DataType Text
      • TextArea

        public static final DataType TextArea
      • Time

        public static final DataType Time
      • Unknown

        public static final DataType Unknown
        Indicates that Metatada was found, but it's type was not mappable. This could because it is a type which isn't mapped, or it was an edge case where the type was ambiguously defined in the Metadata.
    • Field Detail

      • requiresEscaping

        public final boolean requiresEscaping
        True if this field is an XSS risk
    • Method Detail

      • values

        public static DataType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DataType c : DataType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DataType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • fromString

        public static DataType fromString​(String value)
        Map to correct instance, returns Unknown if the value can't be mapped.
      • fromBasicType

        @Deprecated
        public static DataType fromBasicType​(apex.jorje.semantic.symbol.type.BasicType value)
        Deprecated.
        Map to correct instance, returns Unknown if the value can't be mapped.
      • fromTypeName

        public static DataType fromTypeName​(String value)
        Map to correct instance, returns Unknown if the value can't be mapped.