Class SourcesEditProvider

    • Constructor Detail

      • SourcesEditProvider

        public SourcesEditProvider​(QueryWizardSource source,
                                   boolean needRefreshModelAfterAdd)
        Parameters:
        source - query schema source
        needRefreshModelAfterAdd - is necessary update model after add new source
      • SourcesEditProvider

        public SourcesEditProvider​(QueryWizardSource source)
        Parameters:
        source - query schema source
    • Method Detail

      • getVirtualTableForSource

        public static DbViewSelectDef getVirtualTableForSource​(QuerySchemaSource virtTable)
        Get DbView for virtual table
        Parameters:
        virtTable - - virtual table source
        Returns:
        DbView for virtual table. Return null, if not virtual table
      • calcAlias

        public static String calcAlias​(String startAlias,
                                       QueryWizardSource source)
        Calculate unique source alias
        Parameters:
        startAlias - - base alias
        source - - query wizard source
        Returns:
        - unique alias
      • removeNonexistentFields

        public static boolean removeNonexistentFields​(QuerySchemaSource source,
                                                      QueryWizardSource qwSource)
        Remove nonexistent fields in source from query
        Parameters:
        source - - source alias
        qwSource - - query wizard source
        Returns:
        true if removed one or more elements
      • removeNonexistentFields

        public static boolean removeNonexistentFields​(QuerySchemaSource source,
                                                      QueryWizardSource qwSource,
                                                      List<?> fields)
        Remove nonexistent fields in source from query
        Parameters:
        source - - source alias
        qwSource - - query wizard source
        fields - - new fields collection, for temp table
        Returns:
        true if removed one or more elements
      • isFieldContainField

        public static boolean isFieldContainField​(String fieldName1,
                                                  String fieldName2)
        Is field1 contain name of field2
        Parameters:
        fieldName1 - - field name
        fieldName2 - - field name
        Returns:
        - true if field1 contain name of field1
      • setItemData

        public boolean setItemData​(int itemFuture,
                                   Object item,
                                   Object newValue)
        Overrides:
        setItemData in class AbstractQueryWizardEditProvider
        Parameters:
        itemFuture - which item future change
        item - item at which data need to changed
        newValue - new future value
        Returns:
        true if future was changed