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

java.lang.Object
  extended by org.apache.derby.impl.sql.execute.BasicSortObserver
      extended by org.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.


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
Returns:
the row to be inserted by the sorter. If null, then nothing is inserted by the sorter. Distinct sorts will want to return null.
Throws:
StandardException - Thrown on failure
See Also:
AggregateSortObserver.insertDuplicateKey(org.apache.derby.iapi.types.DataValueDescriptor[], org.apache.derby.iapi.types.DataValueDescriptor[])

Built on Thu 2011-03-10 11:54:14+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.