if (unit.isActive(now) && unit.getType() == PartyType.DEPARTMENT) {
if (unit.isActive(now) && unit.getType() == PartyTypeEnum.DEPARTMENT) {
    public static List<Unit> readAllDepartmentUnits() {        final List<Unit> result = new ArrayList<Unit>();        final Date now = Calendar.getInstance().getTime();        for (final Unit unit : RootDomainObject.readAllUnits()) {            if (unit.isActive(now) && unit.getType() == PartyType.DEPARTMENT) {                result.add(unit);            }        }        return result;    }