當前位置: 首頁>>代碼示例>>Java>>正文


Java StandardBasicTypes.INTEGER屬性代碼示例

本文整理匯總了Java中org.hibernate.type.StandardBasicTypes.INTEGER屬性的典型用法代碼示例。如果您正苦於以下問題:Java StandardBasicTypes.INTEGER屬性的具體用法?Java StandardBasicTypes.INTEGER怎麽用?Java StandardBasicTypes.INTEGER使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.hibernate.type.StandardBasicTypes的用法示例。


在下文中一共展示了StandardBasicTypes.INTEGER屬性的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: toType

public Type toType(String propertyName) throws QueryException {
	if ( propertyName.equals(CollectionPropertyNames.COLLECTION_ELEMENTS) ) {
		return memberPersister.getElementType();
	}
	else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_INDICES) ) {
		if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection before indices()");
		return memberPersister.getIndexType();
	}
	else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_SIZE) ) {
		return StandardBasicTypes.INTEGER;
	}
	else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MAX_INDEX) ) {
		return memberPersister.getIndexType();
	}
	else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MIN_INDEX) ) {
		return memberPersister.getIndexType();
	}
	else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MAX_ELEMENT) ) {
		return memberPersister.getElementType();
	}
	else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MIN_ELEMENT) ) {
		return memberPersister.getElementType();
	}
	else {
		//return memberPersister.getPropertyType(propertyName);
		throw new QueryException("illegal syntax near collection: " + propertyName);
	}
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:28,代碼來源:CollectionPropertyMapping.java

示例2: getDataType

public Type getDataType() {
	if ( expectedType != null ) {
		return expectedType;
	}

	switch ( getType() ) {
		case NUM_INT:
			return StandardBasicTypes.INTEGER;
		case NUM_FLOAT:
			return StandardBasicTypes.FLOAT;
		case NUM_LONG:
			return StandardBasicTypes.LONG;
		case NUM_DOUBLE:
			return StandardBasicTypes.DOUBLE;
		case NUM_BIG_INTEGER:
			return StandardBasicTypes.BIG_INTEGER;
		case NUM_BIG_DECIMAL:
			return StandardBasicTypes.BIG_DECIMAL;
		case QUOTED_STRING:
			return StandardBasicTypes.STRING;
		case TRUE:
		case FALSE:
			return StandardBasicTypes.BOOLEAN;
		default:
			return null;
	}
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:27,代碼來源:LiteralNode.java

示例3: getTypedValues

@Override
public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException {
	return new TypedValue[] { new TypedValue( StandardBasicTypes.INTEGER, size ) };
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:4,代碼來源:SizeExpression.java

示例4: getDiscriminatorType

public Type getDiscriminatorType() {
	return StandardBasicTypes.INTEGER;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:3,代碼來源:UnionSubclassEntityPersister.java

示例5: getReturnType

@Override
public Type getReturnType(Type firstArgumentType, Mapping mapping) {
	final int jdbcType = determineJdbcTypeCode( firstArgumentType, mapping );

	// First allow the actual type to control the return value; the underlying sqltype could
	// actually be different
	if ( firstArgumentType == StandardBasicTypes.BIG_INTEGER ) {
		return StandardBasicTypes.BIG_INTEGER;
	}
	else if ( firstArgumentType == StandardBasicTypes.BIG_DECIMAL ) {
		return StandardBasicTypes.BIG_DECIMAL;
	}
	else if ( firstArgumentType == StandardBasicTypes.LONG
			|| firstArgumentType == StandardBasicTypes.SHORT
			|| firstArgumentType == StandardBasicTypes.INTEGER ) {
		return StandardBasicTypes.LONG;
	}
	else if ( firstArgumentType == StandardBasicTypes.FLOAT || firstArgumentType == StandardBasicTypes.DOUBLE)  {
		return StandardBasicTypes.DOUBLE;
	}

	// finally use the jdbcType if == on Hibernate types did not find a match.
	//
	//	IMPL NOTE : we do not match on Types.NUMERIC because it could be either, so we fall-through to the
	// 		first argument type
	if ( jdbcType == Types.FLOAT
			|| jdbcType == Types.DOUBLE
			|| jdbcType == Types.DECIMAL
			|| jdbcType == Types.REAL) {
		return StandardBasicTypes.DOUBLE;
	}
	else if ( jdbcType == Types.BIGINT
			|| jdbcType == Types.INTEGER
			|| jdbcType == Types.SMALLINT
			|| jdbcType == Types.TINYINT ) {
		return StandardBasicTypes.LONG;
	}

	// as a last resort, return the type of the first argument
	return firstArgumentType;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:41,代碼來源:StandardAnsiSqlAggregationFunctions.java

示例6: getReturnType

@Override
public Type getReturnType(Type firstArgumentType, Mapping mapping) throws QueryException {
	return StandardBasicTypes.INTEGER;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:4,代碼來源:PositionSubstringFunction.java

示例7: getReturnType

@Override
public Type getReturnType(Type columnType, Mapping mapping) throws QueryException {
	return StandardBasicTypes.INTEGER;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:4,代碼來源:CharIndexFunction.java

示例8: getReturnType

@Override
public Type getReturnType(Type columnType, Mapping mapping) {
	return StandardBasicTypes.INTEGER;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:4,代碼來源:ClassicCountFunction.java

示例9: resolveDataType

private Type resolveDataType() {
	// TODO : we may also want to check that the types here map to exactly one column/JDBC-type
	//      can't think of a situation where arithmetic expression between multi-column mappings
	//      makes any sense.
	final Node lhs = getLeftHandOperand();
	final Node rhs = getRightHandOperand();

	final Type lhType = ( lhs instanceof SqlNode ) ? ( (SqlNode) lhs ).getDataType() : null;
	final Type rhType = ( rhs instanceof SqlNode ) ? ( (SqlNode) rhs ).getDataType() : null;

	if ( isDateTimeType( lhType ) || isDateTimeType( rhType ) ) {
		return resolveDateTimeArithmeticResultType( lhType, rhType );
	}
	else {
		if ( lhType == null ) {
			if ( rhType == null ) {
				// we do not know either type
				// BLIND GUESS!
				return StandardBasicTypes.DOUBLE;
			}
			else {
				// we know only the rhs-hand type, so use that
				return rhType;
			}
		}
		else {
			if ( rhType == null ) {
				// we know only the lhs-hand type, so use that
				return lhType;
			}
			else {
				if ( lhType == StandardBasicTypes.DOUBLE || rhType == StandardBasicTypes.DOUBLE ) {
					return StandardBasicTypes.DOUBLE;
				}
				if ( lhType == StandardBasicTypes.FLOAT || rhType == StandardBasicTypes.FLOAT ) {
					return StandardBasicTypes.FLOAT;
				}
				if ( lhType == StandardBasicTypes.BIG_DECIMAL || rhType == StandardBasicTypes.BIG_DECIMAL ) {
					return StandardBasicTypes.BIG_DECIMAL;
				}
				if ( lhType == StandardBasicTypes.BIG_INTEGER || rhType == StandardBasicTypes.BIG_INTEGER ) {
					return StandardBasicTypes.BIG_INTEGER;
				}
				if ( lhType == StandardBasicTypes.LONG || rhType == StandardBasicTypes.LONG ) {
					return StandardBasicTypes.LONG;
				}
				if ( lhType == StandardBasicTypes.INTEGER || rhType == StandardBasicTypes.INTEGER ) {
					return StandardBasicTypes.INTEGER;
				}
				return lhType;
			}
		}
	}
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:54,代碼來源:BinaryArithmeticOperatorNode.java


注:本文中的org.hibernate.type.StandardBasicTypes.INTEGER屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。