Package com._1c.g5.v8.dt.md.resource
Class StandardAttributeUtil
- java.lang.Object
-
- com._1c.g5.v8.dt.md.resource.StandardAttributeUtil
-
public class StandardAttributeUtil extends Object
Utility class forStandardAttributeobjects
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StandardAttributegetDefault(Field field, Version version)Returns a newStandardAttributeobject filled with default valuesstatic org.eclipse.emf.ecore.EObjectgetDefaultStandardObject(DuallyNamedElement namedElement, Version version)Returns a newStandardAttributeorStandardTabularSectionDescriptionobject filled with default values.static StandardTabularSectionDescriptiongetDefaultStandardTabularSection(StandardTabularPart standardTabularPart)Returns a newStandardTabularSectionDescriptionobject filled with default valuesstatic StringgetName(org.eclipse.emf.ecore.EObject eObject)Returns md or standard e-object name.static Optional<StandardAttribute>getStandardAttribute(org.eclipse.emf.ecore.EObject container, String standardAttributeName)Gets standard attribute by namestatic org.eclipse.emf.common.util.EList<StandardAttribute>getStandardAttributes(org.eclipse.emf.ecore.EObject container)Gets list of standard attributesstatic Optional<org.eclipse.emf.ecore.EStructuralFeature>getStandardAttributesFeature(org.eclipse.emf.ecore.EObject container)GetsEStructuralFeatureto standard attributesstatic Optional<StandardTabularSectionDescription>getStandardTabularSectionDescription(org.eclipse.emf.ecore.EObject container, String standardTabularSectionsName)Gets standard tabular section by namestatic org.eclipse.emf.common.util.EList<StandardTabularSectionDescription>getStandardTabularSections(org.eclipse.emf.ecore.EObject container)Gets list of standard tabular sectionstatic Optional<org.eclipse.emf.ecore.EStructuralFeature>getStandardTabularSectionsFeature(org.eclipse.emf.ecore.EObject container)GetsEStructuralFeatureto standard tabular sectionsstatic booleanhasStandardAttributes(org.eclipse.emf.ecore.EObject container)Check given object for containing standard attributesstatic booleanhasStandardTabularSections(org.eclipse.emf.ecore.EObject container)Check given object for containing standard tabular sections
-
-
-
Method Detail
-
getDefault
public static StandardAttribute getDefault(Field field, Version version)
Returns a newStandardAttributeobject filled with default values- Parameters:
field- is theField, cannot benullversion- of current runtime, cannot benull.- Returns:
- the
StandardAttribute, cannot benull
-
getDefaultStandardTabularSection
public static StandardTabularSectionDescription getDefaultStandardTabularSection(StandardTabularPart standardTabularPart)
Returns a newStandardTabularSectionDescriptionobject filled with default values- Parameters:
standardTabularPart- is theStandardTabularPart, cannot benull- Returns:
- the
StandardTabularSectionDescription, cannot benull
-
getDefaultStandardObject
public static org.eclipse.emf.ecore.EObject getDefaultStandardObject(DuallyNamedElement namedElement, Version version)
Returns a newStandardAttributeorStandardTabularSectionDescriptionobject filled with default values.- Parameters:
namedElement- is theFieldorStandardTabularPart, cannot benullversion- of current runtime, cannot benull.- Returns:
- the
StandardAttribute,StandardTabularSectionDescriptionornull
-
getName
public static String getName(org.eclipse.emf.ecore.EObject eObject)
Returns md or standard e-object name.- Parameters:
eObject- the md or standard e-object, cannot benull- Returns:
- the md or standard object name, empty string otherwise
-
hasStandardAttributes
public static boolean hasStandardAttributes(org.eclipse.emf.ecore.EObject container)
Check given object for containing standard attributes- Parameters:
container- the object to check if it has standard attributes, cannot benull- Returns:
trueif object has standard attributes,falsein otherwise
-
getStandardAttributesFeature
public static Optional<org.eclipse.emf.ecore.EStructuralFeature> getStandardAttributesFeature(org.eclipse.emf.ecore.EObject container)
GetsEStructuralFeatureto standard attributes- Parameters:
container- the object to getsEStructuralFeatureto standard attributes, cannot benull- Returns:
EStructuralFeatureto standard attributes, nevernull
-
getStandardAttributes
public static org.eclipse.emf.common.util.EList<StandardAttribute> getStandardAttributes(org.eclipse.emf.ecore.EObject container)
Gets list of standard attributes- Parameters:
container- the object to gets list of standard attributes, cannot benull- Returns:
- list of standard attributes if given container objects, never
null - Throws:
IllegalArgumentException- if given container cannot contains list of standard attributes
-
getStandardAttribute
public static Optional<StandardAttribute> getStandardAttribute(org.eclipse.emf.ecore.EObject container, String standardAttributeName)
Gets standard attribute by name- Parameters:
container- the object to gets standard attribute by name, cannot benullstandardAttributeName- the standard attribute name, cannot benull- Returns:
- standard attribute with given name, never
null
-
hasStandardTabularSections
public static boolean hasStandardTabularSections(org.eclipse.emf.ecore.EObject container)
Check given object for containing standard tabular sections- Parameters:
container- the object to check if it has standard tabular sections, cannot benull- Returns:
trueif object has standard tabular sections,falsein otherwise
-
getStandardTabularSectionsFeature
public static Optional<org.eclipse.emf.ecore.EStructuralFeature> getStandardTabularSectionsFeature(org.eclipse.emf.ecore.EObject container)
GetsEStructuralFeatureto standard tabular sections- Parameters:
container- the object to getsEStructuralFeatureto standard tabular sections, cannot benull- Returns:
EStructuralFeatureto standard tabular sections
-
getStandardTabularSections
public static org.eclipse.emf.common.util.EList<StandardTabularSectionDescription> getStandardTabularSections(org.eclipse.emf.ecore.EObject container)
Gets list of standard tabular section- Parameters:
container- the object to gets list of standard tabular section, cannot benull- Returns:
- list of standard tabular section if given container objects, never
null
-
getStandardTabularSectionDescription
public static Optional<StandardTabularSectionDescription> getStandardTabularSectionDescription(org.eclipse.emf.ecore.EObject container, String standardTabularSectionsName)
Gets standard tabular section by name- Parameters:
container- the object to gets standard tabular section by name, cannot benullstandardTabularSectionsName- the standard tabular section name, cannot benull- Returns:
- standard tabular section with given name, never
null - Throws:
IllegalArgumentException- if given container cannot contains list of standard attributes
-
-