Search in sources :

Example 1 with DaoUnit

use of info.xiancloud.dao.group.unit.DaoUnit in project xian by happyyangyuan.

the class DDLAction method check.

@Override
protected UnitResponse check(Unit daoUnit, Map map, Connection connection) {
    UnitResponse unitResponseObject = super.check(daoUnit, map, connection);
    if (!unitResponseObject.getCode().equals(Group.CODE_SUCCESS)) {
        return unitResponseObject;
    }
    DaoUnit daounit = (DaoUnit) daoUnit;
    return DDLChecker.check(daounit);
}
Also used : DaoUnit(info.xiancloud.dao.group.unit.DaoUnit) UnitResponse(info.xiancloud.core.message.UnitResponse)

Example 2 with DaoUnit

use of info.xiancloud.dao.group.unit.DaoUnit 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

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