KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > triactive > jdo > store > PointBaseAdapter


1 /*
2  * Copyright 2003 (C) TJDO.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the TJDO License version 1.0.
6  * See the terms of the TJDO License in the documentation provided with this software.
7  *
8  * $Id: PointBaseAdapter.java,v 1.2 2004/01/31 19:47:27 jackknifebarber Exp $
9  */

10
11 package com.triactive.jdo.store;
12
13 import java.sql.DatabaseMetaData JavaDoc;
14
15
16 /**
17  * Provides methods for adapting SQL language elements to the PointBase
18  * database.
19  * <p>
20  * Currently this adapter is just an untested placeholder.
21  *
22  * @author <a HREF="mailto:mmartin5@austin.rr.com">Mike Martin</a>
23  */

24
25 public class PointBaseAdapter extends DatabaseAdapter
26 {
27     public PointBaseAdapter(DatabaseMetaData JavaDoc metadata)
28     {
29         super(metadata);
30     }
31
32     public String JavaDoc getVendorID()
33     {
34         return "pointbase";
35     }
36
37     public boolean supportsBooleanComparison()
38     {
39         return false;
40     }
41
42     public TableExpression newTableExpression(QueryStatement qs, Table table, SQLIdentifier rangeVar)
43     {
44         return new TableExprAsJoins(qs, table, rangeVar);
45     }
46
47     public int getUnlimitedLengthPrecisionValue(TypeInfo typeInfo)
48     {
49         if (typeInfo.dataType == java.sql.Types.BLOB || typeInfo.dataType == java.sql.Types.CLOB)
50             return 1 << 31;
51         else
52             return super.getUnlimitedLengthPrecisionValue(typeInfo);
53     }
54 }
55
Popular Tags