package com.javahonk;

import java.util.List;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.javahonk.dao.GenericDao;

public class PasswordEncyrptorTestApp {

	private static final Logger logger = LogManager.getLogger(PasswordEncyrptorTestApp.class.getName());

	public static void main(String[] args) {

		logger.info("Starting HibernateTestApp...");

		ApplicationContext context = new ClassPathXmlApplicationContext("spring-context.xml");

		GenericDao<?> genericDao = context.getBean(GenericDao.class);
		
		List<?> dataList2 = genericDao.getEquitySwapByHibernateQuery(20151028);
		
		logger.info("Got the data: {}", dataList2);

		((AbstractApplicationContext) context).close();

	}

}
