if (RootDomainObject.getInstance().getUsers().isEmpty()) {
if (RootDomainObject.getInstance().getUsers().size() == 1) {
    public static String updateIstUsername(Person person) {        if (person.getIstUsername() == null) {            String ist = "ist";            String istUsername = null;             String username = person.getUsername().toUpperCase().trim();                        if(username.startsWith("D") && person.getTeacher() != null) {                istUsername = ist + sumNumber(username.substring(1), 10000);            }else if(username.startsWith("F") && person.getEmployee() != null) {                istUsername = ist + sumNumber(username.substring(1), 20000);            }else if(username.startsWith("B") && person.getGrantOwner() != null) {                istUsername = ist + sumNumber(username.substring(1), 30000);            }else if(username.startsWith("M") && person.getStudentByType(DegreeType.MASTER_DEGREE) != null) {                istUsername = ist + sumNumber(username.substring(1), 40000);            }else if(username.startsWith("L") && person.getStudentByType(DegreeType.DEGREE) != null) {                istUsername = ist + sumNumber(username.substring(1), 100000);            }else if(username.startsWith("C")) {                return person.getIstUsername();            }else if(username.startsWith("P")){            	if (RootDomainObject.getInstance().getUsers().isEmpty()) {            		istUsername = ist + "0000001";            	} else {            		User user = Collections.max(RootDomainObject.getInstance().getUsers(), User.USER_UID_COMPARATOR);            		Integer maxIstNumber = Integer.valueOf(user.getUserUId().replaceFirst("[a-zA-Z]+", ""));            		istUsername = ist + (maxIstNumber + 1);            	}            }                        return istUsername;        }        return person.getIstUsername();    }