Java 类org.jooq.Field 实例源码

项目:oneops    文件:MdClassRelationsRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Integer> field4() {
    return MdClassRelations.MD_CLASS_RELATIONS.TO_CLASS_ID;
}
项目:oneops    文件:DjDeploymentRfcRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<String> field5() {
    return DjDeploymentRfc.DJ_DEPLOYMENT_RFC.COMMENTS;
}
项目:stratio-jdbc-sink-mariadb    文件:MappingQueryGenerator.java   
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;
}
项目:oneops    文件:CmCiAttributesRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Timestamp> field8() {
    return CmCiAttributes.CM_CI_ATTRIBUTES.CREATED;
}
项目:oneops    文件:DjDeploymentRfcRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Integer> field3() {
    return DjDeploymentRfc.DJ_DEPLOYMENT_RFC.STATE_ID;
}
项目:oneops    文件:MdClassAttributesRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Boolean> field14() {
    return MdClassAttributes.MD_CLASS_ATTRIBUTES.IS_IMMUTABLE;
}
项目:vertx-jooq-async    文件:VertxDAO.java   
default <Z> Observable<P> fetchObservable(Field<Z> field, Collection<Z> values) {
    return fetchObservable(field.in(values));
}
项目:secrets-proxy    文件:GroupsRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Timestamp> field5() {
    return Groups.GROUPS.CREATED_AT;
}
项目:oneops    文件:MdRelationsRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<String> field4() {
    return MdRelations.MD_RELATIONS.DESCRIPTION;
}
项目:vertx-jooq-async    文件:SomethingRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Short> field4() {
    return Something.SOMETHING.SOMESMALLNUMBER;
}
项目:oneops    文件:DjReleasesRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Long> field2() {
    return DjReleases.DJ_RELEASES.NS_ID;
}
项目:oneops    文件:DjReleasesRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<String> field5() {
    return DjReleases.DJ_RELEASES.CREATED_BY;
}
项目:vertx-jooq-async    文件:SomethingRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Double> field6() {
    return Something.SOMETHING.SOMEDOUBLE;
}
项目:jooq-flyway-typesafe-migration    文件:AuthorRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Date> field4() {
    return Author.AUTHOR.DATE_OF_BIRTH;
}
项目:secrets-proxy    文件:InvitationsRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Timestamp> field5() {
    return Invitations.INVITATIONS.CREATED_AT;
}
项目:jooq-flyway-typesafe-migration    文件:v3_Author.java   
private v3_Author(String alias, Table<v3_AuthorRecord> aliased, Field<?>[] parameters) {
    super(alias, null, aliased, parameters, "");
}
项目:secrets-proxy    文件:AuthenticationsRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<String> field4() {
    return Authentications.AUTHENTICATIONS.UID;
}
项目:oneops    文件:CmsEventTypeRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<String> field2() {
    return CmsEventType.CMS_EVENT_TYPE.EVENT_TYPE;
}
项目:jooq-flyway-typesafe-migration    文件:v1_SchemaVersionRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<String> field4() {
    return v1_SchemaVersion.v1_SCHEMA_VERSION.v1_TYPE;
}
项目:vertx-zero    文件:SecUserRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<String> field4() {
    return SecUser.SEC_USER.S_EMAIL;
}
项目:sunshine-security    文件:SchemaVersionRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Integer> field9() {
    return SchemaVersion.SCHEMA_VERSION.EXECUTION_TIME;
}
项目:oneops    文件:CmCiRelationsRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Long> field1() {
    return CmCiRelations.CM_CI_RELATIONS.CI_RELATION_ID;
}
项目:oneops    文件:DjDeploymentStatesRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<String> field2() {
    return DjDeploymentStates.DJ_DEPLOYMENT_STATES.STATE_NAME;
}
项目:talk-observing-distributed-systems    文件:HashtagsRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<BigInteger> field2() {
    return Hashtags.HASHTAGS.TWEET_ID;
}
项目:jooq-flyway-typesafe-migration    文件:v3_SchemaVersionRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Integer> field9() {
    return v3_SchemaVersion.v3_SCHEMA_VERSION.v3_EXECUTION_TIME;
}
项目:oneops    文件:DjRfcRelationAttributesRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<String> field7() {
    return DjRfcRelationAttributes.DJ_RFC_RELATION_ATTRIBUTES.COMMENTS;
}
项目:oneops    文件:DjReleaseStatesRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<String> field2() {
    return DjReleaseStates.DJ_RELEASE_STATES.STATE_NAME;
}
项目:oneops    文件:MdClassActionsRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Timestamp> field6() {
    return MdClassActions.MD_CLASS_ACTIONS.CREATED;
}
项目:secrets-proxy    文件:TeamsUsersRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Integer> field2() {
    return TeamsUsers.TEAMS_USERS.TEAM_ID;
}
项目:oneops    文件:DjReleaseRevLabelRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Long> field1() {
    return DjReleaseRevLabel.DJ_RELEASE_REV_LABEL.RELEASE_ID;
}
项目:filter-sort-jooq-api    文件:SortValueImpl.java   
@Override
public Optional<Field> getField() {
    return Optional.ofNullable(field);
}
项目:vertx-zero    文件:SecUserRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<String> field16() {
    return SecUser.SEC_USER.Z_LANGUAGE;
}
项目:jooq-flyway-typesafe-migration    文件:Author.java   
private Author(String alias, Table<AuthorRecord> aliased, Field<?>[] parameters) {
    super(alias, null, aliased, parameters, "");
}
项目:oneops    文件:DjDeploymentStateHistRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Integer> field4() {
    return DjDeploymentStateHist.DJ_DEPLOYMENT_STATE_HIST.NEW_STATE_ID;
}
项目:oneops    文件:CmOpsActionsRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Timestamp> field11() {
    return CmOpsActions.CM_OPS_ACTIONS.CREATED;
}
项目:secrets-proxy    文件:CiProxiesRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<String> field4() {
    return CiProxies.CI_PROXIES.CI_NAME;
}
项目:oneops    文件:CrawlEntitiesRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<String> field1() {
    return CrawlEntities.CRAWL_ENTITIES.NS_PATH;
}
项目:secrets-proxy    文件:GroupMembersRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Integer> field1() {
    return GroupMembers.GROUP_MEMBERS.ID;
}
项目:oneops    文件:NsOptRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<Long> field2() {
    return NsOpt.NS_OPT.NS_ID;
}
项目:sunshine-security    文件:SchemaVersionRecord.java   
/**
 * {@inheritDoc}
 */
@Override
public Field<String> field2() {
    return SchemaVersion.SCHEMA_VERSION.VERSION;
}