View Javadoc

1   /*
2    * Copyright 2004-2005 Emmanouil Batsis
3    * 
4    * Licensed under the GNU General Public License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.gnu.org/licenses/gpl.txt
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   * 
16   */
17  package com.geekologue.md4j.business;
18  
19  import java.util.Set;
20  
21  /***
22   * Used to report uniqueness constraint violation.
23   * 
24   * @author manos
25   * 
26   */
27  public class BrokenConstraintsException extends RuntimeException {
28      /***
29       * The set of property names that where violated
30       */
31      private Set violated = null;
32  
33      /***
34       * 
35       */
36      public BrokenConstraintsException(Set violations) {
37          super();
38          this.violated = violations;
39      }
40  
41      /***
42       * 
43       */
44      public BrokenConstraintsException() {
45          throw new UnsupportedOperationException();
46      }
47  
48      /***
49       * @param arg0
50       * @param arg1
51       */
52      public BrokenConstraintsException(String arg0, Throwable arg1) {
53          throw new UnsupportedOperationException();
54      }
55  
56      /***
57       * @param arg0
58       */
59      public BrokenConstraintsException(String arg0) {
60          throw new UnsupportedOperationException();
61      }
62  
63      /***
64       * @param arg0
65       */
66      public BrokenConstraintsException(Throwable arg0) {
67          throw new UnsupportedOperationException();
68      }
69  
70      /***
71       * Get the set of property names that where violated
72       * 
73       * @return the set of property names that where violated
74       */
75      public Set getViolated() {
76          return this.violated;
77      }
78  }