org.makumba
Class NotUniqueException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.makumba.InvalidValueException
                  extended by org.makumba.NotUniqueException
All Implemented Interfaces:
Serializable

public class NotUniqueException
extends InvalidValueException

Not-unique is a special case of an InvalidValueException - the value is syntactically correct, but is restricted to only one usage. This exception can be used for single-field and multi-field uniqueness with the respective constructors.

Version:
$Id: NotUniqueException.java 5136 2010-05-18 18:22:33Z rosso_nero $
Author:
Rudolf Mayer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.makumba.InvalidValueException
field, shortMessage
 
Constructor Summary
NotUniqueException(FieldDefinition fd, Object value)
          Uniqueness violation for a single field.
NotUniqueException(String message)
           
NotUniqueException(String primaryField, String message)
           
 
Method Summary
 Map<String,String> getFields()
          gets the field-value pairs for the conflicting fields
 void setFields(Map<String,String> fields)
           
 
Methods inherited from class org.makumba.InvalidValueException
getFieldName, getShortMessage
 
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

NotUniqueException

public NotUniqueException(String message)

NotUniqueException

public NotUniqueException(String primaryField,
                          String message)

NotUniqueException

public NotUniqueException(FieldDefinition fd,
                          Object value)
Uniqueness violation for a single field.

Method Detail

getFields

public Map<String,String> getFields()
gets the field-value pairs for the conflicting fields


setFields

public void setFields(Map<String,String> fields)