DataBaseHelpter.java
2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package com.lijinji.call.util;
import com.lijinji.call.WMSApplication;
import com.lijinji.call.bean.ActivityIslandBean;
import com.lijinji.call.bean.LineBean;
import com.lijinji.call.bean.ProductBean;
import com.lijinji.call.bean.ProductTransBean;
import com.lijinji.call.bean.RGVUserBean;
import com.lijinji.call.bean.RolesBean;
import com.lijinji.call.bean.WorkProcessBean;
import com.lijinji.call.bean.WorkProcessDetailBean;
import com.lijinji.call.wmsgreendao.DaoManager;
import java.util.List;
public class DataBaseHelpter {
public static List<ActivityIslandBean> queryAllActivityIsland(){
return DaoManager.getInstance(WMSApplication.getContext()).getDaoSession().loadAll(ActivityIslandBean.class);
}
public static void insertActivityIsland(ActivityIslandBean activityIslandBean) {
DaoManager.getInstance(WMSApplication.getContext()).getDaoSession().getActivityIslandBeanDao().insert(activityIslandBean);
}
public static List<LineBean> queryAllLine(){
return DaoManager.getInstance(WMSApplication.getContext()).getDaoSession().loadAll(LineBean.class);
}
public static void insertLine(LineBean lineBean) {
DaoManager.getInstance(WMSApplication.getContext()).getDaoSession().getLineBeanDao().insert(lineBean);
}
public static List<ProductBean> queryAllProduct(){
return DaoManager.getInstance(WMSApplication.getContext()).getDaoSession().loadAll(ProductBean.class);
}
public static void insertProduct(ProductBean productBean) {
DaoManager.getInstance(WMSApplication.getContext()).getDaoSession().getProductBeanDao().insert(productBean);
}
public static List<RGVUserBean> queryAllUser(){
return DaoManager.getInstance(WMSApplication.getContext()).getDaoSession().loadAll(RGVUserBean.class);
}
public static void insertUser(RGVUserBean rgvUserBean) {
DaoManager.getInstance(WMSApplication.getContext()).getDaoSession().getRGVUserBeanDao().insert(rgvUserBean);
}
public static <T> void deleteAll(Class<T> entityClass) {
DaoManager.getInstance(WMSApplication.getContext()).getDaoSession().deleteAll(entityClass);
}
public static List<WorkProcessBean> queryAllWorkProcess(){
return DaoManager.getInstance(WMSApplication.getContext()).getDaoSession().loadAll(WorkProcessBean.class);
}
public static void insertWorkProcess(WorkProcessBean workProcessBean) {
// DaoManager.getInstance(WMSApplication.getContext()).getDaoSession().getWorkProcessBeanDao().insert(workProcessBean);
}
public static List<WorkProcessDetailBean> queryAllWorkProcessDetailBean(){
return DaoManager.getInstance(WMSApplication.getContext()).getDaoSession().loadAll(WorkProcessDetailBean.class);
}
public static void insertWorkProcessDetailBean(WorkProcessDetailBean workProcessDetailBean) {
DaoManager.getInstance(WMSApplication.getContext()).getDaoSession().getWorkProcessDetailBeanDao().insert(workProcessDetailBean);
}
}