2004.04.29


com.jdc.rdb.sql.dml.insert
Class InsertStatus

java.lang.Object
  |
  +--com.jdc.lang.Object
        |
        +--com.jdc.rdb.sql.dml.DMLStatus
              |
              +--com.jdc.rdb.sql.dml.insert.InsertStatus

public class InsertStatus
extends DMLStatus

InsertStatus represents the execution status of an Insert SQL statement. This class provides the following Insert statement execution status information:

Note:
The InsertStatus class is immutable.

Version:
2.0
Author:
Jay Damon
See Also:
Insert

Field Summary
 
Fields inherited from class com.jdc.lang.Object
string
 
Method Summary
 SQLException getException()
          Returns the Insert statement exception, if one occurred.
 int getRowCount()
          Returns the number of Database Table rows inserted.
 boolean isDuplicate()
          Returns true if Insert statement attempts to insert a duplicate row into the Database Table.
 boolean isSuccessful()
          Returns true if the Insert statement execution is successful.
 
Methods inherited from class com.jdc.rdb.sql.dml.DMLStatus
getSQL, getStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getException

public SQLException getException()
Returns the Insert statement exception, if one occurred.

Returns:
The Insert statement exception.

isDuplicate

public boolean isDuplicate()
Returns true if Insert statement attempts to insert a duplicate row into the Database Table. This method checks for an SQLSTATE value of 23505.

Note:
All database vendors may not return the appropriate SQLSTATE value.

Returns:
True if the Insert statement attempts to insert a duplicate row.
False if the Insert statement execution is successful.

isSuccessful

public boolean isSuccessful()
Returns true if the Insert statement execution is successful.

Overrides:
isSuccessful in class DMLStatus
Returns:
True if the Insert statement execution is successful.
False if the Insert statement execution is not successful.

getRowCount

public int getRowCount()
Returns the number of Database Table rows inserted.

Returns:
The number of Database Table rows inserted.

2004.04.29



Copyright © 2004 J. Damon & Co.; All Rights Reserved WorldWide.