1 package net.sf.tacos.model;
2
3 import java.io.Serializable;
4
5 /**
6 * Default IKeyProvider implementation that uses the object's identity hash.
7 * This only works if the object instances are the same across requests (ie.
8 * static).
9 *
10 * @author phraktle
11 */
12 public class IdentityKeyProvider implements IKeyProvider {
13
14 /**
15 *
16 * {@inheritDoc}
17 */
18 public Serializable getKey(Object value)
19 {
20 return new Integer(System.identityHashCode(value));
21 }
22
23 }