instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public void enqueueMessage(final WebsocketTopicName destination, final Message<?> message) { final WebsocketEvent event = WebsocketEvent.builder() .destination(destination) .payload(message) .converted(true) .build(); if (doAutoflush) { debouncer.add(event); } else { enqu...
{ events.add(event); logger.debug("[name={}] Enqueued event={}", name, event); } public void sendEventsAndClear() { logger.debug("Sending all queued events"); final List<WebsocketEvent> eventsToSend = new ArrayList<>(events); events.clear(); debouncer.addAll(eventsToSend); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\websocket\sender\WebsocketSender.java
1
请完成以下Java代码
public void setPhone (final @Nullable java.lang.String Phone) { set_Value (COLUMNNAME_Phone, Phone); } @Override public java.lang.String getPhone() { return get_ValueAsString(COLUMNNAME_Phone); } @Override public void setPO_PaymentTerm_ID (final int PO_PaymentTerm_ID) { if (PO_PaymentTerm_ID < 1) ...
return get_ValueAsBoolean(COLUMNNAME_Processed); } @Override public void setReferrer (final @Nullable java.lang.String Referrer) { set_Value (COLUMNNAME_Referrer, Referrer); } @Override public java.lang.String getReferrer() { return get_ValueAsString(COLUMNNAME_Referrer); } @Override public void setV...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_QuickInput.java
1
请完成以下Java代码
public int getHR_Payroll_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_HR_Payroll_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Employee. @param IsEmployee Indicates if this Business Partner is an employee */ public void setIsEmployee (boolean IsEmployee) { set_Value (C...
{ return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName()); } /** Set Valid from. @param ValidFrom Valid from including this date (first day)...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_List.java
1
请完成以下Java代码
public class DatabaseDto { protected String vendor; protected String version; public DatabaseDto(String vendor, String version) { this.vendor = vendor; this.version = version; } public String getVendor() { return vendor; } public void setVendor(String vendor) { this.vendor = vendor;
} public String getVersion() { return version; } public void setVersion(String version) { this.version = version; } public static DatabaseDto fromEngineDto(Database other) { return new DatabaseDto( other.getVendor(), other.getVersion()); } }
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\telemetry\DatabaseDto.java
1
请完成以下Java代码
public void handleInvoiceChangedEvent(@NonNull final InvoiceChangedEvent event) { // NOTE: only sales invoices are supported atm if (!event.getSoTrx().isSales()) { return; } final BPartnerId bpartnerId = event.getBpartnerId(); final Set<ProductId> productIds = event.getProductIds(); if (event.isReve...
if (stats == null) { stats = BPartnerProductStats.newInstance(bpartnerId, productId); } final BPartnerProductStats.LastInvoiceInfo lastSalesInvoice = extractLastSalesInvoiceInfo(event, productId); stats.updateLastSalesInvoiceInfo(lastSalesInvoice); statsRepo.save(stats); } } } private...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\product\stats\BPartnerProductStatsEventHandler.java
1
请完成以下Java代码
public void setM_HU_ID (final int M_HU_ID) { if (M_HU_ID < 1) set_Value (COLUMNNAME_M_HU_ID, null); else set_Value (COLUMNNAME_M_HU_ID, M_HU_ID); } @Override public int getM_HU_ID() { return get_ValueAsInt(COLUMNNAME_M_HU_ID); } @Override public de.metas.handlingunits.model.I_M_HU getM_LU_HU() ...
{ set_Value (COLUMNNAME_Qty, Qty); } @Override public BigDecimal getQty() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setRecord_ID (final int Record_ID) { if (Record_ID < 0) set_Value (COLUMNNAME_Record_ID, null)...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Assignment.java
1
请完成以下Java代码
public void exportS3Storage(HttpServletResponse response, S3StorageQueryCriteria criteria) throws IOException { s3StorageService.download(s3StorageService.queryAll(criteria), response); } @GetMapping @ApiOperation("查询文件") @PreAuthorize("@el.check('storage:list')") public ResponseEntity<Page...
if (storage == null) { map.put("message", "文件不存在或已被删除"); return new ResponseEntity<>(map, HttpStatus.NOT_FOUND); } // 仅适合公开文件访问,私有文件可以使用服务中的 privateDownload 方法 String url = amzS3Config.getDomain() + "/" + storage.getFilePath(); map.put("url", url); return ...
repos\eladmin-master\eladmin-tools\src\main\java\me\zhengjie\rest\S3StorageController.java
1
请完成以下Java代码
public abstract class AbstractBehaviorFactory { protected ExpressionManager expressionManager; private ThrowMessageDelegateFactory throwMessageDelegateFactory = new ThrowMessageDelegateFactory() {}; private MessagePayloadMappingProviderFactory messagePayloadMappingProviderFactory = new BpmnMessageP...
return expressionManager; } public void setExpressionManager(ExpressionManager expressionManager) { this.expressionManager = expressionManager; } public ThrowMessageDelegateFactory getThrowMessageDelegateFactory() { return throwMessageDelegateFactory; } public void setThrowMes...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\parser\factory\AbstractBehaviorFactory.java
1
请完成以下Java代码
public int getRetryOnFailure() {return retryOnFailure;} @Override public ILockCommand setRecordByModel(final Object model) { _recordsToLock.setRecordByModel(model); return this; } @Override public ILockCommand setRecordByTableRecordId(final int tableId, final int recordId) { _recordsToLock.setRecordByTab...
public final AdTableId getSelectionToLock_AD_Table_ID() { return _recordsToLock.getSelection_AD_Table_ID(); } @Override public final PInstanceId getSelectionToLock_AD_PInstance_ID() { return _recordsToLock.getSelection_PInstanceId(); } @Override public final Iterator<TableRecordReference> getRecordsToLock...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\lock\api\impl\LockCommand.java
1
请完成以下Java代码
public void setLine (BigDecimal Line) { set_Value (COLUMNNAME_Line, Line); } /** Get Line No. @return Unique line for this document */ public BigDecimal getLine () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Line); if (bd == null) return Env.ZERO; return bd; } /** Set Name. @param Na...
set_Value (COLUMNNAME_PA_Goal_ID, null); else set_Value (COLUMNNAME_PA_Goal_ID, Integer.valueOf(PA_Goal_ID)); } /** Get Goal. @return Performance Goal */ public int getPA_Goal_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_PA_Goal_ID); if (ii == null) return 0; return ii.intValue(); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_DashboardContent.java
1
请完成以下Java代码
public String format(Map<String, ? extends OptionDescriptor> options) { Comparator<OptionDescriptor> comparator = Comparator .comparing((optionDescriptor) -> optionDescriptor.options().iterator().next()); Set<OptionDescriptor> sorted = new TreeSet<>(comparator); sorted.addAll(options.values()); for (Opt...
if (this.options.contains("--cp")) { this.options.remove("--cp"); this.options.add("-cp"); } this.description = descriptor.description(); } @Override public Set<String> getOptions() { return this.options; } @Override public String getUsageHelp() { return this.description; } } }
repos\spring-boot-4.0.1\cli\spring-boot-cli\src\main\java\org\springframework\boot\cli\command\options\OptionHandler.java
1
请完成以下Java代码
public void setIsSelfService (boolean IsSelfService) { set_Value (COLUMNNAME_IsSelfService, Boolean.valueOf(IsSelfService)); } /** Get Self-Service. @return This is a Self-Service entry or this entry can be changed via Self-Service */ public boolean isSelfService () { Object oo = get_Value(COLUMNNAME_Is...
set_ValueNoCheck (COLUMNNAME_R_Group_ID, null); else set_ValueNoCheck (COLUMNNAME_R_Group_ID, Integer.valueOf(R_Group_ID)); } /** Get Group. @return Request Group */ public int getR_Group_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_R_Group_ID); if (ii == null) return 0; return ii.intVa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_GroupUpdates.java
1
请完成以下Java代码
public void remove(String id) { cache.remove(id); } public Object get(String id) { HalResourceCacheEntry cacheEntry = cache.get(id); if (cacheEntry != null) { if (expired(cacheEntry)) { remove(cacheEntry.getId()); return null; } else { return cacheEntry.getReso...
// abort if capacity is reached return; } } // if still exceed capacity remove oldest while (remainingResources.size() > capacity) { HalResourceCacheEntry resourceToRemove = remainingResources.pollFirst(); if (resourceToRemove != null) { remove(resourceToRe...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\hal\cache\DefaultHalResourceCache.java
1
请完成以下Java代码
public class EngineTemperatureSensor implements Callable<Void> { private static final Logger log = LoggerFactory.getLogger(EngineTemperatureSensor.class); public static final String TOPIC = "engine/temperature"; private IMqttClient client; private Random rnd = new Random(); public EngineTempe...
MqttMessage msg = readEngineTemp(); msg.setQos(0); msg.setRetained(true); client.publish(TOPIC,msg); return null; } /** * This method simulates reading the engine temperature * @return */ private MqttMessage readEngineTemp() { ...
repos\tutorials-master\libraries-server\src\main\java\com\baeldung\mqtt\EngineTemperatureSensor.java
1
请完成以下Java代码
public PartyIdentificationSEPA4 getOrgnlCdtrSchmeId() { return orgnlCdtrSchmeId; } /** * Sets the value of the orgnlCdtrSchmeId property. * * @param value * allowed object is * {@link PartyIdentificationSEPA4 } * */ public void setOrgnlCdtrSchmeId(Pa...
public void setOrgnlDbtrAcct(CashAccountSEPA2 value) { this.orgnlDbtrAcct = value; } /** * Gets the value of the orgnlDbtrAgt property. * * @return * possible object is * {@link BranchAndFinancialInstitutionIdentificationSEPA2 } * */ public BranchAnd...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_008_003_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_008_003_02\AmendmentInformationDetailsSDD.java
1
请完成以下Java代码
public static Collector<PickingJobCandidateProduct, ?, PickingJobCandidateProducts> collect() { return GuavaCollectors.collectUsingListAccumulator(PickingJobCandidateProducts::ofList); } public Set<ProductId> getProductIds() {return byProductId.keySet();} @Override @NonNull public Iterator<PickingJobCandidate...
} final ImmutableMap<ProductId, PickingJobCandidateProduct> byProductIdNew = byProductId.values() .stream() .map(updater) .collect(ImmutableMap.toImmutableMap(PickingJobCandidateProduct::getProductId, product -> product)); return Objects.equals(this.byProductId, byProductIdNew) ? this : new Pi...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\PickingJobCandidateProducts.java
1
请完成以下Java代码
public void setPP_MRP_ID (int PP_MRP_ID) { if (PP_MRP_ID < 1) set_ValueNoCheck (COLUMNNAME_PP_MRP_ID, null); else set_ValueNoCheck (COLUMNNAME_PP_MRP_ID, Integer.valueOf(PP_MRP_ID)); } /** Get Material Requirement Planning. @return Material Requirement Planning */ @Override public int getPP_MRP_ID...
} @Override public void setPP_Order(org.eevolution.model.I_PP_Order PP_Order) { set_ValueFromPO(COLUMNNAME_PP_Order_ID, org.eevolution.model.I_PP_Order.class, PP_Order); } /** Set Produktionsauftrag. @param PP_Order_ID Produktionsauftrag */ @Override public void setPP_Order_ID (int PP_Order_ID) { if (...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_MRP_Alternative.java
1
请完成以下Java代码
public void on(OrderShippedEvent event) { orders.computeIfPresent(event.getOrderId(), (orderId, order) -> { order.setOrderShipped(); emitUpdate(order); return order; }); } @QueryHandler public List<Order> handle(FindAllOrderedProductsQuery query) { ...
.reduce(0, Integer::sum); } @QueryHandler public Order handle(OrderUpdatesQuery query) { return orders.get(query.getOrderId()); } private void emitUpdate(Order order) { emitter.emit(OrderUpdatesQuery.class, q -> order.getOrderId() .equals(q.getOrderId()), order); } ...
repos\tutorials-master\patterns-modules\axon\src\main\java\com\baeldung\axon\querymodel\InMemoryOrdersEventHandler.java
1
请完成以下Spring Boot application配置
app.datasource.url=jdbc:mysql://localhost:3306/numberdb?createDatabaseIfNotExist=true app.datasource.username=root app.datasource.password=root app.datasource.initialization-mode=always app.datasource.platform=mysql app.datasource.initial-pool-size=10 app.datasource.min-pool-size=10 app.datasource.max-pool-size=20 app...
rce.* spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false spring.jpa.open-in-view=false spring.jpa.hibernate.ddl-auto=none
repos\Hibernate-SpringBoot-master\HibernateSpringBootDataSourceBuilderC3P0Kickoff\src\main\resources\application.properties
2
请在Spring Boot框架中完成以下Java代码
public class ClusterNotAvailableException extends RuntimeException { /** * Constructs a new uninitialized instance of {@link ClusterNotAvailableException}. */ public ClusterNotAvailableException() { } /** * Constructs a new instance of {@link ClusterNotAvailableException} initialized with * the given {@lin...
* @param cause {@link Throwable} indicating the cause of this exception. */ public ClusterNotAvailableException(Throwable cause) { super(cause); } /** * Constructs a new instance of {@link ClusterNotAvailableException} initialized with * the given {@link String message} describing the exception along with t...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\config\annotation\ClusterNotAvailableException.java
2
请在Spring Boot框架中完成以下Java代码
public User getUser(Long id) { log.info("获取用户信息"); return restTemplate.getForObject("http://Server-Provider/user/{id}", User.class, id); } @HystrixCommand(fallbackMethod = "getUserDefault2") public User getUserDefault(Long id) { String a = null; // 测试服务降级 a.toString(...
User user = new User(1L, "mrbird", "123456"); HttpStatus status = this.restTemplate.postForEntity("http://Server-Provider/user", user, null).getStatusCode(); if (status.is2xxSuccessful()) { return "新增用户成功"; } else { return "新增用户失败"; } } @CacheRemove(comma...
repos\SpringAll-master\30.Spring-Cloud-Hystrix-Circuit-Breaker\Ribbon-Consumer\src\main\java\com\example\demo\Service\UserService.java
2
请完成以下Java代码
public void setCS_Creditpass_CP_Fallback_ID (int CS_Creditpass_CP_Fallback_ID) { if (CS_Creditpass_CP_Fallback_ID < 1) set_ValueNoCheck (COLUMNNAME_CS_Creditpass_CP_Fallback_ID, null); else set_ValueNoCheck (COLUMNNAME_CS_Creditpass_CP_Fallback_ID, Integer.valueOf(CS_Creditpass_CP_Fallback_ID)); } /** G...
public static final String FALLBACKPAYMENTRULE_OnCredit = "P"; /** DirectDebit = D */ public static final String FALLBACKPAYMENTRULE_DirectDebit = "D"; /** Mixed = M */ public static final String FALLBACKPAYMENTRULE_Mixed = "M"; /** Rückerstattung = E */ public static final String PAYMENTRULE_Reimbursement = "E";...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.creditscore\creditpass\src\main\java-gen\de\metas\vertical\creditscore\creditpass\model\X_CS_Creditpass_CP_Fallback.java
1
请完成以下Java代码
public CommissionPoints add(@NonNull final CommissionPoints augent) { if (augent.isZero()) { return this; } return CommissionPoints.of(toBigDecimal().add(augent.toBigDecimal())); } public CommissionPoints subtract(@NonNull final CommissionPoints augent) { if (augent.isZero()) { return this; } ...
final int precision) { final BigDecimal percentagePoints = commissionPercent.computePercentageOf(points, precision); return CommissionPoints.of(percentagePoints); } public CommissionPoints negateIf(final boolean condition) { if (condition) { return CommissionPoints.of(points.negate()); } return this...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\businesslogic\CommissionPoints.java
1
请完成以下Java代码
public void setDisableCommand (final @Nullable java.lang.String DisableCommand) { set_Value (COLUMNNAME_DisableCommand, DisableCommand); } @Override public java.lang.String getDisableCommand() { return get_ValueAsString(COLUMNNAME_DisableCommand); } @Override public void setEnableCommand (final @Nullable...
public int getExternalSystem_ID() { return get_ValueAsInt(COLUMNNAME_ExternalSystem_ID); } @Override public void setExternalSystem_Service_ID (final int ExternalSystem_Service_ID) { if (ExternalSystem_Service_ID < 1) set_ValueNoCheck (COLUMNNAME_ExternalSystem_Service_ID, null); else set_ValueNoChe...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Service.java
1
请完成以下Java代码
public void setClassname (java.lang.String Classname) { set_Value (COLUMNNAME_Classname, Classname); } /** Get Java-Klasse. @return Java-Klasse */ @Override public java.lang.String getClassname () { return (java.lang.String)get_Value(COLUMNNAME_Classname); } /** Set Beschreibung. @param Description...
/** Get Name. @return Alphanumeric identifier of the entity */ @Override public java.lang.String getName () { return (java.lang.String)get_Value(COLUMNNAME_Name); } /** Set Reihenfolge. @param SeqNo Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst */ @Override public v...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\pricing\model\X_C_PricingRule.java
1
请完成以下Java代码
public void recordElapsedTime(final long duration, final TimeUnit unit, final Metadata metadata) { final PerformanceMonitoringData perfMonData = getPerformanceMonitoringData(); final ArrayList<Tag> tags = createTags(metadata, perfMonData); try (final IAutoCloseable ignored = perfMonData.addCalledByIfNotNull(me...
for (final Entry<String, String> entry : metadata.getLabels().entrySet()) { if (PerformanceMonitoringService.VOLATILE_LABELS.contains(entry.getKey())) { // Avoid OOME: if we included e.g. the recordId, then every recordId would cause a new meter to be created. continue; } addTagIfNotNull(en...
repos\metasfresh-new_dawn_uat\backend\de.metas.monitoring\src\main\java\de\metas\monitoring\adapter\MicrometerPerformanceMonitoringService.java
1
请完成以下Java代码
private static Collection<ExposableWebEndpoint> asList(@Nullable ExposableWebEndpoint healthEndpoint) { return (healthEndpoint != null) ? Collections.singletonList(healthEndpoint) : Collections.emptyList(); } @Override protected void initHandlerMethods() { if (this.healthEndpoint == null) { return; } for...
} private RequestMappingInfo getRequestMappingInfo(WebOperation operation, String additionalPath) { WebOperationRequestPredicate predicate = operation.getRequestPredicate(); String path = this.endpointMapping.createSubPath(additionalPath); RequestMethod method = RequestMethod.valueOf(predicate.getHttpMethod().n...
repos\spring-boot-4.0.1\module\spring-boot-webflux\src\main\java\org\springframework\boot\webflux\actuate\endpoint\web\AdditionalHealthEndpointPathsWebFluxHandlerMapping.java
1
请完成以下Java代码
protected static JsonNode convertToJsonCaseInstanceVariables(CaseInstanceMigrationDocument caseInstanceMigrationDocument, ObjectMapper objectMapper) { Map<String, Object> caseInstanceVariables = caseInstanceMigrationDocument.getCaseInstanceVariables(); if (caseInstanceVariables != null && !caseInstanceV...
if (jsonNode.has(propertyName) && !jsonNode.get(propertyName).isNull()) { return jsonNode.get(propertyName).asInt(); } return null; } protected static <V> V getLocalVariablesFromJson(JsonNode jsonNode, ObjectMapper objectMapper) { JsonNode localVariablesNode = jsonN...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\migration\CaseInstanceMigrationDocumentConverter.java
1
请完成以下Java代码
public class InstantRestVariableConverter implements RestVariableConverter { @Override public String getRestTypeName() { return "instant"; } @Override public Class<?> getVariableType() { return Instant.class; } @Override public Object getVariableValue(EngineRestVariabl...
} } return null; } @Override public void convertVariableValue(Object variableValue, EngineRestVariable result) { if (variableValue != null) { if (!(variableValue instanceof Instant)) { throw new FlowableIllegalArgumentException("Converter can only convert...
repos\flowable-engine-main\modules\flowable-common-rest\src\main\java\org\flowable\common\rest\variable\InstantRestVariableConverter.java
1
请完成以下Java代码
public String toJson() { return code; } /** * Accepts either the human-readable constant name (e.g. "PublicInformation") or the code (e.g. "A"). */ @JsonCreator public static JsonConfidentialType fromJson(final String value) { if (value == null) { return null; } // Try by code first for (fina...
return t; } } // Then by enum name (human-readable constant without the generated prefix) for (final JsonConfidentialType t : values()) { if (t.name().equalsIgnoreCase(value)) { return t; } } throw new IllegalArgumentException("Unknown ConfidentialType: " + value); } }
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-rest_api\src\main\java\de\metas\common\rest_api\request\JsonConfidentialType.java
1
请完成以下Java代码
protected boolean isValidSortByValue(String value) { return VALID_SORT_BY_VALUES.contains(value); } @Override protected JobDefinitionQuery createNewQuery(ProcessEngine engine) { return engine.getManagementService().createJobDefinitionQuery(); } @Override protected void applyFilters(JobDefinitionQu...
} if (TRUE.equals(withOverridingJobPriority)) { query.withOverridingJobPriority(); } if (tenantIds != null && !tenantIds.isEmpty()) { query.tenantIdIn(tenantIds.toArray(new String[tenantIds.size()])); } if (TRUE.equals(withoutTenantId)) { query.withoutTenantId(); } if (TR...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\management\JobDefinitionQueryDto.java
1
请完成以下Java代码
public UserQuery memberOfGroup(String groupId) { ensureNotNull("Provided groupId", groupId); this.groupId = groupId; return this; } public UserQuery potentialStarter(String procDefId) { ensureNotNull("Provided processDefinitionId", procDefId); this.procDefId = procDefId; return this; } ...
return firstNameLike; } public String getLastName() { return lastName; } public String getLastNameLike() { return lastNameLike; } public String getEmail() { return email; } public String getEmailLike() { return emailLike; } public String getGroupId() { return groupId; } publi...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\UserQueryImpl.java
1
请完成以下Java代码
public void dispose() { if (m_gridController != null) { m_gridController.dispose(); } m_gridController = null; super.dispose(); orgField = null; locatorField = null; productField = null; mtypeField = null; dateFField = null; dateTField = null; // if (m_frame != null) { m_frame.dis...
} // vetoableChange public void setProductFieldValue(final Object value) { productField.setValue(value); refresh(); } public void setDate(final Timestamp date) { dateFField.setValue(date); dateTField.setValue(date); refresh(); } /*******************************************************************...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\form\VTrxMaterial.java
1
请完成以下Java代码
public void destroy() { log.debug("[{}] Stopping generator", originatorId); initialized.set(false); prevMsg = null; nextTickId = null; lastScheduledTs = 0; if (scriptEngine != null) { scriptEngine.destroy(); scriptEngine = null; } } ...
String originatorId = "originatorId"; boolean hasType = oldConfiguration.hasNonNull(originatorType); boolean hasOriginatorId = oldConfiguration.hasNonNull(originatorId) && StringUtils.isNotBlank(oldConfiguration.get(originatorId).asText()); boolean...
repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\debug\TbMsgGeneratorNode.java
1
请完成以下Java代码
private boolean findLeakedPassword(List<String> passwords, String suffix) { for (String pw : passwords) { if (pw.startsWith(suffix)) { return true; } } return false; } private List<String> getLeakedPasswordsForPrefix(String prefix) { try { String response = this.restClient.get().uri(prefix).retr...
catch (RestClientException ex) { this.logger.error("Request for leaked passwords failed", ex); return Collections.emptyList(); } } private static MessageDigest getSha1Digest() { try { return MessageDigest.getInstance("SHA-1"); } catch (NoSuchAlgorithmException ex) { throw new RuntimeException(ex....
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\password\HaveIBeenPwnedRestApiPasswordChecker.java
1
请完成以下Java代码
protected void prepare() { for (final ProcessInfoParameter para : getParametersAsArray()) { if (para.getParameter() == null) { // skip if no parameter value continue; } final String name = para.getParameterName(); if (name.equals(PARAM_IsAutoProcess)) { p_isAutoProcess = para.getPara...
/** * This dunning candidate source returns only those candidates that have been selected by the user. */ private static final class SelectedDunningCandidatesSource extends AbstractDunningCandidateSource { private final String whereClause; public SelectedDunningCandidatesSource(final String whereClause) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\process\C_Dunning_Candidate_Process.java
1
请完成以下Java代码
private static final void updateM_AttributeSet(final int attributeSetId) { // TODO: translate it to Query API // Update M_AttributeSet.IsInstanceAttribute='Y' { final String sql = "UPDATE M_AttributeSet mas" + " SET IsInstanceAttribute='Y' " + "WHERE M_AttributeSet_ID=" + attributeSetId + " ...
+ " AND NOT EXISTS (SELECT * FROM M_AttributeUse mau" + " INNER JOIN M_Attribute ma ON (mau.M_Attribute_ID=ma.M_Attribute_ID) " + "WHERE mau.M_AttributeSet_ID=mas.M_AttributeSet_ID" + " AND mau.IsActive='Y' AND ma.IsActive='Y'" + " AND ma.IsInstanceAttribute='Y')"; DB.executeUpdateAndThrowExcepti...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MAttributeUse.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO (Properties ctx) { org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo (ctx, Table_Name, get_TrxName()); return poi; } /** Set Beschreibung. @param Description Beschreibung */ @Override public void setDescription (java.lang.String De...
{ Integer ii = (Integer)get_Value(COLUMNNAME_M_Nutrition_Fact_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Name. @param Name Alphanumeric identifier of the entity */ @Override public void setName (java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Nutrition_Fact.java
1
请在Spring Boot框架中完成以下Java代码
private JsonAttachment buildJsonAttachment(@NonNull final de.metas.camel.externalsystems.grssignum.to_grs.api.model.JsonAttachment attachment) { return JsonAttachmentUtil.createLocalFileJsonAttachment( "", attachment.getFileName(), buildJsonTags(attachment)); } @NonNull private ImmutableList<JsonTag>...
jsonTagBuilder.add(JsonTag.of(AttachmentTags.VALID_TO.getName(), attachment.getValidUntil())); } if (Check.isNotBlank(attachment.getDocumentType())) { jsonTagBuilder.add(JsonTag.of(AttachmentTags.DOCUMENT_TYPE.getName(), attachment.getDocumentType())); } if (Check.isNotBlank(attachment.getDocumentGroup()...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-grssignum\src\main\java\de\metas\camel\externalsystems\grssignum\from_grs\product\processor\RawMaterialAttachFileProcessor.java
2
请在Spring Boot框架中完成以下Java代码
public class HistoricTaskLogEntryQueryProperty implements QueryProperty { private static final long serialVersionUID = 1L; private static final Map<String, HistoricTaskLogEntryQueryProperty> properties = new HashMap<>(); public static final HistoricTaskLogEntryQueryProperty LOG_NUMBER = new HistoricTaskL...
public static final HistoricTaskLogEntryQueryProperty TENANT_ID = new HistoricTaskLogEntryQueryProperty("RES.TENANT_ID_"); private String name; public HistoricTaskLogEntryQueryProperty(String name) { this.name = name; properties.put(name, this); } @Override public String getName()...
repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\HistoricTaskLogEntryQueryProperty.java
2
请在Spring Boot框架中完成以下Java代码
public class TraceableObject<O, C> { protected MutableVariableType<O, C> type; protected O tracedObject; protected C tracedObjectOriginalValue; protected VariableInstanceEntity variableInstanceEntity; public TraceableObject(MutableVariableType<O, C> type, O tracedObject, C tracedObjectOriginalValu...
} if (engineConfiguration == null) { throw new FlowableException("Could not find engine configuration with variable service configuration"); } if (!(engineConfiguration instanceof HasVariableServiceConfiguration)) { throw new FlowableException("Variable ...
repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\types\TraceableObject.java
2
请完成以下Java代码
public static synchronized void destroy() { if (isInitialized()) { Map<String, CmmnEngine> engines = new HashMap<>(cmmnEngines); cmmnEngines = new HashMap<>(); for (String cmmnEngineName : engines.keySet()) { CmmnEngine cmmnEngine = engines.get(cmmnEngineName...
cmmnEngineInfosByResourceUrl.clear(); cmmnEngineInfos.clear(); setInitialized(false); } } public static boolean isInitialized() { return isInitialized; } public static void setInitialized(boolean isInitialized) { CmmnEngines.isInitialized = isInitialize...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\CmmnEngines.java
1
请在Spring Boot框架中完成以下Java代码
public class BatchJdbcProperties extends DatabaseInitializationProperties { private static final String DEFAULT_SCHEMA_LOCATION = "classpath:org/springframework/" + "batch/core/schema-@@platform@@.sql"; /** * Whether to validate the transaction state. */ private boolean validateTransactionState = true; /*...
this.validateTransactionState = validateTransactionState; } public @Nullable Isolation getIsolationLevelForCreate() { return this.isolationLevelForCreate; } public void setIsolationLevelForCreate(@Nullable Isolation isolationLevelForCreate) { this.isolationLevelForCreate = isolationLevelForCreate; } public...
repos\spring-boot-4.0.1\module\spring-boot-batch-jdbc\src\main\java\org\springframework\boot\batch\jdbc\autoconfigure\BatchJdbcProperties.java
2
请在Spring Boot框架中完成以下Java代码
public class SupplyRequiredHandlerHelper { private static final Logger logger = LogManager.getLogger(SupplyRequiredHandlerHelper.class); @NonNull private final IOrgDAO orgDAO = Services.get(IOrgDAO.class); @NonNull private final IWarehouseDAO warehouseDAO = Services.get(IWarehouseDAO.class); @NonNull private final ...
Loggables.withLogger(logger, Level.DEBUG).addLog("No PP_Product_Planning record found => nothing to do; query={}", productPlanningQuery); return null; } final I_AD_Org org = orgDAO.getById(orgId); return MaterialPlanningContext.builder() .productId(productId) .attributeSetInstanceId(attributeSetInsta...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\event\SupplyRequiredHandlerHelper.java
2
请完成以下Java代码
public Builder keys(List<String> keys) { this.keys = keys; return this; } public Builder deleteHistoryQueries(List<DeleteTsKvQuery> deleteHistoryQueries) { this.deleteHistoryQueries = deleteHistoryQueries; return this; } public Builder pr...
this.tbMsgType = tbMsgType; return this; } public Builder callback(FutureCallback<List<String>> callback) { this.callback = callback; return this; } public TimeseriesDeleteRequest build() { return new TimeseriesDeleteRequest(tenantId, ent...
repos\thingsboard-master\rule-engine\rule-engine-api\src\main\java\org\thingsboard\rule\engine\api\TimeseriesDeleteRequest.java
1
请完成以下Java代码
class JdbcAdaptingLiquibaseConnectionDetailsFactory implements ConnectionDetailsFactory<JdbcConnectionDetails, LiquibaseConnectionDetails> { @Override public LiquibaseConnectionDetails getConnectionDetails(JdbcConnectionDetails input) { return new LiquibaseConnectionDetails() { @Override public @Nullable ...
@Override public String getJdbcUrl() { return input.getJdbcUrl(); } @Override public String getDriverClassName() { return input.getDriverClassName(); } }; } }
repos\spring-boot-4.0.1\module\spring-boot-liquibase\src\main\java\org\springframework\boot\liquibase\docker\compose\JdbcAdaptingLiquibaseConnectionDetailsFactory.java
1
请完成以下Java代码
public String getHstsValue() { return hstsValue; } public void setHstsValue(String hstsValue) { this.hstsValue = hstsValue; } public String getHstsMaxAge() { return hstsMaxAge; } public void setHstsMaxAge(String hstsMaxAge) { this.hstsMaxAge = hstsMaxAge; } @Override public String ...
.add("xssProtectionDisabled=" + xssProtectionDisabled) .add("xssProtectionOption=" + xssProtectionOption) .add("xssProtectionValue=" + xssProtectionValue) .add("contentSecurityPolicyDisabled=" + contentSecurityPolicyDisabled) .add("contentSecurityPolicyValue=" + contentSecurityPolicyValue) ...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\HeaderSecurityProperties.java
1
请完成以下Java代码
public void onResume(CmmnActivityExecution execution) { ensureNotCaseInstance(execution, "resume"); ensureTransitionAllowed(execution, SUSPENDED, ACTIVE, "resume"); CmmnActivityExecution parent = execution.getParent(); if (parent != null) { if (!parent.isActive()) { String id = execution....
} else { execution.start(); } } // manual activation rule ////////////////////////////////////////////// protected boolean evaluateManualActivationRule(CmmnActivityExecution execution) { boolean manualActivation = false; CmmnActivity activity = execution.getActivity(); Object manualActivat...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\behavior\StageOrTaskActivityBehavior.java
1
请完成以下Java代码
public void setR_RequestUpdate_ID (int R_RequestUpdate_ID) { if (R_RequestUpdate_ID < 1) set_ValueNoCheck (COLUMNNAME_R_RequestUpdate_ID, null); else set_ValueNoCheck (COLUMNNAME_R_RequestUpdate_ID, Integer.valueOf(R_RequestUpdate_ID)); } /** Get Request Update. @return Request Updates */ public i...
{ return new KeyNamePair(get_ID(), String.valueOf(getR_RequestUpdate_ID())); } /** Set Start Time. @param StartTime Time started */ public void setStartTime (Timestamp StartTime) { set_Value (COLUMNNAME_StartTime, StartTime); } /** Get Start Time. @return Time started */ public Timest...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_RequestUpdate.java
1
请完成以下Java代码
public boolean isAllowTrxAfterThreadEnd() { return allowTrxAfterThreadEnd; } @Override public void reset() { setActive(DEFAULT_ACTIVE); setAllowTrxAfterThreadEnd(DEFAULT_ALLOW_TRX_AFTER_TREAD_END); setMaxSavepoints(DEFAULT_MAX_SAVEPOINTS); setMaxTrx(DEFAULT_MAX_TRX); setTrxTimeoutSecs(DEFAULT_TRX_TIME...
public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("TrxConstraints["); sb.append("active=" + this.active); sb.append(", allowedTrxNamePrefixes=" + getAllowedTrxNamePrefixes()); sb.append(", allowTrxAfterThreadEnd=" + isAllowTrxAfterThreadEnd()); sb.append(", maxSavepoints=" ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\util\trxConstraints\api\impl\TrxConstraints.java
1
请完成以下Java代码
public static AttributeCode extractAttributeCode(final org.compiere.model.I_M_Attribute attribute) { return AttributeCode.ofString(attribute.getValue()); } public static Object extractJSONValue( @NonNull final IAttributeStorage attributesStorage, @NonNull final IAttributeValue attributeValue, @NonNull fi...
{ return DocumentFieldWidgetType.LocalDate; } else { throw new IllegalArgumentException("Cannot extract widgetType from " + attributeValue); } } @NonNull private static Optional<DocumentLayoutElementDescriptor> getClearanceNoteLayoutElement(@NonNull final I_M_HU hu) { if (Check.isBlank(hu.getCleara...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorRowAttributesHelper.java
1
请完成以下Java代码
public void run(Properties sysCtx) { sysConfigBL.setValue(sysconfigName, sysconfigValue, ClientId.SYSTEM, OrgId.ANY); } }); } private String createSysConfigName(Object key) { return createSysConfigPrefix() + "." + key.toString(); } private String createSysConfigPrefix() { return SYSCONFIG_PREFIX...
final Map<String, String> map = sysConfigBL.getValuesForPrefix(prefix, removePrefix, clientAndOrgId); for (final Map.Entry<String, String> mapEntry : map.entrySet()) { final String key = mapEntry.getKey(); final String valueStr = mapEntry.getValue(); try { final Object value = serializer.fromStrin...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\plaf\SysConfigUIDefaultsRepository.java
1
请完成以下Java代码
protected static void addFeature(CharSequence rawFeature, List<Integer> featureVector, FeatureMap featureMap) { int id = featureMap.idOf(rawFeature.toString()); if (id != -1) { featureVector.add(id); } } /** * 添加特征,同时清空缓存 * * @param rawFeature ...
* * @param tagSet * @return */ public String[] tags(TagSet tagSet) { assert tagArray != null; String[] tags = new String[tagArray.length]; for (int i = 0; i < tags.length; i++) { tags[i] = tagSet.stringOf(tagArray[i]); } return tags; ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\perceptron\instance\Instance.java
1
请完成以下Java代码
public class JavaKeyStore { private KeyStore keyStore; private String keyStoreName; private String keyStoreType; private String keyStorePassword; JavaKeyStore(String keyStoreType, String keyStorePassword, String keyStoreName) throws CertificateException, NoSuchAlgorithmException, KeyStoreExceptio...
keyStore.setCertificateEntry(alias, certificate); } Certificate getCertificate(String alias) throws KeyStoreException { return keyStore.getCertificate(alias); } void deleteEntry(String alias) throws KeyStoreException { keyStore.deleteEntry(alias); } void deleteKeyStore() throw...
repos\tutorials-master\core-java-modules\core-java-security\src\main\java\com\baeldung\keystore\JavaKeyStore.java
1
请在Spring Boot框架中完成以下Java代码
public class MyProperties { @NotNull private InetAddress remoteAddress; @Valid private final Security security = new Security(); // @fold:on // getters/setters... public InetAddress getRemoteAddress() { return this.remoteAddress; } public void setRemoteAddress(InetAddress remoteAddress) { this.remoteAdd...
@NotEmpty private String username; // @fold:on // getters/setters... public String getUsername() { return this.username; } public void setUsername(String username) { this.username = username; } // @fold:off } }
repos\spring-boot-4.0.1\documentation\spring-boot-docs\src\main\java\org\springframework\boot\docs\features\externalconfig\typesafeconfigurationproperties\validation\nested\MyProperties.java
2
请在Spring Boot框架中完成以下Java代码
public void appReady(ApplicationReadyEvent event) throws Exception { String pathOne = APPLICATION_BASE_NODE_PATH + "/baeldung.archaius.properties.one"; String valueOne = "one FROM:zookeeper"; String pathThree = APPLICATION_BASE_NODE_PATH + "/baeldung.archaius.properties.three"; String va...
} } private void createBaseNodes() throws Exception { if (client.checkExists() .forPath(CONFIG_BASE_NODE_PATH) == null) { client.create() .forPath(CONFIG_BASE_NODE_PATH); } if (client.checkExists() .forPath(APPLICATION_BASE_NODE_PATH) ...
repos\tutorials-master\spring-cloud-modules\spring-cloud-archaius\spring-cloud-archaius-zookeeper-config\src\main\java\com\baeldung\spring\cloud\archaius\zookeeperconfig\config\ZookeeperConfigsInitializer.java
2
请完成以下Java代码
public void createFruit(@Valid Fruit fruit) { SimpleStorageService.storeFruit(fruit); } @POST @Path("/created") @Consumes(MediaType.APPLICATION_JSON) public Response createNewFruit(@Valid Fruit fruit) { String result = "Fruit saved : " + fruit; return Response.status(Res...
@Produces(MediaType.APPLICATION_JSON) @Path("/search/{name}") public Fruit findFruitByName(@PathParam("name") String name) { return SimpleStorageService.findByName(name); } @GET @Produces(MediaType.TEXT_HTML) @Path("/exception") @Valid public Fruit exception() { Fruit fr...
repos\tutorials-master\web-modules\jersey\src\main\java\com\baeldung\jersey\server\rest\FruitResource.java
1
请完成以下Java代码
private Result processInvoices(@NonNull final Iterator<InvoiceId> invoiceIds) { int counter = 0; boolean anyException = false; while (invoiceIds.hasNext()) { final InvoiceId invoiceId = invoiceIds.next(); try (final MDCCloseable invoiceCandidateIdMDC = TableRecordMDC.putTableRecordReference(I_C_Invoice.T...
anyException = true; final AdIssueId adIssueId = errorManager.createIssue(e); Loggables.withLogger(logger, Level.DEBUG) .addLog("C_Invoice_ID={}: Caught {} and created AD_Issue_ID={}; exception-message={}", invoiceId.getRepoId(), e.getClass(), adIssueId.getRepoId(), e.getLocalizedMessage()); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\process\C_Invoice_CreateOrUpdateCommissionInstance.java
1
请完成以下Java代码
private static Optional<GeocodingConfig> toGeocodingConfig(@Nullable final I_GeocodingConfig record) { if (record == null) { return Optional.empty(); } final GeocodingProviderName providerName = GeocodingProviderName.ofNullableCode(record.getGeocodingProvider()); final GoogleMapsConfig googleMapsConfig;...
.millisBetweenRequests(record.getosm_millisBetweenRequests()) .cacheCapacity(record.getcacheCapacity()) .build(); } else { throw new AdempiereException("Unknown provider: " + providerName); } final GeocodingConfig geocodingConfig = GeocodingConfig.builder() .providerName(providerName) .g...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\location\geocoding\GeocodingConfigRepository.java
1
请完成以下Spring Boot application配置
#chaos monkey for spring boot props management.endpoint.chaosmonkey.enabled=true management.endpoint.chaosmonkeyjmx.enabled=true spring.profiles.active=chaos-monkey #Determine whether should execute or not chaos.monkey.enabled=true #How many requests are to be attacked. 1: attack each request; 5: each 5th request is a...
ontroller watcher active chaos.monkey.watcher.controller=false #RestController watcher active chaos.monkey.watcher.restController=false #Service watcher active chaos.monkey.watcher.service=true #Repository watcher active chaos.monkey.watcher.repository=false #Component watcher active chaos.monkey.watcher.component=fals...
repos\tutorials-master\spring-boot-modules\spring-boot-performance\src\main\resources\application.properties
2
请完成以下Java代码
private boolean isIsRetrieveAppsActionMessage() { return retrieveAppsActionMessage; } public Builder setAccelerator(final KeyStroke accelerator) { this.accelerator = accelerator; return this; } private KeyStroke getAccelerator() { return accelerator; } public Builder setText(final Strin...
} /** * Advice the builder if a small size button is needed or not. * * @param smallSize true if small size button shall be created */ public Builder setSmallSize(final boolean smallSize) { this.smallSize = smallSize; return this; } private boolean isSmallSize() { return smallSize; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\AppsAction.java
1
请完成以下Java代码
protected static class Polygon { /** * */ protected Polyline lowerHead, lowerTail, upperHead, upperTail; } /** * */ protected static class Polyline { /** * */ protected double dx, dy;
/** * */ protected Polyline next; /** * */ protected Polyline(double dx, double dy, Polyline next) { this.dx = dx; this.dy = dy; this.next = next; } } }
repos\Activiti-develop\activiti-core\activiti-bpmn-layout\src\main\java\org\activiti\bpmn\BPMNLayout.java
1
请完成以下Java代码
protected void subscribe(TopicSubscription subscription) { if (!subscriptions.addIfAbsent(subscription)) { String topicName = subscription.getTopicName(); throw LOG.topicNameAlreadySubscribedException(topicName); } resume(); } protected void unsubscribe(TopicSubscriptionImpl subscription) ...
ACQUISITION_MONITOR.lock(); try { if (isRunning.get()) { IS_WAITING.await(waitTime, TimeUnit.MILLISECONDS); } } catch (InterruptedException e) { LOG.exceptionWhileExecutingBackoffStrategyMethod(e); } finally { ACQUISITION_MONITOR.unlock(); } } ...
repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\topic\impl\TopicSubscriptionManager.java
1
请完成以下Java代码
public String getClientIdPrefix() { return clientIdPrefix; } public void setClientIdPrefix(String clientIdPrefix) { this.clientIdPrefix = clientIdPrefix; } @Override public Integer getConcurrency() { return concurrency; } public void setConcurrency(Integer concurre...
public void setSplitIterables(boolean splitIterables) { this.splitIterables = splitIterables; } @Override public String getMainListenerId() { return mainListenerId; } public void setMainListenerId(String mainListenerId) { this.mainListenerId = mainListenerId; } @Ov...
repos\flowable-engine-main\modules\flowable-event-registry-spring\src\main\java\org\flowable\eventregistry\spring\kafka\SimpleKafkaListenerEndpoint.java
1
请完成以下Java代码
public class Carrier_ShipmentOrder_Parcel_Label_Download extends JavaProcess implements IProcessPrecondition { private final ShipmentOrderRepository orderRepository = SpringContextHolder.instance.getBean(ShipmentOrderRepository.class); @Override public ProcessPreconditionsResolution checkPreconditionsApplicable(fin...
@Override protected String doIt() { final DeliveryOrderParcelId parcelId = DeliveryOrderParcelId.ofRepoIdOrNull(getRecord_ID()); if (parcelId == null) { return MSG_OK; } final DeliveryOrderParcel parcel = orderRepository.getParcelById(parcelId); if (parcel == null || parcel.getLabelPdfBase64() == null)...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.commons\src\main\java\de\metas\shipper\gateway\commons\process\Carrier_ShipmentOrder_Parcel_Label_Download.java
1
请在Spring Boot框架中完成以下Java代码
public Compression getCompression() { return this.compression; } public void setCompression(Compression compression) { this.compression = compression; } public Map<String, String> getHeaders() { return this.headers; } public void setHeaders(Map<String, String> headers) { this.headers = headers; }
public enum Compression { /** * Gzip compression. */ GZIP, /** * No compression. */ NONE } }
repos\spring-boot-4.0.1\module\spring-boot-micrometer-tracing-opentelemetry\src\main\java\org\springframework\boot\micrometer\tracing\opentelemetry\autoconfigure\otlp\OtlpTracingProperties.java
2
请完成以下Java代码
public class C_SubscriptionProgress_ChangeRecipient extends C_SubscriptionProgressBase { @Param(parameterName = "DateGeneral", mandatory = false) private Timestamp dateFrom; @Param(parameterName = "DateGeneral", mandatory = false, parameterTo = true) private Timestamp dateTo; @Param(parameterName = "DropShip_...
protected String doIt() { final ChangeRecipientsRequest request = ChangeRecipientsRequest.builder() .term(getTermFromProcessInfo()) .dateFrom(dateFrom) .dateTo(dateTo) .DropShip_BPartner_ID(DropShip_BPartner_ID) .DropShip_Location_ID(DropShip_Location_ID) .DropShip_User_ID(DropShip_User_ID) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\subscription\process\C_SubscriptionProgress_ChangeRecipient.java
1
请在Spring Boot框架中完成以下Java代码
public AllocationAmounts convertToRealAmounts(@NonNull final InvoiceAmtMultiplier invoiceAmtMultiplier) { return negateIf(invoiceAmtMultiplier.isNegateToConvertToRealValue()); } private AllocationAmounts negateIf(final boolean condition) { return condition ? negate() : this; } public AllocationAmounts negat...
return payAmt.add(discountAmt).add(writeOffAmt).add(invoiceProcessingFee); } public boolean isZero() { return payAmt.signum() == 0 && discountAmt.signum() == 0 && writeOffAmt.signum() == 0 && invoiceProcessingFee.signum() == 0; } public AllocationAmounts toZero() { return isZero() ? this : Alloc...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\paymentallocation\service\AllocationAmounts.java
2
请完成以下Java代码
public Tutorials getFullDocument() { try { JAXBContext jaxbContext = JAXBContext.newInstance(Tutorials.class); Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); Tutorials tutorials = (Tutorials) jaxbUnmarshaller.unmarshal(this.getFile()); return tu...
} catch (JAXBException e) { e.printStackTrace(); } } public File getFile() { return file; } public void setFile(File file) { this.file = file; } }
repos\tutorials-master\xml-modules\xml\src\main\java\com\baeldung\xml\JaxbParser.java
1
请在Spring Boot框架中完成以下Java代码
public class UserDataPublisher implements Publisher<UserData>, Subscription { private static final Logger LOG = LoggerFactory.getLogger(UserDataPublisher.class); private final List<UserData> users; private Subscriber<? super UserData> subscriber; private long start; private PublishTask publishTas...
@Override public synchronized void request(long n) { long startIndex = start; LOG.info("request n={} start={}", n, startIndex); start = start + n; publishTask = new PublishTask(users, startIndex, n, subscriber); publishTask.publish(); } @Override public void canc...
repos\spring-examples-java-17\spring-webflux\src\main\java\itx\examples\webflux\services\UserDataPublisher.java
2
请完成以下Java代码
private void extractBeneficiaryToInvoice( @NonNull final XmlRequest xRequest, @NonNull final I_C_Invoice invoiceRecord, @NonNull final AttachmentEntry attachmentEntry /*needed for logging*/) { final XmlPatient patient = xRequest.getPayload().getBody().getTiers().getPatient(); final XmlBiller biller = xReq...
final int beneficiaryRepoId = bPartner.getBpartner().getId().getRepoId(); invoiceRecord.setBeneficiary_BPartner_ID(beneficiaryRepoId); logger.debug("set Beneficiary_BPartner_ID={} from the patient-XML data's SSN={} extracted from attachmentEntry with id={} (filename={})", beneficiaryRepoId, patient.getSsn(), at...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\export\HealthcareXMLAttachedToInvoiceListener.java
1
请完成以下Java代码
public LogicExpressionResult getAllowDeleteDocument() { return allowDelete; } public void assertDeleteDocumentAllowed(final IncludedDocumentsCollectionActionsContext context) { final LogicExpressionResult allowDelete = updateAndGetAllowDeleteDocument(context); if (allowDelete.isFalse()) { throw new Inva...
} if (context.isParentDocumentProcessed()) { return DISALLOW_ParentDocumentProcessed; } if (!context.isParentDocumentActive()) { return DISALLOW_ParentDocumentNotActive; } final LogicExpressionResult allowDelete = allowDeleteLogic.evaluateToResult(context.toEvaluatee(), OnVariableNotFound.ReturnN...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\IncludedDocumentsCollectionActions.java
1
请完成以下Java代码
public Collection<String> getHeaderNames() { return this.headers.keySet(); } @Override public List<Locale> getLocales() { return this.locales; } @Override public String[] getParameterValues(String name) { return this.parameters.getOrDefault(name, new String[0]); } @Override public Map<String, String[]...
Assert.notNull(method, "method cannot be null"); this.method = method; } public void setHeaders(Map<String, List<String>> headers) { Assert.notNull(headers, "headers cannot be null"); this.headers = headers; } public void setLocales(List<Locale> locales) { Assert.notNull(locales, "locales cannot be null")...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\savedrequest\SimpleSavedRequest.java
1
请完成以下Java代码
public void setActionListener(final FindPanelActionListener actionListener) { Check.assumeNotNull(actionListener, "actionListener not null"); this.actionListener = actionListener; } private void setDefaultButton() { setDefaultButton(confirmPanel.getOKButton()); } private void setDefaultButton(final JButto...
if (m_editorFirst != null) { m_editorFirst.requestFocus(); } } } @Override public boolean requestFocusInWindow() { if (isSimpleSearchPanelActive()) { if (m_editorFirst != null) { return m_editorFirst.requestFocusInWindow(); } } return false; } private boolean disposed = false; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\FindPanel.java
1
请完成以下Java代码
public String getActivityId() { return activityId; } public void setActivityId(String activityId) { this.activityId = activityId; } public String getCauseIncidentId() { return causeIncidentId; } public void setCauseIncidentId(String causeIncidentId) { this.causeIncidentId = causeIncidentI...
public void setJobDefinitionId(String jobDefinitionId) { this.jobDefinitionId = jobDefinitionId; } public boolean isOpen() { return IncidentState.DEFAULT.getStateCode() == incidentState; } public boolean isDeleted() { return IncidentState.DELETED.getStateCode() == incidentState; } public bool...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricIncidentEventEntity.java
1
请完成以下Java代码
public class ProcessDocuments extends AbstractProcessDocumentsTemplate { // services private final IQueryBL queryBL = Services.get(IQueryBL.class); private final IADTableDAO adTableDAO = Services.get(IADTableDAO.class); public static final String PARAM_AD_Table_ID = "AD_Table_ID"; @Param(parameterName = PARAM_AD_...
throw new FillMandatoryException(PARAM_AD_Table_ID); } final String tableName = adTableDAO.retrieveTableName(this.p_AD_Table_ID); final IQueryBuilder<Object> queryBuilder = queryBL.createQueryBuilder(tableName) .addOnlyActiveRecordsFilter(); if (p_DocStatus != null) { queryBuilder.addEqualsFilter(PA...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\process\ProcessDocuments.java
1
请完成以下Java代码
public class ObjectMapperBuilder { private boolean enableIndentation; private boolean preserveOrder; private DateFormat dateFormat; public ObjectMapperBuilder enableIndentation() { this.enableIndentation = true; return this; } public ObjectMapperBuilder dateFormat() { S...
public ObjectMapperBuilder preserveOrder(boolean order) { this.preserveOrder = order; return this; } public ObjectMapper build() { ObjectMapper objectMapper = JsonMapper.builder() .configure(SerializationFeature.INDENT_OUTPUT, this.enableIndentation) .defaultDate...
repos\tutorials-master\jackson-simple\src\main\java\com\baeldung\jackson\objectmapper\ObjectMapperBuilder.java
1
请在Spring Boot框架中完成以下Java代码
public class C_Project_CreateQuotation extends ServiceOrRepairProjectBasedProcess implements IProcessPrecondition { @Override public ProcessPreconditionsResolution checkPreconditionsApplicable(final @NonNull IProcessPreconditionsContext context) { final ProjectId projectId = ProjectId.ofRepoIdOrNull(context.ge...
.build()); setRecordToOpen(quotationId); return MSG_OK; } private void setRecordToOpen(final OrderId quotationId) { getResult().setRecordToOpen(ProcessExecutionResult.RecordsToOpen.builder() .record(TableRecordReference.of(I_C_Order.Table_Name, quotationId)) .target(ProcessExecutionResult.RecordsToO...
repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.webui\src\main\java\de\metas\servicerepair\project\process\C_Project_CreateQuotation.java
2
请完成以下Java代码
boolean isNoCacheRequestWithoutUpdate(ServerHttpRequest request) { return LocalResponseCacheUtils.isNoCacheRequest(request) && ignoreNoCacheUpdate; } private boolean isStatusCodeToCache(ServerHttpResponse response) { return statusesToCache.contains(response.getStatusCode()); } boolean isRequestCacheable(Serve...
} catch (RuntimeException anyException) { LOGGER.error("Error writing into cache. Data will not be cached", anyException); } } private void saveMetadataInCache(String metadataKey, CachedResponseMetadata metadata) { try { cache.put(metadataKey, metadata); } catch (RuntimeException anyException) { L...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\cache\ResponseCacheManager.java
1
请完成以下Java代码
public boolean equals(GraphicInfo ginfo) { if (this.getX() != ginfo.getX()) { return false; } if (this.getY() != ginfo.getY()) { return false; } if (this.getHeight() != ginfo.getHeight()) { return false; } if (this.getWidth() != ginfo.getWidth()) { return false...
// check for zero value in case we are comparing model value to BPMN DI value // model values do not have xml location information if (0 != this.getXmlColumnNumber() && 0 != ginfo.getXmlColumnNumber() && this.getXmlColumnNumber() != ginfo.getXmlColumnNumber()) { return false; } if (0 != this.g...
repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\GraphicInfo.java
1
请在Spring Boot框架中完成以下Java代码
public JdbcTokenStore tokenStore() { return new JdbcTokenStore(dataSource); } @Override public void configure(AuthorizationServerSecurityConfigurer security) throws Exception { security.passwordEncoder(passwordEncoder); } @Override public void configure(Authorizatio...
; } @Configuration @Order(-20) protected static class AuthenticationManagerConfiguration extends GlobalAuthenticationConfigurerAdapter { @Autowired private DataSource dataSource; @Override public void init(AuthenticationManagerBuilder auth) throws Exception { ...
repos\spring-boot-cloud-master\auth-service\src\main\java\cn\zhangxd\auth\config\OAuthConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
private boolean isTemplateAvailable(String view, ResourceLoader resourceLoader, TemplateAvailabilityProperties properties) { String location = properties.getPrefix() + view + properties.getSuffix(); for (String path : properties.getLoaderPath()) { if (resourceLoader.getResource(path + location).exists()) { ...
public String getPrefix() { return this.prefix; } public void setPrefix(String prefix) { this.prefix = prefix; } public String getSuffix() { return this.suffix; } public void setSuffix(String suffix) { this.suffix = suffix; } } }
repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\template\PathBasedTemplateAvailabilityProvider.java
2
请完成以下Java代码
/* package */final class DocumentNoInfo implements IDocumentNoInfo { public static final Builder builder() { return new Builder(); } private final String docBaseType; private final String docSubType; private final boolean soTrx; private final boolean hasChanges; private final boolean docNoControlled; privat...
} @Override public String getDocumentNo() { return documentNo; } public static final class Builder { private String docBaseType; private String docSubType; private boolean soTrx; private boolean hasChanges; private boolean docNoControlled; private String documentNo; private Builder() { sup...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\sequence\impl\DocumentNoInfo.java
1
请完成以下Java代码
public DocumentFilter createOrderLineDocumentFilter(@NonNull final OrderLineId orderLineId) { final OrderLine salesOrderLine = orderLineRepository.getById(orderLineId); return createOrderLineDocumentFilter(salesOrderLine); } private DocumentFilter createOrderLineDocumentFilter(@NonNull final OrderLine salesOrde...
return HUIdsFilterHelper.createFilter(huQuery); } private IHUQueryBuilder createHUQueryIgnoreAttributes(final Packageable packageable) { final OrderLineId salesOrderLineId = packageable.getSalesOrderLineIdOrNull(); final HUReservationDocRef reservationDocRef = salesOrderLineId != null ? HUReservationDocRef.ofSa...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\sales\hu\reservation\HUReservationDocumentFilterService.java
1
请完成以下Java代码
public Stream<HUEditorRow> streamByIds(final DocumentIdsSelection rowIds) { if (rowIds.isEmpty()) { return Stream.empty(); } return streamByIds(HUEditorRowFilter.onlyRowIds(rowIds)); } public Stream<HUEditorRow> streamByIds(final HUEditorRowFilter filter) { return rowsBuffer.streamByIdsExcludingInclud...
.filter(Objects::nonNull) .collect(ImmutableSet.toImmutableSet()); if (huIds.isEmpty()) { return ImmutableList.of(); } final List<I_M_HU> hus = Services.get(IQueryBL.class) .createQueryBuilder(I_M_HU.class) .addInArrayFilter(I_M_HU.COLUMN_M_HU_ID, huIds) .create() .list(I_M_HU.class); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorView.java
1
请完成以下Java代码
public void reset() { this.stripPaths = false; } /** * Ensures {@link FirewalledRequest#reset()} is called prior to performing a forward. * It then delegates work to the {@link RequestDispatcher} from the original * {@link HttpServletRequest}. * * @author Rob Winch */ private class FirewalledRequestAw...
@Override public void forward(ServletRequest request, ServletResponse response) throws ServletException, IOException { reset(); getDelegateDispatcher().forward(request, response); } @Override public void include(ServletRequest request, ServletResponse response) throws ServletException, IOException { g...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\firewall\RequestWrapper.java
1
请在Spring Boot框架中完成以下Java代码
public Boolean getIncludeCaseVariables() { return includeCaseVariables; } public void setIncludeCaseVariables(Boolean includeCaseVariables) { this.includeCaseVariables = includeCaseVariables; } public Collection<String> getIncludeCaseVariablesNames() { return includeCaseVariabl...
} public Boolean getWithoutCaseInstanceParentId() { return withoutCaseInstanceParentId; } public void setWithoutCaseInstanceParentId(Boolean withoutCaseInstanceParentId) { this.withoutCaseInstanceParentId = withoutCaseInstanceParentId; } public Boolean getWithoutCaseIn...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\caze\HistoricCaseInstanceQueryRequest.java
2
请完成以下Java代码
public String toString() { final StringBuilder builder = new StringBuilder(); builder.append("Bar [name=").append(name).append("]"); return builder.toString(); } @PrePersist public void onPrePersist() { logger.info("@PrePersist"); audit(OPERATION.INSERT); } ...
INSERT, UPDATE, DELETE; private String value; OPERATION() { value = toString(); } public static OPERATION parse(final String value) { OPERATION operation = null; for (final OPERATION op : OPERATION.values()) { if (op.getValue().equals...
repos\tutorials-master\persistence-modules\spring-data-jpa-enterprise\src\main\java\com\baeldung\boot\domain\Bar.java
1
请完成以下Java代码
private ImportInvoiceResponseRequest createRequest(@NonNull final Path fileToImport) { try { final byte[] fileContent = Files.readAllBytes(fileToImport); final String fileName = fileToImport.getFileName().toString(); return ImportInvoiceResponseRequest .builder() .data(fileContent) .fileNa...
} } private void moveFile(@NonNull final Path fileToMove, @NonNull final Path outputDirectory) { try { Files.move(fileToMove, outputDirectory.resolve(fileToMove.getFileName())); } catch (final IOException e) { throw AdempiereException.wrapIfNeeded(e); } } }
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_base\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\base\imp\process\C_Invoice_ImportInvoiceResponse.java
1
请完成以下Java代码
public AdMessagesTree load(@NonNull final String adLanguage) {return build().load(adLanguage);} } public AdMessagesTree load(@NonNull final String adLanguage) { final LinkedHashMap<String, Object> tree = new LinkedHashMap<>(); //tree.put("_language", adLanguage); loadInto(tree, adLanguage, adMessageKey -> adM...
final Map<String, Object> parentNode = currentNode; currentNode = new LinkedHashMap<>(); parentNode.put(keyPart, currentNode); } else if (currentNodeObj instanceof Map) { //noinspection unchecked currentNode = (Map<String, Object>)currentNodeObj; } else { // discarding the old valu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\AdMessagesTreeLoader.java
1
请在Spring Boot框架中完成以下Java代码
public class Saml2ResponseAssertion implements Saml2ResponseAssertionAccessor { @Serial private static final long serialVersionUID = -7505233045395024212L; private final String responseValue; private final String nameId; private final List<String> sessionIndexes; private final Map<String, List<Object>> attri...
Builder(String responseValue) { this.responseValue = responseValue; } public Builder nameId(String nameId) { this.nameId = nameId; return this; } public Builder sessionIndexes(List<String> sessionIndexes) { this.sessionIndexes = sessionIndexes; return this; } public Builder attributes(Map<...
repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\authentication\Saml2ResponseAssertion.java
2
请完成以下Java代码
public void print(char c) throws IOException { trackContentLength(c); this.delegate.print(c); } @Override public void print(double d) throws IOException { trackContentLength(d); this.delegate.print(d); } @Override public void print(float f) throws IOException { trackContentLength(f); thi...
trackContentLengthLn(); this.delegate.println(l); } @Override public void println(String s) throws IOException { trackContentLength(s); trackContentLengthLn(); this.delegate.println(s); } @Override public void write(byte[] b) throws IOException { trackContentLength(b); this.delegate.writ...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\util\OnCommittedResponseWrapper.java
1
请在Spring Boot框架中完成以下Java代码
public int getConnectionMinimumIdleSize() { return connectionMinimumIdleSize; } public void setConnectionMinimumIdleSize(int connectionMinimumIdleSize) { this.connectionMinimumIdleSize = connectionMinimumIdleSize; } public int getConnectionPoolSize() { return connectionPoolSize...
} public int getDnsMonitoringInterval() { return dnsMonitoringInterval; } public void setDnsMonitoringInterval(int dnsMonitoringInterval) { this.dnsMonitoringInterval = dnsMonitoringInterval; } public String getCodec() { return codec; } public void setCodec(String...
repos\kkFileView-master\server\src\main\java\cn\keking\config\RedissonConfig.java
2
请完成以下Java代码
public boolean hasEditableRow() { return editableRowId != null; } public DocumentId getEditableRowId() { if (editableRowId == null) { throw new AdempiereException("No editable row found"); } return editableRowId; } public PricingConditionsRow getEditableRow() { return getById(getEditableRowId())...
{ return filters; } public PricingConditionsRowData filter(@NonNull final DocumentFilterList filters) { if (DocumentFilterList.equals(this.filters, filters)) { return this; } if (filters.isEmpty()) { return getAllRowsData(); } return new PricingConditionsRowData(this, filters); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\pricingconditions\view\PricingConditionsRowData.java
1
请在Spring Boot框架中完成以下Java代码
public String detail(HttpServletRequest request, @PathVariable("newsId") Long newsId) { News newsDetail = newsService.queryNewsById(newsId); if (newsDetail != null) { request.setAttribute("newsDetail", newsDetail); request.setAttribute("pageName", "详情"); return "index...
String ref = request.getHeader("Referer"); if (!StringUtils.hasText(ref)) { return ResultGenerator.genFailResult("非法请求"); } if (null == newsId || newsId < 0) { return ResultGenerator.genFailResult("非法请求"); } if (!StringUtils.hasText(commentator)) { ...
repos\spring-boot-projects-main\SpringBoot咨询发布系统实战项目源码\springboot-project-news-publish-system\src\main\java\com\site\springboot\core\controller\index\IndexController.java
2
请完成以下Spring Boot application配置
# to keep the JVM running camel.springboot.main-run-controller = true #configure the URL of the remote ActiveMQ broker #camel.component.activemq.broker-url=tcp://localhost:61616 #spring.activemq.broker-url
=tcp://localhost:61616 spring.activemq.in-memory=true spring.activemq.pool.enabled=false
repos\tutorials-master\patterns-modules\enterprise-patterns\src\main\resources\application.properties
2
请在Spring Boot框架中完成以下Java代码
protected void updateDeviceCredentials(TenantId tenantId, DeviceCredentialsUpdateMsg deviceCredentialsUpdateMsg) { DeviceCredentials deviceCredentials = JacksonUtil.fromString(deviceCredentialsUpdateMsg.getEntity(), DeviceCredentials.class, true); if (deviceCredentials == null) { throw new R...
} else { log.warn("[{}] Can't find device by id [{}], deviceCredentialsUpdateMsg [{}]", tenantId, deviceCredentials.getDeviceId(), deviceCredentialsUpdateMsg); } } protected abstract void setCustomerId(TenantId tenantId, CustomerId customerId, Device device, DeviceUpdateMsg deviceUpdateMsg)...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\edge\rpc\processor\device\BaseDeviceProcessor.java
2
请完成以下Spring Boot application配置
# = Logging # Level for loggers on classes inside the root package "netgloo" (and its # sub-packages). # Available levels are: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF logging.level.netgloo = DEBUG # Fine-tuning a specific logger (for a single class) # logging.level.netgloo.controllers.HomeController = TRACE # ...
gframework.web = DEBUG # logging.level.org.hibernate = ERROR # Log file location (in addition to the console) #logging.file = /var/netgloo_blog/logs/spring-boot-logging.log
repos\spring-boot-samples-master\spring-boot-logging\src\main\resources\application.properties
2
请完成以下Java代码
private synchronized void add( @NonNull final DataItemId dataItemId, @NonNull final Collection<CacheKey> cacheKeys, @NonNull final Collection<TableRecordReference> recordRefs) { logger.debug("Adding to index: {} -> {}", dataItemId, cacheKeys); _dataItemId_to_cacheKey.putAll(dataItemId, cacheKeys); logg...
final CacheKey cacheKey, final Collection<TableRecordReference> recordRefs) { logger.debug("Removing pair from index: {}, {}", dataItemId, cacheKey); _dataItemId_to_cacheKey.remove(dataItemId, cacheKey); logger.debug("Removing pairs from index: {}, {}", recordRefs, dataItemId); recordRefs.forEach(recordRef...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\CacheIndex.java
1
请完成以下Java代码
public TemplateType getType() { return type; } public void setType(TemplateType type) { this.type = type; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TemplateDefinition ...
} @Override public String toString() { return ( "TemplateDefinition{" + "from='" + from + '\'' + ", subject='" + subject + '\'' + ", type=" + type + ", value='" + value + ...
repos\Activiti-develop\activiti-core\activiti-spring-process-extensions\src\main\java\org\activiti\spring\process\model\TemplateDefinition.java
1