Example #1
0
 public static List<ChatMessage> getChatMessageByClubId(
     Integer clubId, Integer firstIndex, Integer count)
     throws SQLException, ReflectiveOperationException {
   try (Connection connection = ConnectionManager.getConnection()) {
     PreparedStatement statement = connection.prepareStatement(SELECT_CHAT_MESSAGE_BY_CLUB_ID);
     statement.setInt(1, clubId);
     statement.setInt(2, firstIndex);
     statement.setInt(3, count);
     ResultSet resultSet = statement.executeQuery();
     return Transformer.transformResultSetIntoList(resultSet, ChatMessage.class);
   }
 }