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 aConstant
eObject
returns 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 ofCharacteristicsDescription
String
getDefaultDataPathField(MdObject characteristicTypes)
Gets default value for data pathCharacteristicsDescription
fieldField
getDefaultKeyField(MdObject characteristicTypes)
Returns characteristic description key field default value.Field
getDefaultObjectField(MdObject characteristicValues, MdObject mdObject)
Returns characteristic description object field default value for selected md-object.Field
getDefaultTypeField(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 ofCharacteristicsDescription
Collection<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>
getValueFields(MdObject characteristicValues)
Returns characteristic description value field availaible values.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.boolean
isCharacteristicKindRefefenceField(Field field)
Checks, if field source types containsSourceType.CHARACTERISTIC_KIND
and field type containsCatalog
,ChartOfCharacteristicTypes
,Table
reference type.boolean
isFieldContainsMdObjectRefType(MdObject mdObject, Field field)
Checks, if field availables for md-object.boolean
isFieldContainsTypeNameType(String typeName, Field field)
Checks, if field availables for md-object.static FieldsSourceUtil
valueOf(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)
ForinputElement
that is aFieldSource
returns 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 aConstant
eObject
returns all the self-fields of all the constants in the configuration, i.e. fields provided byFieldSource
.For
BasicFeature
s orStandardAttribute
s returns self-fields ofeObject
s container. If containerBasicTabularSection
orStandardTabularSectionDescription
also adds all self-fields of grandparent container.For
CommonAttribute
s 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 benull
field
- 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 pathCharacteristicsDescription
field- Parameters:
characteristicTypes
-CharacteristicsDescription.getCharacteristicTypes()
value, cannot benull
- Returns:
- default value for data path
CharacteristicsDescription
field, can benull
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 benull
mdObject
- 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 benull
field
- 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 benull
characteristicFields
- , the characteristic fields collection, cannot benull
- 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 benull
mdObject
- 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
-CharacteristicsDescription
for 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 benull
characteristicFields
- , the characteristic fields collection, cannot benull
- Returns:
true
if has
-
isCharacteristicKindRefefenceField
public boolean isCharacteristicKindRefefenceField(Field field)
Checks, if field source types containsSourceType.CHARACTERISTIC_KIND
and field type containsCatalog
,ChartOfCharacteristicTypes
,Table
reference type.- Parameters:
field
- the field, cannot benull
- 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 benull
field
- the field, cannot benull
- Returns:
true
if contains
-
-