Enum Class DataDescriptorTypeCache

java.lang.Object
java.lang.Enum<DataDescriptorTypeCache>
com.jbstrap.core.cache.DataDescriptorTypeCache
All Implemented Interfaces:
Serializable, Comparable<DataDescriptorTypeCache>, Constable

public enum DataDescriptorTypeCache extends Enum<DataDescriptorTypeCache>
Since:
4.0
Author:
JBStrap
  • Enum Constant Details

  • Method Details

    • values

      public static DataDescriptorTypeCache[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DataDescriptorTypeCache valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • add

      public void add(String name, Class<? extends DataDescriptor> dataDescriptorClass)
      Parameters:
      name - Unique DataDescriptor name You can specify any text name here that should be unique within the application. Use the specified name to reference the DataDescriptor type in the program logic or in the XML file’s connectorType attribute in the <dataSource> tag.
      dataDescriptorClass - Class implementing the DataDescriptor to be added
      Throws:
      NullPointerException - Thrown if the specified DataDescriptor name or class is null
      IllegalArgumentException - Thrown if the specified class does not contain a constructor that the framework uses to instantiate the DataDescriptor or if there already a DataDescriptor type with that name in the framework.
    • fromName

      public DataDescriptorType fromName(String name)
      Parameters:
      name - DataDescriptor type name
      Returns:
      DataDescriptor type name or null if there is no DataDescriptor with the specified name in the framework
    • fromClass

      public DataDescriptorType fromClass(Class<? extends DataDescriptor> dataDescriptorClass)
      Parameters:
      dataDescriptorClass - The DataDescriptor’s implementing class that also contains the DataDescriptor type
      Returns:
      DataDescriptor type for the specified class, or null, if there is no corresponding DataDescriptor type for the specified class