KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ozoneDB > core > DbRemote > DbCopyObj


1 // You can redistribute this software and/or modify it under the terms of
2
// the Ozone Core License version 1 published by ozone-db.org.
3
//
4
// The original code and portions created by SMB are
5
// Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
6
//
7
// $Id: DbCopyObj.java,v 1.5 2002/12/29 11:15:56 per_nyfelt Exp $
8

9 package org.ozoneDB.core.DbRemote;
10
11 import org.ozoneDB.OzoneProxy;
12 import org.ozoneDB.core.ObjectContainer;
13 import org.ozoneDB.core.Transaction;
14
15 /**
16  * Dieses Kommando loescht ein Datenbankobjekt.
17  *
18  *
19  * @author <a HREF="http://www.softwarebuero.de/">SMB</a>
20  * @version $Revision: 1.5 $Date: 2002/12/29 11:15:56 $
21  */

22 public class DbCopyObj extends DbCommand {
23
24     private OzoneProxy obj;
25
26
27     public DbCopyObj() {
28     }
29
30
31     public DbCopyObj( OzoneProxy _obj ) {
32         obj = _obj;
33     }
34
35
36     public void perform( Transaction ta ) throws Exception JavaDoc {
37         // env.logWriter.newEntry (this, "DbCopyObj.perform()...", LogWriter.DEBUG);
38
ObjectContainer container = ta.copyObject(obj.remoteID());
39
40         try {
41             result = container.ozoneProxy();
42         } finally {
43             container.unpin();
44         }
45     }
46
47 }
48
Popular Tags