本文整理汇总了Java中org.jooq.Field类的典型用法代码示例。如果您正苦于以下问题:Java Field类的具体用法?Java Field怎么用?Java Field使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Field类属于org.jooq包,在下文中一共展示了Field类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: field4
import org.jooq.Field; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Field<Integer> field4() {
return MdClassRelations.MD_CLASS_RELATIONS.TO_CLASS_ID;
}
示例2: field5
import org.jooq.Field; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Field<String> field5() {
return DjDeploymentRfc.DJ_DEPLOYMENT_RFC.COMMENTS;
}
示例3: executeQuery
import org.jooq.Field; //导入依赖的package包/类
public boolean executeQuery(DSLContext dslContext, final List<Event> events) {
InsertSetStep<?> insert = dslContext.insertInto(this.table);
int mappedEvents = 0;
for (Event event : events) {
Map<Field<?>, Object> fieldValues = new HashMap<Field<?>, Object>();
/**
* 커스텀 로직
* Log 전문에 대한 파싱을 통해 Key/Value Map을 만들고 결과를 Query에 바인딩 한다
*/
Map<String, String> data = logSplitter.withKeyValueSeparator( itemSplitter ).split( new String( event.getBody(), StandardCharsets.UTF_8 ) );
for (Map.Entry<String, String> entry : data.entrySet()) {
Field<?> field = table.field( entry.getKey() );
if (field == null) {
log.trace("Ignoring field: {}", entry.getKey());
continue;
}
DataType<?> dataType = field.getDataType();
if ( dataType.getType().isAssignableFrom( Timestamp.class ) && !Strings.isNullOrEmpty( entry.getValue() ) ) {
if ( entry.getValue().length() == FULL_DATE_FORMAT.length() ) {
fieldValues.put(field, dataType.convert( DateTimeFormat.forPattern( FULL_DATE_FORMAT ).parseMillis( entry.getValue() ) ));
} else if ( entry.getValue().length() == SEC_TIME_FORMAT.length() ) {
fieldValues.put(field, dataType.convert( DateTimeFormat.forPattern( SEC_TIME_FORMAT ).parseMillis( entry.getValue() ) ));
}
} else {
fieldValues.put(field, dataType.convert(entry.getValue()));
}
}
if (fieldValues.isEmpty()) {
log.debug("Ignoring event, no mapped fields.");
} else {
mappedEvents++;
if (insert instanceof InsertSetMoreStep) {
insert = ((InsertSetMoreStep<?>) insert).newRecord();
insert = (InsertSetStep<?>)insert.set(fieldValues);
}
}
}
if (insert instanceof InsertSetMoreStep) {
int result = ((InsertSetMoreStep<?>) insert).execute();
if (result != mappedEvents) {
log.warn("Mapped {} events, inserted {}.", mappedEvents, result);
return false;
}
} else {
log.debug("No insert.");
}
return true;
}
示例4: field8
import org.jooq.Field; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Field<Timestamp> field8() {
return CmCiAttributes.CM_CI_ATTRIBUTES.CREATED;
}
示例5: field3
import org.jooq.Field; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Field<Integer> field3() {
return DjDeploymentRfc.DJ_DEPLOYMENT_RFC.STATE_ID;
}
示例6: field14
import org.jooq.Field; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Field<Boolean> field14() {
return MdClassAttributes.MD_CLASS_ATTRIBUTES.IS_IMMUTABLE;
}
示例7: fetchObservable
import org.jooq.Field; //导入依赖的package包/类
default <Z> Observable<P> fetchObservable(Field<Z> field, Collection<Z> values) {
return fetchObservable(field.in(values));
}
示例8: field5
import org.jooq.Field; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Field<Timestamp> field5() {
return Groups.GROUPS.CREATED_AT;
}
示例9: field4
import org.jooq.Field; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Field<String> field4() {
return MdRelations.MD_RELATIONS.DESCRIPTION;
}
示例10: field4
import org.jooq.Field; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Field<Short> field4() {
return Something.SOMETHING.SOMESMALLNUMBER;
}
示例11: field2
import org.jooq.Field; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Field<Long> field2() {
return DjReleases.DJ_RELEASES.NS_ID;
}
示例12: field5
import org.jooq.Field; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Field<String> field5() {
return DjReleases.DJ_RELEASES.CREATED_BY;
}
示例13: field6
import org.jooq.Field; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Field<Double> field6() {
return Something.SOMETHING.SOMEDOUBLE;
}
示例14: field4
import org.jooq.Field; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Field<Date> field4() {
return Author.AUTHOR.DATE_OF_BIRTH;
}
示例15: field5
import org.jooq.Field; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Field<Timestamp> field5() {
return Invitations.INVITATIONS.CREATED_AT;
}