本文整理汇总了Java中org.hsqldb.types.Type.isNumberType方法的典型用法代码示例。如果您正苦于以下问题:Java Type.isNumberType方法的具体用法?Java Type.isNumberType怎么用?Java Type.isNumberType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hsqldb.types.Type
的用法示例。
在下文中一共展示了Type.isNumberType方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addTypeInfo
import org.hsqldb.types.Type; //导入方法依赖的package包/类
void addTypeInfo(Object[] row, Type type) {
final int data_type = 5;
final int character_maximum_length = 6;
final int character_octet_length = 7;
final int character_set_catalog = 8;
final int character_set_schema = 9;
final int character_set_name = 10;
final int collation_catalog = 11;
final int collation_schema = 12;
final int collation_name = 13;
final int numeric_precision = 14;
final int numeric_precision_radix = 15;
final int numeric_scale = 16;
final int datetime_precision = 17;
final int interval_type = 18;
final int interval_precision = 19;
//
final int maximum_cardinality = 26;
final int dtd_identifier = 27;
final int declared_data_type = 28;
final int declared_numeric_precision = 29;
final int declared_numeric_scale = 30;
row[data_type] = type.getFullNameString();
if (type.isCharacterType()) {
row[character_maximum_length] = ValuePool.getLong(type.precision);
row[character_octet_length] = ValuePool.getLong(type.precision
* 2);
row[character_set_catalog] = database.getCatalogName().name;
row[character_set_schema] =
type.getCharacterSet().getSchemaName().name;
row[character_set_name] = type.getCharacterSet().getName().name;
row[collation_catalog] = database.getCatalogName().name;
row[collation_schema] = type.getCollation().getSchemaName().name;
row[collation_name] = type.getCollation().getName().name;
} else if (type.isNumberType()) {
row[numeric_precision] = ValuePool.getLong(
((NumberType) type).getNumericPrecisionInRadix());
row[declared_numeric_precision] = ValuePool.getLong(
((NumberType) type).getNumericPrecisionInRadix());
if (type.isExactNumberType()) {
row[numeric_scale] = row[declared_numeric_scale] =
ValuePool.getLong(type.scale);
}
row[numeric_precision_radix] =
ValuePool.getLong(type.getPrecisionRadix());
} else if (type.isBooleanType()) {
//
} else if (type.isDateTimeType()) {
row[datetime_precision] = ValuePool.getLong(type.scale);
} else if (type.isIntervalType()) {
row[data_type] = "INTERVAL";
row[interval_type] = IntervalType.getQualifier(type.typeCode);
row[interval_precision] = ValuePool.getLong(type.precision);
row[datetime_precision] = ValuePool.getLong(type.scale);
} else if (type.isBinaryType()) {
row[character_maximum_length] = ValuePool.getLong(type.precision);
row[character_octet_length] = ValuePool.getLong(type.precision);
} else if (type.isBitType()) {
row[character_maximum_length] = ValuePool.getLong(type.precision);
row[character_octet_length] = ValuePool.getLong(type.precision);
} else if (type.isArrayType()) {
row[maximum_cardinality] =
ValuePool.getLong(type.arrayLimitCardinality());
}
row[dtd_identifier] = type.getDefinition();
row[declared_data_type] = row[data_type];
}
示例2: addTypeInfo
import org.hsqldb.types.Type; //导入方法依赖的package包/类
void addTypeInfo(Object[] row, Type type) {
final int data_type = 5;
final int character_maximum_length = 6;
final int character_octet_length = 7;
final int character_set_catalog = 8;
final int character_set_schema = 9;
final int character_set_name = 10;
final int collation_catalog = 11;
final int collation_schema = 12;
final int collation_name = 13;
final int numeric_precision = 14;
final int numeric_precision_radix = 15;
final int numeric_scale = 16;
final int datetime_precision = 17;
final int interval_type = 18;
final int interval_precision = 19;
//
final int maximum_cardinality = 26;
final int dtd_identifier = 27;
final int declared_data_type = 28;
final int declared_numeric_precision = 29;
final int declared_numeric_scale = 30;
row[data_type] = type.getFullNameString();
if (type.isCharacterType()) {
row[character_maximum_length] = ValuePool.getLong(type.precision);
row[character_octet_length] = ValuePool.getLong(type.precision
* 2);
row[character_set_catalog] = database.getCatalogName().name;
row[character_set_schema] =
((CharacterType) type).getCharacterSet().getSchemaName().name;
row[character_set_name] =
((CharacterType) type).getCharacterSet().getName().name;
row[collation_catalog] = database.getCatalogName().name;
row[collation_schema] =
((CharacterType) type).getCollation().getSchemaName().name;
row[collation_name] =
((CharacterType) type).getCollation().getName().name;
} else if (type.isNumberType()) {
row[numeric_precision] = ValuePool.getLong(
((NumberType) type).getNumericPrecisionInRadix());
row[declared_numeric_precision] = ValuePool.getLong(
((NumberType) type).getNumericPrecisionInRadix());
if (type.isExactNumberType()) {
row[numeric_scale] = row[declared_numeric_scale] =
ValuePool.getLong(type.scale);
}
row[numeric_precision_radix] =
ValuePool.getLong(type.getPrecisionRadix());
} else if (type.isBooleanType()) {
//
} else if (type.isDateTimeType()) {
row[datetime_precision] = ValuePool.getLong(type.scale);
} else if (type.isIntervalType()) {
row[data_type] = "INTERVAL";
row[interval_type] =
((IntervalType) type).getQualifier(type.typeCode);
row[interval_precision] = ValuePool.getLong(type.precision);
row[datetime_precision] = ValuePool.getLong(type.scale);
} else if (type.isBinaryType()) {
row[character_maximum_length] = ValuePool.getLong(type.precision);
row[character_octet_length] = ValuePool.getLong(type.precision);
} else if (type.isBitType()) {
row[character_maximum_length] = ValuePool.getLong(type.precision);
row[character_octet_length] = ValuePool.getLong(type.precision);
} else if (type.isArrayType()) {
row[maximum_cardinality] =
ValuePool.getLong(type.arrayLimitCardinality());
}
row[dtd_identifier] = type.getDefinition();
row[declared_data_type] = row[data_type];
}
示例3: isSigned
import org.hsqldb.types.Type; //导入方法依赖的package包/类
/**
* Retrieves whether values for the designated parameter can be signed numbers.
*
* @param param the first parameter is 1, the second is 2, ...
* @return <code>true</code> if so; <code>false</code> otherwise
* @exception SQLException if a database access error occurs
* @since JDK 1.4, HSQLDB 1.7.2
*/
public boolean isSigned(int param) throws SQLException {
checkRange(param);
Type type = translateType(rmd.columnTypes[--param]);
return type.isNumberType();
}
示例4: isSigned
import org.hsqldb.types.Type; //导入方法依赖的package包/类
/**
* <!-- start generic documentation -->
* Indicates whether values in the designated column are signed numbers.
* <!-- end generic documentation -->
*
* <!-- start Release-specific documentation -->
* <div class="ReleaseSpecificDocumentation">
* <h3>HSQLDB-Specific Information:</h3> <p>
*
* HSQLDB 2.0 fully supports this feature. <p>
*
* </div>
* <!-- end release-specific documentation -->
*
* @param column the first column is 1, the second is 2, ...
* @return <code>true</code> if so; <code>false</code> otherwise
* @exception SQLException if a database access error occurs
*/
public boolean isSigned(int column) throws SQLException {
checkColumn(column);
Type type = translateType(resultMetaData.columnTypes[--column]);
return type.isNumberType();
}
示例5: isSigned
import org.hsqldb.types.Type; //导入方法依赖的package包/类
/**
* <!-- start generic documentation -->
* Indicates whether values in the designated column are signed numbers.
* <!-- end generic documentation -->
*
* <!-- start Release-specific documentation -->
* <div class="ReleaseSpecificDocumentation">
* <h3>HSQLDB-Specific Information:</h3> <p>
*
* HSQLDB 1.9.0 fully supports this feature. <p>
*
* </div>
* <!-- end release-specific documentation -->
*
* @param column the first column is 1, the second is 2, ...
* @return <code>true</code> if so; <code>false</code> otherwise
* @exception SQLException if a database access error occurs
*/
public boolean isSigned(int column) throws SQLException {
checkColumn(column);
Type type = resultMetaData.columnTypes[--column];
return type.isNumberType();
}