org.melati.poem.dbms
Class DuplicateKeySQLPoemException

Package class diagram package DuplicateKeySQLPoemException
java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.melati.poem.PoemException
                  extended by org.melati.poem.NormalPoemException
                      extended by org.melati.poem.SQLPoemException
                          extended by org.melati.poem.ExecutingSQLPoemException
                              extended by org.melati.poem.dbms.DuplicateKeySQLPoemException
All Implemented Interfaces:
Serializable

public class DuplicateKeySQLPoemException
extends ExecutingSQLPoemException

Thrown when an attempt to insert a value which is already present in a column with a unique index is made.

Author:
WilliamC@paneris.org
See Also:
Serialized Form

Field Summary
 String column
          The Column we are dealing with.
 boolean insert
          Whether this was an insert operation or not.
 String table
          The Table we are dealing with.
 
Fields inherited from class org.melati.poem.ExecutingSQLPoemException
sql
 
Fields inherited from class org.melati.poem.PoemException
subException
 
Constructor Summary
DuplicateKeySQLPoemException(Column column, String sql, boolean insert, SQLException e)
          Constructor.
DuplicateKeySQLPoemException(Table table, String sql, boolean insert, SQLException e)
          Constructor.
 
Method Summary
 String getColumn()
           
 String getMessage()
          The detail message which may be null.
 String getTable()
           
 boolean getWasInsert()
           
 
Methods inherited from class org.melati.poem.PoemException
getCoreMessage, initCause, innermostException, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

table

public String table
The Table we are dealing with.


column

public String column
The Column we are dealing with.


insert

public boolean insert
Whether this was an insert operation or not.

Constructor Detail

DuplicateKeySQLPoemException

public DuplicateKeySQLPoemException(Table table,
                                    String sql,
                                    boolean insert,
                                    SQLException e)
Constructor.


DuplicateKeySQLPoemException

public DuplicateKeySQLPoemException(Column column,
                                    String sql,
                                    boolean insert,
                                    SQLException e)
Constructor.

Method Detail

getTable

public final String getTable()
Returns:
The table name.

getColumn

public final String getColumn()
Returns:
The column name.

getWasInsert

public final boolean getWasInsert()
Returns:
whether operation was an insert

getMessage

public String getMessage()
Description copied from class: PoemException
The detail message which may be null.

Overrides:
getMessage in class ExecutingSQLPoemException
Returns:
The detail message.
See Also:
Throwable.getMessage()


Copyright © 2000-2010 PanEris. All Rights Reserved.