1 package org.myoodb.core.command; 25 26 import java.io.*; 27 28 import org.myoodb.core.*; 29 30 public class GetRootCommand extends AbstractCommand implements Externalizable 31 { 32 private String m_rootName; 33 34 public GetRootCommand() 35 { 36 } 37 38 public GetRootCommand(String rootName) 39 { 40 m_rootName = rootName; 41 } 42 43 public void process(AbstractTransaction tx) throws Exception 44 { 45 m_result = tx.getRoot(m_rootName); 46 } 47 48 public void writeExternal(ObjectOutput out) throws IOException 49 { 50 out.writeObject(m_rootName); 51 } 52 53 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException 54 { 55 m_rootName = (String ) in.readObject(); 56 } 57 } 58 | Popular Tags |