Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test In directory sc8-pr-cvs1:/tmp/cvs-serv20166/cirrus/hibernate/test Modified Files: A.java ABCProxyTest.java ABCTest.java B.java BasicNameable.java Baz.java C1.java C2.java Category.java Contained.java Custom.java CustomPersister.java D.java DemoTest.java FooComponent.java FooStatus.java Fumm.java Glarch.java Holder.java LessSimple.java Location.java MoreStuff.java Multi.hbm.xml Multi.java MultiTableTest.java Nameable.java Named.java ODMGTest.java ParentChildTest.java Qux.java Several.java Simple.java Single.java Stuff.java SubDetail.java SubMulti.java Trivial.java Log Message: fixed broken line-endings and added a test Index: A.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/A.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** A.java 18 Oct 2002 15:16:11 -0000 1.1 --- A.java 26 Nov 2002 03:35:44 -0000 1.2 *************** *** 1,40 **** ! package cirrus.hibernate.test; ! ! ! public class A { ! private Long id; ! private String name; ! ! /** ! * Returns the id. ! * @return Long ! */ ! public Long getId() { ! return id; ! } ! ! /** ! * Returns the name. ! * @return String ! */ ! public String getName() { ! return name; ! } ! ! /** ! * Sets the id. ! * @param id The id to set ! */ ! public void setId(Long id) { ! this.id = id; ! } ! ! /** ! * Sets the name. ! * @param name The name to set ! */ ! public void setName(String name) { ! this.name = name; ! } ! ! } --- 1,40 ---- ! package cirrus.hibernate.test; ! ! ! public class A { ! private Long id; ! private String name; ! ! /** ! * Returns the id. ! * @return Long ! */ ! public Long getId() { ! return id; ! } ! ! /** ! * Returns the name. ! * @return String ! */ ! public String getName() { ! return name; ! } ! ! /** ! * Sets the id. ! * @param id The id to set ! */ ! public void setId(Long id) { ! this.id = id; ! } ! ! /** ! * Sets the name. ! * @param name The name to set ! */ ! public void setName(String name) { ! this.name = name; ! } ! ! } Index: ABCProxyTest.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/ABCProxyTest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ABCProxyTest.java 20 Nov 2002 10:30:45 -0000 1.3 --- ABCProxyTest.java 26 Nov 2002 03:35:44 -0000 1.4 *************** *** 130,134 **** throw e; } ! } } --- 130,134 ---- throw e; } ! } } Index: ABCTest.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/ABCTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ABCTest.java 20 Nov 2002 10:30:45 -0000 1.2 --- ABCTest.java 26 Nov 2002 03:35:44 -0000 1.3 *************** *** 80,84 **** throw e; } ! } } --- 80,84 ---- throw e; } ! } } Index: B.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/B.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** B.java 18 Oct 2002 15:16:11 -0000 1.1 --- B.java 26 Nov 2002 03:35:44 -0000 1.2 *************** *** 1,22 **** ! package cirrus.hibernate.test; ! ! ! public class B extends A { ! private int count; ! /** ! * Returns the count. ! * @return int ! */ ! public int getCount() { ! return count; ! } ! ! /** ! * Sets the count. ! * @param count The count to set ! */ ! public void setCount(int count) { ! this.count = count; ! } ! ! } --- 1,22 ---- ! package cirrus.hibernate.test; ! ! ! public class B extends A { ! private int count; ! /** ! * Returns the count. ! * @return int ! */ ! public int getCount() { ! return count; ! } ! ! /** ! * Sets the count. ! * @param count The count to set ! */ ! public void setCount(int count) { ! this.count = count; ! } ! ! } Index: BasicNameable.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/BasicNameable.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BasicNameable.java 30 Oct 2002 13:34:25 -0000 1.1 --- BasicNameable.java 26 Nov 2002 03:35:44 -0000 1.2 *************** *** 1,42 **** ! //$Id$ ! package cirrus.hibernate.test; ! ! /** ! * @author administrator ! * ! * ! */ ! public class BasicNameable implements Nameable { ! ! private String name; ! private Long id; ! ! /** ! * @see cirrus.hibernate.test.Nameable#getName() ! */ ! public String getName() { ! return name; ! } ! ! /** ! * @see cirrus.hibernate.test.Nameable#setName() ! */ ! public void setName(String n) { ! name = n; ! } ! ! /** ! * @see cirrus.hibernate.test.Nameable#getKey() ! */ ! public Long getKey() { ! return id; ! } ! ! /** ! * @see cirrus.hibernate.test.Nameable#setKey() ! */ ! public void setKey(Long k) { ! id = k; ! } ! ! } --- 1,42 ---- ! //$Id$ ! package cirrus.hibernate.test; ! ! /** ! * @author administrator ! * ! * ! */ ! public class BasicNameable implements Nameable { ! ! private String name; ! private Long id; ! ! /** ! * @see cirrus.hibernate.test.Nameable#getName() ! */ ! public String getName() { ! return name; ! } ! ! /** ! * @see cirrus.hibernate.test.Nameable#setName() ! */ ! public void setName(String n) { ! name = n; ! } ! ! /** ! * @see cirrus.hibernate.test.Nameable#getKey() ! */ ! public Long getKey() { ! return id; ! } ! ! /** ! * @see cirrus.hibernate.test.Nameable#setKey() ! */ ! public void setKey(Long k) { ! id = k; ! } ! ! } Index: Baz.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Baz.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Baz.java 28 Oct 2002 19:27:49 -0000 1.28 --- Baz.java 26 Nov 2002 03:35:44 -0000 1.29 *************** *** 172,176 **** this.fooSet = fooSet; } ! public FooComponent[] getComponents() { return components; --- 172,176 ---- this.fooSet = fooSet; } ! public FooComponent[] getComponents() { return components; *************** *** 179,183 **** this.components = components; } ! public Date[] getTimeArray() { return timeArray; --- 179,183 ---- this.components = components; } ! public Date[] getTimeArray() { return timeArray; Index: C1.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/C1.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** C1.java 18 Oct 2002 15:16:11 -0000 1.1 --- C1.java 26 Nov 2002 03:35:44 -0000 1.2 *************** *** 1,39 **** ! package cirrus.hibernate.test; ! ! ! public class C1 extends B{ ! private String address; ! private D d; ! /** ! * Returns the address. ! * @return String ! */ ! public String getAddress() { ! return address; ! } ! ! /** ! * Sets the address. ! * @param address The address to set ! */ ! public void setAddress(String address) { ! this.address = address; ! } ! ! /** ! * Returns the d. ! * @return D ! */ ! public D getD() { ! return d; ! } ! ! /** ! * Sets the d. ! * @param d The d to set ! */ ! public void setD(D d) { ! this.d = d; ! } ! ! } --- 1,39 ---- ! package cirrus.hibernate.test; ! ! ! public class C1 extends B{ ! private String address; ! private D d; ! /** ! * Returns the address. ! * @return String ! */ ! public String getAddress() { ! return address; ! } ! ! /** ! * Sets the address. ! * @param address The address to set ! */ ! public void setAddress(String address) { ! this.address = address; ! } ! ! /** ! * Returns the d. ! * @return D ! */ ! public D getD() { ! return d; ! } ! ! /** ! * Sets the d. ! * @param d The d to set ! */ ! public void setD(D d) { ! this.d = d; ! } ! ! } Index: C2.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/C2.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** C2.java 18 Oct 2002 15:16:11 -0000 1.1 --- C2.java 26 Nov 2002 03:35:44 -0000 1.2 *************** *** 1,22 **** ! package cirrus.hibernate.test; ! ! ! public class C2 extends B{ ! private String address; ! /** ! * Returns the address. ! * @return String ! */ ! public String getAddress() { ! return address; ! } ! ! /** ! * Sets the address. ! * @param address The address to set ! */ ! public void setAddress(String address) { ! this.address = address; ! } ! ! } --- 1,22 ---- ! package cirrus.hibernate.test; ! ! ! public class C2 extends B{ ! private String address; ! /** ! * Returns the address. ! * @return String ! */ ! public String getAddress() { ! return address; ! } ! ! /** ! * Sets the address. ! * @param address The address to set ! */ ! public void setAddress(String address) { ! this.address = address; ! } ! ! } Index: Category.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Category.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Category.java 28 Oct 2002 15:41:53 -0000 1.2 --- Category.java 26 Nov 2002 03:35:44 -0000 1.3 *************** *** 1,65 **** ! //$Id$ ! package cirrus.hibernate.test; ! ! import java.util.ArrayList; ! import java.util.List; ! ! /** ! * ! */ ! public class Category { ! ! public static final String ROOT_CATEGORY = "/"; ! ! private long id; ! private String name; ! private List subcategories = new ArrayList(); ! /** ! * Returns the id. ! * @return long ! */ ! public long getId() { ! return id; ! } ! ! /** ! * Sets the id. ! * @param id The id to set ! */ ! public void setId(long id) { ! this.id = id; ! } ! ! /** ! * Returns the subcategories. ! * @return List ! */ ! public List getSubcategories() { ! return subcategories; ! } ! ! /** ! * Sets the subcategories. ! * @param subcategories The subcategories to set ! */ ! public void setSubcategories(List subcategories) { ! this.subcategories = subcategories; ! } ! ! /** ! * Returns the name. ! * @return String ! */ ! public String getName() { ! return name; ! } ! ! /** ! * Sets the name. ! * @param name The name to set ! */ ! public void setName(String name) { ! this.name = name; ! } ! ! } --- 1,65 ---- ! //$Id$ ! package cirrus.hibernate.test; ! ! import java.util.ArrayList; ! import java.util.List; ! ! /** ! * ! */ ! public class Category { ! ! public static final String ROOT_CATEGORY = "/"; ! ! private long id; ! private String name; ! private List subcategories = new ArrayList(); ! /** ! * Returns the id. ! * @return long ! */ ! public long getId() { ! return id; ! } ! ! /** ! * Sets the id. ! * @param id The id to set ! */ ! public void setId(long id) { ! this.id = id; ! } ! ! /** ! * Returns the subcategories. ! * @return List ! */ ! public List getSubcategories() { ! return subcategories; ! } ! ! /** ! * Sets the subcategories. ! * @param subcategories The subcategories to set ! */ ! public void setSubcategories(List subcategories) { ! this.subcategories = subcategories; ! } ! ! /** ! * Returns the name. ! * @return String ! */ ! public String getName() { ! return name; ! } ! ! /** ! * Sets the name. ! * @param name The name to set ! */ ! public void setName(String name) { ! this.name = name; ! } ! ! } Index: Contained.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Contained.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Contained.java 7 Sep 2002 03:01:52 -0000 1.2 --- Contained.java 26 Nov 2002 03:35:44 -0000 1.3 *************** *** 1,66 **** ! //$Id$ ! package cirrus.hibernate.test; ! ! import java.util.ArrayList; ! import java.util.Collection; ! ! public class Contained { ! private Container container; ! private long id; ! private Collection bag = new ArrayList(); ! public boolean equals(Object other) { ! return id==( (Contained) other ).id; ! } ! public int hashCode() { ! return new Long(id).hashCode(); ! } ! ! /** ! * Returns the container. ! * @return Container ! */ ! public Container getContainer() { ! return container; ! } ! ! /** ! * Returns the id. ! * @return long ! */ ! public long getId() { ! return id; ! } ! ! /** ! * Sets the container. ! * @param container The container to set ! */ ! public void setContainer(Container container) { ! this.container = container; ! } ! ! /** ! * Sets the id. ! * @param id The id to set ! */ ! public void setId(long id) { ! this.id = id; ! } ! ! /** ! * Returns the bag. ! * @return Collection ! */ ! public Collection getBag() { ! return bag; ! } ! ! /** ! * Sets the bag. ! * @param bag The bag to set ! */ ! public void setBag(Collection bag) { ! this.bag = bag; ! } ! ! } --- 1,66 ---- ! //$Id$ ! package cirrus.hibernate.test; ! ! import java.util.ArrayList; ! import java.util.Collection; ! ! public class Contained { ! private Container container; ! private long id; ! private Collection bag = new ArrayList(); ! public boolean equals(Object other) { ! return id==( (Contained) other ).id; ! } ! public int hashCode() { ! return new Long(id).hashCode(); ! } ! ! /** ! * Returns the container. ! * @return Container ! */ ! public Container getContainer() { ! return container; ! } ! ! /** ! * Returns the id. ! * @return long ! */ ! public long getId() { ! return id; ! } ! ! /** ! * Sets the container. ! * @param container The container to set ! */ ! public void setContainer(Container container) { ! this.container = container; ! } ! ! /** ! * Sets the id. ! * @param id The id to set ! */ ! public void setId(long id) { ! this.id = id; ! } ! ! /** ! * Returns the bag. ! * @return Collection ! */ ! public Collection getBag() { ! return bag; ! } ! ! /** ! * Sets the bag. ! * @param bag The bag to set ! */ ! public void setBag(Collection bag) { ! this.bag = bag; ! } ! ! } Index: Custom.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Custom.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Custom.java 28 Sep 2002 07:23:56 -0000 1.1 --- Custom.java 26 Nov 2002 03:35:44 -0000 1.2 *************** *** 1,17 **** ! //$Id$ ! package cirrus.hibernate.test; ! ! ! public class Custom implements Cloneable { ! long id; ! String name; ! ! public Object clone() { ! try { ! return super.clone(); ! } ! catch (CloneNotSupportedException cnse) { ! throw new RuntimeException(); ! } ! } ! } --- 1,17 ---- ! //$Id$ ! package cirrus.hibernate.test; ! ! ! public class Custom implements Cloneable { ! long id; ! String name; ! ! public Object clone() { ! try { ! return super.clone(); ! } ! catch (CloneNotSupportedException cnse) { ! throw new RuntimeException(); ! } ! } ! } Index: CustomPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/CustomPersister.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** CustomPersister.java 5 Nov 2002 11:48:08 -0000 1.14 --- CustomPersister.java 26 Nov 2002 03:35:44 -0000 1.15 *************** *** 1,434 **** ! //$Id$ ! package cirrus.hibernate.test; ! ! import java.io.Serializable; ! import java.lang.reflect.Method; ! import java.sql.SQLException; ! import java.util.Hashtable; ! ! import cirrus.hibernate.Hibernate; ! import cirrus.hibernate.HibernateException; ! import cirrus.hibernate.LockMode; ! import cirrus.hibernate.MappingException; ! import cirrus.hibernate.cache.CacheConcurrencyStrategy; ! import cirrus.hibernate.engine.Cascades; ! import cirrus.hibernate.engine.Key; ! import cirrus.hibernate.engine.SessionFactoryImplementor; ! import cirrus.hibernate.engine.SessionImplementor; ! import cirrus.hibernate.id.IdentifierGenerator; ! import cirrus.hibernate.id.LongGenerator; ! import cirrus.hibernate.map.PersistentClass; ! import cirrus.hibernate.metadata.ClassMetadata; ! import cirrus.hibernate.persister.ClassPersister; ! import cirrus.hibernate.type.Type; ! import cirrus.hibernate.type.VersionType; ! ! public class CustomPersister implements ClassPersister { ! ! private static final Hashtable instances = new Hashtable(); ! private static final IdentifierGenerator idgen = new LongGenerator(); ! ! public CustomPersister(PersistentClass model, SessionFactoryImplementor factory) {} ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#postInstantiate(SessionFactoryImplementor) ! */ ! public void postInstantiate(SessionFactoryImplementor factory) ! throws MappingException { ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getMappedClass() ! */ ! public Class getMappedClass() { ! return Custom.class; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getClassName() ! */ ! public String getClassName() { ! return Custom.class.getName(); ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#hasCompositeKey() ! */ ! public boolean hasCompositeKey() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#implementsPersistentLifecycle() ! */ ! public boolean implementsPersistentLifecycle() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#implementsLifecycle() ! */ ! public boolean implementsLifecycle() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#implementsValidatable() ! */ ! public boolean implementsValidatable() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#hasProxy() ! */ ! public boolean hasProxy() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getProxyInterfaces() ! */ ! public Class[] getProxyInterfaces() { ! return null; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#hasCollections() ! */ ! public boolean hasCollections() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#hasCascades() ! */ ! public boolean hasCascades() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#isMutable() ! */ ! public boolean isMutable() { ! return true; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#isIdentifierAssignedByInsert() ! */ ! public boolean isIdentifierAssignedByInsert() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#isUnsaved(Serializable) ! */ ! public boolean isUnsaved(Serializable id) { ! return ( (Long) id ).longValue()==0; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#setPropertyValues(Object, Object[]) ! */ ! public void setPropertyValues(Object object, Object[] values) ! throws HibernateException { ! Custom c = (Custom) object; ! c.name = (String) values[0]; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getPropertyValues(Object) ! */ ! public Object[] getPropertyValues(Object object) ! throws HibernateException { ! ! Custom c = (Custom) object; ! return new Object[] { c.name }; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getPropertyValue(Object, int) ! */ ! public Object getPropertyValue(Object obj, int i) ! throws HibernateException { ! return ( (Custom) obj ).name; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#setPropertyValue(Object, int, Object) ! */ ! public void setPropertyValue(Object obj, int i, Object val) ! throws HibernateException { ! ( (Custom) obj ).name = (String) val; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#isDirty(Object[], Object[], Object, SessionImplementor) ! */ ! public int[] findDirty( ! Object[] x, ! Object[] y, ! Object owner, ! SessionImplementor session) ! throws HibernateException { ! if ( x[0]!=y[0] && ( x[0]==null || y[0]==null || !x[0].equals(y[0]) ) ) { ! return new int[] { 0 }; ! } ! else { ! return null; ! } ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#hasIdentifierProperty() ! */ ! public boolean hasIdentifierProperty() { ! return true; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getIdentifier(Object) ! */ ! public Serializable getIdentifier(Object object) ! throws HibernateException { ! return new Long( ( (Custom) object ).id ); ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#setIdentifier(Object, Serializable) ! */ ! public void setIdentifier(Object object, Serializable id) ! throws HibernateException { ! ! ( (Custom) object ).id = ( (Long) id ).longValue(); ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getProxyGetIdentifierMethod() ! */ ! public Method getProxyGetIdentifierMethod() { ! return null; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#isVersioned() ! */ ! public boolean isVersioned() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getVersionType() ! */ ! public VersionType getVersionType() { ! return null; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getVersionProperty() ! */ ! public int getVersionProperty() { ! return 0; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getVersion(Object) ! */ ! public Object getVersion(Object object) throws HibernateException { ! return null; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#instantiate(Serializable) ! */ ! public Object instantiate(Serializable id) throws HibernateException { ! Custom c = new Custom(); ! c.id = ( (Long) id ).longValue(); ! return c; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getIdentifierGenerator() ! */ ! public IdentifierGenerator getIdentifierGenerator() ! throws HibernateException { ! return idgen; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#load(Serializable, Object, boolean, SessionImplementor) ! */ ! public Object load( ! Serializable id, ! Object optionalObject, ! LockMode lockMode, ! SessionImplementor session) ! throws HibernateException, SQLException { ! ! // fails when optional object is supplied ! ! Custom clone = null; ! Custom obj = (Custom) instances.get(id); ! if (obj!=null) { ! clone = (Custom) obj.clone(); ! session.addUninitializedEntity( new Key(id, this), clone, LockMode.NONE ); ! session.postHydrate(this, id, new String[] { obj.name }, clone, LockMode.NONE); ! session.initializeEntity(clone); ! } ! return clone; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#lockForUpdate(Serializable, Object, SessionImplementor) ! */ ! public void lock( ! Serializable id, ! Object version, ! Object object, ! LockMode lockMode, ! SessionImplementor session) ! throws HibernateException, SQLException { ! ! throw new UnsupportedOperationException(); ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#insert(Serializable, Object[], SessionImplementor) ! */ ! public void insert( ! Serializable id, ! Object[] fields, ! Object object, ! SessionImplementor session) ! throws SQLException, HibernateException { ! ! instances.put(id, ( (Custom) object ).clone() ); ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#insert(Object[], SessionImplementor) ! */ ! public Serializable insert(Object[] fields, Object object, SessionImplementor session) ! throws SQLException, HibernateException { ! ! throw new UnsupportedOperationException(); ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#delete(Serializable, Object, SessionImplementor) ! */ ! public void delete( ! Serializable id, ! Object version, ! Object object, ! SessionImplementor session) ! throws SQLException, HibernateException { ! ! instances.remove(id); ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#update(Serializable, Object[], Object, SessionImplementor) ! */ ! public void update( ! Serializable id, ! Object[] fields, ! int[] dirtyFields, ! Object oldVersion, ! Object object, ! SessionImplementor session) ! throws SQLException, HibernateException { ! ! instances.put( id, ( (Custom) object ).clone() ); ! ! } ! ! Type[] TYPES = new Type[] { Hibernate.STRING }; ! String[] NAMES = new String[] { "name" }; ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getPropertyTypes() ! */ ! public Type[] getPropertyTypes() { ! return TYPES; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getPropertyNames() ! */ ! public String[] getPropertyNames() { ! return NAMES; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getPropertyCascadeStyles() ! */ ! public Cascades.CascadeStyle[] getPropertyCascadeStyles() { ! return null; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getIdentifierType() ! */ ! public Type getIdentifierType() { ! return Hibernate.LONG; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getIdentifierPropertyName() ! */ ! public String getIdentifierPropertyName() { ! return "id"; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#hasCache() ! */ ! public boolean hasCache() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getCache() ! */ ! public CacheConcurrencyStrategy getCache() { ! return null; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getIdentifierSpace() ! */ ! public Serializable getIdentifierSpace() { ! return "CUSTOMS"; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getPropertySpaces(Object) ! */ ! public Serializable[] getPropertySpaces(Object instance) { ! return new String[] { "CUSTOMS" }; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getClassMetadata() ! */ ! public ClassMetadata getClassMetadata() { ! return null; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#hasSubclasses() ! */ ! public boolean hasSubclasses() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getConcreteProxyClass() ! */ ! public Class getConcreteProxyClass() { ! return Custom.class; ! } ! ! } --- 1,434 ---- ! //$Id$ ! package cirrus.hibernate.test; ! ! import java.io.Serializable; ! import java.lang.reflect.Method; ! import java.sql.SQLException; ! import java.util.Hashtable; ! ! import cirrus.hibernate.Hibernate; ! import cirrus.hibernate.HibernateException; ! import cirrus.hibernate.LockMode; ! import cirrus.hibernate.MappingException; ! import cirrus.hibernate.cache.CacheConcurrencyStrategy; ! import cirrus.hibernate.engine.Cascades; ! import cirrus.hibernate.engine.Key; ! import cirrus.hibernate.engine.SessionFactoryImplementor; ! import cirrus.hibernate.engine.SessionImplementor; ! import cirrus.hibernate.id.IdentifierGenerator; ! import cirrus.hibernate.id.LongGenerator; ! import cirrus.hibernate.map.PersistentClass; ! import cirrus.hibernate.metadata.ClassMetadata; ! import cirrus.hibernate.persister.ClassPersister; ! import cirrus.hibernate.type.Type; ! import cirrus.hibernate.type.VersionType; ! ! public class CustomPersister implements ClassPersister { ! ! private static final Hashtable instances = new Hashtable(); ! private static final IdentifierGenerator idgen = new LongGenerator(); ! ! public CustomPersister(PersistentClass model, SessionFactoryImplementor factory) {} ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#postInstantiate(SessionFactoryImplementor) ! */ ! public void postInstantiate(SessionFactoryImplementor factory) ! throws MappingException { ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getMappedClass() ! */ ! public Class getMappedClass() { ! return Custom.class; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getClassName() ! */ ! public String getClassName() { ! return Custom.class.getName(); ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#hasCompositeKey() ! */ ! public boolean hasCompositeKey() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#implementsPersistentLifecycle() ! */ ! public boolean implementsPersistentLifecycle() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#implementsLifecycle() ! */ ! public boolean implementsLifecycle() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#implementsValidatable() ! */ ! public boolean implementsValidatable() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#hasProxy() ! */ ! public boolean hasProxy() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getProxyInterfaces() ! */ ! public Class[] getProxyInterfaces() { ! return null; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#hasCollections() ! */ ! public boolean hasCollections() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#hasCascades() ! */ ! public boolean hasCascades() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#isMutable() ! */ ! public boolean isMutable() { ! return true; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#isIdentifierAssignedByInsert() ! */ ! public boolean isIdentifierAssignedByInsert() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#isUnsaved(Serializable) ! */ ! public boolean isUnsaved(Serializable id) { ! return ( (Long) id ).longValue()==0; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#setPropertyValues(Object, Object[]) ! */ ! public void setPropertyValues(Object object, Object[] values) ! throws HibernateException { ! Custom c = (Custom) object; ! c.name = (String) values[0]; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getPropertyValues(Object) ! */ ! public Object[] getPropertyValues(Object object) ! throws HibernateException { ! ! Custom c = (Custom) object; ! return new Object[] { c.name }; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getPropertyValue(Object, int) ! */ ! public Object getPropertyValue(Object obj, int i) ! throws HibernateException { ! return ( (Custom) obj ).name; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#setPropertyValue(Object, int, Object) ! */ ! public void setPropertyValue(Object obj, int i, Object val) ! throws HibernateException { ! ( (Custom) obj ).name = (String) val; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#isDirty(Object[], Object[], Object, SessionImplementor) ! */ ! public int[] findDirty( ! Object[] x, ! Object[] y, ! Object owner, ! SessionImplementor session) ! throws HibernateException { ! if ( x[0]!=y[0] && ( x[0]==null || y[0]==null || !x[0].equals(y[0]) ) ) { ! return new int[] { 0 }; ! } ! else { ! return null; ! } ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#hasIdentifierProperty() ! */ ! public boolean hasIdentifierProperty() { ! return true; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getIdentifier(Object) ! */ ! public Serializable getIdentifier(Object object) ! throws HibernateException { ! return new Long( ( (Custom) object ).id ); ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#setIdentifier(Object, Serializable) ! */ ! public void setIdentifier(Object object, Serializable id) ! throws HibernateException { ! ! ( (Custom) object ).id = ( (Long) id ).longValue(); ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getProxyGetIdentifierMethod() ! */ ! public Method getProxyGetIdentifierMethod() { ! return null; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#isVersioned() ! */ ! public boolean isVersioned() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getVersionType() ! */ ! public VersionType getVersionType() { ! return null; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getVersionProperty() ! */ ! public int getVersionProperty() { ! return 0; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getVersion(Object) ! */ ! public Object getVersion(Object object) throws HibernateException { ! return null; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#instantiate(Serializable) ! */ ! public Object instantiate(Serializable id) throws HibernateException { ! Custom c = new Custom(); ! c.id = ( (Long) id ).longValue(); ! return c; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getIdentifierGenerator() ! */ ! public IdentifierGenerator getIdentifierGenerator() ! throws HibernateException { ! return idgen; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#load(Serializable, Object, boolean, SessionImplementor) ! */ ! public Object load( ! Serializable id, ! Object optionalObject, ! LockMode lockMode, ! SessionImplementor session) ! throws HibernateException, SQLException { ! ! // fails when optional object is supplied ! ! Custom clone = null; ! Custom obj = (Custom) instances.get(id); ! if (obj!=null) { ! clone = (Custom) obj.clone(); ! session.addUninitializedEntity( new Key(id, this), clone, LockMode.NONE ); ! session.postHydrate(this, id, new String[] { obj.name }, clone, LockMode.NONE); ! session.initializeEntity(clone); ! } ! return clone; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#lockForUpdate(Serializable, Object, SessionImplementor) ! */ ! public void lock( ! Serializable id, ! Object version, ! Object object, ! LockMode lockMode, ! SessionImplementor session) ! throws HibernateException, SQLException { ! ! throw new UnsupportedOperationException(); ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#insert(Serializable, Object[], SessionImplementor) ! */ ! public void insert( ! Serializable id, ! Object[] fields, ! Object object, ! SessionImplementor session) ! throws SQLException, HibernateException { ! ! instances.put(id, ( (Custom) object ).clone() ); ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#insert(Object[], SessionImplementor) ! */ ! public Serializable insert(Object[] fields, Object object, SessionImplementor session) ! throws SQLException, HibernateException { ! ! throw new UnsupportedOperationException(); ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#delete(Serializable, Object, SessionImplementor) ! */ ! public void delete( ! Serializable id, ! Object version, ! Object object, ! SessionImplementor session) ! throws SQLException, HibernateException { ! ! instances.remove(id); ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#update(Serializable, Object[], Object, SessionImplementor) ! */ ! public void update( ! Serializable id, ! Object[] fields, ! int[] dirtyFields, ! Object oldVersion, ! Object object, ! SessionImplementor session) ! throws SQLException, HibernateException { ! ! instances.put( id, ( (Custom) object ).clone() ); ! ! } ! ! Type[] TYPES = new Type[] { Hibernate.STRING }; ! String[] NAMES = new String[] { "name" }; ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getPropertyTypes() ! */ ! public Type[] getPropertyTypes() { ! return TYPES; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getPropertyNames() ! */ ! public String[] getPropertyNames() { ! return NAMES; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getPropertyCascadeStyles() ! */ ! public Cascades.CascadeStyle[] getPropertyCascadeStyles() { ! return null; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getIdentifierType() ! */ ! public Type getIdentifierType() { ! return Hibernate.LONG; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getIdentifierPropertyName() ! */ ! public String getIdentifierPropertyName() { ! return "id"; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#hasCache() ! */ ! public boolean hasCache() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getCache() ! */ ! public CacheConcurrencyStrategy getCache() { ! return null; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getIdentifierSpace() ! */ ! public Serializable getIdentifierSpace() { ! return "CUSTOMS"; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getPropertySpaces(Object) ! */ ! public Serializable[] getPropertySpaces(Object instance) { ! return new String[] { "CUSTOMS" }; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getClassMetadata() ! */ ! public ClassMetadata getClassMetadata() { ! return null; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#hasSubclasses() ! */ ! public boolean hasSubclasses() { ! return false; ! } ! ! /** ! * @see cirrus.hibernate.persister.ClassPersister#getConcreteProxyClass() ! */ ! public Class getConcreteProxyClass() { ! return Custom.class; ! } ! ! } Index: D.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/D.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** D.java 18 Oct 2002 15:20:01 -0000 1.1 --- D.java 26 Nov 2002 03:35:44 -0000 1.2 *************** *** 1,38 **** ! package cirrus.hibernate.test; ! ! public class D { ! private Long id; ! private float amount; ! /** ! * Returns the amount. ! * @return float ! */ ! public float getAmount() { ! return amount; ! } ! ! /** ! * Returns the id. ! * @return long ! */ ! public Long getId() { ! return id; ! } ! ! /** ! * Sets the amount. ! * @param amount The amount to set ! */ ! public void setAmount(float amount) { ! this.amount = amount; ! } ! ! /** ! * Sets the id. ! * @param id The id to set ! */ ! public void setId(Long id) { ! this.id = id; ! } ! ! } --- 1,38 ---- ! package cirrus.hibernate.test; ! ! public class D { ! private Long id; ! private float amount; ! /** ! * Returns the amount. ! * @return float ! */ ! public float getAmount() { ! return amount; ! } ! ! /** ! * Returns the id. ! * @return long ! */ ! public Long getId() { ! return id; ! } ! ! /** ! * Sets the amount. ! * @param amount The amount to set ! */ ! public void setAmount(float amount) { ! this.amount = amount; ! } ! ! /** ! * Sets the id. ! * @param id The id to set ! */ ! public void setId(Long id) { ! this.id = id; ! } ! ! } Index: DemoTest.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/DemoTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DemoTest.java 18 Aug 2002 09:47:45 -0000 1.1 --- DemoTest.java 26 Nov 2002 03:35:44 -0000 1.2 *************** *** 1,46 **** ! package cirrus.hibernate.test; ! ! import cirrus.hibernate.eg.NetworkDemo; ! ! import junit.framework.TestCase; ! ! public class DemoTest extends TestCase { ! ! public DemoTest(String arg0) { ! super(arg0); ! } ! ! public void testDemo() throws Exception { ! ! Thread t = new Thread() { ! public void run() { ! try { ! NetworkDemo.main(new String[0]); ! } ! catch (Exception e) { ! assertTrue(false); ! } ! } ! }; ! t.start(); ! ! Thread.sleep(2000); ! ! NetworkDemo.command("setup"); ! NetworkDemo.command("create vertex v"); ! NetworkDemo.command("create vertex w"); ! NetworkDemo.command("create edge x 1 1 v w"); ! NetworkDemo.command("create edge y 1 1 v w"); ! NetworkDemo.command("show"); ! NetworkDemo.command("find from e in class cirrus.hibernate.eg.Edge where e.length>0.5"); ! NetworkDemo.command("delete edge y"); ! NetworkDemo.command("delete vertex v"); ! NetworkDemo.command("drop"); ! t.stop(); ! ! } ! ! ! public static void main(String[] args) { ! } ! } --- 1,46 ---- ! package cirrus.hibernate.test; ! ! import cirrus.hibernate.eg.NetworkDemo; ! ! import junit.framework.TestCase; ! ! public class DemoTest extends TestCase { ! ! public DemoTest(String arg0) { ! super(arg0); ! } ! ! public void testDemo() throws Exception { ! ! Thread t = new Thread() { ! public void run() { ! try { ! NetworkDemo.main(new String[0]); ! } ! catch (Exception e) { ! assertTrue(false); ! } ! } ! }; ! t.start(); ! ! Thread.sleep(2000); ! ! NetworkDemo.command("setup"); ! NetworkDemo.command("create vertex v"); ! NetworkDemo.command("create vertex w"); ! NetworkDemo.command("create edge x 1 1 v w"); ! NetworkDemo.command("create edge y 1 1 v w"); ! NetworkDemo.command("show"); ! NetworkDemo.command("find from e in class cirrus.hibernate.eg.Edge where e.length>0.5"); ! NetworkDemo.command("delete edge y"); ! NetworkDemo.command("delete vertex v"); ! NetworkDemo.command("drop"); ! t.stop(); ! ! } ! ! ! public static void main(String[] args) { ! } ! } Index: FooComponent.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/FooComponent.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** FooComponent.java 28 Oct 2002 19:27:49 -0000 1.10 --- FooComponent.java 26 Nov 2002 03:35:44 -0000 1.11 *************** *** 52,56 **** this.count = count; } ! public String getName() { return name; --- 52,56 ---- this.count = count; } ! public String getName() { return name; *************** *** 59,63 **** this.name = name; } ! public Date[] getImportantDates() { return importantDates; --- 59,63 ---- this.name = name; } ! public Date[] getImportantDates() { return importantDates; *************** *** 79,83 **** private void setNull(String str) throws Exception { if (str!=null) throw new Exception("null component property"); ! } public Fee getFee() { return fee; --- 79,83 ---- private void setNull(String str) throws Exception { if (str!=null) throw new Exception("null component property"); ! } public Fee getFee() { return fee; Index: FooStatus.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/FooStatus.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FooStatus.java 28 Oct 2002 19:27:49 -0000 1.2 --- FooStatus.java 26 Nov 2002 03:35:44 -0000 1.3 *************** *** 31,35 **** return fromInt(code); } ! } --- 31,35 ---- return fromInt(code); } ! } Index: Fumm.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Fumm.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Fumm.java 29 Aug 2002 10:46:35 -0000 1.1 --- Fumm.java 26 Nov 2002 03:35:44 -0000 1.2 *************** *** 1,53 **** ! //$Id$ ! package cirrus.hibernate.test; ! ! import java.util.Locale; ! ! public class Fumm { ! ! private Locale locale; ! private Fum fum; ! ! public FumCompositeID getId() { ! return fum.getId(); ! } ! public void setId(FumCompositeID id) { ! } ! ! public Fumm() { ! super(); ! } ! ! /** ! * Returns the fum. ! * @return Fum ! */ ! public Fum getFum() { ! return fum; ! } ! ! /** ! * Returns the locale. ! * @return Locale ! */ ! public Locale getLocale() { ! return locale; ! } ! ! /** ! * Sets the fum. ! * @param fum The fum to set ! */ ! public void setFum(Fum fum) { ! this.fum = fum; ! } ! ! /** ! * Sets the locale. ! * @param locale The locale to set ! */ ! public void setLocale(Locale locale) { ! this.locale = locale; ! } ! ! } --- 1,53 ---- ! //$Id$ ! package cirrus.hibernate.test; ! ! import java.util.Locale; ! ! public class Fumm { ! ! private Locale locale; ! private Fum fum; ! ! public FumCompositeID getId() { ! return fum.getId(); ! } ! public void setId(FumCompositeID id) { ! } ! ! public Fumm() { ! super(); ! } ! ! /** ! * Returns the fum. ! * @return Fum ! */ ! public Fum getFum() { ! return fum; ! } ! ! /** ! * Returns the locale. ! * @return Locale ! */ ! public Locale getLocale() { ! return locale; ! } ! ! /** ! * Sets the fum. ! * @param fum The fum to set ! */ ! public void setFum(Fum fum) { ! this.fum = fum; ! } ! ! /** ! * Sets the locale. ! * @param locale The locale to set ! */ ! public void setLocale(Locale locale) { ! this.locale = locale; ! } ! ! } Index: Glarch.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Glarch.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Glarch.java 28 Oct 2002 19:27:49 -0000 1.17 --- Glarch.java 26 Nov 2002 03:35:44 -0000 1.18 *************** *** 51,55 **** this.order = order; } ! public List getStrings() { return strings; --- 51,55 ---- this.order = order; } ! public List getStrings() { return strings; *************** *** 81,85 **** public void setProxyArray(GlarchProxy[] proxyArray) { this.proxyArray = proxyArray; ! } public Set getProxySet() { return proxySet; --- 81,85 ---- public void setProxyArray(GlarchProxy[] proxyArray) { this.proxyArray = proxyArray; ! } public Set getProxySet() { return proxySet; Index: Holder.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Holder.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Holder.java 20 Nov 2002 10:30:45 -0000 1.3 --- Holder.java 26 Nov 2002 03:35:44 -0000 1.4 *************** *** 1,99 **** ! //$Id$ ! package cirrus.hibernate.test; ! ! import java.util.*; ! ! public class Holder implements Named { ! private String id; ! private List ones; ! private Foo[] fooArray; ! private Set foos; ! private String name; ! ! public Holder() { ! } ! public Holder(String name) { ! this.name=name; ! } ! ! /** ! * Returns the fooArray. ! * @return Foo[] ! */ ! public Foo[] getFooArray() { ! return fooArray; ! } ! ! /** ! * Returns the foos. ! * @return Set ! */ ! public Set getFoos() { ! return foos; ! } ! ! /** ! * Sets the fooArray. ! * @param fooArray The fooArray to set ! */ ! public void setFooArray(Foo[] fooArray) { ! this.fooArray = fooArray; ! } ! ! /** ! * Sets the foos. ! * @param foos The foos to set ! */ ! public void setFoos(Set foos) { ! this.foos = foos; ! } ! ! /** ! * Returns the id. ! * @return String ! */ ! public String getId() { ! return id; ! } ! ! /** ! * Sets the id. ! * @param id The id to set ! */ ! public void setId(String id) { ! this.id = id; ! } ! ! /** ! * Returns the name. ! * @return String ! */ ! public String getName() { ! return name; ! } ! ! /** ! * Sets the name. ! * @param name The name to set ! */ ! public void setName(String name) { ! this.name = name; ! } ! ! /** ! * Returns the ones. ! * @return List ! */ ! public List getOnes() { ! return ones; ! } ! ! /** ! * Sets the ones. ! * @param ones The ones to set ! */ ! public void setOnes(List ones) { ! this.ones = ones; ! } ! ! } --- 1,99 ---- ! //$Id$ ! package cirrus.hibernate.test; ! ! import java.util.*; ! ! public class Holder implements Named { ! private String id; ! private List ones; ! private Foo[] fooArray; ! private Set foos; ! private String name; ! ! public Holder() { ! } ! public Holder(String name) { ! this.name=name; ! } ! ! /** ! * Returns the fooArray. ! * @return Foo[] ! */ ! public Foo[] getFooArray() { ! return fooArray; ! } ! ! /** ! * Returns the foos. ! * @return Set ! */ ! public Set getFoos() { ! return foos; ! } ! ! /** ! * Sets the fooArray. ! * @param fooArray The fooArray to set ! */ ! public void setFooArray(Foo[] fooArray) { ! this.fooArray = fooArray; ! } ! ! /** ! * Sets the foos. ! * @param foos The foos to set ! */ ! public void setFoos(Set foos) { ! this.foos = foos; ! } ! ! /** ! * Returns the id. ! * @return String ! */ ! public String getId() { ! return id; ! } ! ! /** ! * Sets the id. ! * @param id The id to set ! */ ! public void setId(String id) { ! this.id = id; ! } ! ! /** ! * Returns the name. ! * @return String ! */ ! public String getName() { ! return name; ! } ! ! /** ! * Sets the name. ! * @param name The name to set ! */ ! public void setName(String name) { ! this.name = name; ! } ! ! /** ! * Returns the ones. ! * @return List ! */ ! public List getOnes() { ! return ones; ! } ! ! /** ! * Sets the ones. ! * @param ones The ones to set ! */ ! public void setOnes(List ones) { ! this.ones = ones; ! } ! ! } Index: LessSimple.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/LessSimple.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LessSimple.java 5 Nov 2002 03:44:02 -0000 1.3 --- LessSimple.java 26 Nov 2002 03:35:44 -0000 1.4 *************** *** 1,92 **** ! //$Id$ ! package cirrus.hibernate.test; ! ! import java.util.Set; ! ! public class LessSimple extends Simple { ! private int intprop; ! private String foo; ! private Set set; ! private Simple another; ! private LessSimple yetanother; ! /** ! * Returns the intprop. ! * @return int ! */ ! public int getIntprop() { ! return intprop; ! } ! ! /** ! * Sets the intprop. ! * @param intprop The intprop to set ! */ ! public void setIntprop(int intprop) { ! this.intprop = intprop; ! } ! ! /** ! * Returns the foo. ! * @return String ! */ ! public String getFoo() { ! return foo; ! } ! ! /** ! * Sets the foo. ! * @param foo The foo to set ! */ ! public void setFoo(String foo) { ! this.foo = foo; ! } ! ! /** ! * Returns the set. ! * @return Set ! */ ! public Set getSet() { ! return set; ! } ! ! /** ! * Sets the set. ! * @param set The set to set ! */ ! public void setSet(Set set) { ! this.set = set; ! } ! ! /** ! * Returns the another. ! * @return Simple ! */ ! public Simple getAnother() { ! return another; ! } ! ! /** ! * Returns the yetanother. ! * @return LessSimple ! */ ! public LessSimple getYetanother() { ! return yetanother; ! } ! ! /** ! * Sets the another. ! * @param another The another to set ! */ ! public void setAnother(Simple another) { ! this.another = another; ! } ! ! /** ! * Sets the yetanother. ! * @param yetanother The yetanother to set ! */ ! public void setYetanother(LessSimple yetanother) { ! this.yetanother = yetanother; ! } ! ! } --- 1,92 ---- ! //$Id$ ! package cirrus.hibernate.test; ! ! import java.util.Set; ! ! public class LessSimple extends Simple { ! private int intprop; ! private String foo; ! private Set set; ! private Simple another; ! private LessSimple yetanother; ! /** ! * Returns the intprop. ! * @return int ! */ ! public int getIntprop() { ! return intprop; ! } ! ! /** ! * Sets the intprop. ! * @param intprop The intprop to set ! */ ! public void setIntprop(int intprop) { ! this.intprop = intprop; ! } ! ! /** ! * Returns the foo. ! * @return String ! */ ! public String getFoo() { ! return foo; ! } ! ! /** ! * Sets the foo. ! * @param foo The foo to set ! */ ! public void setFoo(String foo) { ! this.foo = foo; ! } ! ! /** ! * Returns the set. ! * @return Set ! */ ! public Set getSet() { ! return set; ! } ! ! /** ! * Sets the set. ! * @param set The set to set ! */ ! public void setSet(Set set) { ! this.set = set; ! } ! ! /** ! * Returns the another. ! * @return Simple ! */ ! public Simple getAnother() { ! return another; ! } ! ! /** ! * Returns the yetanother. ! * @return LessSimple ! */ ! public LessSimple getYetanother() { ! return yetanother; ! } ! ! /** ! * Sets the another. ! * @param another The another to set ! */ ! public void setAnother(Simple another) { ! this.another = another; ! } ! ! /** ! * Sets the yetanother. ! * @param yetanother The yetanother to set ! */ ! public void setYetanother(LessSimple yetanother) { ! this.yetanother = yetanother; ! } ! ! } Index: Location.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Location.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Location.java 4 Sep 2002 04:27:44 -0000 1.1 --- Location.java 26 Nov 2002 03:35:44 -0000 1.2 *************** *** 1,119 **** ! //$Id$ ! package cirrus.hibernate.test; ! ! import java.io.Serializable; ! import java.util.Locale; ! ! public class Location implements Serializable { ! private int streetNumber; ! private String city; ! private String streetName; ! private String countryCode; ! private Locale locale; ! private String description; ! ! /** ! * Returns the countryCode. ! * @return String ! */ ! public String getCountryCode() { ! return countryCode; ! } ! ! /** ! * Returns the description. ! * @return String ! */ ! public String getDescription() { ! return description; ! } ! ! /** ! * Returns the locale. ! * @return Locale ! */ ! public Locale getLocale() { ! return locale; ! } ! ! /** ! * Returns the streetName. ! * @return String ! */ ! public String getStreetName() { ! return streetName; ! } ! ! /** ! * Returns the streetNumber. ! * @return int ! */ ! public int getStreetNumber() { ! return streetNumber; ! } ! ! /** ! * Sets the countryCode. ! * @param countryCode The countryCode to set ! */ ! public void setCountryCode(String countryCode) { ! this.countryCode = countryCode; ! } ! ! /** ! * Sets the description. ! * @param description The description to set ! */ ! public void setDescription(String description) { ! this.description = description; ! } ! ! /** ! * Sets the locale. ! * @param locale The locale to set ! */ ! public void setLocale(Locale locale) { ! this.locale = locale; ! } ! ! /** ! * Sets the streetName. ! * @param streetName The streetName to set ! */ ! public void setStreetName(String streetName) { ! this.streetName = streetName; ! } ! ! /** ! * Sets the streetNumber. ! * @param streetNumber The streetNumber to set ! */ ! public void setStreetNumber(int streetNumber) { ! this.streetNumber = streetNumber; ! } ! ! /** ! * Returns the city. ! * @return String ! */ ! public String getCity() { ! return city; ! } ! ! /** ! * Sets the city. ! * @param city The city to set ! */ ! public void setCity(String city) { ! this.city = city; ! } ! ! public boolean equals(Object other) { ! Location l = (Location) other; ! return l.getCity().equals(city) && l.getStreetName().equals(streetName) && l.getCountryCode().equals(countryCode) && l.getStreetNumber()==streetNumber; ! } ! public int hashCode() { ! return streetName.hashCode(); ! } ! ! } --- 1,119 ---- ! //$Id$ ! package cirrus.hibernate.test; ! ! import java.io.Serializable; ! import java.util.Locale; ! ! public class Location implements Serializable { ! private int streetNumber; ! private String city; ! private String streetName; ! private String countryCode; ! private Locale locale; ! private String description; ! ! /** ! * Returns the countryCode. ! * @return String ! */ ! public String getCountryCode() { ! return countryCode; ! } ! ! /** ! * Returns the description. ! * @return String ! */ ! public String getDescription() { ! return description; ! } ! ! /** ! * Returns the locale. ! * @return Locale ! */ ! public Locale getLocale() { ! return locale; ! } ! ! /** ! * Returns the streetName. ! * @return String ! */ ! public String getStreetName() { ! return streetName; ! } ! ! /** ! * Returns the streetNumber. ! * @return int ! */ ! public int getStreetNumber() { ! return streetNumber; ! } ! ! /** ! * Sets the countryCode. ! * @param countryCode The countryCode to set ! */ ! public void setCountryCode(String countryCode) { ! this.countryCode = countryCode; ! } ! ! /** ! * Sets the description. ! * @param description The description to set ! */ ! public void setDescription(String description) { ! this.description = description; ! } ! ! /** ! * Sets the locale. ! * @param locale The locale to set ! */ ! public void setLocale(Locale locale) { ! this.locale = locale; ! } ! ! /** ! * Sets the streetName. ! * @param streetName The streetName to set ! */ ! public void setStreetName(String streetName) { ! this.streetName = streetName; ! } ! ! /** ! * Sets the streetNumber. ! * @param streetNumber The streetNumber to set ! */ ! public void setStreetNumber(int streetNumber) { ! this.streetNumber = streetNumber; ! } ! ! /** ! * Returns the city. ! * @return String ! */ ! public String getCity() { ! return city; ! } ! ! /** ! * Sets the city. ! * @param city The city to set ! */ ! public void setCity(String city) { ! this.city = city; ! } ! ! public boolean equals(Object other) { ! Location l = (Location) other; ! return l.getCity().equals(city) && l.getStreetName().equals(streetName) && l.getCountryCode().equals(countryCode) && l.getStreetNumber()==streetNumber; ! } ! public int hashCode() { ! return streetName.hashCode(); ! } ! ! } Index: MoreStuff.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/MoreStuff.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MoreStuff.java 7 Nov 2002 11:33:49 -0000 1.2 --- MoreStuff.java 26 Nov 2002 03:35:44 -0000 1.3 *************** *** 1,86 **** ! //$Id$ ! package cirrus.hibernate.test; ! ! import java.io.Serializable; ! import java.util.Collection; ! ! ! public class MoreStuff implements Serializable { ! private String stringId; ! private int intId; ! private Collection stuffs; ! private String name; ! ! public boolean equals(Object other) { ! return ( (MoreStuff) other ).getIntId()==intId && ( (MoreStuff) other ).getStringId().equals(stringId); ! } ! ! public int hashCode() { ! return stringId.hashCode(); ! } ! ! /** ! * Returns the stuffs. ! * @return Collection ! */ ! public Collection getStuffs() { ! return stuffs; ! } ! ! /** ! * Sets the stuffs. ! * @param stuffs The stuffs to set ! */ ! public void setStuffs(Collection stuffs) { ! th... [truncated message content] |