You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BatchUpdateException.java 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. Copyright (c) 2013 James Ahlborn
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. package com.healthmarketscience.jackcess;
  14. /**
  15. * JackcessException which is thrown from multi-add-row {@link Table} methods
  16. * which indicates how many rows were successfully written before the
  17. * underlying failure was encountered.
  18. *
  19. * @author James Ahlborn
  20. */
  21. public class BatchUpdateException extends JackcessException
  22. {
  23. private static final long serialVersionUID = 20131123L;
  24. private final int _updateCount;
  25. public BatchUpdateException(int updateCount, String msg, Throwable cause) {
  26. super(msg + ": " + cause, cause);
  27. _updateCount = updateCount;
  28. }
  29. public int getUpdateCount() {
  30. return _updateCount;
  31. }
  32. }