org.axiondb.types

Class CharacterType

public class CharacterType extends BaseDataType implements DataType.NonFixedPrecision

A DataTyperepresenting a single char value.

Version: $Revision: 1.14 $ $Date: 2005/12/20 18:32:42 $

Author: Chuck Burdick Rodney Waldhoff Ahimanikya Satapathy

Constructor Summary
CharacterType()
CharacterType(int size)
Method Summary
booleanaccepts(Object value)
Returns true iff value is null, a Character, or a single character String.
intcompare(Object a, Object b)
Objectconvert(Object value)
Returns an String converted from the given value , or throws IllegalArgumentExceptionif the given value isn't acceptable.
intgetColumnDisplaySize()
protected ComparatorgetComparator()
intgetJdbcType()
StringgetLiteralPrefix()
StringgetLiteralSuffix()
intgetPrecision()
StringgetPreferredValueClassName()
shortgetSearchableCode()
booleanisCaseSensitive()
DataTypemakeNewInstance()
protected Stringprocess(String value)
Objectread(DataInput in)
protected StringrightTrim(String source)
voidsetPrecision(int newSize)
Objectsuccessor(Object value)
booleansupportsSuccessor()
byte[]toByteArray(Object value)
StringtoString()
Returns "character"
protected StringtruncateIfLegal(String source)
voidwrite(Object value, DataOutput out)
Writes the given value to the given DataOutput.

Constructor Detail

CharacterType

public CharacterType()

CharacterType

public CharacterType(int size)

Method Detail

accepts

public boolean accepts(Object value)
Returns true iff value is null, a Character, or a single character String.

compare

public int compare(Object a, Object b)

convert

public Object convert(Object value)
Returns an String converted from the given value , or throws IllegalArgumentExceptionif the given value isn't acceptable.

getColumnDisplaySize

public int getColumnDisplaySize()

getComparator

protected Comparator getComparator()

getJdbcType

public int getJdbcType()

Returns: Types#CHAR

getLiteralPrefix

public String getLiteralPrefix()

getLiteralSuffix

public String getLiteralSuffix()

getPrecision

public final int getPrecision()

getPreferredValueClassName

public String getPreferredValueClassName()

getSearchableCode

public short getSearchableCode()

isCaseSensitive

public boolean isCaseSensitive()

makeNewInstance

public DataType makeNewInstance()

process

protected String process(String value)

read

public Object read(DataInput in)

See Also: CharacterType

rightTrim

protected final String rightTrim(String source)

setPrecision

public void setPrecision(int newSize)

successor

public Object successor(Object value)

supportsSuccessor

public boolean supportsSuccessor()

toByteArray

public byte[] toByteArray(Object value)

toString

public String toString()
Returns "character"

Returns: "character"

truncateIfLegal

protected final String truncateIfLegal(String source)

write

public void write(Object value, DataOutput out)
Writes the given value to the given DataOutput.Null values are written as Character.MIN_VALUE,false. Character.MIN_VALUE values are written as Character.MIN_VALUE,true. All other values are written directly.

Parameters: value the value to write, which must be acceptable