View Javadoc

1   /**
2    * Copyright 2005 Steve Molloy
3    * 
4    * This file is part of OV4J.
5    * 
6    * OV4J is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as
7    * published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
8    * 
9    * OV4J is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
10   * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11   * 
12   * You should have received a copy of the GNU General Public License along with OV4J; if not, write to the Free Software
13   * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
14   * 
15   */
16  package org.ov4j.db4oImpl;
17  
18  /**
19   * This class is used for mapping fields to internal unique ids for fast retrieval.
20   * 
21   * @author smolloy
22   * 
23   */
24  public class MappedField {
25  	/** Object to map. */
26  	private Object	object;
27  
28  	/** Id to map to. */
29  	private long	id;
30  
31  	/** Last modification timestamp. */
32  	private long	modificationStamp;
33  
34  	/**
35  	 * @return Returns the id.
36  	 */
37  	public long getId() {
38  		return id;
39  	}
40  
41  	/**
42  	 * @return Returns the modificationStamp.
43  	 */
44  	public long getModificationStamp() {
45  		return modificationStamp;
46  	}
47  
48  	/**
49  	 * @return Returns the object.
50  	 */
51  	public Object getObject() {
52  		return object;
53  	}
54  
55  	/**
56  	 * @param uid
57  	 *            The uid to set.
58  	 */
59  	public void setId(final long id) {
60  		this.id = id;
61  	}
62  
63  	/**
64  	 * @param modificationStamp
65  	 *            The modificationStamp to set.
66  	 */
67  	public void setModificationStamp(final long modificationStamp) {
68  		this.modificationStamp = modificationStamp;
69  	}
70  
71  	/**
72  	 * @param object
73  	 *            The object to set.
74  	 */
75  	public void setObject(final Object object) {
76  		this.object = object;
77  	}
78  
79  }