01: /*-
02: * See the file LICENSE for redistribution information.
03: *
04: * Copyright (c) 2000,2008 Oracle. All rights reserved.
05: *
06: * $Id: EntryBinding.java,v 1.20.2.2 2008/01/07 15:14:05 cwl Exp $
07: */
08:
09: package com.sleepycat.bind;
10:
11: import com.sleepycat.je.DatabaseEntry;
12:
13: /**
14: * A binding between a key or data entry and a key or data object.
15: *
16: * @author Mark Hayes
17: */
18: public interface EntryBinding {
19:
20: /**
21: * Converts a entry buffer into an Object.
22: *
23: * @param entry is the source entry buffer.
24: *
25: * @return the resulting Object.
26: */
27: Object entryToObject(DatabaseEntry entry);
28:
29: /**
30: * Converts an Object into a entry buffer.
31: *
32: * @param object is the source Object.
33: *
34: * @param entry is the destination entry buffer.
35: */
36: void objectToEntry(Object object, DatabaseEntry entry);
37: }
|