KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > jcr > impl > storage > rdb > repository > data > UUIDReference


1 /****************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  */

5
6 package org.exoplatform.services.jcr.impl.storage.rdb.repository.data;
7 import java.util.Set JavaDoc;
8 import java.util.Iterator JavaDoc;
9 import java.util.HashSet JavaDoc;
10
11 /**
12  * Created by The eXo Platform SARL .
13  * @author <a HREF="mailto:geaz@users.sourceforge.net">Gennady Azarenkov</a>
14  * @version $Id: UUIDReference.java,v 1.2 2004/11/02 18:34:39 geaz Exp $
15  *
16  * @hibernate.class table="JCR_REPOSITORY_UUID"
17  */

18 public class UUIDReference {
19     public UUIDReference() {
20     }
21
22     private Long JavaDoc id;
23     private ContainerRecord container;
24     private String JavaDoc uuid;
25     private String JavaDoc realPath;
26     private Set JavaDoc references;
27
28     /** @hibernate.id generator-class="increment" */
29     public Long JavaDoc getId() {
30         return id;
31     }
32
33     public void setId(Long JavaDoc id) {
34         this.id = id;
35     }
36
37     /** @hibernate.property name="UUID"
38      * not-null="true"
39      *
40      **/

41     public String JavaDoc getUuid() {
42         return uuid;
43     }
44
45     public void setUuid(String JavaDoc UUID) {
46         this.uuid = UUID;
47     }
48
49     /** @hibernate.property name="REAL_PATH"
50      * not-null="true"
51      *
52      **/

53     public String JavaDoc getRealPath() {
54         return realPath;
55     }
56
57     public void setRealPath(String JavaDoc realPath) {
58         this.realPath = realPath;
59     }
60
61     /** @hibernate.many-to-one column="CONTAINER_ID"
62      * not-null="true"
63      **/

64     public ContainerRecord getContainer() {
65         return container;
66     }
67
68     public void setContainer(ContainerRecord container) {
69         this.container = container;
70     }
71
72     /**
73      * @hibernate.set lazy="true"
74      * cascade="all"
75      * @hibernate.collection-one-to-many class="org.exoplatform.services.jcr.impl.storage.rdb.repository.data.PathReference"
76      * @hibernate.collection-key column="UUID_REFERENCE_ID"
77      */

78     public Set JavaDoc getReferences() {
79         return references;
80     }
81
82     public void setReferences(Set JavaDoc references) {
83         this.references = references;
84     }
85
86     public Set JavaDoc getRefPaths() {
87         Iterator JavaDoc refs = references.iterator();
88         Set JavaDoc paths = new HashSet JavaDoc();
89         while(refs.hasNext()) {
90             paths.add( ((PathReference) refs.next()).getPath());
91         }
92         return paths;
93     }
94 }
95
Popular Tags