KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > mapping > IdentifierBag


1 //$Id: IdentifierBag.java,v 1.8 2005/02/20 03:34:49 oneovthafew Exp $
2
package org.hibernate.mapping;
3
4 import org.hibernate.type.CollectionType;
5 import org.hibernate.type.TypeFactory;
6
7 /**
8  * An <tt>IdentifierBag</tt> has a primary key consisting of
9  * just the identifier column
10  */

11 public class IdentifierBag extends IdentifierCollection {
12
13     public IdentifierBag(PersistentClass owner) {
14         super(owner);
15     }
16
17     public CollectionType getDefaultCollectionType() {
18         return TypeFactory.idbag( getRole(), getReferencedPropertyName(), isEmbedded() );
19     }
20
21     public Object JavaDoc accept(ValueVisitor visitor) {
22         return visitor.accept(this);
23     }
24 }
25
Popular Tags