KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * Copyright 2002 (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: BooleanCharColumnLiteral.java,v 1.1 2003/08/11 16:01:51 pierreg0 Exp $
9  */

10
11 package com.triactive.jdo.store;
12
13
14 class BooleanCharColumnLiteral extends BooleanLiteral
15 {
16
17     public BooleanCharColumnLiteral(QueryStatement qs, boolean value)
18     {
19         super(qs, value);
20     }
21
22
23     /**
24      * Return the String value for TRUE in the database. This should be
25      * overriden by subclasses for special cases of booleans.
26      *
27      * @return The String value for TRUE in the database.
28      */

29     protected String JavaDoc getBooleanTrueValue()
30     {
31         return "'Y'";
32     }
33
34
35     /**
36      * Return the String value for FALSE in the database. This should be
37      * overriden by subclasses for special cases of booleans.
38      *
39      * @return The String value for FALSE in the database.
40      */

41     protected String JavaDoc getBooleanFalseValue()
42     {
43         return "'N'";
44     }
45 }
Popular Tags