Enum Class FieldsSourceUtil

java.lang.Object
java.lang.Enum<FieldsSourceUtil>
com._1c.g5.v8.dt.md.FieldsSourceUtil
All Implemented Interfaces:
Serializable, Comparable<FieldsSourceUtil>, Constable

public enum FieldsSourceUtil extends Enum<FieldsSourceUtil>
Field source util for fields.
  • Enum Constant Details

  • Method Details

    • values

      public static FieldsSourceUtil[] 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 FieldsSourceUtil 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
    • getFields

      public Collection<Field> getFields(Object inputElement, com.google.common.base.Predicate<Field> predicate)
      For inputElement that is a FieldSource returns its fields filtered by predicate. For others returns an empty collection.
      Parameters:
      inputElement - the field source
      predicate - a filter
    • getAllFieldsOf

      public Collection<Field> getAllFieldsOf(org.eclipse.emf.ecore.EObject eObject)
      For a Constant eObject returns all the self-fields of all the constants in the configuration, i.e. fields provided by FieldSource.

      For BasicFeatures or StandardAttributes returns self-fields of eObjects container. If container BasicTabularSection or StandardTabularSectionDescription also adds all self-fields of grandparent container.

      For CommonAttributes returns an empty collection.

      For all the others returns self-fields of the given eObject.

      Parameters:
      eObject - the field sources
      Returns:
      self fields
    • getTypeFields

      public Collection<Field> getTypeFields(org.eclipse.emf.ecore.EObject eObject)
      Gets field source type fields.
      Parameters:
      context - the field source
      Returns:
      type fields
    • getDefaultTypeField

      public Field getDefaultTypeField(MdObject characteristicValues, Field field)
      Returns characteristic description type field default value for selected field types.
      Parameters:
      characteristicValues - the characteristic description characteristic values, can be null
      field - the field, can be null
      Returns:
      the field availaible values, cannot be null
    • getDefaultKeyField

      public Field getDefaultKeyField(MdObject characteristicTypes)
      Returns characteristic description key field default value.
      Parameters:
      characteristicTypes - the characteristic description characteristic types, can be null
      Returns:
      the field default value or null
    • getDefaultDataPathField

      public String getDefaultDataPathField(MdObject characteristicTypes)
      Gets default value for data path CharacteristicsDescription field
      Parameters:
      characteristicTypes - CharacteristicsDescription.getCharacteristicTypes() value, cannot be null
      Returns:
      default value for data path CharacteristicsDescription field, can be null if fields was not found
    • getDefaultObjectField

      public Field getDefaultObjectField(MdObject characteristicValues, MdObject mdObject)
      Returns characteristic description object field default value for selected md-object.
      Parameters:
      characteristicValues - the characteristic description characteristic values, can be null
      mdObject - the md-object, cannot be null
      Returns:
      the field default value or null
    • getValueFields

      public List<Field> getValueFields(MdObject characteristicValues)
      Returns characteristic description value field availaible values.
      Parameters:
      characteristicValues - the characteristic description characteristic values, can be null
      Returns:
      the field availaible values, cannot be null
    • getTypeFields

      public List<Field> getTypeFields(MdObject characteristicValues, Field field)
      Returns characteristic description type field availaible values for selected field types.
      Parameters:
      characteristicValues - the characteristic description characteristic values, can be null
      field - the field, can be null
      Returns:
      the field availaible values, cannot be null
    • getCharacteristicsTypesFields

      public List<Field> getCharacteristicsTypesFields(Field field, List<Field> characteristicFields)
      Returns fields from characteristic fields those type contains catalog or characteristic types ref type from selected field.
      Parameters:
      field - the selected field, cannot be null
      characteristicFields - , the characteristic fields collection, cannot be null
      Returns:
      true if has
    • getObjectFields

      public List<Field> getObjectFields(MdObject characteristicValues, MdObject mdObject)
      Returns characteristic description object field availaible values for selected md-object.
      Parameters:
      characteristicValues - the characteristic description characteristic values, can be null
      mdObject - the md-object, cannot be null
      Returns:
      the field availaible values, cannot be null
    • getTypesFilterFields

      public List<Field> getTypesFilterFields(MdObject characteristicTypes)
      Returns characteristic description types filter field availaible values.
      Parameters:
      characteristicTypes - the characteristic description characteristic types, can be null
      Returns:
      the field availaible values, cannot be null
    • getKeyFields

      public List<Field> getKeyFields(MdObject characteristicTypes)
      Returns characteristic description key field availaible values.
      Parameters:
      characteristicTypes - the characteristic description characteristic types, can be null
      Returns:
      the field availaible values, cannot be null
    • getDataPathFields

      public List<Pair<String,String>> getDataPathFields(MdObject characteristicTypes)
      Gets possible values for data path field of CharacteristicsDescription
      Parameters:
      characteristicTypes - CharacteristicsDescription.getCharacteristicTypes() value, cannot be null
      Returns:
      collection pair of string - the first value of pair is possible value for data path field, the second value of pair is data path value localized to Russian language, never null
    • getDynamicDataPathFields

      public Collection<Field> getDynamicDataPathFields(CharacteristicsDescription description)
      Gets all dynamic fields allowed in data path field of CharacteristicsDescription
      Parameters:
      description - CharacteristicsDescription for getting dynamic data path field, cannot be null
      Returns:
      all dynamic fields allowed in data path field of CharacteristicsDescription, never null
    • hasFieldForCharacteristicsTypes

      public boolean hasFieldForCharacteristicsTypes(Field field, List<Field> characteristicFields)
      Checks is characteristic fields has field those type contains catalog or characteristic types ref type from selected field.
      Parameters:
      field - the selected field, cannot be null
      characteristicFields - , the characteristic fields collection, cannot be null
      Returns:
      true if has
    • isCharacteristicKindRefefenceField

      public boolean isCharacteristicKindRefefenceField(Field field)
      Checks, if field source types contains SourceType.CHARACTERISTIC_KIND and field type contains Catalog, ChartOfCharacteristicTypes, Table reference type.
      Parameters:
      field - the field, cannot be null
      Returns:
      true if is
    • isFieldContainsTypeNameType

      public boolean isFieldContainsTypeNameType(String typeName, Field field)
      Checks, if field availables for md-object.
      Parameters:
      typeName - the type name, cannot be null
      field - the field, cannot be null
      Returns:
      true if contains
    • isFieldContainsMdObjectRefType

      public boolean isFieldContainsMdObjectRefType(MdObject mdObject, Field field)
      Checks, if field availables for md-object.
      Parameters:
      mdObject - the md-object, cannot be null
      field - the field, cannot be null
      Returns:
      true is available
    • getUseMultipleValuesFields

      public List<Field> getUseMultipleValuesFields(MdObject characteristicTypes)
      Returns characteristic description use multiple values field availaible values.
      Parameters:
      characteristicTypes - the characteristic description characteristic types, may be null
      Returns:
      the availaible values, never be null