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