KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > roller > pojos > Assoc


1 /*
2  * Created on Jan 13, 2004
3  */

4 package org.roller.pojos;
5
6 import org.roller.RollerException;
7 import java.io.Serializable JavaDoc;
8
9 /**
10  * Interface for hierarchical assocations.
11  * @author David M Johnson
12  */

13 public interface Assoc extends Serializable JavaDoc
14 {
15     public static final String JavaDoc PARENT = "PARENT";
16     public static final String JavaDoc GRANDPARENT = "GRANDPARENT";
17
18     /** Object that owns this association. */
19     public HierarchicalPersistentObject getObject();
20     public void setObject(HierarchicalPersistentObject hpo);
21     
22     /** Associated object. */
23     public HierarchicalPersistentObject getAncestor();
24     public void setAncestor(HierarchicalPersistentObject hpo);
25     
26     /** Type of relationship, PARENT or GRANDPARENT. */
27     public String JavaDoc getRelation();
28     
29     /** Save association. */
30     public abstract void save() throws RollerException;
31     
32     /** Remove association. */
33     public abstract void remove() throws RollerException;
34 }
35
Popular Tags