Search in sources :

Example 1 with Group

use of info.xiancloud.core.Group in project xian by happyyangyuan.

the class DaoUnitProvider method provideExtraUnits.

@Override
public List<Unit> provideExtraUnits() {
    List<Unit> baseDaoUnits = new ArrayList<>();
    for (DaoGroup daoGroup : DaoGroup.GROUP_LIST) {
        baseDaoUnits.add(new BaseAddDB() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
        baseDaoUnits.add(new BaseDeleteByIdDB() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
        baseDaoUnits.add(new BaseDeleteDB() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
        baseDaoUnits.add(new BasePaginateDB() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
        baseDaoUnits.add(new BaseQueryByIdDB() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
        baseDaoUnits.add(new BaseQueryDB() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
        baseDaoUnits.add(new BaseUpdateByIdDB() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
        baseDaoUnits.add(new BaseUpdateDB() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
        baseDaoUnits.add(new CommitTransaction() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
        baseDaoUnits.add(new RollbackTransaction() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
        baseDaoUnits.add(new BeginTransaction() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
    }
    return baseDaoUnits;
}
Also used : Group(info.xiancloud.core.Group) DaoGroup(info.xiancloud.dao.core.DaoGroup) ArrayList(java.util.ArrayList) Unit(info.xiancloud.core.Unit) DaoGroup(info.xiancloud.dao.core.DaoGroup)

Example 2 with Group

use of info.xiancloud.core.Group in project xian by happyyangyuan.

the class BaseDaoUnitProvider method provideExtraUnits.

@Override
public List<DaoUnit> provideExtraUnits() {
    List<DaoUnit> baseDaoUnits = new ArrayList<>();
    for (DaoGroup daoGroup : DaoGroup.groupList) {
        baseDaoUnits.add(new BaseAddDB() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
        baseDaoUnits.add(new BaseDeleteByIdDB() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
        baseDaoUnits.add(new BaseDeleteDB() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
        baseDaoUnits.add(new BasePaginateDB() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
        baseDaoUnits.add(new BaseQueryByIdDB() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
        baseDaoUnits.add(new BaseQueryDB() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
        baseDaoUnits.add(new BaseUpdateByIdDB() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
        baseDaoUnits.add(new BaseUpdateDB() {

            @Override
            public Group getGroup() {
                return daoGroup;
            }
        });
    }
    return baseDaoUnits;
}
Also used : Group(info.xiancloud.core.Group) DaoGroup(info.xiancloud.dao.group.DaoGroup) DaoUnit(info.xiancloud.dao.group.unit.DaoUnit) ArrayList(java.util.ArrayList) DaoGroup(info.xiancloud.dao.group.DaoGroup)

Aggregations

Group (info.xiancloud.core.Group)2 ArrayList (java.util.ArrayList)2 Unit (info.xiancloud.core.Unit)1 DaoGroup (info.xiancloud.dao.core.DaoGroup)1 DaoGroup (info.xiancloud.dao.group.DaoGroup)1 DaoUnit (info.xiancloud.dao.group.unit.DaoUnit)1