/* * - * See the file LICENSE for redistribution information. * * Copyright (c) 1999-2003 * Sleepycat Software. All rights reserved. * * $Id: DbSecondaryKeyCreate.java,v 11.16 2003/11/28 18:35:47 bostic Exp $ */ package com.sleepycat.db; /** * An interface specifying a function which constructs secondary keys * from primary key and data items.

*/ public interface DbSecondaryKeyCreate { /** * The secondaryKeyCreate interface is used by the Db.associate * method. This interface defines the application-specific * function to be called to construct secondary keys from primary * key and data items.

* * @param secondary the database handle for the secondary. * @param key a {@link com.sleepycat.db.Dbt Dbt} * referencing the primary key. * @param data a {@link com.sleepycat.db.Dbt Dbt} * referencing the primary data item. * @param result a zeroed {@link com.sleepycat.db.Dbt Dbt} * in which the callback function should fill in data * and size fields that describe the secondary key. * @throws DbException Signals that an exception of some sort * has occurred. * @return * * */ public int secondaryKeyCreate(Db secondary, Dbt key, Dbt data, Dbt result) throws DbException; }