KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sleepycat > bind > EntityBinding


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2000,2006 Oracle. All rights reserved.
5  *
6  * $Id: EntityBinding.java,v 1.21 2006/10/30 21:14:06 bostic Exp $
7  */

8
9 package com.sleepycat.bind;
10
11 import com.sleepycat.je.DatabaseEntry;
12
13 /**
14  * A binding between a key-value entry pair and an entity object.
15  *
16  * @author Mark Hayes
17  */

18 public interface EntityBinding {
19
20     /**
21      * Converts key and data entry buffers into an entity Object.
22      *
23      * @param key is the source key entry.
24      *
25      * @param data is the source data entry.
26      *
27      * @return the resulting Object.
28      */

29     Object JavaDoc entryToObject(DatabaseEntry key, DatabaseEntry data);
30
31     /**
32      * Extracts the key entry from an entity Object.
33      *
34      * @param object is the source Object.
35      *
36      * @param key is the destination entry buffer.
37      */

38     void objectToKey(Object JavaDoc object, DatabaseEntry key);
39
40     /**
41      * Extracts the data entry from an entity Object.
42      *
43      * @param object is the source Object.
44      *
45      * @param data is the destination entry buffer.
46      */

47     void objectToData(Object JavaDoc object, DatabaseEntry data);
48 }
49
Popular Tags