Package com._1c.g5.v8.dt.md
Enum FieldsSourceUtil
- java.lang.Object
-
- java.lang.Enum<FieldsSourceUtil>
-
- com._1c.g5.v8.dt.md.FieldsSourceUtil
-
- All Implemented Interfaces:
Serializable,Comparable<FieldsSourceUtil>
public enum FieldsSourceUtil extends Enum<FieldsSourceUtil>
Field source util for fields.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<Field>getAllFieldsOf(org.eclipse.emf.ecore.EObject eObject)For aConstanteObjectreturns all the self-fields of all the constants in the configuration, i.e.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.List<Pair<String,String>>getDataPathFields(MdObject characteristicTypes)Gets possible values for data path field ofCharacteristicsDescriptionStringgetDefaultDataPathField(MdObject characteristicTypes)Gets default value for data pathCharacteristicsDescriptionfieldFieldgetDefaultKeyField(MdObject characteristicTypes)Returns characteristic description key field default value.FieldgetDefaultObjectField(MdObject characteristicValues, MdObject mdObject)Returns characteristic description object field default value for selected md-object.FieldgetDefaultTypeField(MdObject characteristicValues, Field field)Returns characteristic description type field default value for selected field types.Collection<Field>getDynamicDataPathFields(CharacteristicsDescription description)Gets all dynamic fields allowed in data path field ofCharacteristicsDescriptionCollection<Field>getFields(Object inputElement, com.google.common.base.Predicate<Field> predicate)List<Field>getKeyFields(MdObject characteristicTypes)Returns characteristic description key field availaible values.List<Field>getObjectFields(MdObject characteristicValues, MdObject mdObject)Returns characteristic description object field availaible values for selected md-object.List<Field>getTypeFields(MdObject characteristicValues, Field field)Returns characteristic description type field availaible values for selected field types.Collection<Field>getTypeFields(org.eclipse.emf.ecore.EObject eObject)Gets field source type fields.List<Field>getTypesFilterFields(MdObject characteristicTypes)Returns characteristic description types filter field availaible values.List<Field>getUseMultipleValuesFields(MdObject characteristicTypes)Returns characteristic description use multiple values field availaible values.List<Field>getValueFields(MdObject characteristicValues)Returns characteristic description value field availaible values.booleanhasFieldForCharacteristicsTypes(Field field, List<Field> characteristicFields)Checks is characteristic fields has field those type contains catalog or characteristic types ref type from selected field.booleanisCharacteristicKindRefefenceField(Field field)Checks, if field source types containsSourceType.CHARACTERISTIC_KINDand field type containsCatalog,ChartOfCharacteristicTypes,Tablereference type.booleanisFieldContainsMdObjectRefType(MdObject mdObject, Field field)Checks, if field availables for md-object.booleanisFieldContainsTypeNameType(String typeName, Field field)Checks, if field availables for md-object.static FieldsSourceUtilvalueOf(String name)Returns the enum constant of this type with the specified name.static FieldsSourceUtil[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final FieldsSourceUtil INSTANCE
-
-
Method Detail
-
values
public static FieldsSourceUtil[] 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 (FieldsSourceUtil c : FieldsSourceUtil.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FieldsSourceUtil 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 nameNullPointerException- if the argument is null
-
getFields
public Collection<Field> getFields(Object inputElement, com.google.common.base.Predicate<Field> predicate)
ForinputElementthat is aFieldSourcereturns its fields filtered bypredicate. For others returns an empty collection.- Parameters:
inputElement- the field sourcepredicate- a filter
-
getAllFieldsOf
public Collection<Field> getAllFieldsOf(org.eclipse.emf.ecore.EObject eObject)
For aConstanteObjectreturns all the self-fields of all the constants in the configuration, i.e. fields provided byFieldSource.For
BasicFeatures orStandardAttributes returns self-fields ofeObjects container. If containerBasicTabularSectionorStandardTabularSectionDescriptionalso 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 benullfield- the field, can benull- 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 benull- Returns:
- the field default value or
null
-
getDefaultDataPathField
public String getDefaultDataPathField(MdObject characteristicTypes)
Gets default value for data pathCharacteristicsDescriptionfield- Parameters:
characteristicTypes-CharacteristicsDescription.getCharacteristicTypes()value, cannot benull- Returns:
- default value for data path
CharacteristicsDescriptionfield, can benullif 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 benullmdObject- the md-object, cannot benull- 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 benull- 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 benullfield- the field, can benull- 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 benullcharacteristicFields- , the characteristic fields collection, cannot benull- Returns:
trueif 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 benullmdObject- the md-object, cannot benull- 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 benull- 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 benull- Returns:
- the field availaible values, cannot be
null
-
getDataPathFields
public List<Pair<String,String>> getDataPathFields(MdObject characteristicTypes)
Gets possible values for data path field ofCharacteristicsDescription- Parameters:
characteristicTypes-CharacteristicsDescription.getCharacteristicTypes()value, cannot benull- 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 ofCharacteristicsDescription- Parameters:
description-CharacteristicsDescriptionfor getting dynamic data path field, cannot benull- Returns:
- all dynamic fields allowed in data path field of
CharacteristicsDescription, nevernull
-
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 benullcharacteristicFields- , the characteristic fields collection, cannot benull- Returns:
trueif has
-
isCharacteristicKindRefefenceField
public boolean isCharacteristicKindRefefenceField(Field field)
Checks, if field source types containsSourceType.CHARACTERISTIC_KINDand field type containsCatalog,ChartOfCharacteristicTypes,Tablereference type.- Parameters:
field- the field, cannot benull- Returns:
trueif is
-
isFieldContainsTypeNameType
public boolean isFieldContainsTypeNameType(String typeName, Field field)
Checks, if field availables for md-object.- Parameters:
typeName- the type name, cannot benullfield- the field, cannot benull- Returns:
trueif contains
-
isFieldContainsMdObjectRefType
public boolean isFieldContainsMdObjectRefType(MdObject mdObject, Field field)
Checks, if field availables for md-object.- Parameters:
mdObject- the md-object, cannot benullfield- the field, cannot benull- Returns:
trueis 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 benull- Returns:
- the availaible values, never be
null
-
-