org.openmrs.api
Class ConceptNameInUseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.openmrs.api.APIException
                  extended by org.openmrs.api.ConceptNameInUseException
All Implemented Interfaces:
java.io.Serializable

public class ConceptNameInUseException
extends APIException

This exception is thrown when one attempts to delete a concept that has a conceptName that is being used by an observation

See Also:
ObsService.getObservationCount(java.util.List, boolean), ConceptService.saveConcept(org.openmrs.Concept), Serialized Form

Constructor Summary
ConceptNameInUseException()
          Generic constructor that gives a normal message about editing not being allowed to the user.
ConceptNameInUseException(java.lang.String message)
          Convenience constructor to give the user a message other than normal default one
ConceptNameInUseException(java.lang.String message, java.lang.Throwable cause)
          Convenience constructor to give the user a message other than the normal one and to chain this exception with a parent exception.
ConceptNameInUseException(java.lang.Throwable cause)
          Convenience constructor used to only set the parent exception to chain with.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConceptNameInUseException

public ConceptNameInUseException()
Generic constructor that gives a normal message about editing not being allowed to the user.


ConceptNameInUseException

public ConceptNameInUseException(java.lang.String message)
Convenience constructor to give the user a message other than normal default one

Parameters:
message - the String to show to the user as to why the conceptName's name can't be changed

ConceptNameInUseException

public ConceptNameInUseException(java.lang.String message,
                                 java.lang.Throwable cause)
Convenience constructor to give the user a message other than the normal one and to chain this exception with a parent exception.

Parameters:
message - the String to show to the user as to why the conceptName's name can't be changed
cause - the parent exception

ConceptNameInUseException

public ConceptNameInUseException(java.lang.Throwable cause)
Convenience constructor used to only set the parent exception to chain with. This does not set the error message for the user as to why an exception is being thrown. The ConceptNameInUseException(String, Throwable) constructor is preferred over this one.

Parameters:
cause - the parent exception

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change