OA????????????????
???????????? ???????[ 2013/8/16 13:58:44 ] ????????
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import cn.itcast.oa.domain.MenuItem;
public class MenuitemTest {
@Test
public void addMenuItem(){
ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring/applicationContext.xml");
SessionFactory sessionFactory = (SessionFactory)applicationContext.getBean("sessionFactory");
Session session = sessionFactory.openSession();
Transaction transaction = session.beginTransaction();
/*
* ?????
*/
MenuItem MenuItemitem1 = new MenuItem();
MenuItemitem1.setMid(1L);
MenuItemitem1.setIcon("css/images/MenuIcon/FUNC20082.gif");
MenuItemitem1.setName("???????");
MenuItemitem1.setPid(0L);
//Menuitemitem1.setChecked(false);
MenuItemitem1.setIsParent(true);
MenuItem MenuItem2 = new MenuItem();
MenuItem2.setMid(2L);
MenuItem2.setIcon("css/images/MenuIcon/FUNC20001.gif");
MenuItem2.setName("?????");
//MenuItem2.setChecked(false);
MenuItem2.setPid(1L);
MenuItem2.setIsParent(true);
MenuItem MenuItem21 = new MenuItem();
MenuItem21.setMid(21L);
MenuItem21.setIcon("css/images/MenuIcon/FUNC20054.gif");
MenuItem21.setName("???????");
//MenuItem21.setChecked(false);
MenuItem21.setPid(2L);
MenuItem21.setIsParent(false);
MenuItem MenuItem22 = new MenuItem();
MenuItem22.setMid(22L);
MenuItem22.setIcon("css/images/MenuIcon/FUNC23700.gif");
MenuItem22.setName("??????");
//MenuItem22.setChecked(false);
MenuItem22.setPid(2L);
MenuItem22.setIsParent(false);
MenuItem MenuItem23 = new MenuItem();
MenuItem23.setMid(23L);
MenuItem23.setIcon("css/images/MenuIcon/FUNC20069.gif");
MenuItem23.setName("???????");
//MenuItem23.setChecked(false);
MenuItem23.setPid(2L);
MenuItem23.setIsParent(false);
MenuItem MenuItem24 = new MenuItem();
MenuItem24.setMid(24L);
MenuItem24.setIcon("css/images/MenuIcon/FUNC20056.gif");
MenuItem24.setName("???????");
//MenuItem24.setChecked(false);
MenuItem24.setPid(2L);
MenuItem24.setIsParent(false);
MenuItem MenuItem25 = new MenuItem();
MenuItem25.setMid(25L);
MenuItem25.setIcon("css/images/MenuIcon/time_date.gif");
MenuItem25.setName("???");
//MenuItem25.setChecked(false);
MenuItem25.setPid(2L);
MenuItem25.setIsParent(false);
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11