1 /* 2 * Created on 8 Apr 2009 3 * 4 */ 5 package org.sourceforge.jemm.database.components.interfaces; 6 7 import org.sourceforge.jemm.database.components.ObjectStatusListener; 8 import org.sourceforge.jemm.types.ID; 9 10 /** 11 * @author Rory Graves 12 * 13 */ 14 public interface DBRootHandler { 15 void setObjectStatusListener(ObjectStatusListener objectStatusListener); 16 void setRoot(String rootName, ID newValue); 17 18 /** 19 * Set the given root, if the current value of the root is null. 20 * @param rootName The name of the root. 21 * @param newValue The new value to set 22 * @return The old value of the root, (i.e. the current value if the set fails, or null if it does) 23 */ 24 ID setRootIfNull(String rootName, ID newValue); 25 26 /** 27 * Return the current value of the root. 28 * @param rootName The name of the root. 29 * @return The current value of the root reference 'rootName' 30 */ 31 ID getRoot(String rootName); 32 } 33