if (args.length != 3) throw new WrongNumberOfArguments("Requires three arguments: the domain to transfer, the full path to the adapter-queries-to-qep.conf file, and the full path to the shrine.conf file.")
val domain = args(0)
val localConfig = args(1)
val shrineConfig = args(2)
val config: Config = ConfigFactory.parseFile(new File(localConfig)).withFallback(ConfigFactory.parseFile(new File(shrineConfig))).withFallback(ConfigFactory.load())
val adapterDataSource: DataSource = TestableDataSourceCreator.dataSource(config.getConfig("shrine.adapter.query.database"))
val squerylAdapter: DatabaseAdapter = SquerylDbAdapterSelecter.determineAdapter(config.getString("shrine.shrineDatabaseType"))
val squerylInitializer: SquerylInitializer = new DataSourceSquerylInitializer(adapterDataSource, squerylAdapter)
val squerylAdapterTables: AdapterTables = new AdapterTables
val breakdownTypes = config.getOptionConfigured("breakdownResultOutputTypes", ResultOutputTypes.fromConfig).getOrElse(Set.empty)
val adapterDao: AdapterDao = new SquerylAdapterDao(squerylInitializer, squerylAdapterTables)(breakdownTypes)
val adapterQueries: Seq[ShrineQuery] = adapterDao.findQueriesByDomain(domain)
println(s"Found ${adapterQueries.size} queries for $domain in the adapter's table")