本文整理了Java中org.jooq.DataType.asConvertedDataType()
方法的一些代码示例,展示了DataType.asConvertedDataType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DataType.asConvertedDataType()
方法的具体详情如下:
包路径:org.jooq.DataType
类名称:DataType
方法名:asConvertedDataType
[英]Retrieve the data type for a given binding.
[中]检索给定绑定的数据类型。
代码示例来源:origin: org.jooq/jooq
@SuppressWarnings("unchecked")
AbstractField(Name name, DataType<T> type, Comment comment, Binding<?, T> binding) {
super(name, comment);
this.dataType = type.asConvertedDataType((Binding<T, T>) binding);
}
代码示例来源:origin: com.torodb.torod.backends/common
public <U> DataType<U> asConvertedDataType(Binding<? super T, U> binding) {
return dataType.asConvertedDataType(binding);
}
代码示例来源:origin: com.torodb.torod.backends/common
public <U> DataType<U> asConvertedDataType(Converter<? super T, U> converter) {
return dataType.asConvertedDataType(converter);
}
代码示例来源:origin: org.jooq/jooq
@SuppressWarnings("unchecked")
ParameterImpl(String name, DataType<T> type, Binding<?, T> binding, boolean isDefaulted, boolean isUnnamed) {
super(DSL.name(name), CommentImpl.NO_COMMENT);
this.type = type.asConvertedDataType((Binding<T, T>) binding);
this.isDefaulted = isDefaulted;
this.isUnnamed = isUnnamed;
}
代码示例来源:origin: com.torodb.torod.backends/common
public static <DT, T extends ScalarValue<?>> DataTypeForScalar<T> from(DataType<DT> dataType, SubdocValueConverter<DT, T> converter) {
return new DataTypeForScalar<>(dataType.asConvertedDataType(converter), converter);
}
代码示例来源:origin: com.torodb.torod.backends/common
public static <DT, T extends ScalarValue<?>> DataTypeForScalar<T> from(DataType<DT> dataType, SubdocValueConverter<DT, T> converter, Binding<DT, T> binding) {
return new DataTypeForScalar<>(dataType.asConvertedDataType(binding), converter);
}
代码示例来源:origin: org.jooq/jooq
@SuppressWarnings({ "unchecked", "rawtypes" })
protected <X, Y> AbstractRoutine(String name, Schema schema, Package pkg, DataType<X> type, Converter<Y, T> converter, Binding<X, Y> binding) {
super(qualify(pkg != null ? pkg : schema, DSL.name(name)), CommentImpl.NO_COMMENT);
this.resultIndexes = new HashMap<Parameter<?>, Integer>();
this.schema = schema;
this.allParameters = new ArrayList<Parameter<?>>();
this.inParameters = new ArrayList<Parameter<?>>();
this.outParameters = new ArrayList<Parameter<?>>();
this.results = new ResultsImpl(null);
this.inValues = new HashMap<Parameter<?>, Field<?>>();
this.inValuesDefaulted = new HashSet<Parameter<?>>();
this.inValuesNonDefaulted = new HashSet<Parameter<?>>();
this.outValues = new HashMap<Parameter<?>, Object>();
this.type = converter == null && binding == null
? (DataType<T>) type
: type.asConvertedDataType(DefaultBinding.newBinding((Converter) converter, type, binding));
}
代码示例来源:origin: org.jooq/jooq
/**
* Factory method for parameters.
*/
@SuppressWarnings("unchecked")
public static final <T, X, U> Parameter<U> createParameter(String name, DataType<T> type, boolean isDefaulted, boolean isUnnamed, Converter<X, U> converter, Binding<T, X> binding) {
final Binding<T, U> actualBinding = DefaultBinding.newBinding(converter, type, binding);
final DataType<U> actualType = converter == null && binding == null
? (DataType<U>) type
: type.asConvertedDataType(actualBinding);
return new ParameterImpl<U>(name, actualType, actualBinding, isDefaulted, isUnnamed);
}
代码示例来源:origin: org.jooq/jooq
/**
* Subclasses may call this method to create {@link UDTField} objects that
* are linked to this table.
*
* @param name The name of the field (case-sensitive!)
* @param type The data type of the field
* @param isDefaulted Whether the parameter is defaulted (see
* {@link Parameter#isDefaulted()}
* @param isUnnamed Whether the parameter is unnamed (see
* {@link Parameter#isUnnamed()}.
*
* @deprecated - Please, re-generate your routine code.
*/
@Deprecated
@SuppressWarnings("unchecked")
protected static final <T, X, U> Parameter<U> createParameter(String name, DataType<T> type, boolean isDefaulted, boolean isUnnamed, Converter<X, U> converter, Binding<T, X> binding) {
final Binding<T, U> actualBinding = DefaultBinding.newBinding(converter, type, binding);
final DataType<U> actualType = converter == null && binding == null
? (DataType<U>) type
: type.asConvertedDataType(actualBinding);
return new ParameterImpl<U>(name, actualType, actualBinding, isDefaulted, isUnnamed);
}
代码示例来源:origin: org.jooq/jooq
/**
* Subclasses may call this method to create {@link UDTField} objects that
* are linked to this table.
*
* @param name The name of the field (case-sensitive!)
* @param type The data type of the field
*/
@SuppressWarnings("unchecked")
protected static final <R extends UDTRecord<R>, T, X, U> UDTField<R, U> createField(String name, DataType<T> type, UDT<R> udt, String comment, Converter<X, U> converter, Binding<T, X> binding) {
final Binding<T, U> actualBinding = DefaultBinding.newBinding(converter, type, binding);
final DataType<U> actualType = converter == null && binding == null
? (DataType<U>) type
: type.asConvertedDataType(actualBinding);
// [#5999] TODO: Allow for user-defined Names
final UDTFieldImpl<R, U> udtField = new UDTFieldImpl<R, U>(DSL.name(name), actualType, udt, DSL.comment(comment), actualBinding);
return udtField;
}
}
代码示例来源:origin: org.jooq/jooq
/**
* Subclasses may call this method to create {@link TableField} objects that
* are linked to this table.
*
* @param name The name of the field (case-sensitive!)
* @param type The data type of the field
*/
@SuppressWarnings("unchecked")
protected static final <R extends Record, T, X, U> TableField<R, U> createField(String name, DataType<T> type, Table<R> table, String comment, Converter<X, U> converter, Binding<T, X> binding) {
final Binding<T, U> actualBinding = DefaultBinding.newBinding(converter, type, binding);
final DataType<U> actualType =
converter == null && binding == null
? (DataType<U>) type
: type.asConvertedDataType(actualBinding);
// [#5999] TODO: Allow for user-defined Names
final TableFieldImpl<R, U> tableField = new TableFieldImpl<R, U>(DSL.name(name), actualType, table, DSL.comment(comment), actualBinding);
// [#1199] The public API of Table returns immutable field lists
if (table instanceof TableImpl) {
((TableImpl<?>) table).fields0().add(tableField);
}
return tableField;
}
内容来源于网络,如有侵权,请联系作者删除!