01: /**
02: * Objective Database Abstraction Layer (ODAL)
03: * Copyright (c) 2004, The ODAL Development Group
04: * All rights reserved.
05: * For definition of the ODAL Development Group please refer to LICENCE.txt file
06: *
07: * Distributable under LGPL license.
08: * See terms of license at gnu.org.
09: */package com.completex.objective.components.persistency;
10:
11: import java.util.Map;
12:
13: /**
14: * Defines methods that are used to save meta object to and recreate from internal and external descriptor maps
15: *
16: * @author Gennady Krizhevsky
17: */
18: public interface DescriptorMappable {
19: /**
20: * Puts fields appropriate for Internal descriptor into map
21: *
22: * @return map representation of this object
23: */
24: Map toInternalMap();
25:
26: /**
27: * Populates this object from the Internal descriptor map
28: *
29: * @param map
30: */
31: void fromInternalMap(Map map);
32:
33: /**
34: * Puts fields appropriate for External descriptor into map
35: *
36: * @return map representation of this object
37: */
38: Map toExternalMap();
39:
40: /**
41: * Populates this object from the External descriptor map
42: *
43: * @param map
44: */
45: void fromExternalMap(Map map);
46: }
|