Exemplo n.º 1
0
 @Autowired
 public DatabaseAccessHelper(
     DataSource dataSource,
     SqlMapClient sqlMapClient,
     StageDao stageDao,
     JobInstanceDao jobInstanceDao,
     PropertyDao propertyDao,
     PipelineDao pipelineDao,
     MaterialRepository materialRepository,
     SessionFactory sessionFactory,
     PipelineTimeline pipelineTimeline,
     TransactionTemplate transactionTemplate,
     TransactionSynchronizationManager transactionSynchronizationManager,
     GoCache goCache,
     PipelineService pipelineService,
     InstanceFactory instanceFactory)
     throws AmbiguousTableNameException {
   this.dataSource = dataSource;
   this.sqlMapClient = sqlMapClient;
   this.stageDao = stageDao;
   this.jobInstanceDao = jobInstanceDao;
   this.propertyDao = propertyDao;
   this.pipelineTimeline = pipelineTimeline;
   this.transactionTemplate = transactionTemplate;
   this.transactionSynchronizationManager = transactionSynchronizationManager;
   this.goCache = goCache;
   this.pipelineService = pipelineService;
   this.instanceFactory = instanceFactory;
   this.pipelineDao = (PipelineSqlMapDao) pipelineDao;
   this.materialRepository = materialRepository;
   setSessionFactory(sessionFactory);
   initialize(dataSource);
 }
Exemplo n.º 2
0
 @Deprecated // use Autowired version
 public DatabaseAccessHelper(DataSource dataSource) throws AmbiguousTableNameException {
   this.dataSource = dataSource;
   initialize(dataSource);
 }
Exemplo n.º 3
0
 @Deprecated // Should not be creating a new spring context for every test
 public DatabaseAccessHelper() throws AmbiguousTableNameException {
   ClassPathXmlApplicationContext context = createDataContext();
   dataSource = (DataSource) context.getBean("dataSource");
   initialize(dataSource);
 }