1 /*2 * Created on Jan 13, 20043 */4 package org.roller.pojos;5 6 import org.roller.RollerException;7 import java.io.Serializable ;8 9 /**10 * Interface for hierarchical assocations.11 * @author David M Johnson12 */13 public interface Assoc extends Serializable 14 {15 public static final String PARENT = "PARENT";16 public static final String 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 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