Last change
on this file since 319 was
319,
checked in by vmipsl, 12 years ago
|
Import du projet Ether pour le nouveau look 2012
|
File size:
1013 bytes
|
Line | |
---|
1 | package com.ether; |
---|
2 | |
---|
3 | import org.hibernate.usertype.UserType; |
---|
4 | import org.hibernate.HibernateException; |
---|
5 | |
---|
6 | import java.io.Serializable; |
---|
7 | |
---|
8 | public abstract class SimpleUserType implements UserType |
---|
9 | { |
---|
10 | public Object deepCopy(final Object value) throws HibernateException { |
---|
11 | return value; |
---|
12 | } |
---|
13 | |
---|
14 | public boolean isMutable() { |
---|
15 | return false; |
---|
16 | } |
---|
17 | |
---|
18 | public Object assemble(final Serializable cached, final Object owner) |
---|
19 | throws HibernateException { |
---|
20 | return cached; |
---|
21 | } |
---|
22 | |
---|
23 | public Serializable disassemble(final Object value) |
---|
24 | throws HibernateException { |
---|
25 | return (Serializable) value; |
---|
26 | } |
---|
27 | |
---|
28 | public Object replace(final Object original, final Object target, |
---|
29 | final Object owner) throws HibernateException { |
---|
30 | return original; |
---|
31 | } |
---|
32 | |
---|
33 | public int hashCode(final Object object) throws HibernateException { |
---|
34 | return object.hashCode(); |
---|
35 | } |
---|
36 | |
---|
37 | public boolean equals(final Object x, final Object y) |
---|
38 | throws HibernateException { |
---|
39 | return x == y || !(null == x || null == y) && x.equals(y); |
---|
40 | } |
---|
41 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.