📄 catalogdaotest.java
字号:
package org.bestteam.dao.test;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.bestteam.dao.CatalogDao;
import org.bestteam.domain.Catalog;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import junit.framework.TestCase;
public class CatalogDaoTest extends TestCase {
private CatalogDao catalogDao;
protected void setUp() throws Exception {
super.setUp();
ApplicationContext app = new ClassPathXmlApplicationContext("applicationContext.xml");
catalogDao = (CatalogDao) app.getBean("catalogDao");
}
protected void tearDown() throws Exception {
super.tearDown();
}
public void testCatalogDao() {
// List list=(List) catalogDao.findByCatalogId(new Integer(2));
// Catalog catalog=(Catalog) list.get(0);
//// Catalog catalog=new Catalog();
// catalog.setCatalogName("�ֻ�");
// catalogDao.saveOrUpdate(catalog);
// List list=catalogDao.findByPropertyIsNull("PARENT_CATEGORY_ID");
// Iterator it=list.iterator();
// while(it.hasNext()){
// Catalog catalog=(Catalog) it.next();
// System.out.println(catalog.getCatalogName());
// Set sublist = catalog.getChildCatalogs();
// Iterator itt=sublist.iterator();
//// int size = sublist.size();
// while (itt.hasNext())
// {
// Catalog childCatalog=(Catalog) itt.next();
// System.out.println(" "+childCatalog.getCatalogName());
// }
// }
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -