KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > commons > exception > UniqueObjectException


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.commons.exception;
6 /*
7  * @author: Tuan Nguyen
8  * @version: $Id: UniqueObjectException.java,v 1.1 2004/10/21 15:23:40 tuan08 Exp $
9  * @since: 0.0
10  * @email: tuan08@yahoo.com
11  */

12 public class UniqueObjectException extends ExoMessageException {
13   
14   public UniqueObjectException(String JavaDoc messageKey) {
15     super(messageKey) ;
16   }
17   
18   public UniqueObjectException(String JavaDoc messageKey, Object JavaDoc[] args) {
19     super(messageKey, args) ;
20   }
21   
22   public String JavaDoc getExceptionDescription() {
23     return "Usually, this exception is raised when the system detect 2 or more " +
24            "objects with the same id the database or a tree of components";
25   }
26   
27   public String JavaDoc getErrorCode() { return "UNIQUE_CONSTRAINT: " ; }
28 }
Popular Tags