};
public ODocument create(String username, String password, String role) throws UserAlreadyExistsException {
OrientGraph db = DbHelper.getOrientGraphConnection();
if (existsUserName(username)) throw new UserAlreadyExistsException("User " + username + " already exists");
OUser user=null;
if (role==null) user=db.getRawGraph().getMetadata().getSecurity().createUser(username,password,new String[]{DefaultRoles.REGISTERED_USER.toString()});
else {
ORole orole = RoleDao.getRole(role);
if (orole==null) throw new InvalidParameterException("Role " + role + " does not exists");