Beispiel #1
0
 public static void saveChatMessage(ChatMessage chatMessage)
     throws ReflectiveOperationException, SQLException {
   try (Connection connection = ConnectionManager.getConnection()) {
     PreparedStatement statement = connection.prepareStatement(INSERT_CHAT_MESSAGE);
     Transformer.valueIntoPreparedStatement(statement, chatMessage, INSERT_CHAT_MESSAGE_ORDER);
     statement.executeUpdate();
   }
 }