Class GeneralUtils


  • public final class GeneralUtils
    extends Object
    This class contains some important methods to work with the main dataholding classes like SQLTable, SQLDatabase etc. It also provides methods for loading the DatabaseModel by reflection (including Plugin-based DatabaseModel-types)
    handling the cache or provide es for executing parallel tasks and more.
    • Field Detail

      • es

        public static ExecutorService es
        This is used for executing the sqls of each editor
    • Method Detail

      • getAllDependendTablesByDepth

        public static Set<SQLTable> getAllDependendTablesByDepth​(int depthCount,
                                                                 SQLTable table,
                                                                 boolean onlyRealDependencys)
        Gets all Tables dependend to the given table and all dependend tables of the depndencies themselfs. So this method will recursifly loop through all dependencies restricted to the (max)-depthCount and collect the tables in a list and returns it. Also, you can choose if you include manually configured dependencys (configured over the gui) or not.
        Parameters:
        depthCount -
        table -
        onlyRealDependencys -
        Returns:
      • getAllDirectDependendTables

        public static Set<SQLTable> getAllDirectDependendTables​(SQLTable table,
                                                                boolean onlyRealDependencys)
        Gets all Tables dependend to the given table and all dependend tables of the depndencies themselfs. So this method will recursifly loop through all dependencies and collect the tables in a list and returns it. Also, you can choose if you include manually configured dependencys (configured over the gui) or not.
        Parameters:
        table -
        onlyRealDependencys -
        Returns:
      • getAllNonPrimaryIndexes

        public static List<SQLIndex> getAllNonPrimaryIndexes​(SQLTable table)
      • getListOfDriverSettings

        public static List<DriverSetting> getListOfDriverSettings()
      • clearCache

        public static void clearCache()
      • updateCache

        public static void updateCache​(ISQLItem<?,​?> item,
                                       boolean isDelete)