org.melati.poem
Class SizedAtomPoemType
java.lang.Object
org.melati.poem.BasePoemType<T>
org.melati.poem.AtomPoemType
org.melati.poem.SizedAtomPoemType
- All Implemented Interfaces:
- Cloneable, PoemType, SQLPoemType, SQLType
- Direct Known Subclasses:
- BinaryPoemType, StringPoemType
public abstract class SizedAtomPoemType
- extends AtomPoemType
An AtomPoemType
with a size
.
Constructor Summary |
SizedAtomPoemType(int sqlTypeCode,
String sqlTypeName,
boolean nullable,
int size)
Constructor with size. |
Methods inherited from class org.melati.poem.BasePoemType |
_assertValidRaw, _canRepresent, _getRaw, _possibleRaws, _rawOfString, _saveColumnInfo, _setRaw, assertValidCooked, assertValidRaw, canRepresent, clone, cookedOfRaw, getLimitRaw, getLowRaw, getNullable, getRaw, possibleRaws, quotedRaw, rawOfCooked, rawOfString, saveColumnInfo, setRaw, setRawRange, sqlDefinition, sqlTypeCode, sqlTypeDefinition, stringOfCooked, stringOfRaw, toString, withNullable |
SizedAtomPoemType
public SizedAtomPoemType(int sqlTypeCode,
String sqlTypeName,
boolean nullable,
int size)
- Constructor with size.
- Parameters:
sqlTypeCode
- SQL TYPE codesqlTypeName
- SQL TYPE namenullable
- whether nullablesize
- how big
getSize
public int getSize()
- Returns:
- the size of this type
withSize
public SizedAtomPoemType withSize(int newSize)
- Parameters:
newSize
- size of returned field
- Returns:
- this or clone with new size
sizeGreaterEqual
public static boolean sizeGreaterEqual(int sizeA,
int sizeB)
- Compare sizes, taking into account magic value -1.
- Parameters:
sizeA
- the size of first fieldsizeB
- the size of second field
- Returns:
- whether it should be considered bigger
Copyright © 2000-2010 PanEris. All Rights Reserved.