Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * See the file LICENSE for redistribution information.
  *
  * Copyright (c) 2002, 2013 Oracle and/or its affiliates.  All rights reserved.
  *
  */
 
 package com.sleepycat.je;

Thrown by Cursor.putCurrent if the old and new data are not equal according to the configured duplicate comparator or default comparator.

If the old and new data are unequal according to the comparator, this would change the sort order of the record, which would change the cursor position, and this is not allowed. To change the sort order of a record, delete it and then re-insert it.

The Transaction handle is not invalidated as a result of this exception.

Since:
4.0
    private static final long serialVersionUID = 1;

    
For internal use only.

Hidden:
    public DuplicateDataException(String message) {
        super(null /*locker*/false /*abortOnly*/messagenull /*cause*/);
    }

    
For internal use only.

Hidden:
    private DuplicateDataException(String message,
                                   DuplicateDataException cause) {
        super(messagecause);
    }

    
For internal use only.

Hidden:
    @Override
    public OperationFailureException wrapSelf(String msg) {
        return new DuplicateDataException(msgthis);
    }
New to GrepCode? Check out our FAQ X