public class DbColDesc
extends java.lang.Object
implements java.io.Externalizable
Note that a DbColDesc
can be used to get information about the types
and properties of the columns in a DbValue
object.
The following code fragment creates the DbValue
object value.
DbColDesc intDesc = new DbColDesc("",Db.SQL_INTEGER,15,0,Db.SQL_NULLABLE_UNKNOWN); DbValue value= new DbValue(intDesc);
Modifier and Type | Field and Description |
---|---|
static int |
ARRAY
The constant referred to as an attribute type code
identifies it's ARRAY Type.
|
int |
bigDecimalLength
The length of the BigDecimal type column
for writing idx report.
|
java.lang.String |
colName
Deprecated.
|
static int |
CONSTANT
The constant referred to as an attribute type code
identifies it's CONSTANT Type.
|
static int |
CURRENCY
The constant referred to as an attribute type code
identifies it's CURRENCY Type.
|
static int |
ENCODE
The constant referred to as an attribute type code
identifies it's ENCODE Type, which means the name for this column
is encoded.
|
static int |
GLOBAL
The constant referred to as an attribute type code
identifies it's GLOBAL Type.
|
static int |
GROUPABLE
The constant referred to as an attribute type code
identifies it's GROUPABLE Type, which means it can be used
in SQL Group By clause.
|
static int |
GROUPLEVEL
The constant referred to as an attribute type code
identifies it's GROUPLEVEL Type, which means this column indicates
the value in this
DbValue is the level of the group(i.e. |
static int |
IGNORECASE
The constant referred to as an attribute type code
identifies it's IGNORECASE Type, which means cases of the column name will
be ignored.
|
static int |
NOTAUTOENCODE
The constant referred to as an attribute type code
identifies it's NOTAUTOENCODE Type, which means the name for this column
will not be encoded by default "8859_1".
|
int |
nullable
Deprecated.
|
static int |
PARAMETER
The constant referred to as an attribute type code
identifies it's PARAMETER Type.
|
int |
precision
Deprecated.
|
int |
scale
Deprecated.
|
int |
sqlType
Deprecated.
|
static int |
USER_DEFINED
The constant referred to as an attribute type code
identifies it's USER_DEFINED Type,
which means a user defined column, like formula.
|
Constructor and Description |
---|
DbColDesc()
Constructs an uninitialized DbColDesc.
|
DbColDesc(DbColDesc desc)
Constructs an initialized DbColDesc.
|
DbColDesc(java.lang.String ColName,
int SqlType,
int Precision,
int Scale,
int Nullable)
Constructs an initialized DbColDesc.
|
DbColDesc(java.lang.String ColName,
int SqlType,
int Precision,
int Scale,
int Nullable,
boolean bCurrency)
Constructs an initialized DbColDesc.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Deep clones this object.
|
boolean |
equals(java.lang.Object colDesc)
Compares the column names to see if they are equal.
|
int |
getColIndex()
Retrieves the integer index for this column.
|
java.lang.String |
getColName()
Returns the name of a column.
|
java.lang.String |
getEncodingName()
Retrieves the encoding name for this column.
|
int |
getFlag()
Returns the column flag
which is composed of all supported attributes
for the column description object.
|
int |
getFromEncoding()
Retrieves the integer value for converted encoding.
|
int |
getNullable()
Returns information of whether a column result set can have null values.
|
int |
getPrecision()
Returns the precision (maximum length) of
character or binary data or the precision
of decimal or numeric data for a column in a
result set.
|
java.lang.String |
getRealColName()
Retrieves the real name for this column.
|
int |
getScale()
Returns the scale of a column in a result set
for decimal or numeric data.
|
int |
getSqlType()
Returns the SqlType.
|
int |
getToEncoding()
Retrieves the integer value for original encoding.
|
boolean |
isArray()
Retrieves the indicator that shows whether the column is Array type.
|
boolean |
isConstant()
Returns the constant indicator to show whether the column is a constant.
|
boolean |
isCurrency()
Returns the currency type indicator to show whether the column is a currency type.
|
boolean |
isEncode()
Retrieves the indicator that shows whether the column is encoded.
|
boolean |
isGlobal()
Returns the global indicator to show whether the column is for global.
|
boolean |
isGroupable()
Returns the indicator whether the column to be group level.
|
boolean |
isGroupLevel()
Retrieves the indicator that shows whether the column is grouped.
|
boolean |
isIgnoreCase()
Returns the indicator of ignoring case.
|
boolean |
isNotAutoEncode()
Retrieves the indicator that keeps the original coding.
|
boolean |
isParameter()
Returns the parameter type indicator to show whether the column is a parameter type.
|
boolean |
isReadOnly()
Retrieves an indicator for the read only column.
|
boolean |
isUserDef()
Returns the user define column indicator to show whether the column is a user define column.
|
void |
readExternal(java.io.ObjectInput in) |
void |
setArray(boolean b)
Sets the indicator that shows whether the column is Array type.
|
void |
setColIndex(int index)
Sets the integer index for this column.
|
void |
setColName(java.lang.String name)
Sets the name of the column.
|
void |
setConstant(boolean b)
Sets the constant indicator.
|
void |
setConvertEncoding(int fromEncoding,
int toEncoding)
Sets the encoding for the column encoding change.
|
void |
setCurrency(boolean bCurrency)
Sets the currency type indicator.
|
void |
setEncode(boolean b)
Sets the indicator that shows whether the column is encoded.
|
void |
setEncodingName(java.lang.String enc)
Sets the encoding name for this column.
|
void |
setFlag(int flag)
Sets the column flag
which is composed of all supported attributes
for the column description object.
|
void |
setGlobal(boolean b)
Sets the global indicator.
|
void |
setGroupable(boolean g)
Sets the group indicator.
|
void |
setGroupLevel(boolean b)
Sets the indicator that shows whether the column is grouped.
|
void |
setIgnoreCase(boolean b)
Sets the indicator of ignoring case.
|
void |
setNotAutoEncode(boolean b)
Sets the indicator that keeps the original coding.
|
void |
setParameter(boolean b)
Sets the parameter type indicator.
|
void |
setReadOnly(boolean readOnly)
Sets an indicator for the read only column.
|
void |
setRealColName(java.lang.String realName)
Sets the real column name for this column which is identified by the data source.
|
void |
setSqlType(int type) |
void |
setUserDef(boolean b)
Sets the user define column indicator.
|
java.lang.String |
toString()
Retrieves a string to show the main parts of this DbColDesc object.
|
boolean |
typeEquals(DbColDesc colDesc)
Equality compared by the values of two DbColDesc objects.
|
void |
writeExternal(java.io.ObjectOutput out) |
public static final int CURRENCY
The constant referred to as an attribute type code identifies it's CURRENCY Type.
Note that it can be set with other attributes.
public static final int CONSTANT
The constant referred to as an attribute type code identifies it's CONSTANT Type.
Note that it can be set with other attributes.
public static final int GROUPABLE
The constant referred to as an attribute type code identifies it's GROUPABLE Type, which means it can be used in SQL Group By clause.
Note that it can be set with other attributes.
public static final int USER_DEFINED
The constant referred to as an attribute type code identifies it's USER_DEFINED Type, which means a user defined column, like formula.
Note that it can be set with other attributes.
public static final int PARAMETER
The constant referred to as an attribute type code identifies it's PARAMETER Type.
Note that it can be set with other attributes.
public static final int GLOBAL
The constant referred to as an attribute type code identifies it's GLOBAL Type.
Note that it can be set with other attributes.
public static final int IGNORECASE
The constant referred to as an attribute type code identifies it's IGNORECASE Type, which means cases of the column name will be ignored.
Note that it can be set with other attributes.
public static final int NOTAUTOENCODE
The constant referred to as an attribute type code identifies it's NOTAUTOENCODE Type, which means the name for this column will not be encoded by default "8859_1".
Note that it can be set with other attributes.
public static final int ENCODE
The constant referred to as an attribute type code identifies it's ENCODE Type, which means the name for this column is encoded.
Note that it can be set with other attributes.
public static final int GROUPLEVEL
The constant referred to as an attribute type code
identifies it's GROUPLEVEL Type, which means this column indicates
the value in this DbValue
is the level of the group(i.e. members of the group).
Note that it can be set with other attributes.
public static final int ARRAY
The constant referred to as an attribute type code identifies it's ARRAY Type.
Note that it can be set with other attributes.
public java.lang.String colName
getColName
and setColName
to access it instead of accessing it directly.public int sqlType
getSqlType
and setSqlType
to access it instead of accessing it directly.public int precision
getPrecision
and setPrecision
to access it instead of accessing it directly.public int scale
getScale
and setScale
to access it instead of accessing it directly.public int nullable
getNullable
and setNullable
to access it instead of accessing it directly.public int bigDecimalLength
bigDecimalLength
public DbColDesc()
public DbColDesc(java.lang.String ColName, int SqlType, int Precision, int Scale, int Nullable, boolean bCurrency)
Note that the scale's value should be greater than or equal to zero.
ColName
- The Column Name in the source.SqlType
- A valid constant Name from Db
.Precision
- Indicates the precision value.Scale
- Indicates the scale value.Nullable
- A valid constant Name from Db
.bCurrency
- Indicates whether the column is for currency type.
DbColDesc intDesc = new DbColDesc("",Db.SQL_INTEGER,15,0,Db.SQL_NULLABLE_UNKNOWN,true);
public DbColDesc(java.lang.String ColName, int SqlType, int Precision, int Scale, int Nullable)
Note that the scale's value should be greater than or equal to zero.
ColName
- The Column Name in the source.SqlType
- A valid constant Name from Db
.Precision
- Indicates the precision value.Scale
- Indicates the scale value.Nullable
- A valid constant Name from Db
.
DbColDesc intDesc = new DbColDesc("",Db.SQL_INTEGER,15,0,Db.SQL_NULLABLE_UNKNOWN);
public DbColDesc(DbColDesc desc)
Note that the scale's value should be greater than or equal to zero.
desc
- The column description object for duplication.public void setConvertEncoding(int fromEncoding, int toEncoding)
fromEncoding
- The original encoding.toEncoding
- The target encoding.jet.util.Converter
public int getFlag()
(flag & GROUPABLE) != 0;
public void setFlag(int flag)
public final void setGroupable(boolean g)
g
- Indicates whether the column to be group level. When it is true, its value stored at group node, not stored at data buffer..public final boolean isGroupable()
public void setConstant(boolean b)
b
- Indicates whether the column is a constant.public boolean isConstant()
public void setCurrency(boolean bCurrency)
bCurrency
- Indicates whether the column is a currency type.public boolean isCurrency()
public void setUserDef(boolean b)
b
- Indicates whether the column is a user define column.public boolean isUserDef()
public void setGlobal(boolean b)
b
- Indicates whether the column is for global.public boolean isGlobal()
public void setParameter(boolean b)
b
- Indicates whether the column is a parameter type.public boolean isParameter()
public void setIgnoreCase(boolean b)
b
- Indicates whether to ignore case in the column.public boolean isIgnoreCase()
public void setNotAutoEncode(boolean b)
b
- Indicates whether the column keeps the original coding.public boolean isNotAutoEncode()
public void setEncode(boolean b)
b
- Indicates whether the column is encoded.public boolean isEncode()
public void setGroupLevel(boolean b)
b
- Indicates whether the column is grouped.public boolean isGroupLevel()
public void setArray(boolean b)
b
- Indicates whether the column is Array type.public boolean isArray()
public void setEncodingName(java.lang.String enc)
enc
- The name of the encoding.public java.lang.String getEncodingName()
public void setColIndex(int index)
index
- for this column, which should not be negative.public int getColIndex()
public java.lang.String getColName()
public void setColName(java.lang.String name)
public void setRealColName(java.lang.String realName)
The
- real name for this column.public java.lang.String getRealColName()
public int getSqlType()
If SqlType cannot be determined, returns 0.
public void setSqlType(int type)
public int getPrecision()
public int getScale()
DbDecimal
,
jet.connect.DbNumeric
public int getNullable()
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean typeEquals(DbColDesc colDesc)
colDesc
- Compared one.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object colDesc)
equals
in class java.lang.Object
public boolean isReadOnly()
public void setReadOnly(boolean readOnly)
readOnly
- True indicates the column is read Only.public int getToEncoding()
jet.util.Converter
public int getFromEncoding()
jet.util.Converter
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException