1 package org.hibernate.usertype; 3 4 import java.io.Serializable ; 5 import java.sql.PreparedStatement ; 6 import java.sql.ResultSet ; 7 import java.sql.SQLException ; 8 9 import org.hibernate.HibernateException; 10 import org.hibernate.engine.SessionImplementor; 11 import org.hibernate.type.Type; 12 13 35 public interface CompositeUserType { 36 37 43 public String [] getPropertyNames(); 44 45 50 public Type[] getPropertyTypes(); 51 52 60 public Object getPropertyValue(Object component, int property) throws HibernateException; 61 62 70 public void setPropertyValue(Object component, int property, Object value) throws HibernateException; 71 72 77 public Class returnedClass(); 78 79 88 public boolean equals(Object x, Object y) throws HibernateException; 89 90 93 public int hashCode(Object x) throws HibernateException; 94 95 107 public Object nullSafeGet(ResultSet rs, String [] names, SessionImplementor session, Object owner) 108 throws HibernateException, SQLException ; 109 110 122 public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) 123 throws HibernateException, SQLException ; 124 125 132 public Object deepCopy(Object value) throws HibernateException; 133 134 139 public boolean isMutable(); 140 141 152 public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException; 153 154 164 public Object assemble(Serializable cached, SessionImplementor session, Object owner) 165 throws HibernateException; 166 167 182 public Object replace(Object original, Object target, SessionImplementor session, Object owner) 183 throws HibernateException; 184 } 185 | Popular Tags |