public boolean addUser(@NotNull User user){
  int updatedRows=0;
  try {
    final PreparedStatement preparedStatement=connetion.getPreparedStatement("INSERT INTO Users (userId, userHash) " + "VALUES (?,?)");
    preparedStatement.setInt(1,user.getUserId());
    if ((user.getUserHash() == null) || (user.getUserHash() == 0L)) {
      preparedStatement.setNull(2,Types.NUMERIC);
    }
 else {
      preparedStatement.setLong(2,user.getUserHash());
    }
    updatedRows=preparedStatement.executeUpdate();
  }
 catch (  SQLException e) {
    BotLogger.error(LOGTAG,e);
  }
  return updatedRows > 0;
}

public boolean addUser ( @ NotNull User user ) { int updatedRows = 0 ; try { final PreparedStatement preparedStatement = connetion . getPreparedStatement ( "INSERT INTO Users (userId, userHash) " + "VALUES (?,?)" ) ; preparedStatement . setInt ( 1 , user . getUserId ( ) ) ; if ( ( user . getUserHash ( ) == null ) || ( user . getUserHash ( ) == 0L ) ) { preparedStatement . setNull ( 2 , Types . NUMERIC ) ; } else { preparedStatement . setLong ( 2 , user . getUserHash ( ) ) ; } updatedRows = preparedStatement . executeUpdate ( ) ; } catch ( SQLException e ) { BotLogger . error ( LOGTAG , e ) ; } return updatedRows > 0 ; }
adds an user to the database
