1 24 package org.riotfamily.riot.dao; 25 26 import org.springframework.context.MessageSourceResolvable; 27 import org.springframework.dao.DataAccessException; 28 29 33 public class RioDaoException extends DataAccessException 34 implements MessageSourceResolvable { 35 36 private String code; 37 38 private Object [] arguments; 39 40 public RioDaoException(String code, String msg) { 41 this(code, new Object [] {}, msg); 42 } 43 44 public RioDaoException(String code, Object [] arguments, String msg) { 45 this(code, arguments, msg, null); 46 } 47 48 public RioDaoException(String code, Object [] arguments, String msg, Throwable cause) { 49 super(msg, cause); 50 this.code = code; 51 this.arguments = arguments; 52 } 53 54 public Object [] getArguments() { 55 return this.arguments; 56 } 57 58 public String getCode() { 59 return this.code; 60 } 61 62 public String [] getCodes() { 63 return new String [] { code }; 64 } 65 66 public String getDefaultMessage() { 67 return getMessage(); 68 } 69 70 } 71 | Popular Tags |