KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: IndexBackref.java,v 1.4 2005/05/27 01:30:18 oneovthafew Exp $
2
package org.hibernate.mapping;
3
4 import org.hibernate.property.IndexPropertyAccessor;
5 import org.hibernate.property.PropertyAccessor;
6
7 /**
8  * @author Gavin King
9  */

10 public class IndexBackref extends Property {
11     private String JavaDoc collectionRole;
12     private String JavaDoc entityName;
13     
14     public boolean isBackRef() {
15         return true;
16     }
17     public String JavaDoc getCollectionRole() {
18         return collectionRole;
19     }
20     public void setCollectionRole(String JavaDoc collectionRole) {
21         this.collectionRole = collectionRole;
22     }
23
24     public boolean isBasicPropertyAccessor() {
25         return false;
26     }
27
28     public PropertyAccessor getPropertyAccessor(Class JavaDoc clazz) {
29         return new IndexPropertyAccessor(collectionRole, entityName);
30     }
31     
32     public String JavaDoc getEntityName() {
33         return entityName;
34     }
35     public void setEntityName(String JavaDoc entityName) {
36         this.entityName = entityName;
37     }
38 }
39
Popular Tags