org.jooq.Field Java Examples
The following examples show how to use
org.jooq.Field.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PgExpressionHandler.java From FROST-Server with GNU Lesser General Public License v3.0 | 6 votes |
@Override public FieldWrapper visit(NotEqual node) { List<Expression> params = node.getParameters(); FieldWrapper p1 = params.get(0).accept(this); FieldWrapper p2 = params.get(1).accept(this); if (p1 instanceof TimeFieldWrapper) { TimeFieldWrapper ti1 = (TimeFieldWrapper) p1; return ti1.neq(p2); } if (p2 instanceof TimeFieldWrapper) { TimeFieldWrapper ti2 = (TimeFieldWrapper) p2; return ti2.neq(p1); } if (p1 instanceof JsonFieldFactory.JsonFieldWrapper) { JsonFieldFactory.JsonFieldWrapper l1 = (JsonFieldFactory.JsonFieldWrapper) p1; return l1.ne(p2); } if (p2 instanceof JsonFieldFactory.JsonFieldWrapper) { JsonFieldFactory.JsonFieldWrapper l2 = (JsonFieldFactory.JsonFieldWrapper) p2; return l2.ne(p1); } Field[] pair = findPair(p1, p2); return new SimpleFieldWrapper(pair[0].ne(pair[1])); }
Example #2
Source File: DirectQueryBasedDataExtractor.java From waltz with Apache License 2.0 | 6 votes |
private void writeExcelBody(Select<?> qry, XSSFSheet sheet) { AtomicInteger rowNum = new AtomicInteger(1); qry.fetch().forEach(r -> { Row row = sheet.createRow(rowNum.getAndIncrement()); AtomicInteger colNum = new AtomicInteger(0); for (Field<?> field : r.fields()) { Cell cell = row.createCell(colNum.getAndIncrement()); ofNullable(r.get(field)).ifPresent(v -> { if (v instanceof Number) { cell.setCellType(CellType.NUMERIC); cell.setCellValue(((Number) v).doubleValue()); } else { cell.setCellValue(Objects.toString(v)); } }); } }); }
Example #3
Source File: RelationIncluder.java From java-crud-api with MIT License | 5 votes |
private HashMap<Object, Object> getFkEmptyValues(ReflectedTable t1, ReflectedTable t2, ArrayList<Record> records) { HashMap<Object, Object> fkValues = new HashMap<>(); List<Field<Object>> fks = t1.getFksTo(t2.getName()); for (Field<Object> fk : fks) { for (Record record : records) { Object fkValue = record.get(fk.getName()); if (fkValue == null) { continue; } fkValues.put(fkValue, null); } } return fkValues; }
Example #4
Source File: JobLogDao.java From waltz with Apache License 2.0 | 5 votes |
public List<JobLog> findLatestSuccessful() { Field[] fields = new Field[] { SYSTEM_JOB_LOG.NAME, SYSTEM_JOB_LOG.ENTITY_KIND, DSL.max(SYSTEM_JOB_LOG.START).as(SYSTEM_JOB_LOG.START) }; return dsl.select(fields) .from(SYSTEM_JOB_LOG) .where(SYSTEM_JOB_LOG.STATUS.eq(JobStatus.SUCCESS.name())) .groupBy(SYSTEM_JOB_LOG.NAME, SYSTEM_JOB_LOG.ENTITY_KIND) .fetch(TO_JOB_SUMMARY); }
Example #5
Source File: MultiDatastreamFactory.java From FROST-Server with GNU Lesser General Public License v3.0 | 5 votes |
private void updateName(MultiDatastream md, Map<Field, Object> update, EntityChangedMessage message) throws IncompleteEntityException { if (md.isSetName()) { if (md.getName() == null) { throw new IncompleteEntityException("name" + CAN_NOT_BE_NULL); } update.put(table.colName, md.getName()); message.addField(EntityProperty.NAME); } }
Example #6
Source File: EntityFactories.java From FROST-Server with GNU Lesser General Public License v3.0 | 5 votes |
public static void insertTimeValue(Map<Field, Object> clause, Field<OffsetDateTime> startField, Field<OffsetDateTime> endField, TimeValue time) { if (time instanceof TimeInstant) { TimeInstant timeInstant = (TimeInstant) time; insertTimeInstant(clause, endField, timeInstant); insertTimeInstant(clause, startField, timeInstant); } else if (time instanceof TimeInterval) { TimeInterval timeInterval = (TimeInterval) time; insertTimeInterval(clause, startField, endField, timeInterval); } }
Example #7
Source File: Routines.java From oneops with Apache License 2.0 | 5 votes |
/** * Get <code>kloopzcm.cms_acquire_lock</code> as a field. */ public static Field<Boolean> cmsAcquireLock(String pLockName, String pLockedBy, Integer pStaleTimeout) { CmsAcquireLock f = new CmsAcquireLock(); f.setPLockName(pLockName); f.setPLockedBy(pLockedBy); f.setPStaleTimeout(pStaleTimeout); return f.asField(); }
Example #8
Source File: Routines.java From oneops with Apache License 2.0 | 5 votes |
/** * Get <code>kloopzcm.cm_is_ops_procedure_active_for_ci</code> as a field. */ public static Field<Boolean> cmIsOpsProcedureActiveForCi(Field<Long> pCiId) { CmIsOpsProcedureActiveForCi f = new CmIsOpsProcedureActiveForCi(); f.setPCiId(pCiId); return f.asField(); }
Example #9
Source File: PackagesRecord.java From fasten with Apache License 2.0 | 4 votes |
@Override public Field<String> field4() { return Packages.PACKAGES.PROJECT_NAME; }
Example #10
Source File: StableIdEventRecord.java From hmftools with GNU General Public License v3.0 | 4 votes |
/** * {@inheritDoc} */ @Override public Field<String> field1() { return StableIdEvent.STABLE_ID_EVENT.OLD_STABLE_ID; }
Example #11
Source File: DjRmRfcs.java From oneops with Apache License 2.0 | 4 votes |
/** * Set the <code>p_ns_path</code> parameter to the function to be used with a {@link org.jooq.Select} statement */ public void setPNsPath(Field<String> field) { setField(P_NS_PATH, field); }
Example #12
Source File: SomethingRecord.java From vertx-jooq with MIT License | 4 votes |
@Override public Field<Integer> field5() { return Something.SOMETHING.SOMEREGULARNUMBER; }
Example #13
Source File: EdgesRecord.java From fasten with Apache License 2.0 | 4 votes |
@Override public Field<Long> field2() { return Edges.EDGES.TARGET_ID; }
Example #14
Source File: IdentityXrefRecord.java From hmftools with GNU General Public License v3.0 | 4 votes |
/** * {@inheritDoc} */ @Override public Field<Integer> field4() { return IdentityXref.IDENTITY_XREF.XREF_START; }
Example #15
Source File: MappingSessionRecord.java From hmftools with GNU General Public License v3.0 | 4 votes |
/** * {@inheritDoc} */ @Override public Field<String> field2() { return MappingSession.MAPPING_SESSION.OLD_DB_NAME; }
Example #16
Source File: MdClassRelationsRecord.java From oneops with Apache License 2.0 | 4 votes |
/** * {@inheritDoc} */ @Override public Field<String> field6() { return MdClassRelations.MD_CLASS_RELATIONS.LINK_TYPE; }
Example #17
Source File: TranscriptRecord.java From hmftools with GNU General Public License v3.0 | 4 votes |
/** * {@inheritDoc} */ @Override public Field<UInteger> field1() { return Transcript.TRANSCRIPT.TRANSCRIPT_ID; }
Example #18
Source File: DjDeploymentStateHistRecord.java From oneops with Apache License 2.0 | 4 votes |
/** * {@inheritDoc} */ @Override public Field<Long> field2() { return DjDeploymentStateHist.DJ_DEPLOYMENT_STATE_HIST.DEPLOYMENT_ID; }
Example #19
Source File: MdClassAttributesRecord.java From oneops with Apache License 2.0 | 4 votes |
/** * {@inheritDoc} */ @Override public Field<Boolean> field8() { return MdClassAttributes.MD_CLASS_ATTRIBUTES.FORCE_ON_DEPENDENT; }
Example #20
Source File: FilesRecord.java From fasten with Apache License 2.0 | 4 votes |
@Override public Field<JSONB> field6() { return Files.FILES.METADATA; }
Example #21
Source File: SomethingRecord.java From vertx-jooq with MIT License | 4 votes |
@Override public Field<Integer> field1() { return Something.SOMETHING.SOMEID; }
Example #22
Source File: XrefRecord.java From hmftools with GNU General Public License v3.0 | 4 votes |
/** * {@inheritDoc} */ @Override public Field<String> field3() { return Xref.XREF.DBPRIMARY_ACC; }
Example #23
Source File: PagesRecord.java From redpipe with Apache License 2.0 | 4 votes |
/** * {@inheritDoc} */ @Override public Field<Integer> field1() { return Pages.PAGES.ID; }
Example #24
Source File: TranscriptSupportingFeatureRecord.java From hmftools with GNU General Public License v3.0 | 4 votes |
/** * {@inheritDoc} */ @Override public Field<UInteger> field3() { return TranscriptSupportingFeature.TRANSCRIPT_SUPPORTING_FEATURE.FEATURE_ID; }
Example #25
Source File: DjNsOpt.java From oneops with Apache License 2.0 | 4 votes |
private DjNsOpt(Name alias, Table<DjNsOptRecord> aliased, Field<?>[] parameters) { super(alias, null, aliased, parameters, ""); }
Example #26
Source File: BinaryModulesRecord.java From fasten with Apache License 2.0 | 4 votes |
@Override public Field<JSONB> field5() { return BinaryModules.BINARY_MODULES.METADATA; }
Example #27
Source File: SomethingRecord.java From vertx-jooq with MIT License | 4 votes |
@Override public Field<SomeJsonPojo> field9() { return Something.SOMETHING.SOMECUSTOMJSONOBJECT; }
Example #28
Source File: PredictionExonRecord.java From hmftools with GNU General Public License v3.0 | 4 votes |
/** * {@inheritDoc} */ @Override public Field<Byte> field7() { return PredictionExon.PREDICTION_EXON.SEQ_REGION_STRAND; }
Example #29
Source File: AnalysisRecord.java From hmftools with GNU General Public License v3.0 | 4 votes |
/** * {@inheritDoc} */ @Override public Field<Timestamp> field2() { return Analysis.ANALYSIS.CREATED; }
Example #30
Source File: MetaCoordRecord.java From hmftools with GNU General Public License v3.0 | 4 votes |
/** * {@inheritDoc} */ @Override public Field<UInteger> field2() { return MetaCoord.META_COORD.COORD_SYSTEM_ID; }