Class StandardAttributeUtil

java.lang.Object
com._1c.g5.v8.dt.md.resource.StandardAttributeUtil

public class StandardAttributeUtil extends Object
Utility class for StandardAttribute objects
  • Method Details

    • getDefault

      public static StandardAttribute getDefault(Field field, Version version)
      Returns a new StandardAttribute object filled with default values
      Parameters:
      field - is the Field, cannot be null
      version - of current runtime, cannot be null.
      Returns:
      the StandardAttribute, cannot be null
    • getDefaultStandardTabularSection

      public static StandardTabularSectionDescription getDefaultStandardTabularSection(StandardTabularPart standardTabularPart)
      Returns a new StandardTabularSectionDescription object filled with default values
      Parameters:
      standardTabularPart - is the StandardTabularPart, cannot be null
      Returns:
      the StandardTabularSectionDescription, cannot be null
    • getDefaultStandardObject

      public static org.eclipse.emf.ecore.EObject getDefaultStandardObject(DuallyNamedElement namedElement, Version version)
      Returns a new StandardAttribute or StandardTabularSectionDescription object filled with default values.
      Parameters:
      namedElement - is the Field or StandardTabularPart, cannot be null
      version - of current runtime, cannot be null.
      Returns:
      the StandardAttribute, StandardTabularSectionDescription or null
    • 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 be null
      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 be null
      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)
      Gets EStructuralFeature to standard attributes
      Parameters:
      container - the object to gets EStructuralFeature to standard attributes, cannot be null
      Returns:
      EStructuralFeature to standard attributes, never null
    • 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 be null
      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 be null
      standardAttributeName - the standard attribute name, cannot be null
      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 be null
      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)
      Gets EStructuralFeature to standard tabular sections
      Parameters:
      container - the object to gets EStructuralFeature to standard tabular sections, cannot be null
      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 be null
      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 be null
      standardTabularSectionsName - the standard tabular section name, cannot be null
      Returns:
      standard tabular section with given name, never null
      Throws:
      IllegalArgumentException - if given container cannot contains list of standard attributes