資源簡(jiǎn)介
包含寵物商店源碼。mvc模式開發(fā)。讓培訓(xùn)的學(xué)生一步步了解三層架構(gòu)。

代碼片段和文件信息
package?dao;
import?java.sql.Connection;??
import?java.sql.PreparedStatement;
import?java.sql.ResultSet;
import?java.sql.SQLException;
import?util.DatabaseUtil;
public?class?baseDao?{
private?Connection?conn;
public?baseDao(Connection?conn)?{
super();
this.conn?=?conn;
}
//?查存方法返回結(jié)果集
protected?ResultSet?executeQuery(String?sql?object...?params)?{
ResultSet?rs?=?null;
PreparedStatement?ps?=?null;
try?{
ps?=?conn.prepareStatement(sql);
for?(int?i?=?0;?i? ps.setobject(i?+?1?params[i]);
}
rs?=?ps.executeQuery();
}?catch?(SQLException?e)?{
e.printStackTrace();
}?
return?rs;
}
//?增刪改方法
protected?int?executeupdate(String?sql?object...?params)?{
int?rs?=?-1;
PreparedStatement?ps?=?null;
try?{
ps?=?conn.prepareStatement(sql);
for?(int?i?=?0;?i? ps.setobject(i?+?1?params[i]);
}
rs?=?ps.executeUpdate();
}?catch?(SQLException?e)?{
e.printStackTrace();
}?finally?{
DatabaseUtil.closeAll(null?ps?null);
}
return?rs;
}
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-03-01?11:10??javaPetStore\
?????目錄???????????0??2018-03-01?11:10??javaPetStore\.settings\
?????目錄???????????0??2018-04-19?23:43??javaPetStore\bin\
?????目錄???????????0??2018-04-19?23:43??javaPetStore\bin\dao\
?????目錄???????????0??2018-04-19?23:43??javaPetStore\bin\dao\impl\
?????目錄???????????0??2018-04-19?23:43??javaPetStore\bin\entity\
?????目錄???????????0??2018-04-19?23:43??javaPetStore\bin\service\
?????目錄???????????0??2018-04-19?23:43??javaPetStore\bin\service\impl\
?????目錄???????????0??2018-04-19?23:43??javaPetStore\bin\test\
?????目錄???????????0??2018-04-19?23:43??javaPetStore\bin\util\
?????目錄???????????0??2018-03-01?11:11??javaPetStore\lib\
?????目錄???????????0??2018-03-01?11:10??javaPetStore\resource\
?????目錄???????????0??2018-03-01?11:10??javaPetStore\src\
?????目錄???????????0??2018-03-01?11:11??javaPetStore\src\dao\
?????目錄???????????0??2018-03-01?11:11??javaPetStore\src\dao\impl\
?????目錄???????????0??2018-03-01?11:10??javaPetStore\src\entity\
?????目錄???????????0??2018-03-01?11:11??javaPetStore\src\service\
?????目錄???????????0??2018-03-01?11:11??javaPetStore\src\service\impl\
?????目錄???????????0??2018-03-16?15:00??javaPetStore\src\test\
?????目錄???????????0??2018-03-01?11:10??javaPetStore\src\util\
?????文件?????????624??2018-03-01?11:10??javaPetStore\.classpath
?????文件?????????388??2018-03-01?11:10??javaPetStore\.project
?????文件?????????598??2018-03-01?11:10??javaPetStore\.settings\org.eclipse.jdt.core.prefs
?????文件????????1760??2018-05-29?00:43??javaPetStore\bin\dao\ba
?????文件?????????380??2018-05-29?00:43??javaPetStore\bin\dao\IAccountDao.class
?????文件????????3456??2018-05-29?00:43??javaPetStore\bin\dao\impl\AccountDao.class
?????文件????????3533??2018-05-29?00:43??javaPetStore\bin\dao\impl\PetDao.class
?????文件????????3072??2018-05-29?00:43??javaPetStore\bin\dao\impl\PetOwnerDao.class
?????文件????????3076??2018-05-29?00:43??javaPetStore\bin\dao\impl\PetStoreDao.class
?????文件????????3268??2018-05-29?00:43??javaPetStore\bin\dao\impl\PPPDao.class
?????文件?????????352??2018-05-29?00:43??javaPetStore\bin\dao\IPetDao.class
............此處省略57個(gè)文件信息
評(píng)論
共有 條評(píng)論