Search in sources :

Example 1 with SQLConnection

use of org.folio.rest.persist.SQLConnection in project mod-circulation-storage by folio-org.

the class ExpirationTool method resetPositionsForOpenRequestsByIdemIds.

private static Future<RowSet<Row>> resetPositionsForOpenRequestsByIdemIds(AsyncResult<SQLConnection> conn, Vertx vertx, String tenant, Set<String> itemIds) {
    if (itemIds.isEmpty()) {
        succeededFuture();
    }
    Set<String> quotedItemIds = itemIds.stream().map(id -> format("'%s'", id)).collect(toSet());
    String fullTableName = format("%s.%s", PostgresClient.convertToPsqlStandard(tenant), REQUEST_TABLE);
    String sql = format("UPDATE %1$s SET jsonb = jsonb - 'position' WHERE " + "(jsonb->>'status' = '%2$s' OR " + "jsonb->>'status' = '%3$s' OR " + "jsonb->>'status' = '%4$s' OR " + "jsonb->>'status' = '%5$s') AND " + "jsonb->>'itemId' IN (%6$s)", fullTableName, OPEN_NOT_YET_FILLED.value(), OPEN_AWAITING_PICKUP.value(), OPEN_AWAITING_DELIVERY.value(), OPEN_IN_TRANSIT.value(), String.join(",", quotedItemIds));
    Promise<RowSet<Row>> promise = Promise.promise();
    PostgresClient pgClient = PostgresClient.getInstance(vertx, tenant);
    pgClient.execute(conn, sql, promise);
    return promise.future().map(ur -> null);
}
Also used : Future.succeededFuture(io.vertx.core.Future.succeededFuture) OPEN_AWAITING_DELIVERY(org.folio.rest.jaxrs.model.Request.Status.OPEN_AWAITING_DELIVERY) REQUEST_EXPIRED(org.folio.support.exception.LogEventType.REQUEST_EXPIRED) Date(java.util.Date) SimpleDateFormat(java.text.SimpleDateFormat) REQUESTS(org.folio.support.LogEventPayloadField.REQUESTS) ArrayList(java.util.ArrayList) OPEN_NOT_YET_FILLED(org.folio.rest.jaxrs.model.Request.Status.OPEN_NOT_YET_FILLED) HashSet(java.util.HashSet) OPEN_AWAITING_PICKUP(org.folio.rest.jaxrs.model.Request.Status.OPEN_AWAITING_PICKUP) DbUtil.rowSetToStream(org.folio.support.DbUtil.rowSetToStream) REQUEST_TABLE(org.folio.support.ModuleConstants.REQUEST_TABLE) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Request(org.folio.rest.jaxrs.model.Request) Map(java.util.Map) JsonObject(io.vertx.core.json.JsonObject) RowSet(io.vertx.sqlclient.RowSet) ZoneOffset(java.time.ZoneOffset) AsyncResult(io.vertx.core.AsyncResult) CLOSED_UNFILLED(org.folio.rest.jaxrs.model.Request.Status.CLOSED_UNFILLED) Collectors.toSet(java.util.stream.Collectors.toSet) OPEN_IN_TRANSIT(org.folio.rest.jaxrs.model.Request.Status.OPEN_IN_TRANSIT) GenericCompositeFuture(org.folio.okapi.common.GenericCompositeFuture) ORIGINAL(org.folio.support.LogEventPayloadField.ORIGINAL) Collections.emptyList(java.util.Collections.emptyList) TimeZone(java.util.TimeZone) Promise(io.vertx.core.Promise) Vertx(io.vertx.core.Vertx) Set(java.util.Set) SQLConnection(org.folio.rest.persist.SQLConnection) Collectors(java.util.stream.Collectors) Future(io.vertx.core.Future) String.format(java.lang.String.format) PostgresClient(org.folio.rest.persist.PostgresClient) CLOSED_PICKUP_EXPIRED(org.folio.rest.jaxrs.model.Request.Status.CLOSED_PICKUP_EXPIRED) Collectors.toList(java.util.stream.Collectors.toList) List(java.util.List) Logger(org.apache.logging.log4j.Logger) Row(io.vertx.sqlclient.Row) UPDATED(org.folio.support.LogEventPayloadField.UPDATED) EventPublisherService(org.folio.service.EventPublisherService) Comparator(java.util.Comparator) LogManager(org.apache.logging.log4j.LogManager) RowSet(io.vertx.sqlclient.RowSet) PostgresClient(org.folio.rest.persist.PostgresClient)

Example 2 with SQLConnection

use of org.folio.rest.persist.SQLConnection in project mod-circulation-storage by folio-org.

the class ExpirationTool method closeRequests.

private static Future<Set<String>> closeRequests(AsyncResult<SQLConnection> conn, Vertx vertx, String tenant, List<Request> requests, List<JsonObject> context) {
    Future<Void> future = succeededFuture();
    Set<String> closedRequestsItemIds = new HashSet<>();
    for (Request request : requests) {
        JsonObject pair = new JsonObject();
        pair.put(ORIGINAL.value(), JsonObject.mapFrom(request));
        closedRequestsItemIds.add(request.getItemId());
        Request updatedRequest = changeRequestStatus(request).withPosition(null);
        pair.put(UPDATED.value(), JsonObject.mapFrom(updatedRequest));
        context.add(pair);
        future = future.compose(v -> updateRequest(conn, vertx, tenant, updatedRequest));
    }
    return future.map(v -> closedRequestsItemIds);
}
Also used : Future.succeededFuture(io.vertx.core.Future.succeededFuture) OPEN_AWAITING_DELIVERY(org.folio.rest.jaxrs.model.Request.Status.OPEN_AWAITING_DELIVERY) REQUEST_EXPIRED(org.folio.support.exception.LogEventType.REQUEST_EXPIRED) Date(java.util.Date) SimpleDateFormat(java.text.SimpleDateFormat) REQUESTS(org.folio.support.LogEventPayloadField.REQUESTS) ArrayList(java.util.ArrayList) OPEN_NOT_YET_FILLED(org.folio.rest.jaxrs.model.Request.Status.OPEN_NOT_YET_FILLED) HashSet(java.util.HashSet) OPEN_AWAITING_PICKUP(org.folio.rest.jaxrs.model.Request.Status.OPEN_AWAITING_PICKUP) DbUtil.rowSetToStream(org.folio.support.DbUtil.rowSetToStream) REQUEST_TABLE(org.folio.support.ModuleConstants.REQUEST_TABLE) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Request(org.folio.rest.jaxrs.model.Request) Map(java.util.Map) JsonObject(io.vertx.core.json.JsonObject) RowSet(io.vertx.sqlclient.RowSet) ZoneOffset(java.time.ZoneOffset) AsyncResult(io.vertx.core.AsyncResult) CLOSED_UNFILLED(org.folio.rest.jaxrs.model.Request.Status.CLOSED_UNFILLED) Collectors.toSet(java.util.stream.Collectors.toSet) OPEN_IN_TRANSIT(org.folio.rest.jaxrs.model.Request.Status.OPEN_IN_TRANSIT) GenericCompositeFuture(org.folio.okapi.common.GenericCompositeFuture) ORIGINAL(org.folio.support.LogEventPayloadField.ORIGINAL) Collections.emptyList(java.util.Collections.emptyList) TimeZone(java.util.TimeZone) Promise(io.vertx.core.Promise) Vertx(io.vertx.core.Vertx) Set(java.util.Set) SQLConnection(org.folio.rest.persist.SQLConnection) Collectors(java.util.stream.Collectors) Future(io.vertx.core.Future) String.format(java.lang.String.format) PostgresClient(org.folio.rest.persist.PostgresClient) CLOSED_PICKUP_EXPIRED(org.folio.rest.jaxrs.model.Request.Status.CLOSED_PICKUP_EXPIRED) Collectors.toList(java.util.stream.Collectors.toList) List(java.util.List) Logger(org.apache.logging.log4j.Logger) Row(io.vertx.sqlclient.Row) UPDATED(org.folio.support.LogEventPayloadField.UPDATED) EventPublisherService(org.folio.service.EventPublisherService) Comparator(java.util.Comparator) LogManager(org.apache.logging.log4j.LogManager) Request(org.folio.rest.jaxrs.model.Request) JsonObject(io.vertx.core.json.JsonObject) HashSet(java.util.HashSet)

Example 3 with SQLConnection

use of org.folio.rest.persist.SQLConnection in project mod-circulation-storage by folio-org.

the class BatchResourceService method executeBatchUpdate.

/**
 * Execute batch update in a single transaction, subsequently.
 *
 * @param batchFactories  - Factory to create a batch update chunk.
 * @param onFinishHandler - Callback.
 */
public void executeBatchUpdate(List<Function<SQLConnection, Future<RowSet<Row>>>> batchFactories, Handler<AsyncResult<Void>> onFinishHandler) {
    postgresClient.startTx(connectionResult -> {
        if (connectionResult.failed()) {
            LOG.warn("Can not start transaction", connectionResult.cause());
            onFinishHandler.handle(failedFuture(connectionResult.cause()));
            return;
        }
        SQLConnection connection = connectionResult.result();
        // Using this future for chaining updates
        Future<RowSet<Row>> lastUpdate = succeededFuture();
        for (Function<SQLConnection, Future<RowSet<Row>>> factory : batchFactories) {
            lastUpdate = lastUpdate.compose(prev -> factory.apply(connection));
        }
        // Handle overall update result and decide on whether to commit or rollback transaction
        lastUpdate.onComplete(updateResult -> {
            if (updateResult.failed()) {
                LOG.warn("Batch update rejected", updateResult.cause());
                // Rollback transaction and keep original cause.
                postgresClient.rollbackTx(connectionResult, rollback -> onFinishHandler.handle(failedFuture(updateResult.cause())));
            } else {
                LOG.debug("Update successful, committing transaction");
                postgresClient.endTx(connectionResult, onFinishHandler);
            }
        });
    });
}
Also used : Future.succeededFuture(io.vertx.core.Future.succeededFuture) Promise.promise(io.vertx.core.Promise.promise) Logger(org.slf4j.Logger) Collection(java.util.Collection) Promise(io.vertx.core.Promise) LoggerFactory(org.slf4j.LoggerFactory) SQLConnection(org.folio.rest.persist.SQLConnection) Future.failedFuture(io.vertx.core.Future.failedFuture) Function(java.util.function.Function) Future(io.vertx.core.Future) PostgresClient(org.folio.rest.persist.PostgresClient) ArrayList(java.util.ArrayList) Tuple.tuple(io.vertx.sqlclient.Tuple.tuple) List(java.util.List) Row(io.vertx.sqlclient.Row) RowSet(io.vertx.sqlclient.RowSet) AsyncResult(io.vertx.core.AsyncResult) Handler(io.vertx.core.Handler) SQLConnection(org.folio.rest.persist.SQLConnection) RowSet(io.vertx.sqlclient.RowSet) Future.succeededFuture(io.vertx.core.Future.succeededFuture) Future.failedFuture(io.vertx.core.Future.failedFuture) Future(io.vertx.core.Future) Row(io.vertx.sqlclient.Row)

Example 4 with SQLConnection

use of org.folio.rest.persist.SQLConnection in project mod-source-record-manager by folio-org.

the class JobExecutionProgressDaoImpl method initializeJobExecutionProgress.

@Override
public Future<JobExecutionProgress> initializeJobExecutionProgress(String jobExecutionId, Integer totalRecords, String tenantId) {
    Promise<JobExecutionProgress> promise = Promise.promise();
    Promise<SQLConnection> tx = Promise.promise();
    PostgresClient pgClient = pgClientFactory.createInstance(tenantId);
    getSelectResult(tx, pgClient, jobExecutionId, tenantId).compose(selectResult -> {
        JobExecutionProgress progress = new JobExecutionProgress().withJobExecutionId(jobExecutionId).withTotal(totalRecords);
        Optional<JobExecutionProgress> optionalJobExecutionProgress = mapResultSetToOptionalJobExecutionProgress(selectResult);
        return optionalJobExecutionProgress.isEmpty() ? save(progress, tenantId).map(progress) : Future.succeededFuture(optionalJobExecutionProgress.get());
    }).onComplete(saveAr -> {
        if (saveAr.succeeded()) {
            pgClient.endTx(tx.future(), endTx -> promise.complete(saveAr.result()));
        } else {
            if (ValidationHelper.isDuplicate(saveAr.cause().getMessage())) {
                pgClient.rollbackTx(tx.future(), r -> promise.complete());
                return;
            }
            LOGGER.error(FAILED_INITIALIZATION_MESSAGE, jobExecutionId, saveAr.cause());
            pgClient.rollbackTx(tx.future(), r -> promise.fail(saveAr.cause()));
        }
    });
    return promise.future();
}
Also used : ValidationHelper(org.folio.rest.tools.utils.ValidationHelper) Promise(io.vertx.core.Promise) PostgresClient.convertToPsqlStandard(org.folio.rest.persist.PostgresClient.convertToPsqlStandard) SQLConnection(org.folio.rest.persist.SQLConnection) Autowired(org.springframework.beans.factory.annotation.Autowired) UnaryOperator(java.util.function.UnaryOperator) Future(io.vertx.core.Future) NotFoundException(javax.ws.rs.NotFoundException) PostgresClient(org.folio.rest.persist.PostgresClient) Tuple(io.vertx.sqlclient.Tuple) PostgresClientFactory(org.folio.dao.util.PostgresClientFactory) RowIterator(io.vertx.sqlclient.RowIterator) Logger(org.apache.logging.log4j.Logger) JobExecutionProgress(org.folio.rest.jaxrs.model.JobExecutionProgress) Row(io.vertx.sqlclient.Row) Optional(java.util.Optional) RowSet(io.vertx.sqlclient.RowSet) AsyncResult(io.vertx.core.AsyncResult) Repository(org.springframework.stereotype.Repository) LogManager(org.apache.logging.log4j.LogManager) JobExecutionProgress(org.folio.rest.jaxrs.model.JobExecutionProgress) Optional(java.util.Optional) SQLConnection(org.folio.rest.persist.SQLConnection) PostgresClient(org.folio.rest.persist.PostgresClient)

Example 5 with SQLConnection

use of org.folio.rest.persist.SQLConnection in project mod-source-record-manager by folio-org.

the class JobExecutionDaoImpl method updateBlocking.

@Override
public Future<JobExecution> updateBlocking(String jobExecutionId, JobExecutionMutator mutator, String tenantId) {
    Promise<JobExecution> promise = Promise.promise();
    String rollbackMessage = "Rollback transaction. Error during jobExecution update. jobExecutionId" + jobExecutionId;
    Promise<SQLConnection> connection = Promise.promise();
    Promise<JobExecution> jobExecutionPromise = Promise.promise();
    Future.succeededFuture().compose(v -> {
        pgClientFactory.createInstance(tenantId).startTx(connection);
        return connection.future();
    }).compose(v -> {
        String selectForUpdate = format("SELECT * FROM %s WHERE id = $1 AND is_deleted = false LIMIT 1 FOR UPDATE", formatFullTableName(tenantId, TABLE_NAME));
        Promise<RowSet<Row>> selectResult = Promise.promise();
        pgClientFactory.createInstance(tenantId).execute(connection.future(), selectForUpdate, Tuple.of(jobExecutionId), selectResult);
        return selectResult.future();
    }).compose(rowSet -> {
        if (rowSet.rowCount() != 1) {
            throw new NotFoundException(rollbackMessage);
        }
        return mutator.mutate(mapRowToJobExecution(rowSet.iterator().next())).onComplete(jobExecutionPromise);
    }).compose(jobExecution -> {
        Promise<RowSet<Row>> updateHandler = Promise.promise();
        String preparedQuery = format(UPDATE_SQL, formatFullTableName(tenantId, TABLE_NAME));
        Tuple queryParams = mapToTuple(jobExecution);
        pgClientFactory.createInstance(tenantId).execute(connection.future(), preparedQuery, queryParams, updateHandler);
        return updateHandler.future();
    }).compose(updateHandler -> {
        Promise<Void> endTxFuture = Promise.promise();
        pgClientFactory.createInstance(tenantId).endTx(connection.future(), endTxFuture);
        return endTxFuture.future();
    }).onComplete(ar -> {
        if (ar.failed()) {
            pgClientFactory.createInstance(tenantId).rollbackTx(connection.future(), rollback -> promise.fail(ar.cause()));
            return;
        }
        promise.complete(jobExecutionPromise.future().result());
    });
    return promise.future();
}
Also used : JobExecution(org.folio.rest.jaxrs.model.JobExecution) PROGRESS_TOTAL_FIELD(org.folio.dao.util.JobExecutionDBConstants.PROGRESS_TOTAL_FIELD) GET_CHILDREN_JOBS_BY_PARENT_ID_SQL(org.folio.dao.util.JobExecutionDBConstants.GET_CHILDREN_JOBS_BY_PARENT_ID_SQL) Date(java.util.Date) COMPLETED_DATE_FIELD(org.folio.dao.util.JobExecutionDBConstants.COMPLETED_DATE_FIELD) JOB_PROFILE_ID_FIELD(org.folio.dao.util.JobExecutionDBConstants.JOB_PROFILE_ID_FIELD) PostgresClient.convertToPsqlStandard(org.folio.rest.persist.PostgresClient.convertToPsqlStandard) Autowired(org.springframework.beans.factory.annotation.Autowired) TOTAL_COUNT_FIELD(org.folio.dao.util.JobExecutionDBConstants.TOTAL_COUNT_FIELD) Tuple(io.vertx.sqlclient.Tuple) SUBORDINATION_TYPE_FIELD(org.folio.dao.util.JobExecutionDBConstants.SUBORDINATION_TYPE_FIELD) TOTAL_FIELD(org.folio.dao.util.JobExecutionDBConstants.TOTAL_FIELD) ProfileSnapshotWrapper(org.folio.rest.jaxrs.model.ProfileSnapshotWrapper) GET_BY_ID_SQL(org.folio.dao.util.JobExecutionDBConstants.GET_BY_ID_SQL) LAST_NAME_FIELD(org.folio.dao.util.JobExecutionDBConstants.LAST_NAME_FIELD) JobExecution(org.folio.rest.jaxrs.model.JobExecution) JobProfileInfo(org.folio.rest.jaxrs.model.JobProfileInfo) Map(java.util.Map) JsonObject(io.vertx.core.json.JsonObject) ZoneOffset(java.time.ZoneOffset) Repository(org.springframework.stereotype.Repository) JobExecutionDto(org.folio.rest.jaxrs.model.JobExecutionDto) DbUtil(org.folio.dao.util.DbUtil) PROFILE_SNAPSHOT_WRAPPER_FIELD(org.folio.dao.util.JobExecutionDBConstants.PROFILE_SNAPSHOT_WRAPPER_FIELD) GET_UNIQUE_USERS(org.folio.dao.util.JobExecutionDBConstants.GET_UNIQUE_USERS) UUID(java.util.UUID) Future(io.vertx.core.Future) Collectors(java.util.stream.Collectors) STARTED_DATE_FIELD(org.folio.dao.util.JobExecutionDBConstants.STARTED_DATE_FIELD) PostgresClient(org.folio.rest.persist.PostgresClient) NotFoundException(javax.ws.rs.NotFoundException) String.format(java.lang.String.format) Objects(java.util.Objects) List(java.util.List) Logger(org.apache.logging.log4j.Logger) HRID_FIELD(org.folio.dao.util.JobExecutionDBConstants.HRID_FIELD) StrSubstitutor(org.apache.commons.lang.text.StrSubstitutor) JobExecutionDtoCollection(org.folio.rest.jaxrs.model.JobExecutionDtoCollection) INSERT_SQL(org.folio.dao.util.JobExecutionDBConstants.INSERT_SQL) Optional(java.util.Optional) GET_RELATED_JOB_PROFILES_SQL(org.folio.dao.util.JobExecutionDBConstants.GET_RELATED_JOB_PROFILES_SQL) PARENT_ID_FIELD(org.folio.dao.util.JobExecutionDBConstants.PARENT_ID_FIELD) Objects.nonNull(java.util.Objects.nonNull) Progress(org.folio.rest.jaxrs.model.Progress) GET_JOBS_NOT_PARENT_SQL(org.folio.dao.util.JobExecutionDBConstants.GET_JOBS_NOT_PARENT_SQL) UI_STATUS_FIELD(org.folio.dao.util.JobExecutionDBConstants.UI_STATUS_FIELD) STATUS_FIELD(org.folio.dao.util.JobExecutionDBConstants.STATUS_FIELD) ID_FIELD(org.folio.dao.util.JobExecutionDBConstants.ID_FIELD) LocalDateTime(java.time.LocalDateTime) ERROR_STATUS_FIELD(org.folio.dao.util.JobExecutionDBConstants.ERROR_STATUS_FIELD) HashMap(java.util.HashMap) JOB_PROFILE_NAME_FIELD(org.folio.dao.util.JobExecutionDBConstants.JOB_PROFILE_NAME_FIELD) DeleteJobExecutionsResp(org.folio.rest.jaxrs.model.DeleteJobExecutionsResp) JobExecutionUserInfo(org.folio.rest.jaxrs.model.JobExecutionUserInfo) CollectionUtils(org.apache.commons.collections4.CollectionUtils) PostgresClientFactory(org.folio.dao.util.PostgresClientFactory) ArrayList(java.util.ArrayList) CompositeFuture(io.vertx.core.CompositeFuture) JOB_USER_LAST_NAME_FIELD(org.folio.dao.util.JobExecutionDBConstants.JOB_USER_LAST_NAME_FIELD) JobExecutionMutator(org.folio.dao.util.JobExecutionMutator) FIRST_NAME_FIELD(org.folio.dao.util.JobExecutionDBConstants.FIRST_NAME_FIELD) JOB_PROFILE_DATA_TYPE_FIELD(org.folio.dao.util.JobExecutionDBConstants.JOB_PROFILE_DATA_TYPE_FIELD) JOB_PROFILE_HIDDEN_FIELD(org.folio.dao.util.JobExecutionDBConstants.JOB_PROFILE_HIDDEN_FIELD) USER_ID_FIELD(org.folio.dao.util.JobExecutionDBConstants.USER_ID_FIELD) EMPTY(org.apache.commons.lang3.StringUtils.EMPTY) CURRENTLY_PROCESSED_FIELD(org.folio.dao.util.JobExecutionDBConstants.CURRENTLY_PROCESSED_FIELD) RowSet(io.vertx.sqlclient.RowSet) AsyncResult(io.vertx.core.AsyncResult) SOURCE_PATH_FIELD(org.folio.dao.util.JobExecutionDBConstants.SOURCE_PATH_FIELD) JOB_USER_FIRST_NAME_FIELD(org.folio.dao.util.JobExecutionDBConstants.JOB_USER_FIRST_NAME_FIELD) Promise(io.vertx.core.Promise) SQLConnection(org.folio.rest.persist.SQLConnection) UPDATE_SQL(org.folio.dao.util.JobExecutionDBConstants.UPDATE_SQL) RunBy(org.folio.rest.jaxrs.model.RunBy) ChronoUnit(java.time.temporal.ChronoUnit) SortField(org.folio.dao.util.SortField) JobExecutionUserInfoCollection(org.folio.rest.jaxrs.model.JobExecutionUserInfoCollection) JobProfileInfoCollection(org.folio.rest.jaxrs.model.JobProfileInfoCollection) Row(io.vertx.sqlclient.Row) JobExecutionDetail(org.folio.rest.jaxrs.model.JobExecutionDetail) UPDATE_BY_IDS_SQL(org.folio.dao.util.JobExecutionDBConstants.UPDATE_BY_IDS_SQL) PROGRESS_CURRENT_FIELD(org.folio.dao.util.JobExecutionDBConstants.PROGRESS_CURRENT_FIELD) LogManager(org.apache.logging.log4j.LogManager) FILE_NAME_FIELD(org.folio.dao.util.JobExecutionDBConstants.FILE_NAME_FIELD) Promise(io.vertx.core.Promise) SQLConnection(org.folio.rest.persist.SQLConnection) RowSet(io.vertx.sqlclient.RowSet) NotFoundException(javax.ws.rs.NotFoundException) Tuple(io.vertx.sqlclient.Tuple)

Aggregations

AsyncResult (io.vertx.core.AsyncResult)12 Future (io.vertx.core.Future)12 Promise (io.vertx.core.Promise)12 PostgresClient (org.folio.rest.persist.PostgresClient)12 SQLConnection (org.folio.rest.persist.SQLConnection)12 Row (io.vertx.sqlclient.Row)11 RowSet (io.vertx.sqlclient.RowSet)11 Logger (org.apache.logging.log4j.Logger)11 LogManager (org.apache.logging.log4j.LogManager)10 List (java.util.List)8 Future.succeededFuture (io.vertx.core.Future.succeededFuture)7 JsonObject (io.vertx.core.json.JsonObject)7 ArrayList (java.util.ArrayList)7 Date (java.util.Date)7 Map (java.util.Map)7 String.format (java.lang.String.format)6 ZoneOffset (java.time.ZoneOffset)6 Collectors (java.util.stream.Collectors)6 Collectors.toList (java.util.stream.Collectors.toList)6 Vertx (io.vertx.core.Vertx)5