/** * Binding version of Cursor.putNoDupData(), optionally returning the old value and optionally * using the current key instead of the key parameter. */ OperationStatus putNoDupData(Object key, Object value, Object[] oldValue, boolean useCurrentKey) throws DatabaseException { initForPut(key, value, oldValue, useCurrentKey); if (view.dupsOrdered) { return cursor.putNoDupData(keyThang, valueThang); } else { if (view.dupsAllowed) { /* Unordered duplicates. */ OperationStatus status = cursor.getSearchBoth(keyThang, primaryKeyThang, valueThang, getLockMode(false)); if (status == OperationStatus.SUCCESS) { return OperationStatus.KEYEXIST; } else { return cursor.put(keyThang, valueThang); } } else { /* No duplicates. */ return cursor.putNoOverwrite(keyThang, valueThang); } } }
/** * Binding version of Cursor.putNoOverwrite(), optionally using the current key instead of the key * parameter. */ OperationStatus putNoOverwrite(Object key, Object value, boolean useCurrentKey) throws DatabaseException { initForPut(key, value, null, useCurrentKey); return cursor.putNoOverwrite(keyThang, valueThang); }
/** * Binding version of Cursor.put(), optionally returning the old value and optionally using the * current key instead of the key parameter. */ OperationStatus put(Object key, Object value, Object[] oldValue, boolean useCurrentKey) throws DatabaseException { initForPut(key, value, oldValue, useCurrentKey); return cursor.put(keyThang, valueThang); }