org.apache.derby.impl.sql.execute
Class UniqueIndexSortObserver

java.lang.Object
  extended byorg.apache.derby.impl.sql.execute.BasicSortObserver
      extended byorg.apache.derby.impl.sql.execute.UniqueIndexSortObserver
All Implemented Interfaces:
SortObserver

class UniqueIndexSortObserver
extends BasicSortObserver

Unique index aggregator. Enforces uniqueness when creating a unique index or constraint.

Author:
jerry

Field Summary
private  java.lang.String indexOrConstraintName
           
private  boolean isConstraint
           
private  java.lang.String tableName
           
 
Fields inherited from class org.apache.derby.impl.sql.execute.BasicSortObserver
distinct, doClone
 
Constructor Summary
UniqueIndexSortObserver(boolean doClone, boolean isConstraint, java.lang.String indexOrConstraintName, ExecRow execRow, boolean reuseWrappers, java.lang.String tableName)
           
 
Method Summary
 DataValueDescriptor[] insertDuplicateKey(DataValueDescriptor[] in, DataValueDescriptor[] dup)
          Called prior to inserting a duplicate sort key.
 
Methods inherited from class org.apache.derby.impl.sql.execute.BasicSortObserver
addToFreeList, getArrayClone, insertNonDuplicateKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isConstraint

private boolean isConstraint

indexOrConstraintName

private java.lang.String indexOrConstraintName

tableName

private java.lang.String tableName
Constructor Detail

UniqueIndexSortObserver

public UniqueIndexSortObserver(boolean doClone,
                               boolean isConstraint,
                               java.lang.String indexOrConstraintName,
                               ExecRow execRow,
                               boolean reuseWrappers,
                               java.lang.String tableName)
Method Detail

insertDuplicateKey

public DataValueDescriptor[] insertDuplicateKey(DataValueDescriptor[] in,
                                                DataValueDescriptor[] dup)
                                         throws StandardException
Description copied from class: BasicSortObserver
Called prior to inserting a duplicate sort key.

Specified by:
insertDuplicateKey in interface SortObserver
Overrides:
insertDuplicateKey in class BasicSortObserver
Parameters:
in - the current row that the sorter is on the verge of retaining. It is a duplicate of existingRow.
dup - the row that is already in the the sorter which is a duplicate of insertRow
Throws:
StandardException - Thrown on failure
See Also:
AggregateSortObserver.insertDuplicateKey(org.apache.derby.iapi.types.DataValueDescriptor[], org.apache.derby.iapi.types.DataValueDescriptor[])


Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.