Class DbViewUtil


  • public class DbViewUtil
    extends Object
    Utility class for DBView definitions.
    • Constructor Detail

      • DbViewUtil

        public DbViewUtil()
    • Method Detail

      • getFields

        public static List<DbViewFieldDef> getFields​(org.eclipse.emf.ecore.EObject context,
                                                     DbViewFieldDef field)
        Returns fields from dbviews provided by field types or empty list.
        Parameters:
        context - the context object to figure out execution scope
        field - the DbViewFieldDef (not null).
        Returns:
        fields from dbviews provided by field types or empty list.
      • getFieldsByTypeDescription

        public static List<DbViewFieldDef> getFieldsByTypeDescription​(org.eclipse.emf.ecore.EObject context,
                                                                      TypeDescription typeDescription)
        Returns fields provided by type description or empty list.
        Parameters:
        context - the context object to figure out execution scope
        typeDescription - the TypeDescription (may be null)
        Returns:
        fields from dbviews provided by field types or empty list.
      • getFieldsByType

        public static Collection<DbViewFieldDef> getFieldsByType​(Type type,
                                                                 boolean skipTables)
        Returns fields list by type for all visible dbViews.
        Parameters:
        type - type (not null)
        skipTables - if true all tabular section fields will be filtered out
        Returns:
        fields list or empty list.
      • getMainTable

        public static DbViewDef getMainTable​(MdObject mdObject)
        Get Main table for MdObject
        Parameters:
        mdObject - the source metadata object, cannot be null
        Returns:
        the Main Table for given mdObject, or null if no table find
      • getMainDbViewDef

        public static DbViewTableDef getMainDbViewDef​(TypeItem type)
        Returns tables list by type.
        Parameters:
        type - type (not null)
        Returns:
        tables, contained in type
      • getRlsFields

        public static List<DbViewFieldDef> getRlsFields​(Object input)
        Returns object fields for rls.
        Parameters:
        input - the input object, cannot be null
        Returns:
        the list rls fields