类org.hibernate.type.BinaryType源码实例Demo

下面列出了怎么用org.hibernate.type.BinaryType的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: lams   文件: SimpleValue.java
public Type getType() throws MappingException {
	if ( type != null ) {
		return type;
	}

	if ( typeName == null ) {
		throw new MappingException( "No type name" );
	}

	if ( typeParameters != null
			&& Boolean.valueOf( typeParameters.getProperty( DynamicParameterizedType.IS_DYNAMIC ) )
			&& typeParameters.get( DynamicParameterizedType.PARAMETER_TYPE ) == null ) {
		createParameterImpl();
	}

	Type result = getMetadata().getTypeConfiguration().getTypeResolver().heuristicType( typeName, typeParameters );
	// if this is a byte[] version/timestamp, then we need to use RowVersionType
	// instead of BinaryType (HHH-10413)
	if ( isVersion && BinaryType.class.isInstance( result ) ) {
		log.debug( "version is BinaryType; changing to RowVersionType" );
		result = RowVersionType.INSTANCE;
	}
	if ( result == null ) {
		String msg = "Could not determine type for: " + typeName;
		if ( table != null ) {
			msg += ", at table: " + table.getName();
		}
		if ( columns != null && columns.size() > 0 ) {
			msg += ", for columns: " + columns;
		}
		throw new MappingException( msg );
	}

	return result;
}
 
源代码2 项目: unitime   文件: SessionBackup.java
boolean hasBlob() {
	for (String property: iMeta.getPropertyNames()) {
		if (iMeta.getPropertyType(property) instanceof BinaryType) return true;
	}
	return false;
}
 
源代码3 项目: lams   文件: Query.java
/**
 * Bind a positional binary-valued parameter.
 *
 * @param position The parameter position
 * @param val The bind value
 *
 * @return {@code this}, for method chaining
 *
 * @deprecated (since 5.2) use {@link #setParameter(int, Object)} or {@link #setParameter(int, Object, Type)}
 * instead
 */
@Deprecated
@SuppressWarnings("unchecked")
default Query<R> setBinary(int position, byte[] val) {
	setParameter( position, val, BinaryType.INSTANCE );
	return this;
}
 
源代码4 项目: lams   文件: Query.java
/**
 * Bind a named binary-valued parameter.
 *
 * @param name The parameter name
 * @param val The bind value
 *
 * @return {@code this}, for method chaining
 *
 * @deprecated (since 5.2) use {@link #setParameter(int, Object)} or {@link #setParameter(int, Object, Type)}
 * instead
 */
@Deprecated
@SuppressWarnings("unchecked")
default Query<R> setBinary(String name, byte[] val) {
	setParameter( name, val, BinaryType.INSTANCE );
	return this;
}
 
源代码5 项目: lams   文件: Query.java
/**
 * Bind a positional binary-valued parameter.
 *
 * @param position The parameter position
 * @param val The bind value
 *
 * @return {@code this}, for method chaining
 *
 * @deprecated (since 5.2) use {@link #setParameter(int, Object)} or {@link #setParameter(int, Object, Type)}
 * instead
 */
@Deprecated
@SuppressWarnings("unchecked")
default Query<R> setBinary(int position, byte[] val) {
	setParameter( position, val, BinaryType.INSTANCE );
	return this;
}
 
源代码6 项目: lams   文件: Query.java
/**
 * Bind a named binary-valued parameter.
 *
 * @param name The parameter name
 * @param val The bind value
 *
 * @return {@code this}, for method chaining
 *
 * @deprecated (since 5.2) use {@link #setParameter(String, Object)} or {@link #setParameter(String, Object, Type)}
 * instead
 */
@Deprecated
@SuppressWarnings("unchecked")
default Query<R> setBinary(String name, byte[] val) {
	setParameter( name, val, BinaryType.INSTANCE );
	return this;
}
 
 类所在包
 同包方法