instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public class SpringJobExecutor extends JobExecutor { private TaskExecutor taskExecutor; public TaskExecutor getTaskExecutor() { return taskExecutor; } /** * Required spring injected {@link TaskExecutor}} implementation that will be used to execute runnable jobs. * * @param taskExecutor */ public void ...
logJobExecutionInfo(processEngine, ((ThreadPoolTaskExecutor) taskExecutor).getQueueSize(), ((ThreadPoolTaskExecutor) taskExecutor).getQueueCapacity(), ((ThreadPoolTaskExecutor) taskExecutor).getMaxPoolSize(), ((ThreadPoolTaskExecutor) taskExecutor).getActiveCount()); } } } @Override protected...
repos\camunda-bpm-platform-master\engine-spring\core\src\main\java\org\camunda\bpm\engine\spring\components\jobexecutor\SpringJobExecutor.java
1
请完成以下Java代码
public String getName() { return name; } /** * @param name the name to set */ public void setName(String name) { this.name = name; } /** * @return the branchId */ public Long getBranchId() { return branchId; } /** * @param branchId the ...
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Account other = (Account) obj; if (branchId == null) { if (other.branchId != null) ...
repos\tutorials-master\spring-cloud-modules\spring-cloud-vault\src\main\java\com\baeldung\spring\cloud\vaultsample\domain\Account.java
1
请完成以下Java代码
public Expression getExpression() { return expressionChild.getChild(this); } public void setExpression(Expression expression) { expressionChild.setChild(this, expression); } public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(B...
}); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); parameterChild = sequenceBuilder.element(Parameter.class) .required() .build(); expressionChild = sequenceBuilder.element(Expression.class) .build(); typeBuilder.build(); } }
repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\BindingImpl.java
1
请完成以下Java代码
public void setValue(Object model) { final int adTableId; final int recordId; if (model == null) { adTableId = -1; recordId = -1; } else { adTableId = InterfaceWrapperHelper.getModelTableId(model); recordId = InterfaceWrapperHelper.getId(model); } setTableAndRecordId(adTableId, recordId)...
final RT modelCasted = InterfaceWrapperHelper.create(ctx, tableName, recordId, modelClass, trxName); setModel(modelCasted, modelTableId, modelRecordId); return modelCasted; } private final void setModel(final Object model, int adTableId, int recordId) { this.model = model; this.modelTableId = adTableId; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\model\impl\TableRecordCacheLocal.java
1
请完成以下Java代码
public class PrintQRCode extends JavaProcess { private final GlobalQRCodeService globalQRCodeService = SpringContextHolder.instance.getBean(GlobalQRCodeService.class); @Override protected String doIt() { final ExternalSystemConfigQRCode qrCode = ExternalSystemConfigQRCode.builder() .childConfigId(getChildCon...
@NonNull private IExternalSystemChildConfigId getChildConfigId() { final String tableName = getTableName(); if (I_ExternalSystem_Config_LeichMehl.Table_Name.equals(tableName)) { return ExternalSystemLeichMehlConfigId.ofRepoId(getRecord_ID()); } else { throw new AdempiereException("Unsupported child ...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\process\PrintQRCode.java
1
请完成以下Java代码
public final boolean isDateWithTime() { return this == ZonedDateTime || this == Timestamp; } public final boolean isNumeric() { return TYPES_ALL_NUMERIC.contains(this); } public final boolean isBigDecimal() { return isNumeric() && BigDecimal.class.equals(getValueClassOrNull()); } public final bool...
public final boolean isBoolean() { return this == YesNo || this == Switch; } /** * Same as {@link #getValueClassOrNull()} but it will throw exception in case there is no valueClass. * * @return value class */ public Class<?> getValueClass() { if (valueClass == null) { throw new IllegalStateExcept...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentFieldWidgetType.java
1
请完成以下Java代码
protected ProcessPreconditionsResolution checkPreconditionsApplicable() { if (!getSelectedRowIds().isSingleDocumentId()) { return ProcessPreconditionsResolution.rejectBecauseNotSingleSelection(); } return ProcessPreconditionsResolution.accept(); } @Override protected String doIt() { final IView husTo...
return MSG_OK; } private IView createHUsToPickView() { final PickingSlotView pickingSlotsView = getPickingSlotView(); final PickingSlotRowId pickingSlotRowId = getSingleSelectedPickingSlotRow().getPickingSlotRowId(); return viewsRepo.createView(husToPickViewFactory.createViewRequest( pickingSlotsView.get...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\process\WEBUI_Picking_HUEditor_Launcher.java
1
请完成以下Java代码
public Long getBranchId() { return branchId; } /** * @param branchId the branchId to set */ public void setBranchId(Long branchId) { this.branchId = branchId; } /** * @return the customerId */ public Long getCustomerId() { return customerId; } ...
return false; Account other = (Account) obj; if (branchId == null) { if (other.branchId != null) return false; } else if (!branchId.equals(other.branchId)) return false; if (customerId == null) { if (other.customerId != null) ...
repos\tutorials-master\spring-cloud-modules\spring-cloud-vault\src\main\java\com\baeldung\spring\cloud\vaultsample\domain\Account.java
1
请完成以下Java代码
public List<String> findHistoricCaseInstanceIdsByParentIds(Collection<String> caseInstanceIds) { return getDbSqlSession().selectList("selectHistoricCaseInstanceIdsByParentIds", createSafeInValuesList(caseInstanceIds)); } @Override @SuppressWarnings("unchecked") public List<HistoricCaseInstance>...
getDbSqlSession().delete("deleteHistoricCaseInstanceByCaseDefinitionId", caseDefinitionId, getManagedEntityClass()); } @Override public void deleteHistoricCaseInstances(HistoricCaseInstanceQueryImpl historicCaseInstanceQuery) { getDbSqlSession().delete("bulkDeleteHistoricCaseInstances", historicCas...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\data\impl\MybatisHistoricCaseInstanceDataManagerImpl.java
1
请完成以下Java代码
public String getProcessInstanceId() { return processInstanceId; } public void setProcessInstanceId(String processInstanceId) { this.processInstanceId = processInstanceId; } public String getConfiguration() { return configuration; } public void setConfiguration(String ...
public void setProcessDefinitionId(String processDefinitionId) { this.processDefinitionId = processDefinitionId; } public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } @Override public int hashCode(...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\EventSubscriptionEntityImpl.java
1
请完成以下Java代码
public static boolean isConnectionError(final Exception e) { if (e instanceof EMailSendException) { return ((EMailSendException)e).isConnectionError(); } else return e instanceof java.net.ConnectException; } @Override public String toString() { return MoreObjects.toStringHelper(this) .omitNull...
{ return Util.same(sentMsg, SENT_OK); } public void throwIfNotOK() { throwIfNotOK(null); } public void throwIfNotOK(@Nullable final Consumer<EMailSendException> exceptionDecorator) { if (!isSentOK()) { final EMailSendException exception = new EMailSendException(this); if (exceptionDecorator != nul...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\email\EMailSentStatus.java
1
请在Spring Boot框架中完成以下Java代码
public class Host { /** * IP address to listen to. */ private String ip = "127.0.0.1"; /** * Port to listener to. */ private int port = 9797; // @fold:on // getters/setters ... public String getIp() { return this.ip;
} public void setIp(String ip) { this.ip = ip; } public int getPort() { return this.port; } public void setPort(int port) { this.port = port; } // @fold:off }
repos\spring-boot-4.0.1\documentation\spring-boot-docs\src\main\java\org\springframework\boot\docs\appendix\configurationmetadata\annotationprocessor\automaticmetadatageneration\source\Host.java
2
请在Spring Boot框架中完成以下Java代码
public void addH110(final H110 h110) { h110Lines.add(h110); } public void addH120(final H120 h120) { h120Lines.add(h120); } public void addH130(final H130 h130) { h130Lines.add(h130); } public void addOrderLine(final OrderLine orderLine) { orderLines.add(orderLine); } public void addT100(final T...
return h120Lines; } public List<H130> getH130Lines() { return h130Lines; } public List<OrderLine> getOrderLines() { return orderLines; } public List<T100> getT100Lines() { return t100Lines; } }
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\ordersimport\OrderHeader.java
2
请完成以下Java代码
public HuId getTopLevelHUId(final HuId huId) { return topLevelHUIds.computeIfAbsent(huId, this::retrieveTopLevelHUId); } private HuId retrieveTopLevelHUId(final HuId huId) { final I_M_HU hu = getHUById(huId); final I_M_HU topLevelHU = handlingUnitsBL.getTopLevelParentAsLUTUCUPair(hu).getTopLevelHU(); addTo...
return huAttributesCache.computeIfAbsent(huId, this::retrieveHUAttributes); } private ImmutableAttributeSet retrieveHUAttributes(final HuId huId) { final I_M_HU hu = getHUById(huId); final IAttributeStorage attributes = attributesFactory.getAttributeStorage(hu); return ImmutableAttributeSet.createSubSet(attri...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\plan\generator\pickFromHUs\HUsLoadingCache.java
1
请在Spring Boot框架中完成以下Java代码
public String getConsignmentReference() { return consignmentReference; } /** * Sets the value of the consignmentReference property. * * @param value * allowed object is * {@link String } * */ public void setConsignmentReference(String value) { ...
* getFreeText().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link FreeTextType } * * */ public List<FreeTextType> getFreeText() { if (freeText == null) { freeText = new ArrayList<FreeTextType>(...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\ORDRSPExtensionType.java
2
请在Spring Boot框架中完成以下Java代码
private static class LoadLabelsValues implements DocumentFieldValueLoader { @NonNull String sqlValuesColumn; @Override public LookupValuesList retrieveFieldValue( @NonNull final ResultSet rs, final boolean isDisplayColumnAvailable_NOTUSED, final String adLanguage_NOTUSED, @Nullable final LookupD...
@Builder @Value private static class ColorDocumentFieldValueLoader implements DocumentFieldValueLoader { @NonNull String sqlColumnName; @Override @Nullable public Object retrieveFieldValue( @NonNull final ResultSet rs, final boolean isDisplayColumnAvailable_NOTUSED, final String adLanguage_NOTUS...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\DocumentFieldValueLoaders.java
2
请完成以下Java代码
private void commit(final ASIDocument asiDoc) { final DocumentId asiDocId = asiDoc.getDocumentId(); if (asiDoc.isCompleted()) { final ASIDocument asiDocRemoved = id2asiDoc.remove(asiDocId); logger.trace("Removed from repository by ID={}: {}", asiDocId, asiDocRemoved); } else { final ASIDocument as...
.bindContextDocumentIfPossible(documentsCollection); return processor.apply(asiDoc); } } public <R> R forASIDocumentWritable( @NonNull final DocumentId asiDocId, @NonNull final IDocumentChangesCollector changesCollector, @NonNull final DocumentCollection documentsCollection, @NonNull final Function<...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pattribute\ASIRepository.java
1
请在Spring Boot框架中完成以下Java代码
public class WebConfig implements WebMvcConfigurer { private final ApplicationContext applicationContext; public WebConfig(ApplicationContext applicationContext) { super(); this.applicationContext = applicationContext; } @Override public void configureMessageConverters(final List<...
engine.setEnableSpringELCompiler(true); engine.setTemplateResolver(templateResolver()); engine.addDialect(new SpringSecurityDialect()); return engine; } private ITemplateResolver templateResolver() { SpringResourceTemplateResolver resolver = new SpringResourceTemplateResolver(); r...
repos\tutorials-master\spring-security-modules\spring-security-web-rest-custom\src\main\java\com\baeldung\config\child\WebConfig.java
2
请在Spring Boot框架中完成以下Java代码
public class ExternalWorkerJobFailureBuilderImpl implements ExternalWorkerJobFailureBuilder { protected final String externalJobId; protected final String workerId; protected final CommandExecutor commandExecutor; protected final JobServiceConfiguration jobServiceConfiguration; protected String er...
} @Override public ExternalWorkerJobFailureBuilder errorDetails(String errorDetails) { this.errorDetails = errorDetails; return this; } @Override public ExternalWorkerJobFailureBuilder retries(int retries) { this.retries = retries; return this; } @Override ...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\ExternalWorkerJobFailureBuilderImpl.java
2
请在Spring Boot框架中完成以下Java代码
public String xxlJobTrigger() { Map<String, Object> jobInfo = Maps.newHashMap(); jobInfo.put("id", 4); jobInfo.put("executorParam", JSONUtil.toJsonStr(jobInfo)); HttpResponse execute = HttpUtil.createGet(baseUri + JOB_INFO_URI + "/trigger").form(jobInfo).execute(); log.info("【ex...
@GetMapping("/stop") public String xxlJobStop() { Map<String, Object> jobInfo = Maps.newHashMap(); jobInfo.put("id", 4); HttpResponse execute = HttpUtil.createGet(baseUri + JOB_INFO_URI + "/stop").form(jobInfo).execute(); log.info("【execute】= {}", execute); return execute.bo...
repos\spring-boot-demo-master\demo-task-xxl-job\src\main\java\com\xkcoding\task\xxl\job\controller\ManualOperateController.java
2
请完成以下Java代码
public List<Product> parseCsvFileIntoBeans(String relativePath) { try (Reader inputReader = new InputStreamReader(new FileInputStream(new File(relativePath)), "UTF-8")) { BeanListProcessor<Product> rowProcessor = new BeanListProcessor<Product>(Product.class); CsvParserSettings settings =...
try (Reader inputReader = new InputStreamReader(new FileInputStream(new File(relativePath)), "UTF-8")) { CsvParserSettings settings = new CsvParserSettings(); settings.setProcessor(new BatchedColumnProcessor(5) { @Override public void batchProcessed(int rowsInThis...
repos\tutorials-master\libraries-data-2\src\main\java\com\baeldung\univocity\ParsingService.java
1
请在Spring Boot框架中完成以下Java代码
public class CreateProjectCostCollectorRequest { @NonNull ServiceRepairProjectTaskId taskId; @NonNull ServiceRepairProjectCostCollectorType type; @NonNull ProductId productId; @NonNull AttributeSetInstanceId asiId; @NonNull WarrantyCase warrantyCase; @NonNull Quantity qtyReserved; @NonNull Quantity qtyConsumed...
this.type = type; this.productId = productId; this.asiId = asiId != null ? asiId : AttributeSetInstanceId.NONE; this.warrantyCase = warrantyCase != null ? warrantyCase : WarrantyCase.NO; this.qtyReserved = qtyReserved != null ? qtyReserved : qtyFirstNotNull.toZero(); this.qtyConsumed = qtyConsumed != null ? q...
repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\project\repository\requests\CreateProjectCostCollectorRequest.java
2
请完成以下Java代码
public ClientAndOrgId getClientAndOrgId() { assertNotEmpty(); return list.get(0).getClientAndOrgId(); } public MaterialDispoGroupId getEffectiveGroupId() { assertNotEmpty(); return list.get(0).getEffectiveGroupId(); } public CandidateBusinessCase getBusinessCase() { assertNotEmpty(); return Collect...
public Candidate getSingleCandidate() { return CollectionUtils.singleElement(list); } public Candidate getSingleSupplyCandidate() { return CollectionUtils.singleElement(list, candidate -> CandidateType.equals(candidate.getType(), CandidateType.SUPPLY)); } public Candidate getSingleDemandCandidate() { ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\candidate\CandidatesGroup.java
1
请在Spring Boot框架中完成以下Java代码
public class WebUser { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String name; WebUser(String name) { this.name = name; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null ||...
WebUser webUser = (WebUser) o; return Objects.equals(id, webUser.id); } @Override public int hashCode() { return id != null ? id.hashCode() : 0; } protected WebUser() { } }
repos\tutorials-master\persistence-modules\java-jpa-3\src\main\java\com\baeldung\jpa\hibernateunproxy\WebUser.java
2
请完成以下Java代码
private ChartOfAccountsMap getMap() { return cache.getOrLoad(0, this::retrieveMap); } private ChartOfAccountsMap retrieveMap() { return new ChartOfAccountsMap( queryBL.createQueryBuilder(I_C_Element.class) .addOnlyActiveRecordsFilter() .create() .stream() .map(ChartOfAccountsReposit...
return getMap().getByIds(chartOfAccountsIds); } public Optional<ChartOfAccounts> getByName(@NonNull final String chartOfAccountsName, @NonNull final ClientId clientId, @NonNull final OrgId orgId) { return getMap().getByName(chartOfAccountsName, clientId, orgId); } public Optional<ChartOfAccounts> getByTreeId(...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\elementvalue\ChartOfAccountsRepository.java
1
请完成以下Java代码
public class SysDepartPositionVo { /** * 部门id */ private String id; /** * 是否为叶子节点(数据返回) */ private Integer izLeaf; /** * 部门名称 */ private String departName; /** * 职务名称 */ private String positionName; /** * 父级id */
private String parentId; /** * 部门编码 */ private String orgCode; /** * 机构类型 */ private String orgCategory; /** * 上级岗位id */ private String depPostParentId; }
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\vo\SysDepartPositionVo.java
1
请完成以下Java代码
public Long getProductCategoryId() { return productCategoryId; } public void setProductCategoryId(Long productCategoryId) { this.productCategoryId = productCategoryId; } public String getProductBrand() { return productBrand; } public void setProductBrand(String product...
public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", productId=").append(productId); sb.append(", productSkuI...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\OmsCartItem.java
1
请完成以下Java代码
public java.lang.String getDescription() { return get_ValueAsString(COLUMNNAME_Description); } /** * EntityType AD_Reference_ID=389 * Reference name: _EntityTypeNew */ public static final int ENTITYTYPE_AD_Reference_ID=389; @Override public void setEntityType (final java.lang.String EntityType) { se...
{ return get_ValueAsString(COLUMNNAME_Name); } /** * ResponsibleType AD_Reference_ID=304 * Reference name: WF_Participant Type */ public static final int RESPONSIBLETYPE_AD_Reference_ID=304; /** Organisation = O */ public static final String RESPONSIBLETYPE_Organisation = "O"; /** Human = H */ public s...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WF_Responsible.java
1
请完成以下Java代码
private ImmutableMap<SecurPharmLogId, I_M_Securpharm_Log> retrieveLogRecordsByIds(final Collection<SecurPharmLogId> ids) { if (ids.isEmpty()) { return ImmutableMap.of(); } return Services.get(IQueryBL.class) .createQueryBuilder(I_M_Securpharm_Log.class) .addInArrayFilter(I_M_Securpharm_Log.COLUMN_M...
// record.setTransactionIDClient(log.getClientTransactionId()); record.setTransactionIDServer(log.getServerTransactionId()); // // Links if (productId != null) { record.setM_Securpharm_Productdata_Result_ID(productId.getRepoId()); } if (actionId != null) { record.setM_Securpharm_Action_Result_I...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java\de\metas\vertical\pharma\securpharm\log\SecurPharmLogRepository.java
1
请完成以下Java代码
private ImmutableList<GeographicalCoordinates> queryAllCoordinates(final @NonNull GeoCoordinatesRequest request) { final Map<String, String> parameterList = prepareParameterList(request); //@formatter:off final ParameterizedTypeReference<List<NominatimOSMGeographicalCoordinatesJSON>> returnType = new Parameteri...
m.put("city", CoalesceUtil.coalesce(request.getCity(), defaultEmptyValue)); m.put("countrycodes", request.getCountryCode2()); m.put("format", "json"); m.put("dedupe", "1"); m.put("email", "openstreetmapbot@metasfresh.com"); m.put("polygon_geojson", "0"); m.put("polygon_kml", "0"); m.put("polygon_svg", "0"...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\location\geocoding\provider\openstreetmap\NominatimOSMGeocodingProviderImpl.java
1
请完成以下Java代码
public DmnDecisionLogicEvaluationEvent evaluate(DmnDecision decision, VariableContext variableContext) { DmnDecisionLiteralExpressionEvaluationEventImpl evaluationResult = new DmnDecisionLiteralExpressionEvaluationEventImpl(); evaluationResult.setDecision(decision); evaluationResult.setExecutedDecisionEleme...
if (expressionLanguage == null) { expressionLanguage = literalExpressionLanguage; } return expressionEvaluationHandler.evaluateExpression(expressionLanguage, expression, variableContext); } @Override public DmnDecisionResult generateDecisionResult(DmnDecisionLogicEvaluationEvent event) { DmnDec...
repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\evaluation\DecisionLiteralExpressionEvaluationHandler.java
1
请在Spring Boot框架中完成以下Java代码
public Map<String, Integer> maxBucketsPerMeter() { return obtain(perMeter(Meter::getMaxBucketCount), OtlpConfig.super::maxBucketsPerMeter); } @Override public int maxScale() { return obtain(OtlpMetricsProperties::getMaxScale, OtlpConfig.super::maxScale); } @Override public int maxBucketCount() { return ob...
if (CollectionUtils.isEmpty(properties.getMeter())) { return null; } Map<String, V> perMeter = new LinkedHashMap<>(); properties.getMeter().forEach((key, meterProperties) -> { V value = getter.get(meterProperties); if (value != null) { perMeter.put(key, value); } }); return (!perMete...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\otlp\OtlpMetricsPropertiesConfigAdapter.java
2
请完成以下Java代码
public void setIsSold (final boolean IsSold) { set_Value (COLUMNNAME_IsSold, IsSold); } @Override public boolean isSold() { return get_ValueAsBoolean(COLUMNNAME_IsSold); } @Override public void setM_Product_Category_ID (final int M_Product_Category_ID) { if (M_Product_Category_ID < 1) set_Value (C...
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyOnHand); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyOrdered (final @Nullable BigDecimal QtyOrdered) { set_Value (COLUMNNAME_QtyOrdered, QtyOrdered); } @Override public BigDecimal getQtyOrdered() { final BigDecimal bd...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_RV_HU_Quantities_Summary.java
1
请完成以下Java代码
public String getReminderLevel() { if (reminderLevel == null) { return "1"; } else { return reminderLevel; } } /** * Sets the value of the reminderLevel property. * * @param value * allowed object is * {@link String } * ...
* @return * possible object is * {@link String } * */ public String getReminderText() { return reminderText; } /** * Sets the value of the reminderText property. * * @param value * allowed object is * {@link String } * ...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\ReminderType.java
1
请完成以下Java代码
public int getES_FTS_Index_Queue_ID() { return get_ValueAsInt(COLUMNNAME_ES_FTS_Index_Queue_ID); } /** * EventType AD_Reference_ID=541373 * Reference name: ES_FTS_Index_Queue_EventType */ public static final int EVENTTYPE_AD_Reference_ID=541373; /** Update = U */ public static final String EVENTTYPE_Up...
set_Value (COLUMNNAME_Processed, Processed); } @Override public boolean isProcessed() { return get_ValueAsBoolean(COLUMNNAME_Processed); } @Override public void setProcessingTag (final @Nullable java.lang.String ProcessingTag) { set_Value (COLUMNNAME_ProcessingTag, ProcessingTag); } @Override public ...
repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java-gen\de\metas\elasticsearch\model\X_ES_FTS_Index_Queue.java
1
请完成以下Java代码
protected Class<DeviceCredentialsEntity> getEntityClass() { return DeviceCredentialsEntity.class; } @Override protected JpaRepository<DeviceCredentialsEntity, UUID> getRepository() { return deviceCredentialsRepository; } @Override public DeviceCredentials findByDeviceId(TenantI...
log.trace("[{}] findByCredentialsId [{}]", tenantId, credentialsId); return DaoUtil.getData(deviceCredentialsRepository.findByCredentialsId(credentialsId)); } @Override public DeviceCredentials removeByDeviceId(TenantId tenantId, DeviceId deviceId) { return DaoUtil.getData(deviceCredentials...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\device\JpaDeviceCredentialsDao.java
1
请完成以下Java代码
public class ProductPriceAware implements IProductPriceAware { /** * Introspects given model and returns {@link IProductPriceAware} is possible. * <p> * Basically a model to be {@link IProductPriceAware} * <ul> * <li>it has to implement that interface and in this case it will be returned right away. * <li>...
// we are considering it as Explicit if the actual M_ProductPrice_ID is set. isExplicitProductPrice = productPriceIdSet; } final IProductPriceAware productPriceAware = new ProductPriceAware( isExplicitProductPrice, productPriceIdSet ? productPriceId : -1); return Optional.of(productPriceAware); } p...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\attributebased\ProductPriceAware.java
1
请完成以下Java代码
private Step childJobTwoStep() { return new JobStepBuilder(new StepBuilder("childJobTwoStep")) .job(childJobTwo()) .launcher(jobLauncher) .repository(jobRepository) .transactionManager(platformTransactionManager) .build(); } ...
}).build() ).build(); } // 子任务二 private Job childJobTwo() { return jobBuilderFactory.get("childJobTwo") .start( stepBuilderFactory.get("childJobTwoStep") .tasklet((stepContribution, chunkContext) -> { ...
repos\SpringAll-master\67.spring-batch-start\src\main\java\cc\mrbird\batch\job\NestedJobDemo.java
1
请完成以下Java代码
public String getAccount() { return account; } public void setAccount(String account) { this.account = account; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPassword() { return password; } public void setPassword(String password) ...
} public String getAccountType() { return accountType; } public void setAccountType(String accountType) { this.accountType = accountType; } public String getTel() { return tel; } public void setTel(String tel) { this.tel = tel; } }
repos\SpringAll-master\08.Spring-Boot-Thymeleaf\src\main\java\com\springboot\bean\Account.java
1
请在Spring Boot框架中完成以下Java代码
public Price getPrice(Long productId){ LOGGER.info("Getting Price from Price Repo With Product Id {}", productId); if(!priceMap.containsKey(productId)){ LOGGER.error("Price Not Found for Product Id {}", productId); throw new PriceNotFoundException("Product Not Found"); }...
priceMap.put(100002L, price2); Price price3 = getPrice(100003L, 18.5, 2.0); priceMap.put(100003L, price3); Price price4 = getPrice(100004L, 18.5, 2.0); priceMap.put(100004L, price4); } private static Price getPrice(long productId, double priceAmount, double discount) { ...
repos\tutorials-master\spring-boot-modules\spring-boot-open-telemetry\spring-boot-open-telemetry2\src\main\java\com\baeldung\opentelemetry\repository\PriceRepository.java
2
请完成以下Java代码
public List<CleanableHistoricBatchReportResult> executeList(CommandContext commandContext, Page page) { provideHistoryCleanupStrategy(commandContext); checkQueryOk(); checkPermissions(commandContext); Map<String, Integer> batchOperationsForHistoryCleanup = commandContext.getProcessEngineConfiguration(...
} public Date getCurrentTimestamp() { return currentTimestamp; } public void setCurrentTimestamp(Date currentTimestamp) { this.currentTimestamp = currentTimestamp; } private void checkPermissions(CommandContext commandContext) { for (CommandChecker checker : commandContext.getProcessEngineConfi...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\CleanableHistoricBatchReportImpl.java
1
请在Spring Boot框架中完成以下Java代码
public ResponseBo login(String username, String password) { password = MD5Utils.encrypt(username, password); UsernamePasswordToken token = new UsernamePasswordToken(username, password); Subject subject = SecurityUtils.getSubject(); try { subject.login(token); return ResponseBo.ok(); } catch (UnknownAcco...
} } @RequestMapping("/") public String redirectIndex() { return "redirect:/index"; } @RequestMapping("/index") public String index(Model model) { User user = (User) SecurityUtils.getSubject().getPrincipal(); model.addAttribute("user", user); return "index"; } }
repos\SpringAll-master\11.Spring-Boot-Shiro-Authentication\src\main\java\com\springboot\controller\LoginController.java
2
请在Spring Boot框架中完成以下Java代码
public class C_Request_CreateFromDDOrder_Async extends WorkpackageProcessorAdapter { @Override public Result processWorkPackage(final I_C_Queue_WorkPackage workPackage, final String localTrxName) {// Services final IQueueDAO queueDAO = Services.get(IQueueDAO.class); final IRequestBL requestBL = Services.get(IRe...
{ return Env.getCtx(); } @Override protected String extractTrxNameFromItem(final DDOrderLineId ddOrderLineId) { return ITrx.TRXNAME_ThreadInherited; } @Override protected TableRecordReference extractModelToEnqueueFromItem(final Collector collector, final DDOrderLineId ddOrderLineId) { return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\request\service\async\spi\impl\C_Request_CreateFromDDOrder_Async.java
2
请完成以下Java代码
public class Tree { private final int value; private final Tree left; private final Tree right; public Tree(int value, Tree left, Tree right) { this.value = value; this.left = left; this.right = right; } public int value() { return value; } public Tree ...
return left; } public Tree right() { return right; } @Override public String toString() { return String.format("[%s, %s, %s]", value, left == null ? "null" : left.toString(), right == null ? "null" : right.toString() ); } }
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-5\src\main\java\com\baeldung\algorithms\balancedbinarytree\Tree.java
1
请完成以下Java代码
public ModelQuery createModelQuery() { return new ModelQueryImpl(commandExecutor); } @Override public NativeModelQuery createNativeModelQuery() { return new NativeModelQueryImpl(commandExecutor); } public Model getModel(String modelId) { return commandExecutor.execute(new G...
public void addCandidateStarterGroup(String processDefinitionId, String groupId) { commandExecutor.execute(new AddIdentityLinkForProcessDefinitionCmd(processDefinitionId, null, groupId)); } public void deleteCandidateStarterGroup(String processDefinitionId, String groupId) { commandExecutor.exe...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\RepositoryServiceImpl.java
1
请完成以下Java代码
public synchronized T compute(@NonNull final UnaryOperator<T> remappingFunction) { this.value = remappingFunction.apply(this.value); return this.value; } @SuppressWarnings("unused") public synchronized OldAndNewValues<T> computeReturningOldAndNew(@NonNull final UnaryOperator<T> remappingFunction) { final T ...
return this.value; } public synchronized OldAndNewValues<T> computeIfNotNullReturningOldAndNew(@NonNull final UnaryOperator<T> remappingFunction) { if (value != null) { final T oldValue = this.value; this.value = remappingFunction.apply(oldValue); return OldAndNewValues.<T>builder() .oldValue(oldV...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\lang\SynchronizedMutable.java
1
请在Spring Boot框架中完成以下Java代码
public void setLOCATIONCODE(String value) { this.locationcode = value; } /** * Gets the value of the locationname property. * * @return * possible object is * {@link String } * */ public String getLOCATIONNAME() { return locationname; } ...
* Gets the value of the hrfad1 property. * * @return * possible object is * {@link HRFAD1 } * */ public HRFAD1 getHRFAD1() { return hrfad1; } /** * Sets the value of the hrfad1 property. * * @param value * allowed object is *...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\HADRE1.java
2
请完成以下Java代码
public boolean existsByTenantIdAndTargetId(TenantId tenantId, NotificationTargetId targetId) { return notificationRuleRepository.existsByTenantIdAndRecipientsConfigContaining(tenantId.getId(), targetId.getId().toString()); } @Override public List<NotificationRule> findByTenantIdAndTriggerTypeAndEna...
return DaoUtil.toPageData(notificationRuleRepository.findByTenantId(tenantId, DaoUtil.toPageable(pageLink))); } @Override public NotificationRuleId getExternalIdByInternal(NotificationRuleId internalId) { return DaoUtil.toEntityId(notificationRuleRepository.getExternalIdByInternal(internalId.getId(...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\notification\JpaNotificationRuleDao.java
1
请完成以下Java代码
public class HibernateUtil { private static SessionFactory sessionFactory; private static String PROPERTY_FILE_NAME; public static SessionFactory getSessionFactory() throws IOException { return getSessionFactory(null); } public static SessionFactory getSessionFactory(String propertyFileNam...
MetadataSources metadataSources = new MetadataSources(serviceRegistry); metadataSources.addPackage("com.baeldung.hibernate.interceptors"); metadataSources.addAnnotatedClass(User.class); Metadata metadata = metadataSources.buildMetadata(); return metadata.getSessionFactoryBuilder(); ...
repos\tutorials-master\persistence-modules\hibernate5\src\main\java\com\baeldung\hibernate\interceptors\HibernateUtil.java
1
请完成以下Java代码
public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; }
public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } }
repos\SpringBoot-Projects-FullStack-master\Part-6 Spring Boot Security\SpringSecurity\src\main\java\spring\security\entities\User.java
1
请完成以下Java代码
public Void execute(CommandContext commandContext) { ensureNotNull("userId", userId); IdentityInfoEntity pictureInfo = commandContext.getIdentityInfoManager() .findUserInfoByUserIdAndKey(userId, "picture"); if (pictureInfo != null) { String byteArrayId = pictureInfo.getValue(); if (byteA...
pictureInfo.setUserId(userId); pictureInfo.setKey("picture"); commandContext.getDbEntityManager().insert(pictureInfo); } ByteArrayEntity byteArrayEntity = new ByteArrayEntity(picture.getMimeType(), picture.getBytes(), ResourceTypes.REPOSITORY); commandContext.getByteArrayManager() .inser...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\SetUserPictureCmd.java
1
请完成以下Java代码
public String toString() { return "ModelClassInfo [" + "modelClass=" + modelClass + ", tableName=" + tableName + "]"; } @Override public Class<?> getModelClass() { return modelClass; } @Override public String getTableName() { return tableName; } @Override public final IModelMethodInfo g...
*/ private final Map<Method, IModelMethodInfo> getMethodInfos0() { if (_modelMethodInfos == null) { _modelMethodInfos = introspector.createModelMethodInfos(getModelClass()); } return _modelMethodInfos; } @Override public synchronized final Set<String> getDefinedColumnNames() { if (_definedColumnName...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\persistence\ModelClassInfo.java
1
请完成以下Java代码
public boolean isContractedProduct() { final I_C_Flatrate_DataEntry flatrateDataEntry = getC_Flatrate_DataEntry(); if (flatrateDataEntry == null) { return false; } // Consider that we have a contracted product only if the data entry has the Price or the QtyPlanned set (FRESH-568) return Services.get(...
{ return candidate; } @Override public Timestamp getDate() { return candidate.getDatePromised(); } @Override public BigDecimal getQty() { // TODO: shall we use QtyToOrder instead... but that could affect our price (if we have some prices defined on breaks) return candidate.getQtyPromised(); } @Over...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\order\impl\PMMPricingAware_PurchaseCandidate.java
1
请完成以下Java代码
public String getProcessDefinitionId() { return processDefinitionId; } public void setProcessDefinitionId(String processDefinitionId) { this.processDefinitionId = processDefinitionId; } @Override public String getCategory() { return category; } public void setC...
@Override public String getJobHandlerType() { return jobHandlerType; } public void setJobHandlerType(String jobHandlerType) { this.jobHandlerType = jobHandlerType; } @Override public String getJobHandlerConfiguration() { return jobHandlerConfiguration; } public...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\AbstractJobEntity.java
1
请完成以下Java代码
protected void updateBulk(DbBulkOperation operation) { String statement = operation.getStatement(); Object parameter = operation.getParameter(); LOG.executeDatabaseBulkOperation("UPDATE", statement, parameter); executeUpdate(statement, parameter); } @Override protected void deleteBulk(DbBulkOpe...
// get statement String deleteStatement = dbSqlSessionFactory.getDeleteStatement(dbEntity.getClass()); ensureNotNull("no delete statement for " + dbEntity.getClass() + " in the ibatis mapping files", "deleteStatement", deleteStatement); LOG.executeDatabaseOperation("DELETE", dbEntity); // execute the ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\sql\BatchDbSqlSession.java
1
请完成以下Java代码
public @Nullable BankAccountId getBPartnerBankAccountId() { return bpBankAccountId; } public Builder setBPartnerBankAccountId(final @Nullable BankAccountId bpBankAccountId) { this.bpBankAccountId = bpBankAccountId; return this; } public BigDecimal getOpenAmt() { return CoalesceUtil.coalesceN...
public BigDecimal getDiscountAmt() { return CoalesceUtil.coalesceNotNull(_discountAmt, BigDecimal.ZERO); } public Builder setDiscountAmt(final BigDecimal discountAmt) { this._discountAmt = discountAmt; return this; } public BigDecimal getDifferenceAmt() { final BigDecimal openAmt = getOpenAm...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\impl\PaySelectionLineCandidate.java
1
请完成以下Java代码
private void addQuantitiesRowsToResult( @NonNull final DimensionSpec dimensionSpec, @NonNull final Map<MainRowBucketId, MainRowWithSubRows> result) { for (final ProductWithDemandSupply qtyRecord : request.getQuantitiesRecords()) { final MainRowBucketId mainRowBucketId = MainRowBucketId.createInstanc...
.rowLookups(rowLookups) .productIdAndDate(mainRowBucketId) .procurementStatusColor(procurementStatusColor) .maxPurchasePrice(maxPurchasePrice) .build(); } private Optional<MFColor> getProcurementStatusColor(@NonNull final ProductId productId) { return adReferenceService.getRefListById(PROC...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\rowfactory\MaterialCockpitRowFactory.java
1
请在Spring Boot框架中完成以下Java代码
protected String getBeanClassName(Element element) { return "org.springframework.amqp.rabbit.core.RabbitAdmin"; } @Override protected boolean shouldGenerateId() { return false; } @Override protected boolean shouldGenerateIdAsFallback() { return true; } @Override protected void doParse(Element element,...
} if (StringUtils.hasText(connectionFactoryRef)) { // Use constructor with connectionFactory parameter builder.addConstructorArgReference(connectionFactoryRef); } String attributeValue; attributeValue = element.getAttribute(AUTO_STARTUP_ATTRIBUTE); if (StringUtils.hasText(attributeValue)) { builder...
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\config\AdminParser.java
2
请完成以下Java代码
public static String jsonComposer() throws IOException { return JSON.std.with(JSON.Feature.PRETTY_PRINT_OUTPUT) .composeString() .startObject() .startArrayField("objectArray") .startObject() .put("name", "name1") .put("age", 11) .end() ...
extensionContext.insertProvider(new MyHandlerProvider()); } }) .build() .with(JSON.Feature.PRETTY_PRINT_OUTPUT) .asString(person); } public static Person objectDeserialization(String json) throws IOException { return JSON.std.with(JSON.Feature.PRETT...
repos\tutorials-master\jackson-modules\jackson-jr\src\main\java\com\baeldung\jacksonjr\JacksonJrFeatures.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable Set<String> getCiphers() { return this.ciphers; } public void setCiphers(@Nullable Set<String> ciphers) { this.ciphers = ciphers; } public @Nullable Set<String> getEnabledProtocols() { return this.enabledProtocols; } public void setEnabledProtocols(@Nullable Set<String> enabledP...
/** * The alias that identifies the key in the key store. */ private @Nullable String alias; public @Nullable String getPassword() { return this.password; } public void setPassword(@Nullable String password) { this.password = password; } public @Nullable String getAlias() { return this.ali...
repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\ssl\SslBundleProperties.java
2
请完成以下Java代码
public Long getSuccessQps() { return successQps; } public void setSuccessQps(Long successQps) { this.successQps = successQps; } public Long getExceptionQps() { return exceptionQps; } public void setExceptionQps(Long exceptionQps) { this.exceptionQps = exception...
this.rt = rt; } public Integer getCount() { return count; } public void setCount(Integer count) { this.count = count; } @Override public int compareTo(MetricVo o) { return Long.compare(this.timestamp, o.timestamp); } }
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\domain\vo\MetricVo.java
1
请完成以下Java代码
private EntityManager getEntityManager() { return emf.createEntityManager(); } public UserEntity getUserByIdWithPlainQuery(Long id) { Query jpqlQuery = getEntityManager().createQuery("SELECT u FROM UserEntity u WHERE u.id=:id"); jpqlQuery.setParameter("id", id); return (UserEnti...
nativeQuery.setParameter("userId", id); return (UserEntity) nativeQuery.getSingleResult(); } public UserEntity getUserByIdWithCriteriaQuery(Long id) { CriteriaBuilder criteriaBuilder = getEntityManager().getCriteriaBuilder(); CriteriaQuery<UserEntity> criteriaQuery = criteriaBuilder.cre...
repos\tutorials-master\persistence-modules\java-jpa-2\src\main\java\com\baeldung\jpa\querytypes\QueryTypesExamples.java
1
请完成以下Spring Boot application配置
spring: security: oauth2: client: registration: github-client-1: client-id: ${APP-CLIENT-ID} client-secret: ${APP-CLIENT-SECRET} client-name: Github user provider: github scope: user redirect-uri: http://localhost:8080...
client-id: ${APP-CLIENT-ID} client-secret: ${APP-CLIENT-SECRET} scope: public_repo redirect-uri: "{baseUrl}/github-repos" provider: github client-name: GitHub Repositories provider: yahoo-oidc: issuer-uri: https://api.log...
repos\spring-boot-4.0.1\smoke-test\spring-boot-smoke-test-oauth2-client\src\main\resources\application.yml
2
请完成以下Java代码
public void setBytes(byte[] bytes) { this.bytes = bytes; } @Override public String toString() { return "ByteArrayEntity[id=" + id + ", name=" + name + ", size=" + (bytes != null ? bytes.length : 0) + "]"; } // Wrapper for a byte array, needed to do byte array comparisons // See...
this.name = name; this.bytes = bytes; } public boolean equals(Object obj) { if (obj instanceof PersistentState) { PersistentState other = (PersistentState) obj; return StringUtils.equals(this.name, other.name) && Arrays.equals(this.bytes, other.by...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ByteArrayEntityImpl.java
1
请完成以下Java代码
public void setDocBaseType (java.lang.String DocBaseType) { set_Value (COLUMNNAME_DocBaseType, DocBaseType); } /** Get Document BaseType. @return Logical type of document */ @Override public java.lang.String getDocBaseType () { return (java.lang.String)get_Value(COLUMNNAME_DocBaseType); } @Override...
*/ @Override public void setR_RequestType_ID (int R_RequestType_ID) { if (R_RequestType_ID < 1) set_Value (COLUMNNAME_R_RequestType_ID, null); else set_Value (COLUMNNAME_R_RequestType_ID, Integer.valueOf(R_RequestType_ID)); } /** Get Anfrageart. @return Type of request (e.g. Inquiry, Complaint, ..) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_UserBPAccess.java
1
请完成以下Java代码
public class ShipmentService { private static final ShipmentDAO shipmentDAO = new ShipmentDAO("jdbc:sqlite:food_delivery.db"); public static int createShipment(ShippingRequest shippingRequest) { String orderId = shippingRequest.getOrderId(); Shipment shipment = new Shipment(); shipmen...
public static void cancelDelivery(String orderId) { shipmentDAO.cancelShipment(orderId); } private static int findDriver() { Random random = new Random(); int driverId = 0; int counter = 0; while (counter < 10) { driverId = random.nextInt(4); if(d...
repos\tutorials-master\microservices-modules\saga-pattern\src\main\java\io\orkes\example\saga\service\ShipmentService.java
1
请在Spring Boot框架中完成以下Java代码
public class WebConfigurer implements WebFluxConfigurer { private final Logger log = LoggerFactory.getLogger(WebConfigurer.class); private final JHipsterProperties jHipsterProperties; public WebConfigurer(Environment env, JHipsterProperties jHipsterProperties) { this.jHipsterProperties = jHipster...
// TODO: remove when this is supported in spring-boot @Bean HandlerMethodArgumentResolver reactivePageableHandlerMethodArgumentResolver() { return new ReactivePageableHandlerMethodArgumentResolver(); } // TODO: remove when this is supported in spring-boot @Bean HandlerMethodArgumentReso...
repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\gateway-app\src\main\java\com\gateway\config\WebConfigurer.java
2
请完成以下Spring Boot application配置
spring: mail: host: smtp.mxhichina.com port: 465 username: spring-boot-demo@xkcoding.com # 使用 jasypt 加密密码,使用com.xkcoding.email.PasswordTest.testGeneratePassword 生成加密密码,替换 ENC(加密密码) password: ENC(OT0qGOpXrr1Iog1W+fjOiIDCJdBjHyhy) protocol: smtp test-connection: true default-encoding: ...
l.smtp.starttls.required: true mail.smtp.ssl.enable: true mail.display.sendmail: spring-boot-demo # 为 jasypt 配置解密秘钥 jasypt: encryptor: password: spring-boot-demo
repos\spring-boot-demo-master\demo-email\src\main\resources\application.yml
2
请完成以下Java代码
private static void configureLUTUConfigTU( @NonNull final I_M_HU_LUTU_Configuration lutuConfigNew, final HUPIItemProductId M_HU_PI_Item_Product_ID, @NonNull final BigDecimal qtyTU) { final I_M_HU_PI_Item_Product tuPIItemProduct = Services.get(IHUPIItemProductDAO.class).getRecordById(M_HU_PI_Item_Product_ID)...
{ this.qtyCUsPerTU = qtyCU; } /** * Called from the process class to set the TU qty from the process parameter. */ public void setQtyTU(final BigDecimal qtyTU) { this.qtyTU = qtyTU; } public void setQtyLU(final BigDecimal qtyLU) { this.qtyLU = qtyLU; } private boolean getIsReceiveIndividualCUs() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pporder\process\PackingInfoProcessParams.java
1
请完成以下Java代码
public ModelAndView welcome(){ ModelAndView model = new ModelAndView(); model.setViewName("welcome"); return model; } private List getUsers() { User user = new User(); user.setEmail("johndoe123@gmail.com"); user.setName("John Doe"); user.setAddress("Bang...
user1.setName("Amit Singh"); user1.setAddress("Chennai, Tamilnadu"); User user2 = new User(); user2.setEmail("bipulkumar@gmail.com"); user2.setName("Bipul Kumar"); user2.setAddress("Bangalore, Karnataka"); User user3 = new User(); user3.setEmail("prakashranjan@g...
repos\Spring-Boot-Advanced-Projects-main\Springboot integrated with JSP\SpringJSPUpdate\src\main\java\spring\jsp\DashboardController.java
1
请在Spring Boot框架中完成以下Java代码
public class PPOrderAllocator { @NonNull String headerAggKey; @NonNull PPOrderCreateRequestBuilder ppOrderCreateRequestBuilder; @NonNull Map<PPOrderCandidateId, Quantity> ppOrderCand2AllocatedQty = new HashMap<>(); @NonNull Quantity capacityPerProductionCycle; @NonNull @NonFinal Quantity allocatedQty; ...
ppOrderCreateRequestBuilder.addRecord(ppOrderCandidateToAllocate.getPpOrderCandidate()); final Quantity qtyToAllocate = getQtyToAllocate(ppOrderCandidateToAllocate); allocateQuantity(ppOrderCandidateToAllocate, qtyToAllocate); return qtyToAllocate; } @NonNull public PPOrderCreateRequest getPPOrderCreateReq...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\productioncandidate\service\produce\PPOrderAllocator.java
2
请完成以下Java代码
public String getParameterName() { return documentField.getFieldName(); } @Override public DocumentFieldWidgetType getWidgetType() { return documentField.getWidgetType(); } @Override public OptionalInt getMinPrecision() { return documentField.getMinPrecision(); } @Override public Object getValueAsJ...
@Override public LogicExpressionResult getMandatory() { return documentField.getMandatory(); } @Override public LogicExpressionResult getDisplayed() { return documentField.getDisplayed(); } @Override public DocumentValidStatus getValidStatus() { return documentField.getValidStatus(); } @Override p...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\adprocess\DocumentFieldAsProcessInstanceParameter.java
1
请完成以下Java代码
public CamundaIn newInstance(ModelTypeInstanceContext instanceContext) { return new CamundaInImpl(instanceContext); } }); camundaSourceAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_SOURCE) .namespace(CAMUNDA_NS) .build(); camundaSourceExpressionAttribute = typeB...
public String getCamundaSourceExpression() { return camundaSourceExpressionAttribute.getValue(this); } public void setCamundaSourceExpression(String camundaSourceExpression) { camundaSourceExpressionAttribute.setValue(this, camundaSourceExpression); } public String getCamundaVariables() { return c...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\camunda\CamundaInImpl.java
1
请完成以下Java代码
private static boolean hasSecurityContext(Context context) { return context.hasKey(SECURITY_CONTEXT_KEY); } private static Mono<SecurityContext> getSecurityContext(Context context) { return context.<Mono<SecurityContext>>get(SECURITY_CONTEXT_KEY); } /** * Clears the {@code Mono<SecurityContext>} from Reacto...
* @param securityContext the {@code Mono<SecurityContext>} to set in the returned * Reactor {@link Context} * @return a Reactor {@link Context} that contains the {@code Mono<SecurityContext>} */ public static Context withSecurityContext(Mono<? extends SecurityContext> securityContext) { return Context.of(SECUR...
repos\spring-security-main\core\src\main\java\org\springframework\security\core\context\ReactiveSecurityContextHolder.java
1
请完成以下Java代码
public void setRandomClass(String randomClass) { this.randomClass = randomClass; } @Override public void destroy() { } /** * Determine if the request a non-modifying request. A non-modifying * request is one that is either a 'HTTP GET/OPTIONS/HEAD' request, or * is allowed explicitly through th...
return mutex; } private boolean isBlank(String s) { return s == null || s.trim().isEmpty(); } private String getRequestedPath(HttpServletRequest request) { String path = request.getServletPath(); if (request.getPathInfo() != null) { path = path + request.getPathInfo(); } return pat...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\security\filter\CsrfPreventionFilter.java
1
请完成以下Java代码
public String getTaskId() { return taskId; } public void setTaskId(String taskId) { this.taskId = taskId; } public String getTaskAssignee() { return taskAssignee; } public void setTaskAssignee(String taskAssignee) { this.taskAssignee = taskAssignee; } public void setActivityInstanceS...
public String getRootProcessInstanceId() { return rootProcessInstanceId; } public void setRootProcessInstanceId(String rootProcessInstanceId) { this.rootProcessInstanceId = rootProcessInstanceId; } @Override public String toString() { return this.getClass().getSimpleName() + "[activit...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricActivityInstanceEventEntity.java
1
请完成以下Java代码
public class BooleanRestVariableConverter implements RestVariableConverter { @Override public String getRestTypeName() { return "boolean"; } @Override public Class<?> getVariableType() { return Boolean.class; } @Override public Object getVariableValue(EngineRestVariabl...
} @Override public void convertVariableValue(Object variableValue, EngineRestVariable result) { if (variableValue != null) { if (!(variableValue instanceof Boolean)) { throw new FlowableIllegalArgumentException("Converter can only convert booleans"); } ...
repos\flowable-engine-main\modules\flowable-common-rest\src\main\java\org\flowable\common\rest\variable\BooleanRestVariableConverter.java
1
请完成以下Java代码
public String toCamelCaseFormat() { String[] tokens = this.property.split("[-.]"); StringBuilder sb = new StringBuilder(); for (int i = 0; i < tokens.length; i++) { String part = tokens[i]; if (i > 0) { part = StringUtils.capitalize(part); } sb.append(part); } return sb.toString(); } public...
if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } VersionProperty that = (VersionProperty) o; return this.internal == that.internal && this.property.equals(that.property); } @Override public int hashCode() { return Objects.hash(this.property, this.inter...
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\version\VersionProperty.java
1
请在Spring Boot框架中完成以下Java代码
public void setDateFunctionCodeQualifier(String value) { this.dateFunctionCodeQualifier = value; } /** * Gets the value of the dateFormatCode property. * * @return * ...
* */ public void setDateFormatCode(String value) { this.dateFormatCode = value; } } } } } }
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\ListLineItemExtensionType.java
2
请完成以下Java代码
public void setC_Print_Package_ID (int C_Print_Package_ID) { if (C_Print_Package_ID < 1) set_Value (COLUMNNAME_C_Print_Package_ID, null); else set_Value (COLUMNNAME_C_Print_Package_ID, Integer.valueOf(C_Print_Package_ID)); } @Override public int getC_Print_Package_ID() { return get_ValueAsInt(COLUM...
{ set_ValueFromPO(COLUMNNAME_S_Resource_ID, org.compiere.model.I_S_Resource.class, S_Resource); } @Override public void setS_Resource_ID (int S_Resource_ID) { if (S_Resource_ID < 1) set_Value (COLUMNNAME_S_Resource_ID, null); else set_Value (COLUMNNAME_S_Resource_ID, Integer.valueOf(S_Resource_ID)); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_C_Print_Job_Instructions_v.java
1
请完成以下Java代码
public void setQtyPromised_TU (java.math.BigDecimal QtyPromised_TU) { set_ValueNoCheck (COLUMNNAME_QtyPromised_TU, QtyPromised_TU); } /** Get Zusagbar (TU). @return Zusagbar (TU) */ @Override public java.math.BigDecimal getQtyPromised_TU () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyPromised_...
/** Set Wochenerster. @param WeekDate Wochenerster */ @Override public void setWeekDate (java.sql.Timestamp WeekDate) { set_ValueNoCheck (COLUMNNAME_WeekDate, WeekDate); } /** Get Wochenerster. @return Wochenerster */ @Override public java.sql.Timestamp getWeekDate () { return (java.sql.Timestamp)...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java-gen\de\metas\procurement\base\model\X_PMM_Balance.java
1
请完成以下Java代码
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Possession other = (Possession) obj; if (id != other.id) ...
if (other.name != null) { return false; } } else if (!name.equals(other.name)) { return false; } return true; } @Override public String toString() { return "Possession [id=" + id + ", name=" + name + "]"; } }
repos\tutorials-master\persistence-modules\spring-data-jpa-simple\src\main\java\com\baeldung\jpa\modifying\model\Possession.java
1
请完成以下Java代码
public static PaymentToReconcileRow cast(final IViewRow row) { return (PaymentToReconcileRow)row; } @Override public DocumentId getId() { return rowId; } @Override public boolean isProcessed() { return isReconciled(); } @Override public DocumentPath getDocumentPath() { return null; } @Overrid...
static DocumentId convertPaymentIdToDocumentId(@NonNull final PaymentId paymentId) { return DocumentId.of(paymentId); } static PaymentId convertDocumentIdToPaymentId(@NonNull final DocumentId rowId) { return rowId.toId(PaymentId::ofRepoId); } public Amount getPayAmtNegateIfOutbound() { return getPayAmt()...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\bankstatement_reconciliation\PaymentToReconcileRow.java
1
请在Spring Boot框架中完成以下Java代码
public void save(@NonNull final PostgRESTConfig postgRESTConfig) { final I_S_PostgREST_Config configRecord = InterfaceWrapperHelper.loadOrNew(postgRESTConfig.getId(), I_S_PostgREST_Config.class); configRecord.setAD_Org_ID(postgRESTConfig.getOrgId().getRepoId()); configRecord.setBase_url(postgRESTConfig.getBas...
} if (postgRESTConfig.getReadTimeout() == null) { configRecord.setRead_timeout(0); } else { final long millis = postgRESTConfig.getReadTimeout().toMillis(); configRecord.setRead_timeout((int)millis); } configRecord.setPostgREST_ResultDirectory(postgRESTConfig.getResultDirectory()); Interface...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\postgrest\config\PostgRESTConfigRepository.java
2
请完成以下Java代码
public String getRecurringType () { return (String)get_Value(COLUMNNAME_RecurringType); } /** Set Maximum Runs. @param RunsMax Number of recurring runs */ public void setRunsMax (int RunsMax) { set_Value (COLUMNNAME_RunsMax, Integer.valueOf(RunsMax)); } /** Get Maximum Runs. @return Number of re...
/** Set Remaining Runs. @param RunsRemaining Number of recurring runs remaining */ public void setRunsRemaining (int RunsRemaining) { set_ValueNoCheck (COLUMNNAME_RunsRemaining, Integer.valueOf(RunsRemaining)); } /** Get Remaining Runs. @return Number of recurring runs remaining */ public int getRu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Recurring.java
1
请完成以下Java代码
public class ManualActivationRuleImpl extends CmmnElementImpl implements ManualActivationRule { protected static Attribute<String> nameAttribute; protected static AttributeReference<CaseFileItem> contextRefAttribute; protected static ChildElement<ConditionExpression> conditionChild; public ManualActivationRul...
public ManualActivationRule newInstance(ModelTypeInstanceContext instanceContext) { return new ManualActivationRuleImpl(instanceContext); } }); nameAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_NAME) .build(); contextRefAttribute = typeBuilder.stringAttribute(CMM...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\ManualActivationRuleImpl.java
1
请完成以下Java代码
public String getTo() { return to; } /** * Sets the value of the to property. * * @param value * allowed object is * {@link String } * */ public void setTo(String value) { this.to = value; } /** * <p>Java class for anonymous co...
/** * Gets the value of the via property. * * @return * possible object is * {@link String } * */ public String getVia() { return via; } /** * Sets the value of the via property. * ...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\TransportType.java
1
请在Spring Boot框架中完成以下Java代码
public class ADInfoWindowBL implements IADInfoWindowBL { @Override public String getSqlFrom(final I_AD_InfoWindow infoWindow) { Check.assumeNotNull(infoWindow, "infoWindow not null"); final StringBuilder sqlFrom = new StringBuilder(); if (!Check.isEmpty(infoWindow.getFromClause(), true)) { sqlFrom.appen...
final String treeColumnName = treeColumn.getSelectClause(); return treeColumnName; } @Override // @Cached public int getAD_Tree_ID(final I_AD_InfoWindow infoWindow) { String keyName = getTreeColumnName(infoWindow); // the keyName is wrong typed in Mtree class // TODO: HARDCODED if ("M_Product_Category_I...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\service\impl\ADInfoWindowBL.java
2
请完成以下Java代码
public String getCustomer() { return customer; } public void setCustomer(String customer) { this.customer = customer; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getValidUntil() { return validUntil; } public...
public Map<String, String> getFeatures() { return features; } public void setFeatures(Map<String, String> features) { this.features = features; } public String getRaw() { return raw; } public void setRaw(String raw) { this.raw = raw; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\telemetry\dto\LicenseKeyDataImpl.java
1
请完成以下Java代码
public void setPDFCount (final int PDFCount) { throw new IllegalArgumentException ("PDFCount is virtual column"); } @Override public int getPDFCount() { return get_ValueAsInt(COLUMNNAME_PDFCount); } @Override public void setPOReference (final @Nullable String POReference) { set_ValueNoCheck (COLUMNNAME...
} @Override public int getRecord_ID() { return get_ValueAsInt(COLUMNNAME_Record_ID); } @Override public void setStoreCount (final int StoreCount) { throw new IllegalArgumentException ("StoreCount is virtual column"); } @Override public int getStoreCount() { return get_ValueAsInt(COLUMNNAME_StoreCou...
repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java-gen\de\metas\document\archive\model\X_C_Doc_Outbound_Log.java
1
请完成以下Java代码
private String supplementWildCards(@NonNull final String stringVal) { final StringBuilder result = new StringBuilder(); if (!stringVal.startsWith("%")) { result.append("%"); } result.append(stringVal.replace("'", "''")); // escape quotes within the string if (!stringVal.endsWith("%")) { ...
{ str = (String)value; } return supplementWildCards(str); } @Override public String toString() { return "Modifier[ignoreCase=" + ignoreCase + "]"; } } public StringLikeFilter( @NonNull final String columnName, @NonNull final String substring, final boolean ignoreCase) { super(colu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\StringLikeFilter.java
1
请完成以下Java代码
private void dispatchExecutionCancelled(ActivityExecution execution, ActivityImpl causeActivity) { // subprocesses for (ActivityExecution subExecution : execution.getExecutions()) { dispatchExecutionCancelled(subExecution, causeActivity); } // call activities Executi...
protected void dispatchActivityCancelled(ActivityExecution execution, ActivityImpl activity, ActivityImpl causeActivity) { Context.getProcessEngineConfiguration().getEventDispatcher().dispatchEvent( ActivitiEventBuilder.createActivityCancelledEvent(activity.getId(), (Stri...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\TerminateEndEventActivityBehavior.java
1
请在Spring Boot框架中完成以下Java代码
public class InstanceProperties { /** * Management-url to register with. Inferred at runtime, can be overridden in case the * reachable URL is different (e.g. Docker). */ @Nullable private String managementUrl; /** * Base url for computing the management-url to register with. The path is inferred at * r...
* Name to register with. Defaults to ${spring.application.name} */ @Value("${spring.application.name:spring-boot-application}") private String name = "spring-boot-application"; /** * Should the registered urls be built with server.address or with hostname. * @deprecated Use serviceHostType instead. */ @Dep...
repos\spring-boot-admin-master\spring-boot-admin-client\src\main\java\de\codecentric\boot\admin\client\config\InstanceProperties.java
2
请完成以下Java代码
public Double getPrice() { return price; } public void setPrice(Double price) { this.price = price; } public List<String> getImageUrls() { return imageUrls; } public void setImageUrls(List<String> imageUrls) { this.imageUrls = imageUrls; } public List<...
public void setStock(Integer stock) { this.stock = stock; } @Override public String toString() { return "ProductModel{" + "name='" + name + '\'' + ", description='" + description + '\'' + ", status='" + status + '\'' + ", curre...
repos\tutorials-master\spring-boot-modules\spring-boot-graphql-2\src\main\java\com\baeldung\graphqlvsrest\model\ProductModel.java
1
请完成以下Java代码
public void setProperty(final String propertyName, final Object value) { Check.assumeNotNull(propertyName, "propertyName not null"); if (properties == null) { properties = new HashMap<String, Object>(); } properties.put(propertyName, value); } @Override public <T> T getProperty(final String propertyN...
} @SuppressWarnings("unchecked") final T value = (T)valueObj; return value; } @Override public boolean isProperty(final String propertyName) { final boolean defaultValue = false; return isProperty(propertyName, defaultValue); } @Override public boolean isProperty(final String propertyName, final bo...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\api\impl\AbstractDunningContext.java
1
请完成以下Java代码
public class Person { @Id private String id; @Field @NotNull private String firstName; @Field @NotNull private String lastName; @Field @NotNull private DateTime created; @Field private DateTime updated; public Person(String id, String firstName, String lastName)...
this.lastName = lastName; } public DateTime getCreated() { return created; } public void setCreated(DateTime created) { this.created = created; } public DateTime getUpdated() { return updated; } public void setUpdated(DateTime updated) { this.updated =...
repos\tutorials-master\persistence-modules\spring-data-couchbase-2\src\main\java\com\baeldung\spring\data\couchbase\model\Person.java
1
请完成以下Java代码
public int getM_HU_Attribute_Snapshot_ID() { return get_ValueAsInt(COLUMNNAME_M_HU_Attribute_Snapshot_ID); } @Override public de.metas.handlingunits.model.I_M_HU getM_HU() { return get_ValueAsPO(COLUMNNAME_M_HU_ID, de.metas.handlingunits.model.I_M_HU.class); } @Override public void setM_HU(final de.metas...
@Override public java.lang.String getValue() { return get_ValueAsString(COLUMNNAME_Value); } @Override public void setValueInitial (final @Nullable java.lang.String ValueInitial) { set_ValueNoCheck (COLUMNNAME_ValueInitial, ValueInitial); } @Override public java.lang.String getValueInitial() { retur...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Attribute_Snapshot.java
1
请完成以下Java代码
public boolean isValidNewState(final WFState newState) { final WFState[] options = getNewStateOptions(); for (final WFState option : options) { if (option.equals(newState)) return true; } return false; } /** * @return true if the action is valid based on current state */ public boolean isValid...
/** * @return valid actions based on current State */ private WFAction[] getActionOptions() { if (isNotStarted()) return new WFAction[] { WFAction.Start, WFAction.Abort, WFAction.Terminate }; if (isRunning()) return new WFAction[] { WFAction.Suspend, WFAction.Complete, WFAction.Abort, WFAction.Terminate...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\workflow\WFState.java
1
请完成以下Java代码
private OLCandOrderFactory newOrderFactory() { return OLCandOrderFactory.builder() .orderDefaults(orderDefaults) .userInChargeId(userInChargeId) .loggable(loggable) .olCandProcessorId(olCandProcessorId) .olCandListeners(olCandListeners) .propagateAsyncBatchIdToOrderRecord(propagateAsyncBatchI...
} } return groupingValues.build(); } private static Timestamp truncateDateByGranularity(final Timestamp date, final Granularity granularity) { if (granularity == Granularity.Day) { return TimeUtil.trunc(date, TimeUtil.TRUNC_DAY); } else if (granularity == Granularity.Week) { return TimeUtil.tru...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\api\OLCandsProcessorExecutor.java
1
请在Spring Boot框架中完成以下Java代码
public void run() { ExecutorService executorService = Executors.newSingleThreadExecutor(); try { this.session.sendMessage(new TextMessage("sh -c ls -la\r\n")); ProcessBuilder builder = new ProcessBuilder(); builder.command("sh", "-c", "ls -la"); builder.di...
private class WSSender implements Runnable { private final WebSocketSession session; private final String message; public WSSender(WebSocketSession session, String message) { this.session = session; this.message = message; } @Override public voi...
repos\spring-examples-java-17\spring-websockets\src\main\java\itx\examples\springboot\websockets\config\WSTerminalSession.java
2