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 forStandardAttribute
objects
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StandardAttribute
getDefault(Field field, Version version)
Returns a newStandardAttribute
object filled with default valuesstatic org.eclipse.emf.ecore.EObject
getDefaultStandardObject(DuallyNamedElement namedElement, Version version)
Returns a newStandardAttribute
orStandardTabularSectionDescription
object filled with default values.static StandardTabularSectionDescription
getDefaultStandardTabularSection(StandardTabularPart standardTabularPart)
Returns a newStandardTabularSectionDescription
object filled with default valuesstatic String
getName(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)
GetsEStructuralFeature
to 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)
GetsEStructuralFeature
to standard tabular sectionsstatic boolean
hasStandardAttributes(org.eclipse.emf.ecore.EObject container)
Check given object for containing standard attributesstatic boolean
hasStandardTabularSections(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 newStandardAttribute
object filled with default values- Parameters:
field
- is theField
, cannot benull
version
- of current runtime, cannot benull
.- Returns:
- the
StandardAttribute
, cannot benull
-
getDefaultStandardTabularSection
public static StandardTabularSectionDescription getDefaultStandardTabularSection(StandardTabularPart standardTabularPart)
Returns a newStandardTabularSectionDescription
object 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 newStandardAttribute
orStandardTabularSectionDescription
object filled with default values.- Parameters:
namedElement
- is theField
orStandardTabularPart
, cannot benull
version
- of current runtime, cannot benull
.- Returns:
- the
StandardAttribute
,StandardTabularSectionDescription
ornull
-
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:
true
if object has standard attributes,false
in otherwise
-
getStandardAttributesFeature
public static Optional<org.eclipse.emf.ecore.EStructuralFeature> getStandardAttributesFeature(org.eclipse.emf.ecore.EObject container)
GetsEStructuralFeature
to standard attributes- Parameters:
container
- the object to getsEStructuralFeature
to standard attributes, cannot benull
- Returns:
EStructuralFeature
to 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 benull
standardAttributeName
- 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:
true
if object has standard tabular sections,false
in otherwise
-
getStandardTabularSectionsFeature
public static Optional<org.eclipse.emf.ecore.EStructuralFeature> getStandardTabularSectionsFeature(org.eclipse.emf.ecore.EObject container)
GetsEStructuralFeature
to standard tabular sections- Parameters:
container
- the object to getsEStructuralFeature
to standard tabular sections, cannot benull
- Returns:
EStructuralFeature
to 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 benull
standardTabularSectionsName
- 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
-
-