package org.tt.core.dm;

import org.tt.core.fetch.AbstractDataFetcher;
import org.tt.core.sql.AbstractQueries;
import org.tt.core.sql.AbstractSQLManager;

public class TTFactory {
    private static AbstractSQLManager sqlm;
    private static AbstractQueries qrs;
    private static AbstractDataFetcher df;
    private static TTFactory ttf;

    private TTFactory() {
    }

    public static TTFactory getInstance() {
        if (ttf == null) {
            ttf = new TTFactory();
        }

        return ttf;
    }

    public void setSQLManager(AbstractSQLManager sqlm) {
        this.sqlm = sqlm;
    }

    public void setSQLQueries(AbstractQueries qrs) {
        this.qrs = qrs;
    }

    public void setDataFetcher(AbstractDataFetcher df) {
        this.df = df;
    }

    public TTUpdateManager produceUpdateManager() {
        return new TTUpdateManager(sqlm, df);
    }

    public TTDeliveryManager produceDeliveryManager() {
        return new TTDeliveryManager(sqlm);
    }


}

@@ -221,48 +221,8 @@
 lm;%0A
-    private static AbstractQueries qrs;%0A
     
@@ -525,16 +525,37 @@
 ger sqlm
+, AbstractQueries qrs
 ) %7B%0A    
@@ -584,56 +584,32 @@
     
-%7D%0A%0A
     
-public void setSQLQueries(Abstrac
+this.sqlm.se
 tQueries
  qrs
@@ -608,38 +608,13 @@
 ries
- 
+(
 qrs)
- %7B%0A        this.qrs = qrs
 ;%0A  

Make setSQLManager forced to load queries to avoid NPE and misunderstanding