package com.jqmobile.core.server.db.dao;
import java.sql.Connection;
import com.jqmobile.core.orm.ORM;
import com.jqmobile.core.orm.ORMS;
import com.jqmobile.core.orm.exception.ORMException;
import com.jqmobile.core.orm.exception.ORMNotDBTableException;
import com.jqmobile.core.server.db.orm.ORMFactory;
import com.jqmobile.core.server.service.ServiceUtil;
public class DAO {
public Connection getConnection() {
return ServiceUtil.getInstance().getConnection();
}
protected <T> ORM<T> getORM(Class<T> c) throws ORMNotDBTableException, ORMException{
return ORMFactory.instance(getConnection(), c);
}
protected ORMS getORMS(){
return ORMFactory.instance(getConnection());
}
}