KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > db4o > inside > ix > IxRemove


1 /* Copyright (C) 2004 - 2006 db4objects Inc. http://www.db4o.com
2
3 This file is part of the db4o open source object database.
4
5 db4o is free software; you can redistribute it and/or modify it under
6 the terms of version 2 of the GNU General Public License as published
7 by the Free Software Foundation and as clarified by db4objects' GPL
8 interpretation policy, available at
9 http://www.db4o.com/about/company/legalpolicies/gplinterpretation/
10 Alternatively you can write to db4objects, Inc., 1900 S Norfolk Street,
11 Suite 350, San Mateo, CA 94403, USA.
12
13 db4o is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 for more details.
17
18 You should have received a copy of the GNU General Public License along
19 with this program; if not, write to the Free Software Foundation, Inc.,
20 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */

21 package com.db4o.inside.ix;
22
23 import com.db4o.*;
24 import com.db4o.foundation.*;
25 import com.db4o.inside.freespace.*;
26
27 /**
28  * A node to represent an entry removed from an Index
29  */

30 public class IxRemove extends IxPatch {
31
32     public IxRemove(IndexTransaction a_ft, int a_parentID, Object JavaDoc a_value) {
33         super(a_ft, a_parentID, a_value);
34         _size = 0;
35     }
36     
37     public int ownSize() {
38         return 0;
39     }
40
41     public String JavaDoc toString() {
42         if(! Debug4.prettyToStrings){
43             return super.toString();
44         }
45         String JavaDoc str = "IxRemove " + _parentID + "\n " + handler().comparableObject(trans(), _value);
46         return str;
47     }
48     
49     public void freespaceVisit(FreespaceVisitor visitor, int index){
50         // do nothing
51
}
52     
53     public void visit(Object JavaDoc obj){
54         // do nothing
55
}
56     
57     public void visit(Visitor4 visitor, int[] lowerAndUpperMatch){
58         // do nothing
59
}
60
61     public int write(Indexable4 a_handler, YapWriter a_writer) {
62         // do nothing
63
return 0;
64     }
65
66     public void visitAll(IntObjectVisitor visitor) {
67         // do nothing
68
}
69     
70     public Object JavaDoc shallowClone() {
71         IxRemove remove=new IxRemove(_fieldTransaction,_parentID,_value);
72         super.shallowCloneInternal(remove);
73         return remove;
74     }
75 }
76
Popular Tags