instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public class BestellenResponse { @XmlElement(name = "return", namespace = "", required = true) protected BestellungAntwort _return; /** * Gets the value of the return property. * * @return * possible object is * {@link BestellungAntwort } * */ public Be...
} /** * Sets the value of the return property. * * @param value * allowed object is * {@link BestellungAntwort } * */ public void setReturn(BestellungAntwort value) { this._return = value; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v1\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v1\BestellenResponse.java
1
请完成以下Java代码
public Optional<SalesRegion> getBySalesRepId(@NonNull final UserId salesRepId) { return getMap().stream() .filter(salesRegion -> salesRegion.isActive() && UserId.equals(salesRegion.getSalesRepId(), salesRepId)) .max(Comparator.comparing(SalesRegion::getId)); } // // // private static class Sales...
{ this.byId = Maps.uniqueIndex(list, SalesRegion::getId); } public SalesRegion getById(final SalesRegionId salesRegionId) { final SalesRegion salesRegion = byId.get(salesRegionId); if (salesRegion == null) { throw new AdempiereException("No sales region found for " + salesRegionId); } retur...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\sales_region\SalesRegionRepository.java
1
请完成以下Java代码
public class NonAlphaNumRegexChecker { private static final Pattern PATTERN_NON_ALPHNUM_ANYLANG = Pattern.compile("[^\\p{IsAlphabetic}\\p{IsDigit}]"); private static final Pattern PATTERN_NON_ALPHNUM_USASCII = Pattern.compile("[^a-zA-Z0-9]+"); /** * checks if a non-alphanumeric character is present. t...
} /** * checks for non-alphanumeric character. it returns true if it detects any character other than the * specified script argument. example of script - Character.UnicodeScript.GEORGIAN.name() * * @param input - String to check for special character * @param script - language script ...
repos\tutorials-master\core-java-modules\core-java-string-operations-6\src\main\java\com\baeldung\nonalphanumeric\NonAlphaNumRegexChecker.java
1
请完成以下Java代码
public void showWindow(final Object model) { Check.assumeNotNull(model, "model not null"); final int adTableId = InterfaceWrapperHelper.getModelTableId(model); final int recordId = InterfaceWrapperHelper.getId(model); AEnv.zoom(adTableId, recordId); } @Override public IClientUIInvoker invoke() { return...
{ return new SwingClientUIAsyncInvoker(); } @Override public void showURL(final String url) { try { final URI uri = new URI(url); Desktop.getDesktop().browse(uri); } catch (Exception e) { logger.warn("Failed opening " + url, e.getLocalizedMessage()); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\de\metas\adempiere\form\swing\SwingClientUIInstance.java
1
请完成以下Java代码
public de.metas.async.model.I_C_Async_Batch getC_Async_Batch() { return get_ValueAsPO(COLUMNNAME_C_Async_Batch_ID, de.metas.async.model.I_C_Async_Batch.class); } @Override public void setC_Async_Batch(final de.metas.async.model.I_C_Async_Batch C_Async_Batch) { set_ValueFromPO(COLUMNNAME_C_Async_Batch_ID, de.m...
{ return get_ValueAsInt(COLUMNNAME_CountProcessed); } @Override public de.metas.async.model.I_C_Queue_PackageProcessor getC_Queue_PackageProcessor() { return get_ValueAsPO(COLUMNNAME_C_Queue_PackageProcessor_ID, de.metas.async.model.I_C_Queue_PackageProcessor.class); } @Override public void setC_Queue_Pack...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java-gen\de\metas\async\model\X_RV_Async_batch_statistics.java
1
请完成以下Java代码
public RemittanceLocationMethod2Code getMtd() { return mtd; } /** * Sets the value of the mtd property. * * @param value * allowed object is * {@link RemittanceLocationMethod2Code } * */ public void setMtd(RemittanceLocationMethod2Code value) { ...
* */ public void setElctrncAdr(String value) { this.elctrncAdr = value; } /** * Gets the value of the pstlAdr property. * * @return * possible object is * {@link NameAndAddress10 } * */ public NameAndAddress10 getPstlAdr() { ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-xjc_camt054_001_06\de\metas\payment\camt054_001_06\RemittanceLocationDetails1.java
1
请完成以下Java代码
public void applyTo(final I_C_OrderLine orderLine) { logger.debug("Applying {} to {}", this, orderLine); orderLine.setPriceEntered(priceEntered); orderLine.setDiscount(discount.toBigDecimal()); orderLine.setPriceActual(priceActual); orderLine.setPriceLimit(priceLimit); orderLine.setPriceLimitNote(buildPri...
.build(); } else { msg = TranslatableStrings.builder() .appendADMessage(AdMessageKey.of("NotEnforced")) .append(": ") .append(priceLimitNotEnforcedExplanation) .build(); } final String adLanguage = Language.getBaseAD_Language(); return msg.translate(adLanguage); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\OrderLinePriceAndDiscount.java
1
请完成以下Java代码
protected IScriptFactory createScriptFactory() { return new RolloutDirScriptFactory(); } @Override protected void configureScriptExecutorFactory(final IScriptExecutorFactory scriptExecutorFactory) { scriptExecutorFactory.setDryRunMode(false); } @Override protected IScriptScanner create...
@Override protected IScriptsApplierListener createScriptsApplierListener() { return NullScriptsApplierListener.instance; } @Override protected IDatabase createDatabase() { return db; }; }; return prepareNewDBCopy; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.cli\src\main\java\de\metas\migration\cli\rollout_migrate\DBCopyMaker.java
1
请完成以下Java代码
private static Predicate<String> toAdMessageStartingWithIgnoreCaseFilter(@Nullable final String filterString) { if (filterString == null || Check.isBlank(filterString)) { return null; } else { final String filterStringUC = filterString.trim().toUpperCase(); return adMessageKey -> adMessageK...
} }); } private static void addMessageToTree(final Map<String, Object> tree, final String key, final String value) { final List<String> keyParts = SPLIT_BY_DOT.splitToList(key); Map<String, Object> currentNode = tree; for (int i = 0; i < keyParts.size() - 1; i++) { final String keyPart = keyParts.ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\AdMessagesTreeLoader.java
1
请完成以下Java代码
public RefreshTokenGrantBuilder accessTokenResponseClient( ReactiveOAuth2AccessTokenResponseClient<OAuth2RefreshTokenGrantRequest> accessTokenResponseClient) { this.accessTokenResponseClient = accessTokenResponseClient; return this; } /** * Sets the maximum acceptable clock skew, which is used when ch...
return this; } /** * Builds an instance of * {@link RefreshTokenReactiveOAuth2AuthorizedClientProvider}. * @return the {@link RefreshTokenReactiveOAuth2AuthorizedClientProvider} */ @Override public ReactiveOAuth2AuthorizedClientProvider build() { RefreshTokenReactiveOAuth2AuthorizedClientProvide...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\ReactiveOAuth2AuthorizedClientProviderBuilder.java
1
请完成以下Java代码
public Result beforeHUItemStorage(final IMutable<IHUItemStorage> itemStorage) { // don't go downstream because we don't care what's there return Result.SKIP_DOWNSTREAM; } @Override public Result afterHUItemStorage(final IHUItemStorage itemStorage) { final ZonedDateTime date = getHUIterator()...
{ return; } for (final I_M_HU hu : sourceHUs) { // Skip it if already destroyed if (handlingUnitsBL.isDestroyed(hu)) { continue; } handlingUnitsBL.destroyIfEmptyStorage(huContext, hu); } } private void createHUSnapshotsIfRequired(final IHUContext huContext) { if (!createHUSnapshots...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\HUListAllocationSourceDestination.java
1
请完成以下Java代码
public String getTradeNo() { return tradeNo; } /** 银行流水 **/ public void setTradeNo(String tradeNo) { this.tradeNo = tradeNo; } /** 交易类型 **/ public String getTransType() { return transType; } /** 交易类型 **/ public void setTransType(String transType) { this.transType = transType; } /** 交易时间 **/ publ...
/** 交易时间 **/ public void setTransDate(Date transDate) { this.transDate = transDate; } /** 银行(支付宝)该笔订单收取的手续费 **/ public BigDecimal getBankFee() { return bankFee; } /** 银行(支付宝)该笔订单收取的手续费 **/ public void setBankFee(BigDecimal bankFee) { this.bankFee = bankFee; } }
repos\roncoo-pay-master\roncoo-pay-app-reconciliation\src\main\java\com\roncoo\pay\app\reconciliation\vo\AlipayAccountLogVO.java
1
请完成以下Spring Boot application配置
spring: application: name: account-service datasource: url: jdbc:mysql://127.0.0.1:3306/seata_account?useSSL=false&useUnicode=true&characterEncoding=UTF-8 driver-class-name: com.mysql.jdbc.Driver username: root password: # dubbo 配置项,对应 DubboConfigurationProperties 配置类 dubbo: # Dubbo 应用配置 a...
SeataProperties 类 seata: application-id: ${spring.application.name} # Seata 应用编号,默认为 ${spring.application.name} tx-service-group: ${spring.application.name}-group # Seata 事务组编号,用于 TC 集群名 # 服务配置项,对应 ServiceProperties 类 service: # 虚拟组和分组的映射 vgroup-mapping: account-service-group: default # 分组和 S...
repos\SpringBoot-Labs-master\lab-53\lab-53-seata-at-dubbo-demo\lab-53-seata-at-dubbo-demo-account-service\src\main\resources\application-file.yaml
2
请在Spring Boot框架中完成以下Java代码
public class DpdDeliveryOrderService implements DeliveryOrderService { private final DpdDeliveryOrderRepository dpdDeliveryOrderRepository; @Override public ShipperGatewayId getShipperGatewayId() { return DpdConstants.SHIPPER_GATEWAY_ID; } @NonNull @Override public ITableRecordReference toTableRecordRefere...
/** * Explanation of the different data structures: * <p> * - DeliveryOrder is the DTO * - I_Dpd_StoreOrder is the persisted object for that DTO (which has lines), with data relevant for DPD. * Each different shipper has its own "shipper-po" with its own relevant data. */ @Override @NonNull public Delive...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java\de\metas\shipper\gateway\dpd\DpdDeliveryOrderService.java
2
请完成以下Java代码
public String getOwner() { return owner; } public void setOwner(String owner) { this.owner = owner; } @Override public String getParentTaskId() { return parentTaskId; } public void setParentTaskId(String parentTaskId) { this.parentTaskId = parentTaskId; ...
} } } return variables; } @Override public Map<String, Object> getProcessVariables() { Map<String, Object> variables = new HashMap<>(); if (queryVariables != null) { for (HistoricVariableInstanceEntity variableInstance : queryVariables) { ...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\HistoricTaskInstanceEntity.java
1
请完成以下Java代码
public Criteria andSortBetween(Integer value1, Integer value2) { addCriterion("sort between", value1, value2, "sort"); return (Criteria) this; } public Criteria andSortNotBetween(Integer value1, Integer value2) { addCriterion("sort not between", value1, value2, "sort...
} public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; ...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\CmsHelpCategoryExample.java
1
请完成以下Java代码
public void setClassnameForProcessType(@NonNull final I_AD_Process process) { switch (ProcessType.ofCode(process.getType())) { case SQL: process.setClassname(ExecuteUpdateSQL.class.getName()); break; case Excel: process.setClassname(ExportToSpreadsheetProcess.class.getName()); break; case ...
menu.setIsActive(adProcess.isActive()); menu.setName(adProcess.getName()); menu.setDescription(adProcess.getDescription()); InterfaceWrapperHelper.save(menu); } for (final I_AD_WF_Node node : MWindow.getWFNodes(ctx, I_AD_WF_Node.COLUMNNAME_AD_Process_ID + "=" + adProcess.getAD_Process_ID(), trxName)) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\model\interceptor\AD_Process.java
1
请完成以下Java代码
public void setDepreciationType (String DepreciationType) { set_Value (COLUMNNAME_DepreciationType, DepreciationType); } /** Get DepreciationType. @return DepreciationType */ public String getDepreciationType () { return (String)get_Value(COLUMNNAME_DepreciationType); } /** Set Description. @param D...
} /** Set Processed. @param Processed The document has been processed */ public void setProcessed (boolean Processed) { set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); } /** Get Processed. @return The document has been processed */ public boolean isProcessed () { Object oo = get...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Depreciation.java
1
请完成以下Java代码
public int getWindowCount() { return windows.size(); } /** * Find window by ID * * @param AD_Window_ID * @return AWindow reference, null if not found */ public AWindow find(final AdWindowId adWindowId) { for (Window w : windows) { if (w instanceof AWindow) { AWindow a = (AWindow)w; ...
} @Override public void componentResized(ComponentEvent e) { } @Override public void componentShown(ComponentEvent e) { } @Override public void windowActivated(WindowEvent e) { } @Override public void windowClosed(WindowEvent e) { Window w = e.getWindow(); if (w instanceof Window) { w.remove...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\WindowManager.java
1
请完成以下Java代码
public static AttributesKeyPart ofAttributeIdAndValue(@NonNull final AttributeId attributeId, @NonNull final String value) { final String stringRepresentation = attributeId.getRepoId() + "=" + value; final int specialCode = -1; final AttributeValueId attributeValueId = null; return new AttributesKeyPart(Attrib...
|| type == AttributeKeyPartType.Other || type == AttributeKeyPartType.None) { return specialCode; } else { return null; } } private Integer getAttributeIdOrNull() { return AttributeKeyPartType.AttributeIdAndValue == type ? attributeId.getRepoId() : null; } private static int compareNullsLas...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\commons\AttributesKeyPart.java
1
请完成以下Java代码
public boolean isQualityInspection(@NonNull final I_PP_Order ppOrder) { // NOTE: keep in sync with #qualityInspectionFilter final String orderType = ppOrder.getOrderType(); return C_DocType_DOCSUBTYPE_QualityInspection.equals(orderType); } @Override public void assertQualityInspectionOrder(@NonNull final I_P...
} Check.assumeNotNull(dateOfProduction, "dateOfProduction not null for PP_Order {}", ppOrder); return dateOfProduction; } @Override public List<I_M_InOutLine> retrieveIssuedInOutLines(final I_PP_Order ppOrder) { // services final IPPOrderMInOutLineRetrievalService ppOrderMInOutLineRetrievalService = Servic...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\impl\MaterialTrackingPPOrderBL.java
1
请完成以下Java代码
public void setHelp (String Help) { set_Value (COLUMNNAME_Help, Help); } /** Get Comment/Help. @return Comment or Hint */ public String getHelp () { return (String)get_Value(COLUMNNAME_Help); } /** Set Default. @param IsDefault Default value */ public void setIsDefault (boolean IsDefault) {...
Integer ii = (Integer)get_Value(COLUMNNAME_M_Demand_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Demand.java
1
请完成以下Java代码
public Date getEvaluationTime() { return evaluationTime; } public void setEvaluationTime(Date evaluationTime) { this.evaluationTime = evaluationTime; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getTenantI...
return collectResultValue; } public void setCollectResultValue(Double collectResultValue) { this.collectResultValue = collectResultValue; } public String getRootDecisionInstanceId() { return rootDecisionInstanceId; } public void setRootDecisionInstanceId(String rootDecisionInstanceId) { this....
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricDecisionInstanceEntity.java
1
请在Spring Boot框架中完成以下Java代码
public String getCsvExeOffice() { return csvExeOffice; } public void setCsvExeOffice(String csvExeOffice) { this.csvExeOffice = csvExeOffice; } public String getCsvVtoll() { return csvVtoll; } public void setCsvVtoll(String csvVtoll) { this.csvVtoll = csvVtoll;...
public void setCsvLog(String csvLog) { this.csvLog = csvLog; } public String getCsvCanton() { return csvCanton; } public void setCsvCanton(String csvCanton) { this.csvCanton = csvCanton; } public Integer getLocation() { return location; } public void s...
repos\SpringBootBucket-master\springboot-batch\src\main\java\com\xncoding\trans\config\properties\CommonProperties.java
2
请完成以下Java代码
protected String doIt() throws Exception { final I_M_Material_Tracking materialTracking = getM_Material_Tracking(); final IMaterialTrackingDocuments materialTrackingDocuments = qualityBasedInvoicingDAO.retrieveMaterialTrackingDocuments(materialTracking); final PPOrderQualityCalculator calculator = new PPOrderQ...
} final I_PP_Order ppOrder = getRecord(I_PP_Order.class); // note that a quality inspection has at most one material-tracking final I_M_Material_Tracking materialTracking = materialTrackingDAO.retrieveSingleMaterialTrackingForModel(ppOrder); if (materialTracking == null) { throw new AdempiereException("@...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\process\PP_Order_UpdateQualityFields.java
1
请在Spring Boot框架中完成以下Java代码
public SimpleMailMessage templateSimpleMessage() { SimpleMailMessage message = new SimpleMailMessage(); message.setText("This is the test email template for your email:\n%s\n"); return message; } @Bean public SpringTemplateEngine thymeleafTemplateEngine(ITemplateResolver templat...
// @Bean // public FreeMarkerConfigurer freemarkerFilesystemConfig() throws IOException { // Configuration configuration = new Configuration(Configuration.VERSION_2_3_27); // TemplateLoader templateLoader = new FileTemplateLoader(new File(mailTemplatesPath)); // configuration.setTemplateLoad...
repos\tutorials-master\spring-web-modules\spring-mvc-basics-2\src\main\java\com\baeldung\spring\configuration\EmailConfiguration.java
2
请完成以下Java代码
protected void initializeIncidentsHandlers(IncidentHandler mainIncidentHandler, final List<IncidentHandler> incidentHandlers) { EnsureUtil.ensureNotNull("Incident handler", mainIncidentHandler); this.mainIncidentHandler = mainIncidentHandler; EnsureUtil.ensureNo...
public String getIncidentHandlerType() { return mainIncidentHandler.getIncidentHandlerType(); } @Override public Incident handleIncident(IncidentContext context, String message) { Incident incident = mainIncidentHandler.handleIncident(context, message); for (IncidentHandler incidentHandler : this.inc...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\incident\CompositeIncidentHandler.java
1
请完成以下Java代码
private static final boolean decodeReadonly(final String readonlyStr) { return "ro".equals(readonlyStr); } private static final String encodeReadonly(final boolean readonly) { return readonly ? "ro" : "rw"; } public void assertRowType(@NonNull final PurchaseRowType expectedRowType) { final PurchaseRowTyp...
{ return type == PurchaseRowType.GROUP; } public boolean isLineRowId() { return type == PurchaseRowType.LINE; } public boolean isAvailabilityRowId() { return type == PurchaseRowType.AVAILABILITY_DETAIL; } public boolean isAvailableOnVendor() { assertRowType(PurchaseRowType.AVAILABILITY_DETAIL); re...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\sales\purchasePlanning\view\PurchaseRowId.java
1
请完成以下Java代码
class PrefixedConfigurationPropertySource implements ConfigurationPropertySource { private final ConfigurationPropertySource source; private final ConfigurationPropertyName prefix; PrefixedConfigurationPropertySource(ConfigurationPropertySource source, String prefix) { Assert.notNull(source, "'source' must not ...
private ConfigurationPropertyName getPrefixedName(ConfigurationPropertyName name) { return this.prefix.append(name); } @Override public ConfigurationPropertyState containsDescendantOf(ConfigurationPropertyName name) { return this.source.containsDescendantOf(getPrefixedName(name)); } @Override public @Nullab...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\properties\source\PrefixedConfigurationPropertySource.java
1
请完成以下Java代码
public BigDecimal getQty() { return storage.getQtyCapacity(); } @Override public I_C_UOM getC_UOM() { return storage.getC_UOM(); } @Override public BigDecimal getQtyAllocated() { return storage.getQtyFree(); } @Override public BigDecimal getQtyToAllocate() { return storage.getQty().toBigDecimal(...
return HUListAllocationSourceDestination.of(hu); } @Override public boolean isReadOnly() { return readonly; } @Override public void setReadOnly(final boolean readonly) { this.readonly = readonly; } @Override public I_M_HU_Item getInnerHUItem() { return null; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\document\impl\AbstractHUDocumentLine.java
1
请完成以下Java代码
public class ProductsToPick_PickSelected extends ProductsToPickViewBasedProcess { private final ProductsToPickRowsService rowsService = SpringContextHolder.instance.getBean(ProductsToPickRowsService.class); @Override protected ProcessPreconditionsResolution checkPreconditionsApplicable() { if (!isPickerProfile()...
return ProcessPreconditionsResolution.accept(); } @Override @RunOutOfTrx protected String doIt() { final ImmutableList<WebuiPickHUResult> result = rowsService.pick(getSelectedRows()); updateViewRowFromPickingCandidate(result); invalidateView(); return MSG_OK; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\productsToPick\process\ProductsToPick_PickSelected.java
1
请在Spring Boot框架中完成以下Java代码
public class EventSubscriptionRestServiceImpl extends AbstractRestProcessEngineAware implements EventSubscriptionRestService { public EventSubscriptionRestServiceImpl(String engineName, ObjectMapper objectMapper) { super(engineName, objectMapper); } @Override public List<EventSubscriptionDto> getEventSubs...
public CountResultDto getEventSubscriptionsCount(UriInfo uriInfo) { EventSubscriptionQueryDto queryDto = new EventSubscriptionQueryDto(getObjectMapper(), uriInfo.getQueryParameters()); return queryEventSubscriptionsCount(queryDto); } public CountResultDto queryEventSubscriptionsCount(EventSubscriptionQuery...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\EventSubscriptionRestServiceImpl.java
2
请完成以下Java代码
private void checkForPrice(@NonNull final I_C_OLCand olCand, @Nullable final ProductId packingMaterialProductId) { final PricingSystemId pricingSystemId = PricingSystemId.ofRepoIdOrNull(olCand.getM_PricingSystem_ID()); final IOLCandEffectiveValuesBL olCandEffectiveValuesBL = Services.get(IOLCandEffectiveValuesBL....
final IEditablePricingContext pricingCtx = pricingBL.createPricingContext(); pricingCtx.setBPartnerId(BPartnerId.ofRepoIdOrNull(olCand.getBill_BPartner_ID())); pricingCtx.setSOTrx(SOTrx.SALES); pricingCtx.setQty(BigDecimal.ONE); // we don't care for the actual quantity we just want to verify that there is a price...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\ordercandidate\spi\impl\OLCandPIIPPriceValidator.java
1
请完成以下Java代码
public Process parse(XMLStreamReader xtr, BpmnModel model) throws Exception { Process process = null; if (StringUtils.isNotEmpty(xtr.getAttributeValue(null, ATTRIBUTE_ID))) { String processId = xtr.getAttributeValue(null, ATTRIBUTE_ID); process = new Process(); proces...
ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_PROCESS_CANDIDATE_GROUPS ); if (candidateGroupsString != null) { process.setCandidateStarterGroupsDefined(true); } if (StringUtils.isNotEmpty(candidateGroupsString)) { List<String> ca...
repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\parser\ProcessParser.java
1
请完成以下Java代码
public class CaseInstanceBatchMigrationPartResult { protected String batchId; protected String status = CaseInstanceBatchMigrationResult.STATUS_WAITING; protected String result; protected String caseInstanceId; protected String sourceCaseDefinitionId; protected String targetCaseDefinitionId; ...
public void setSourceCaseDefinitionId(String sourceCaseDefinitionId) { this.sourceCaseDefinitionId = sourceCaseDefinitionId; } public String getTargetCaseDefinitionId() { return targetCaseDefinitionId; } public void setTargetCaseDefinitionId(String targetCaseDefinitionId) { thi...
repos\flowable-engine-main\modules\flowable-cmmn-api\src\main\java\org\flowable\cmmn\api\migration\CaseInstanceBatchMigrationPartResult.java
1
请完成以下Java代码
public String getUmsatzsteuerID() { return umsatzsteuerID; } /** * Sets the value of the umsatzsteuerID property. * * @param value * allowed object is * {@link String } * */ public void setUmsatzsteuerID(String value) { this.umsatzsteuerID = ...
} /** * Sets the value of the bic property. * * @param value * allowed object is * {@link String } * */ public void setBIC(String value) { this.bic = value; } /** * Gets the value of the iban property. * * @return * poss...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v2\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v2\RetourenavisAnkuendigungType.java
1
请完成以下Java代码
public ConversationAssociation newInstance(ModelTypeInstanceContext instanceContext) { return new ConversationAssociationImpl(instanceContext); } }); innerConversationNodeRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_INNER_CONVERSATION_NODE_REF) .required() .qNameAtt...
return innerConversationNodeRefAttribute.getReferenceTargetElement(this); } public void setInnerConversationNode(ConversationNode innerConversationNode) { innerConversationNodeRefAttribute.setReferenceTargetElement(this, innerConversationNode); } public ConversationNode getOuterConversationNode() { re...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\ConversationAssociationImpl.java
1
请完成以下Java代码
public static PriceSpecification fixedPrice(@NonNull final Money fixedPrice) { return new PriceSpecification( PriceSpecificationType.FIXED_PRICE, null/* pricingSystemId */, null/* basePriceAddAmt */, fixedPrice/* fixedPriceAmt */ ); } private static final PriceSpecification NONE = new PriceSpeci...
@Nullable final PricingSystemId basePricingSystemId, @Nullable final Money pricingSystemSurcharge, @Nullable final Money fixedPrice) { this.type = type; this.basePricingSystemId = basePricingSystemId; this.pricingSystemSurcharge = pricingSystemSurcharge; this.fixedPrice = fixedPrice; } public boolea...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\conditions\PriceSpecification.java
1
请完成以下Java代码
public void setIsAutoApproval (boolean IsAutoApproval) { set_Value (COLUMNNAME_IsAutoApproval, Boolean.valueOf(IsAutoApproval)); } /** Get Auto Approval. @return Auto Approval */ @Override public boolean isAutoApproval () { Object oo = get_Value(COLUMNNAME_IsAutoApproval); if (oo != null) { if ...
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 void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Reihenfolge. @return Z...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_CreditLimit_Type.java
1
请完成以下Java代码
public void endpointActivation(MessageEndpointFactory endpointFactory, ActivationSpec spec) throws ResourceException { if(jobHandlerActivation != null) { throw new ResourceException("The Camunda Platform job executor can only service a single MessageEndpoint for job execution. " + "Make sure not to de...
} public String getCommonJWorkManagerName() { return commonJWorkManagerName; } public void setCommonJWorkManagerName(String commonJWorkManagerName) { this.commonJWorkManagerName = commonJWorkManagerName; } // misc ////////////////////////////////////////////////////////////////// @Override p...
repos\camunda-bpm-platform-master\javaee\jobexecutor-ra\src\main\java\org\camunda\bpm\container\impl\threading\ra\JcaExecutorServiceConnector.java
1
请完成以下Java代码
public static List<Object> streamTokenizerWithCustomConfiguration(Reader reader) throws IOException { StreamTokenizer streamTokenizer = new StreamTokenizer(reader); List<Object> tokens = new ArrayList<>(); streamTokenizer.wordChars('!', '-'); streamTokenizer.ordinaryChar('/'); s...
} public static Reader createReaderFromFile() throws FileNotFoundException { String inputFile = StreamTokenizerDemo.class.getResource(INPUT_FILE).getFile(); return new FileReader(inputFile); } public static void main(String[] args) throws IOException { List<Object> tokens1 = stream...
repos\tutorials-master\core-java-modules\core-java-string-apis-2\src\main\java\com\baeldung\streamtokenizer\StreamTokenizerDemo.java
1
请完成以下Java代码
public void setTaxIdAndUpdateVatCode(@Nullable final TaxId taxId) { if (TaxId.equals(this.taxId, taxId)) { return; } this.taxId = taxId; this.vatCode = computeVATCode().map(VATCode::getCode).orElse(null); } private Optional<VATCode> computeVATCode() { if (taxId == null) { return Optional.empt...
{ this.openItemTrxInfo = openItemTrxInfo; } public void updateFrom(@NonNull FactAcctChanges changes) { setAmtSource(changes.getAmtSourceDr(), changes.getAmtSourceCr()); setAmtAcct(changes.getAmtAcctDr(), changes.getAmtAcctCr()); updateCurrencyRate(); if (changes.getAccountId() != null) { this.accoun...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\FactLine.java
1
请在Spring Boot框架中完成以下Java代码
public DomesticAmountType getDomesticAmount() { return domesticAmount; } /** * Sets the value of the domesticAmount property. * * @param value * allowed object is * {@link DomesticAmountType } * */ public void setDomesticAmount(DomesticAmountType val...
* {@link String } * */ public String getDescription() { return description; } /** * Sets the value of the description property. * * @param value * allowed object is * {@link String } * */ public void setDescription(String value...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ItemType.java
2
请完成以下Java代码
public class CompensationBehavior { /** * With compensation, we have a dedicated scope execution for every handler, even if the handler is not * a scope activity; this must be respected when invoking end listeners, etc. */ public static boolean executesNonScopeCompensationHandler(PvmExecutionImpl executio...
return scopeExecution.isScope() && currentActivity.isScope() && !scopeExecution.getNonEventScopeExecutions().isEmpty() && !isCompensationThrowing(scopeExecution); } else { return false; } } public static String getParentActivityInstanceId(PvmExecutionImpl execution) ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\runtime\CompensationBehavior.java
1
请在Spring Boot框架中完成以下Java代码
public class UserController { @Autowired private UserRepository userRepository; @Autowired private UserUtils userUtils; @Autowired private UserService userService; private static final Logger logger = LoggerFactory.getLogger(UserController.class); @GetMapping("/user/me") @PreAut...
{ return userRepository.findByUsername(username); } @GetMapping("/users/getAllUsers") public List<String> getAllUsers(@PathVariable(value = "id") Long id) { return userRepository.findAllUsers(); } @GetMapping("/users/{id}") public UserProfile getUserProfile(@PathVariable(va...
repos\SpringBoot-Projects-FullStack-master\Part-9.SpringBoot-React-Projects\Project-2.SpringBoot-React-ShoppingMall\fullstack\backend\src\main\java\com\urunov\controller\UserController.java
2
请完成以下Java代码
public Amount toAmount(@NonNull final Function<CurrencyId, CurrencyCode> currencyCodeMapper) { return Amount.of(toBigDecimal(), currencyCodeMapper.apply(getCurrencyId())); } public Money round(@NonNull final CurrencyPrecision precision) { return withValue(precision.round(this.value)); } public Money roundIf...
int count = 0; for (final Money money : array) { if (money != null && money.signum() != 0) { count++; } } return count; } public static boolean equals(@Nullable Money money1, @Nullable Money money2) {return Objects.equals(money1, money2);} public Percent percentageOf(@NonNull final Money whol...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\money\Money.java
1
请完成以下Spring Boot application配置
quarkus.langchain4j.timeout=180s quarkus.langchain4j.chat-model.provider=ollama quarkus.langchain4j.ollama.chat-model.model-id=mistral quarkus.langchain4j.ollama.base-url=http://localhost:11434 quarkus.langchain4j.mcp
.default.transport-type=http quarkus.langchain4j.mcp.default.url=http://localhost:9000/mcp/sse
repos\tutorials-master\quarkus-modules\quarkus-mcp-langchain\quarkus-mcp-client\src\main\resources\application.properties
2
请完成以下Java代码
private Set<String> validateVariablesAgainstDefinitions( Map<String, Object> variables, Map<String, VariableDefinition> variableDefinitionMap ) { Set<String> mismatchedVars = new HashSet<>(); variableDefinitionMap.forEach((k, v) -> { //if we have definition for this varia...
) { ProcessDefinition processDefinition = ProcessDefinitionUtil.getProcessDefinition( processInstance.getProcessDefinitionId() ); Map<String, Object> calculatedVariables = calculateOutputVariables( variables, processDefinition, initialFlowElement ...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-runtime-impl\src\main\java\org\activiti\spring\process\ProcessVariablesInitiator.java
1
请完成以下Java代码
public void addNotifications(final List<I_AD_Note> list) { if (list != null && !list.isEmpty()) { this.notifications.addAll(list); this.notificationsWhereClause = null; } } @Override public String getNotificationsWhereClause() { if (this.notificationsWhereClause == null) { final Accessor access...
{ if (whereClause.length() > 0) whereClause.append(" OR "); whereClause.append(columnName).append(" IN (").append(whereClauseCurrent).append(")"); whereClauseCurrent = null; } if (hasNull) { if (whereClause.length() > 0) whereClause.append(" OR "); whereClause.append(columnName).append(" I...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceGenerateResult.java
1
请完成以下Java代码
public BatchStatisticsQuery startedBefore(final Date date) { this.startedBefore = date; return this; } @Override public BatchStatisticsQuery startedAfter(final Date date) { this.startedAfter = date; return this; } @Override public BatchStatisticsQuery withFailures() { this.hasFailure =...
@Override public BatchStatisticsQuery orderByStartTime() { return orderBy(BatchQueryProperty.START_TIME); } public long executeCount(CommandContext commandContext) { checkQueryOk(); return commandContext .getStatisticsManager() .getStatisticsCountGroupedByBatch(this); } public List<B...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\BatchStatisticsQueryImpl.java
1
请完成以下Java代码
public static Long[] get(String key) { return dictionary.get(key); } /** * 语义距离 * @param itemA * @param itemB * @return */ public static long distance(CommonSynonymDictionary.SynonymItem itemA, CommonSynonymDictionary.SynonymItem itemB) { return itemA.distan...
} else { synonymItemList.add(item); } } return synonymItemList; } /** * 获取语义标签 * @return */ public static long[] getLexemeArray(List<CommonSynonymDictionary.SynonymItem> synonymItemList) { long[] array = new lon...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dictionary\CoreSynonymDictionaryEx.java
1
请完成以下Java代码
private static void applyCountingSortOn(int[] numbers, int placeValue) { int range = 10; // radix or the base int length = numbers.length; int[] frequency = new int[range]; int[] sortedValues = new int[length]; for (int i = 0; i < length; i++) { int digit = (numbers...
frequency[digit]--; } System.arraycopy(sortedValues, 0, numbers, 0, length); } private static int calculateNumberOfDigitsIn(int number) { return (int) Math.log10(number) + 1; // valid only if number > 0 } private static int findMaximumNumberIn(int[] arr) { return Array...
repos\tutorials-master\algorithms-modules\algorithms-sorting-2\src\main\java\com\baeldung\algorithms\radixsort\RadixSort.java
1
请完成以下Java代码
public void setPlanItemDefinitionMap(Map<String, PlanItemDefinition> planItemDefinitionMap) { this.planItemDefinitionMap = planItemDefinitionMap; } public boolean isPlanModel() { return isPlanModel; } public void setPlanModel(boolean isPlanModel) { this.isPlanModel = isPlanMode...
this.displayOrder = displayOrder; } public String getIncludeInStageOverview() { return includeInStageOverview; } public void setIncludeInStageOverview(String includeInStageOverview) { this.includeInStageOverview = includeInStageOverview; } @Override public List<Criterion> ...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\Stage.java
1
请在Spring Boot框架中完成以下Java代码
public ServiceRepairProjectTask reduce(@NonNull final AddQtyToProjectTaskRequest request) { if (!ProductId.equals(getProductId(), request.getProductId())) { return this; } return toBuilder() .qtyReserved(getQtyReserved().add(request.getQtyReserved())) .qtyConsumed(getQtyConsumed().add(request.getQt...
} } public ServiceRepairProjectTask withRepairOrderId(@NonNull final PPOrderId repairOrderId) { return toBuilder() .repairOrderId(repairOrderId) .build() .withUpdatedStatus(); } public ServiceRepairProjectTask withRepairOrderDone( @Nullable final String repairOrderSummary, @Nullable final Pro...
repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\project\model\ServiceRepairProjectTask.java
2
请完成以下Java代码
public @Nullable ConfigurationProperty get(ConfigurationPropertyName name) { return this.properties.get(name); } /** * Get all bound properties. * @return a map of all bound properties */ public Map<ConfigurationPropertyName, ConfigurationProperty> getAll() { return Collections.unmodifiableMap(this.proper...
return (!context.containsBeanDefinition(BEAN_NAME)) ? null : context.getBean(BEAN_NAME, BoundConfigurationProperties.class); } static void register(BeanDefinitionRegistry registry) { Assert.notNull(registry, "'registry' must not be null"); if (!registry.containsBeanDefinition(BEAN_NAME)) { BeanDefinition ...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\properties\BoundConfigurationProperties.java
1
请完成以下Java代码
public List<Object[]> searchProductNameByMoreLikeThisQuery(Product entity) { Query moreLikeThisQuery = getQueryBuilder() .moreLikeThis() .comparingField("productName") .toEntity(entity) .createQuery(); List<Object[]> results = getJpaQuery(moreLikeThisQue...
.should(getQueryBuilder() .phrase() .onField("description") .sentence(extraFeature) .createQuery()) .must(getQueryBuilder() .keyword() .onField("productName") .matching(exclude) .c...
repos\tutorials-master\persistence-modules\spring-hibernate-5\src\main\java\com\baeldung\hibernatesearch\ProductSearchDao.java
1
请完成以下Java代码
public class DmnDecisionTableTransformHandler implements DmnElementTransformHandler<DecisionTable, DmnDecisionTableImpl> { protected static final DmnTransformLogger LOG = DmnLogger.TRANSFORM_LOGGER; public DmnDecisionTableImpl handleElement(DmnElementTransformContext context, DecisionTable decisionTable) { re...
if (hitPolicy == null) { // use default hit policy hitPolicy = HitPolicy.UNIQUE; } BuiltinAggregator aggregation = decisionTable.getAggregation(); DmnHitPolicyHandler hitPolicyHandler = context.getHitPolicyHandlerRegistry().getHandler(hitPolicy, aggregation); if (hitPolicyHandler != null) { ...
repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\transform\DmnDecisionTableTransformHandler.java
1
请完成以下Java代码
public class CacheControlServerHttpHeadersWriter implements ServerHttpHeadersWriter { /** * The value for expires value */ public static final String EXPIRES_VALUE = "0"; /** * The value for pragma value */ public static final String PRAGMA_VALUE = "no-cache"; /** * The value for cache control value ...
public static final String CACHE_CONTRTOL_VALUE = CACHE_CONTROL_VALUE; /** * The delegate to write all the cache control related headers */ private static final ServerHttpHeadersWriter CACHE_HEADERS = StaticServerHttpHeadersWriter.builder() .header(HttpHeaders.CACHE_CONTROL, CacheControlServerHttpHeadersWriter...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\header\CacheControlServerHttpHeadersWriter.java
1
请完成以下Java代码
public class JsonMinifier { public String removeExtraWhitespace(String json) { StringBuilder result = new StringBuilder(json.length()); boolean inQuotes = false; boolean escapeMode = false; for (char character : json.toCharArray()) { if (escapeMode) { res...
ObjectMapper objectMapper = new ObjectMapper(); JsonNode jsonNode = objectMapper.readTree(json); return objectMapper.writeValueAsString(jsonNode); } public String removeWhitespacesUsingGson(String json) { Gson gson = new GsonBuilder().registerTypeAdapter(String.class, new StringSerializ...
repos\tutorials-master\json-modules\json-2\src\main\java\com\baeldung\jsonminifier\JsonMinifier.java
1
请完成以下Java代码
public ParameterValueProvider getVersionValueProvider() { return versionValueProvider; } public void setVersionValueProvider(ParameterValueProvider version) { this.versionValueProvider = version; } public String getVersionTag(VariableScope variableScope) { Object result = versionTagValueProvider.g...
} else { return defaultTenantId; } } public ParameterValueProvider getTenantIdProvider() { return tenantIdProvider; } /** * @return true if any of the references that specify the callable element are non-literal and need to be resolved with * potential side effects to determine the process...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\core\model\BaseCallableElement.java
1
请完成以下Java代码
public String[] likeCriteria() { final Session session = HibernateUtil.getHibernateSession(); final SessionFactory sessionFactory = HibernateUtil.getHibernateSessionFactory(); CriteriaDefinition<Item> query = new CriteriaDefinition<>(sessionFactory, Item.class) { { J...
for (int i = 0; i < items.size(); i++) { likeItems[i] = items.get(i).getItemName(); } session.close(); return likeItems; } public String[] betweenCriteria() { final Session session = HibernateUtil.getHibernateSession(); final SessionFactory sessionFactory = H...
repos\tutorials-master\persistence-modules\hibernate-queries\src\main\java\com\baeldung\hibernate\criteria\view\CriteriaDefinitionApplicationView.java
1
请在Spring Boot框架中完成以下Java代码
public BatchQuery orderByBatchCreateTime() { return orderBy(BatchQueryProperty.CREATETIME); } @Override public BatchQuery orderByBatchId() { return orderBy(BatchQueryProperty.BATCH_ID); } @Override public BatchQuery orderByBatchTenantId() { return orderBy(BatchQueryProp...
} public String getSearchKey2() { return searchKey2; } public Date getCreateTimeHigherThan() { return createTimeHigherThan; } public Date getCreateTimeLowerThan() { return createTimeLowerThan; } public String getStatus() { return status; } public ...
repos\flowable-engine-main\modules\flowable-batch-service\src\main\java\org\flowable\batch\service\impl\BatchQueryImpl.java
2
请完成以下Java代码
public void updateBPSupplierApproval(@NonNull final BPSupplierApprovalId bpSupplierApprovalId, @Nullable final String supplierApproval, @Nullable final Instant supplierApprovalDateParameter) { final I_C_BP_SupplierApproval bpSupplierApprovalRecord = getById(bpSupplierApprovalId); bpSupplierApprovalRecord.se...
.addCompareFilter(I_C_BP_SupplierApproval.COLUMNNAME_SupplierApproval_Date, CompareQueryFilter.Operator.LESS_OR_EQUAL, maxExpirationDate.minusYears(1)); final IQueryFilter<I_C_BP_SupplierApproval> supplierApprovalOptionFilter = queryBL.createCompositeQueryFilter(I_C_BP_SupplierApproval.cl...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\BPartnerSupplierApprovalRepository.java
1
请完成以下Java代码
static ConfigurationPropertyCaching get(Environment environment, @Nullable Object underlyingSource) { Iterable<ConfigurationPropertySource> sources = ConfigurationPropertySources.get(environment); return get(sources, underlyingSource); } /** * Get for all specified configuration property sources. * @param so...
return new ConfigurationPropertySourcesCaching(sources); } for (ConfigurationPropertySource source : sources) { if (source.getUnderlyingSource() == underlyingSource) { ConfigurationPropertyCaching caching = CachingConfigurationPropertySource.find(source); if (caching != null) { return caching; }...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\properties\source\ConfigurationPropertyCaching.java
1
请完成以下Java代码
public class EncryptableMutablePropertySourcesInterceptor implements MethodInterceptor { private final EncryptablePropertySourceConverter propertyConverter; private final EnvCopy envCopy; /** * <p>Constructor for EncryptableMutablePropertySourcesInterceptor.</p> * * @param propertyConverter...
case "addBefore": envCopy.addBefore((String) arguments[0], (PropertySource<?>) arguments[1]); return invocation.getMethod().invoke(invocation.getThis(), arguments[0], makeEncryptable(arguments[1])); case "addAfter": envCopy.addAfter((String) arguments[0], (Pro...
repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\aop\EncryptableMutablePropertySourcesInterceptor.java
1
请完成以下Java代码
public class NumberAsSumOfTwoSquares { private static final Logger LOGGER = LoggerFactory.getLogger(NumberAsSumOfTwoSquares.class); /** * Checks if a non-negative integer n can be written as the * sum of two squares i.e. (a^2 + b^2) * This implementation is based on Fermat's theorem on sums of ...
for (int i = 3; i * i <= n; i += 2) { // 2a. Find the exponent of the factor i int count = 0; while (n % i == 0) { count++; n /= i; } // 2b. Check the condition from Fermat's theorem // If i is of form 4k+3 (i % 4 =...
repos\tutorials-master\algorithms-modules\algorithms-numeric\src\main\java\com\baeldung\algorithms\sumoftwosquares\NumberAsSumOfTwoSquares.java
1
请完成以下Java代码
public ClassLoader getClassLoader() { return classLoader; } public void setClassLoader(ClassLoader classLoader) { this.classLoader = classLoader; } public boolean isUseClassForNameClassLoading() { return useClassForNameClassLoading; } public void setUseClassForNameClas...
} public Throwable getException() { return exception; } public boolean isReused() { return reused; } public void setReused(boolean reused) { this.reused = reused; } public Object getResult() { return resultStack.pollLast(); } public void setRe...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\interceptor\CommandContext.java
1
请完成以下Java代码
public class StudentJson { private int id; private String firstName; private String lastName; private String email; private List<PhoneNumJson> phoneNumList; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getFirstName...
} public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public List<PhoneNumJson> getPhoneNumList() { return phoneNumList; } public void setPhoneNumList(List<PhoneNumJson> phoneNumList) { this.phoneNumList = ...
repos\springboot-demo-master\protobuf\src\main\java\com\et\protobuf\StudentJson.java
1
请完成以下Java代码
public int getAsyncExecutorAsyncJobLockTimeInMillis() { return asyncExecutorAsyncJobLockTimeInMillis; } public ProcessEngineConfigurationImpl setAsyncExecutorAsyncJobLockTimeInMillis( int asyncExecutorAsyncJobLockTimeInMillis ) { this.asyncExecutorAsyncJobLockTimeInMillis = asyncExe...
this.asyncExecutorResetExpiredJobsPageSize = asyncExecutorResetExpiredJobsPageSize; return this; } public boolean isAsyncExecutorIsMessageQueueMode() { return asyncExecutorMessageQueueMode; } public ProcessEngineConfigurationImpl setAsyncExecutorMessageQueueMode(boolean asyncExecutorMe...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cfg\ProcessEngineConfigurationImpl.java
1
请完成以下Java代码
public void setMake(String make) { this.make = make; } public String getModel() { return model; } public void setModel(String model) { this.model = model; } } public static class Car extends Vehicle { private int seatingCapac...
public static class Truck extends Vehicle { private double payloadCapacity; public Truck() { } public Truck(String make, String model, double payloadCapacity) { super(make, model); this.payloadCapacity = payloadCapacity; } public double getPaylo...
repos\tutorials-master\jackson-modules\jackson-core\src\main\java\com\baeldung\jackson\inheritance\TypeInfoAnnotatedStructure.java
1
请在Spring Boot框架中完成以下Java代码
public class GrpcHealthServiceAutoConfiguration { /** * Creates a new HealthStatusManager instance. * * @return The newly created bean. */ @Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix = "grpc.server", name = "health-service.type", havingValue = "GRPC", m...
@Bean @GrpcService @ConditionalOnProperty(prefix = "grpc.server", name = "health-service.type", havingValue = "GRPC", matchIfMissing = true) BindableService grpcHealthService(final HealthStatusManager healthStatusManager) { return healthStatusManager.getHealthService(); } @Bean ...
repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\autoconfigure\GrpcHealthServiceAutoConfiguration.java
2
请完成以下Java代码
public class GetStartFormCmd implements Command<StartFormData>, Serializable { private static final long serialVersionUID = 1L; protected String processDefinitionId; public GetStartFormCmd(String processDefinitionId) { this.processDefinitionId = processDefinitionId; } @Override public...
if (Flowable5Util.isFlowable5ProcessDefinition(processDefinition, commandContext)) { return Flowable5Util.getFlowable5CompatibilityHandler().getStartFormData(processDefinitionId); } FormHandlerHelper formHandlerHelper = CommandContextUtil.getProcessEngineConfiguration(commandContext).getFor...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cmd\GetStartFormCmd.java
1
请在Spring Boot框架中完成以下Java代码
public class RedisConfig { @Bean JedisConnectionFactory jedisConnectionFactory() { return new JedisConnectionFactory(); } @Bean public RedisTemplate<String, Object> redisTemplate() { final RedisTemplate<String, Object> template = new RedisTemplate<>(); template.setConnectio...
final RedisMessageListenerContainer container = new RedisMessageListenerContainer(); container.setConnectionFactory(jedisConnectionFactory()); container.addMessageListener(messageListener(), topic()); return container; } @Bean MessagePublisher redisPublisher() { return new R...
repos\tutorials-master\persistence-modules\spring-data-redis\src\main\java\com\baeldung\spring\data\redis\config\RedisConfig.java
2
请完成以下Java代码
public Builder setReservedForOrderLine(@Nullable final OrderLineId orderLineId) { orderLineReservation = orderLineId; huReserved = orderLineId != null; return this; } public Builder setClearanceStatus(@Nullable final JSONLookupValue clearanceStatusLookupValue) { clearanceStatus = clearanceStatusLoo...
includedOrderLineReservationsBuilder.put(orderLineReservation, currentRow); } return includedOrderLineReservationsBuilder.build(); } } @lombok.Builder @lombok.Value public static class HUEditorRowHierarchy { @NonNull HUEditorRow cuRow; @Nullable HUEditorRow parentRow; @Nullable HUEditorRow topLe...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorRow.java
1
请在Spring Boot框架中完成以下Java代码
public void setHttpMethodEnum(HttpMethodEnum httpMethodEnum) { this.httpMethodEnum = httpMethodEnum; } public boolean isLogin() { return isLogin; } public void setLogin(boolean login) { isLogin = login; } public String getPermission() { return permission; }
public void setPermission(String permission) { this.permission = permission; } @Override public String toString() { return "AccessAuthEntity{" + "url='" + url + '\'' + ", methodName='" + methodName + '\'' + ", httpMethodEnum=" + httpMethodEnum...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\entity\user\AccessAuthEntity.java
2
请完成以下Java代码
public synchronized void unloadById(final InboundEMailConfigId configId) { final InboundEMailConfig loadedConfig = loadedConfigs.remove(configId); if (loadedConfig == null) { logger.info("Skip unloading inbound mail for {} because it's not loaded", configId); return; } try { flowContext.remove(to...
{ return IntegrationFlows .from(Mail.imapIdleAdapter(config.getUrl()) .javaMailProperties(p -> p.put("mail.debug", Boolean.toString(config.isDebugProtocol()))) .userFlag(IMAP_USER_FLAG) .shouldMarkMessagesAsRead(false) .shouldDeleteMessages(false) .shouldReconnectAutomatically(true) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.inbound.mail\src\main\java\de\metas\inbound\mail\InboundEMailServer.java
1
请完成以下Java代码
public Map<String, VariableValueDto> getProcessVariablesLocal() { return processVariablesLocal; } public void setProcessVariablesLocal(Map<String, VariableValueDto> processVariablesLocal) { this.processVariablesLocal = processVariablesLocal; } public Map<String, VariableValueDto> getProcessVariablesTo...
public String getProcessInstanceId() { return processInstanceId; } public void setProcessInstanceId(String processInstanceId) { this.processInstanceId = processInstanceId; } public boolean isResultEnabled() { return resultEnabled; } public void setResultEnabled(boolean resultEnabled) { th...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\message\CorrelationMessageDto.java
1
请完成以下Java代码
public OAuth2TokenValidatorResult validate(Jwt jwt) { Assert.notNull(jwt, "jwt cannot be null"); Instant issuedAt = jwt.getIssuedAt(); if (issuedAt == null && this.required) { OAuth2Error error = createOAuth2Error("iat claim is required."); return OAuth2TokenValidatorResult.failure(error); } if (issued...
public void setClockSkew(Duration clockSkew) { Assert.notNull(clockSkew, "clockSkew cannot be null"); Assert.isTrue(clockSkew.getSeconds() >= 0, "clockSkew must be >= 0"); this.clockSkew = clockSkew; } /** * Sets the {@link Clock} used in {@link Instant#now(Clock)}. * @param clock the clock */ public vo...
repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\JwtIssuedAtValidator.java
1
请完成以下Java代码
public Enumeration<String> getHeaderNames() { Set<String> names = headers.headerNames(); if (names.isEmpty()) { return super.getHeaderNames(); } Set<String> result = new LinkedHashSet<>(names); result.addAll(Collections.list(super.getHeaderNames())); return new Vector<String>(result).elements(); ...
public void write(int b) throws IOException { builder.append(Character.valueOf((char) b)); } @Override public void setWriteListener(WriteListener listener) { } @Override public boolean isReady() { return true; } }; } public ServletInputStream getInputStream() { ByteArrayInputStream...
repos\spring-cloud-gateway-main\spring-cloud-gateway-proxyexchange-webmvc\src\main\java\org\springframework\cloud\gateway\mvc\ProxyExchange.java
1
请完成以下Java代码
public class OAuth2RefreshTokenGrantRequest extends AbstractOAuth2AuthorizationGrantRequest { private final OAuth2AccessToken accessToken; private final OAuth2RefreshToken refreshToken; private final Set<String> scopes; /** * Constructs an {@code OAuth2RefreshTokenGrantRequest} using the provided parameters. ...
/** * Returns the {@link OAuth2RefreshToken refresh token} credential granted. * @return the {@link OAuth2RefreshToken} */ public OAuth2RefreshToken getRefreshToken() { return this.refreshToken; } /** * Returns the scope(s) to request. * @return the scope(s) to request */ public Set<String> getScopes...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\endpoint\OAuth2RefreshTokenGrantRequest.java
1
请在Spring Boot框架中完成以下Java代码
public MessageChannel holdingTank() { return MessageChannels.queue().get(); } // @Bean public IntegrationFlow fileReader() { return IntegrationFlow.from(sourceDirectory(), configurer -> configurer.poller(Pollers.fixedDelay(10))) .filter(onlyJpgs()) .channel("hold...
.get(); } public static void main(final String... args) { final AbstractApplicationContext context = new AnnotationConfigApplicationContext(JavaDSLFileCopyConfig.class); context.registerShutdownHook(); final Scanner scanner = new Scanner(System.in); System.out.print("Please ente...
repos\tutorials-master\spring-integration\src\main\java\com\baeldung\dsl\JavaDSLFileCopyConfig.java
2
请完成以下Java代码
public String getTitle() { return this.title; } public void setTitle(String title) { this.title = title; } public String getDescription() { return this.description; } public void setDescription(String description) { this.description = description; } public String getId() { return this.id; } pub...
/** * Merge the content of this instance with the specified content. * @param otherContent the content to merge * @see #merge(io.spring.initializr.metadata.ServiceCapability) */ public abstract void merge(T otherContent); /** * Merge this capability with the specified argument. The service capabilities sho...
repos\initializr-main\initializr-metadata\src\main\java\io\spring\initializr\metadata\ServiceCapability.java
1
请完成以下Java代码
public JobQuery orderByJobDuedate() { return orderBy(JobQueryProperty.DUEDATE); } public JobQuery orderByExecutionId() { return orderBy(JobQueryProperty.EXECUTION_ID); } public JobQuery orderByJobId() { return orderBy(JobQueryProperty.JOB_ID); } public JobQuery orderBy...
} public boolean isOnlyTimers() { return onlyTimers; } public boolean isOnlyMessages() { return onlyMessages; } public Date getDuedateHigherThan() { return duedateHigherThan; } public Date getDuedateLowerThan() { return duedateLowerThan; } public ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\JobQueryImpl.java
1
请完成以下Java代码
public final int executeUpdate(final String sql, final String[] columnNames) throws SQLException { final String sqlConverted = convertSqlAndSet(sql); return getStatementImpl().executeUpdate(sqlConverted, columnNames); } @Override public final boolean execute(final String sql, final int autoGeneratedKeys) throw...
} @Override public final void commit() throws SQLException { if (this.ownedConnection != null && !this.ownedConnection.getAutoCommit()) { this.ownedConnection.commit(); } } @Nullable private static Trx getTrx(@NonNull final CStatementVO vo) { final ITrxManager trxManager = Services.get(ITrxManager.c...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\sql\impl\AbstractCStatementProxy.java
1
请完成以下Java代码
public void setMessageSource(MessageSource messageSource) { this.messages = new MessageSourceAccessor(messageSource); } public void setUserCache(UserCache userCache) { this.userCache = userCache; } @Override public boolean supports(Class<?> authentication) { return (UsernamePasswordAuthenticationToken.clas...
AbstractUserDetailsAuthenticationProvider.this.logger .debug("Failed to authenticate since user account is disabled"); throw new DisabledException(AbstractUserDetailsAuthenticationProvider.this.messages .getMessage("AbstractUserDetailsAuthenticationProvider.disabled", "User is disabled")); } if (!us...
repos\spring-security-main\core\src\main\java\org\springframework\security\authentication\dao\AbstractUserDetailsAuthenticationProvider.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonPaymentAllocationLine { @NonNull @ApiModelProperty(required = true, dataType = "java.lang.String", value = "Identifier of the Invoice in question. Can be\n" + "* a plain `<C_Invoice.C_Invoice_ID>`\n" + "* or something like `doc-<C_Invoice.documentNo>`" + "* or something like `ext...
BigDecimal amount; @ApiModelProperty(position = 40) @Nullable BigDecimal discountAmt; @ApiModelProperty(position = 50) @Nullable BigDecimal writeOffAmt; @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class JsonPaymentAllocationLineBuilder { } }
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-rest_api\src\main\java\de\metas\common\rest_api\v2\invoice\JsonPaymentAllocationLine.java
2
请完成以下Java代码
public boolean has_Variable(final String variableName) { return POJOWrapper.this.hasColumnName(variableName); } @Override public String get_ValueOldAsString(final String variableName) { throw new UnsupportedOperationException("not implemented"); } }; } public IModelInternalAccessor getMo...
} POJOModelInternalAccessor _modelInternalAccessor = null; public static IModelInternalAccessor getModelInternalAccessor(final Object model) { final POJOWrapper wrapper = getWrapper(model); if (wrapper == null) { return null; } return wrapper.getModelInternalAccessor(); } public boolean isProcessed...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\wrapper\POJOWrapper.java
1
请在Spring Boot框架中完成以下Java代码
public static class Proxy { /** * The host of the proxy to use to connect to the remote application. */ private @Nullable String host; /** * The port of the proxy to use to connect to the remote application. */ private @Nullable Integer port; public @Nullable String getHost() { return this.h...
public void setHost(@Nullable String host) { this.host = host; } public @Nullable Integer getPort() { return this.port; } public void setPort(@Nullable Integer port) { this.port = port; } } }
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\autoconfigure\RemoteDevToolsProperties.java
2
请完成以下Java代码
protected void transfer(OrderProcessContext orderProcessContext) { // 获取订单ID 和 购买者ID String orderId = orderProcessContext.getOrderProcessReq().getOrderId(); String buyerId = orderProcessContext.getOrderProcessReq().getUserId(); // 构造查询请求 OrderQueryReq orderQueryReq = buildOrderQ...
* @return prodIdCountMap */ private Map<String, Integer> buildProdIdCountMap(OrdersEntity ordersEntity) { // 初始化结果集 Map<String, Integer> prodIdCountMap = Maps.newHashMap(); // 获取产品列表 List<ProductOrderEntity> productOrderList = ordersEntity.getProductOrderList(); // 构造结...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Order\src\main\java\com\gaoxi\order\component\datatransfer\ProdIdCountMapTransferComponent.java
1
请在Spring Boot框架中完成以下Java代码
public BeetlGroupUtilConfiguration getBeetlGroupUtilConfiguration() { BeetlGroupUtilConfiguration beetlGroupUtilConfiguration = new BeetlGroupUtilConfiguration(); ResourcePatternResolver patternResolver = ResourcePatternUtils.getResourcePatternResolver(new DefaultResourceLoader()); try { // WebAppResourceLoade...
factory.setNc(new UnderlinedNameConversion());//开启驼峰 factory.setSqlLoader(new ClasspathLoader("/sql"));//sql文件路径 return factory; } //配置数据库 @Bean(name = "datasource") public DataSource getDataSource() { return DataSourceBuilder.create().url("jdbc:mysql://127.0.0.1:3306/test").username("root").password("12345...
repos\SpringBootLearning-master\springboot-beatlsql\src\main\java\com\forezp\SpringbootBeatlsqlApplication.java
2
请完成以下Java代码
public void setR_RequestProcessor_Route_ID (int R_RequestProcessor_Route_ID) { if (R_RequestProcessor_Route_ID < 1) set_ValueNoCheck (COLUMNNAME_R_RequestProcessor_Route_ID, null); else set_ValueNoCheck (COLUMNNAME_R_RequestProcessor_Route_ID, Integer.valueOf(R_RequestProcessor_Route_ID)); } /** Get Req...
} /** Set Sequence. @param SeqNo Method of ordering records; lowest number comes first */ public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Sequence. @return Method of ordering records; lowest number comes first */ public int getSeqNo () { Inte...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_RequestProcessor_Route.java
1
请完成以下Java代码
public static void main(String[] args) { try { generateTxtFromPDF(PDF); generatePDFFromTxt(TXT); } catch (IOException | DocumentException e) { e.printStackTrace(); } } private static void generateTxtFromPDF(String filename) throws IOException { File f = new File(filename); String parsedText; PDF...
myfont.setStyle(Font.NORMAL); myfont.setSize(11); pdfDoc.add(new Paragraph("\n")); BufferedReader br = new BufferedReader(new FileReader(filename)); String strLine; while ((strLine = br.readLine()) != null) { Paragraph para = new Paragraph(strLine + "\n", myfont); para.setAlignment(Element.ALIGN_JUST...
repos\tutorials-master\text-processing-libraries-modules\pdf\src\main\java\com\baeldung\pdf\PDF2TextExample.java
1
请完成以下Java代码
private ImmutableList<JsonRawMaterialsIssueLine> getLines(final ManufacturingJob job, final @NonNull WFActivityId wfActivityId, final @NonNull JsonOpts jsonOpts) { return job.getActivityById(wfActivityId) .getRawMaterialsIssueAssumingNotNull() .getLines().stream() .map(line -> toJson(line, jsonOpts)) ...
return productAllergensService.getAllergensByProductId(productId) .stream() .map(allergen -> JsonAllergen.of(allergen, adLanguage)) .collect(ImmutableList.toImmutableList()); } private JsonRejectReasonsList getJsonRejectReasonsList(final @NonNull JsonOpts jsonOpts) { return JsonRejectReasonsList.of(ad...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\workflows_api\activity_handlers\issue\RawMaterialsIssueActivityHandler.java
1
请完成以下Java代码
public class IntermediateCatchTimerEventActivityBehavior extends IntermediateCatchEventActivityBehavior { private static final long serialVersionUID = 1L; protected TimerEventDefinition timerEventDefinition; public IntermediateCatchTimerEventActivityBehavior(TimerEventDefinition timerEventDefinition) { ...
} @Override public void eventCancelledByEventGateway(DelegateExecution execution) { JobService jobService = CommandContextUtil.getJobService(); List<JobEntity> jobEntities = jobService.findJobsByExecutionId(execution.getId()); for (JobEntity jobEntity : jobEntities) { // Should be only...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\behavior\IntermediateCatchTimerEventActivityBehavior.java
1
请完成以下Java代码
public static boolean isNumeric(String str) { if (StringUtils.isBlank(str)) { return false; } else { return str.matches("\\d*"); } } /** * 计算采用utf-8编码方式时字符串所占字节数 * * @param content * @return */ public static int getByteSize(String co...
list = Arrays.asList(param.split(",")); } else { list.add(param); } return list; } /** * 判断对象是否为空 * * @param obj * @return */ public static boolean isNotNull(Object obj) { if (obj != null && obj.toString() != null && !"".equals(obj.toStri...
repos\roncoo-pay-master\roncoo-pay-common-core\src\main\java\com\roncoo\pay\common\core\utils\StringUtil.java
1
请完成以下Java代码
public class URLDemo { private final Logger log = LoggerFactory.getLogger(URLDemo.class); String URLSTRING = "https://wordpress.org:443/support/topic/page-jumps-within-wordpress/?replies=3#post-2278484"; // parsed locator String URLPROTOCOL = "https"; // final static String URLAUTHORITY = "wordpres...
} // we can check response code (200 OK is expected) log.info(connection.getResponseCode() + " " + connection.getResponseMessage()); in = new BufferedReader(new InputStreamReader(connection.getInputStream())); String current; while ((current = in.readLine()) != null) { ...
repos\tutorials-master\core-java-modules\core-java-networking-5\src\main\java\com\baeldung\networking\uriurl\URLDemo.java
1
请完成以下Java代码
public List<I_C_DunningLevel> getC_DunningLevels() { return C_DunningLevels; } public void setC_DunningLevels(List<I_C_DunningLevel> c_DunningLevels) { C_DunningLevels = c_DunningLevels; } @Override public boolean isActive() { return active; } public void setActive(boolean active) { this.active = ...
public void setProcessed(Boolean processed) { this.processed = processed; } @Override public Boolean getWriteOff() { return writeOff; } public void setWriteOff(Boolean writeOff) { this.writeOff = writeOff; } @Override public String getAdditionalWhere() { return additionalWhere; } public void s...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\api\impl\DunningCandidateQuery.java
1
请完成以下Java代码
public class CompositeConnectionListener implements ConnectionListener { private List<ConnectionListener> delegates = new CopyOnWriteArrayList<>(); @Override public void onCreate(@Nullable Connection connection) { this.delegates.forEach(delegate -> delegate.onCreate(connection)); } @Override public void onCl...
this.delegates.forEach(delegate -> delegate.onFailed(exception)); } public void setDelegates(List<? extends ConnectionListener> delegates) { this.delegates = new ArrayList<>(delegates); } public void addDelegate(ConnectionListener delegate) { this.delegates.add(delegate); } public boolean removeDelegate(Co...
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\connection\CompositeConnectionListener.java
1
请完成以下Java代码
public class ArmoredCar extends Car implements Floatable, Flyable{ private int bulletProofWindows; private String model; public void remoteStartCar() { // this vehicle can be started by using a remote control } public String registerModel() { return model; } pu...
@Override public void floatOnWater() { System.out.println("I can float!"); } @Override public void fly() { System.out.println("I can fly!"); } public void aMethod() { // System.out.println(duration); // Won't compile System.out.println(Floatable.duration); ...
repos\tutorials-master\core-java-modules\core-java-lang-oop-inheritance-2\src\main\java\com\baeldung\inheritance\ArmoredCar.java
1
请完成以下Java代码
public class MSchedulerRecipient extends X_AD_SchedulerRecipient { /** * */ private static final long serialVersionUID = -6521993049769786393L; /** * Standard Constructor * @param ctx context * @param AD_SchedulerRecipient_ID id * @param trxName transaction */ public MSchedulerRecipient (Propertie...
super (ctx, AD_SchedulerRecipient_ID, trxName); } // MSchedulerRecipient /** * Load Constructor * @param ctx context * @param rs result set * @param trxName transaction */ public MSchedulerRecipient (Properties ctx, ResultSet rs, String trxName) { super (ctx, rs, trxName); } // MSchedulerRecipient ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MSchedulerRecipient.java
1