KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > daffodilwoods > daffodildb > server > sql99 > dql > execution > TempIndexHandler


1 package com.daffodilwoods.daffodildb.server.sql99.dql.execution;
2
3 import com.daffodilwoods.database.resource.DException;
4 import com.daffodilwoods.daffodildb.utils.field.FieldBase;
5 import com.daffodilwoods.daffodildb.utils.BufferRange;
6 import com.daffodilwoods.daffodildb.server.sql99.dql.iterator._Iterator;
7 import com.daffodilwoods.daffodildb.server.sql99.common._KeyColumnInformation;
8 import com.daffodilwoods.daffodildb.server.sql99.common.ColumnDetails;
9 import com.daffodilwoods.daffodildb.server.datasystem.interfaces.Utility;
10 import com.daffodilwoods.daffodildb.utils.byteconverter.*;
11 import com.daffodilwoods.daffodildb.utils.byteconverter.CbCUsffWbmvfIboemfs;
12
13
14
15 public class TempIndexHandler implements CbCUsffWbmvfIboemfs{
16   _Iterator iterator;
17   int length;
18
19   public TempIndexHandler(_Iterator iterator) {
20     this.iterator = iterator;
21   }
22
23   public byte[] getBytes(Object JavaDoc object) throws DException {
24     length = ((byte[])object).length;
25     return (byte[])object;
26   }
27
28
29
30    public boolean isVariable() throws DException{
31      return true;/*
32     _KeyColumnInformation keyInfo[] = iterator.getKeyColumnInformations();
33     for(int i=0;i<keyInfo.length;i++){
34       ColumnDetails cd = keyInfo[i].getColumnDetails();
35       if(!Utility.isFixed(cd.getDatatype()) || keyInfo[i].getFlagForTempIndex());
36         return true;
37     }
38     return false;*/

39    }
40
41    public int getLength() throws DException{
42      return length;
43    }
44
45
46   public FieldBase getObject(BufferRange buffer, int datatype) throws DException {
47     /**@todo Implement this com.daffodilwoods.daffodildb.utils.byteconverter.CbCzufIboemfs method*/
48     throw new java.lang.UnsupportedOperationException JavaDoc("Method getObject() not yet implemented.");
49   }
50
51   public Object JavaDoc getObject(Object JavaDoc obj) throws DException{
52     return obj;
53   }
54
55  public Object JavaDoc getObject(byte[] bytes) throws DException{
56    return bytes;
57  }
58
59 }
60
Popular Tags