Update of /cvsroot/xdoclet/xdoclet/samples/src/java/test/hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv28056/samples/src/java/test/hibernate
Added Files: CompositeId.java CompositeIdEntity.java Log Message: XDT-219 - Partial implementation of composite ID support. --- NEW FILE: CompositeId.java --- package test.hibernate; import java.io.Serializable; /** * composite ID class example */ public class CompositeId implements Serializable { Integer _foo; long _bar; String _baz; public Integer getFoo() { return _foo; } public void setFoo(Integer foo) { _foo = foo; } public long getBar() { return _bar; } public void setBar(long bar) { _bar = bar; } public String getBaz() { return _baz; } public void setBaz(String baz) { _baz = baz; } public boolean equals(Object o) { if( o == null) { return false; } if(getClass().equals(o.getClass()) && _foo.equals(((CompositeId)o).getFoo()) && _bar == ((CompositeId)o).getBar() && _baz.equals(((CompositeId)o).getBaz()) ) { return true; } else { return false; } } } --- NEW FILE: CompositeIdEntity.java --- package test.hibernate; /** * demonstrate composite ID * * @author ko5tik ( Konstantin Pribluda ) * @hibernate.class */ public class CompositeIdEntity { private CompositeId _id; private String _foo; /** * @hibernate.id generator-class="assigned" */ public CompositeId getId() { return _id; } public void setId(CompositeId id) { _id = id; } public String getFoo() { return _foo; } /** * foo value * * @return String * @hibernate.property */ public void setFoo(String foo) { _foo = foo; } } ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel