private void createTheUserForSingleUserMode(){
  if (!isInSingleUserMode()) {
    return;
  }
  try {
    final User user=dbLogic.getOrCreateUser(singleUserName);
    if (user == null) {
      logger.log(Level.SEVERE,"Could not create single user user");
      return;
    }
    if (!user.getIsSingleUser()) {
      user.setIsSingleUser(true);
    }
    if (!user.getIsAdmin()) {
      user.setIsAdmin(true);
    }
    dbLogic.commit();
  }
 catch (  final PersistenceException e) {
    logger.log(Level.SEVERE,"Could not create single user user",e);
  }
}

private void createTheUserForSingleUserMode ( ) { if ( ! isInSingleUserMode ( ) ) { return ; } try { final User user = dbLogic . getOrCreateUser ( singleUserName ) ; if ( user == null ) { logger . log ( Level . SEVERE , "Could not create single user user" ) ; return ; } if ( ! user . getIsSingleUser ( ) ) { user . setIsSingleUser ( true ) ; } if ( ! user . getIsAdmin ( ) ) { user . setIsAdmin ( true ) ; } dbLogic . commit ( ) ; } catch ( final PersistenceException e ) { logger . log ( Level . SEVERE , "Could not create single user user" , e ) ; } }
creates the user for single user mode .
