1 16 17 package org.springframework.jdbc; 18 19 import org.springframework.dao.DataRetrievalFailureException; 20 21 29 public class IncorrectResultSetColumnCountException extends DataRetrievalFailureException { 30 31 private int expectedCount; 32 33 private int actualCount; 34 35 36 41 public IncorrectResultSetColumnCountException(int expectedCount, int actualCount) { 42 super("Incorrect column count: expected " + expectedCount + ", actual " + actualCount); 43 this.expectedCount = expectedCount; 44 this.actualCount = actualCount; 45 } 46 47 53 public IncorrectResultSetColumnCountException(String msg, int expectedCount, int actualCount) { 54 super(msg); 55 this.expectedCount = expectedCount; 56 this.actualCount = actualCount; 57 } 58 59 60 63 public int getExpectedCount() { 64 return expectedCount; 65 } 66 67 70 public int getActualCount() { 71 return actualCount; 72 } 73 74 } 75 | Popular Tags |