instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public JsonResponseManufacturingOrdersReport report(@NonNull final JsonRequestManufacturingOrdersReport request) { final ManufacturingOrderReportProcessCommand command = ManufacturingOrderReportProcessCommand.builder() .huReservationService(huReservationService) .auditRepository(orderReportAuditRepo) .js...
.ppOrderBOMBL(ppOrderBOMBL) .orgDAO(orgDAO) .productRepository(productRepo) .build(); return JsonConverter.toJson(request); } @NonNull public ImmutableList<JsonResponseManufacturingOrderBOMLine> retrieveBomLines(@NonNull final PPOrderId ppOrderId) { return ppOrderBOMDAO.retrieveOrderBOMLines(ppOrd...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\rest_api\v2\ManufacturingOrderAPIService.java
1
请完成以下Java代码
public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Process Now. @return Process Now */ public boolean isProcessing () { Object oo = get_Value(COLUMNNAME_Processing); if (oo != null) { if (oo instanceof Boolean) return ...
*/ public String getRemote_Host () { return (String)get_Value(COLUMNNAME_Remote_Host); } /** Set Sales Volume in 1.000. @param SalesVolume Total Volume of Sales in Thousands of Currency */ public void setSalesVolume (int SalesVolume) { set_Value (COLUMNNAME_SalesVolume, Integer.valueOf(SalesVolume))...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Registration.java
1
请完成以下Java代码
private final boolean isNonPackingMaterialShipment(final I_M_InOutLine inoutLine) { // make sure the shipment is not null final I_M_InOut shipment = inoutLine.getM_InOut(); if (shipment == null) { return false; } // Make sure we are dealing with a shipment (and not with a receipt) if (!shipment.is...
final IHUPackingAware packingAware = new InOutLineHUPackingAware(inOutLine); Services.get(IHUPackingAwareBL.class).setQtyTU(packingAware); packingAware.setQty(packingAware.getQty()); } /** * Task #1306: If QtyEnteredTU or M_HU_PI_Item_Product_ID change, then update QtyEntered (i.e. the CU qty). * Applied onl...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inout\callout\M_InOutLine.java
1
请完成以下Java代码
public <K, V> ImmutableMap<K, V> merge(@NonNull final ImmutableMap<K, V> map, K key, V value, BinaryOperator<V> remappingFunction) { if (map.isEmpty()) { return ImmutableMap.of(key, value); } final ImmutableMap.Builder<K, V> mapBuilder = ImmutableMap.builder(); boolean added = false; boolean changed = ...
if (!changed) { return map; } return mapBuilder.build(); } public static <T> ImmutableList<T> removeIf(@NonNull ImmutableList<T> list, @NonNull Predicate<T> predicate) { if (list.isEmpty()) {return list;} final ImmutableList<T> result = list.stream() .filter(item -> !predicate.test(item)) .co...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\collections\CollectionUtils.java
1
请完成以下Java代码
public static AppsAction createAppsAction(final APanel parent, final boolean small) { final AProcess app = new AProcess(parent, small); return app.action; } private AProcess(final APanel parent, final boolean small) { super(); this.parent = parent; action = AppsAction.builder() .setAction(model.getA...
} final AbstractButton button = action.getButton(); if (button.isShowing()) { popup.show(button, 0, button.getHeight()); // below button } } private CMenuItem createProcessMenuItem(final SwingRelatedProcessDescriptor process, final String adLanguage) { final CMenuItem mi = new CMenuItem(process.getCap...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\de\metas\process\ui\AProcess.java
1
请完成以下Java代码
private void createMissingProductCategoryAccts(@NonNull final ProductCategoryId productCategoryId) { final I_M_Product_Category pc = productDAO.getProductCategoryById(productCategoryId); InterfaceWrapperHelper.getPO(pc).insert_Accounting( I_M_Product_Category_Acct.Table_Name, I_C_AcctSchema_Default.Table_N...
private static class ProductCategoryAcctKey { @NonNull ProductCategoryId productCategoryId; @NonNull AcctSchemaId acctSchemaId; } @Value @Builder private static class ProductCategoryAcct { @NonNull ProductCategoryId productCategoryId; @NonNull AcctSchemaId acctSchemaId; @Nullable CostingMethod costingM...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\impl\ProductCostingBL.java
1
请完成以下Java代码
public Money getTaxAmt() { updateTaxAmtsIfNeeded(); return _taxAmt; } public Money getReverseChargeAmt() { updateTaxAmtsIfNeeded(); return _reverseChargeAmt; } private void updateTaxAmtsIfNeeded() { if (!isTaxCalculated) { final CalculateTaxResult result = tax.calculateTax(taxBaseA...
this._reverseChargeAmt = Money.of(result.getReverseChargeAmt(), taxBaseAmt.getCurrencyId()); this.isTaxCalculated = true; } } public void updateDocTax(@NonNull final DocTax docTax) { if (!TaxId.equals(tax.getTaxId(), docTax.getTaxId())) { throw new AdempiereException("TaxId not matching: " + thi...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\DocTaxUpdater.java
1
请在Spring Boot框架中完成以下Java代码
public void insert(SuspendedJobEntity jobEntity) { insert(jobEntity, true); } @Override public void delete(SuspendedJobEntity jobEntity) { delete(jobEntity, false); deleteByteArrayRef(jobEntity.getExceptionByteArrayRef()); deleteByteArrayRef(jobEntity.getCustomValuesByteArr...
protected SuspendedJobEntity createSuspendedJob(AbstractRuntimeJobEntity job) { SuspendedJobEntity newSuspendedJobEntity = create(); newSuspendedJobEntity.setJobHandlerConfiguration(job.getJobHandlerConfiguration()); newSuspendedJobEntity.setCustomValues(job.getCustomValues()); newSuspen...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\persistence\entity\SuspendedJobEntityManagerImpl.java
2
请完成以下Java代码
public class ImpDataCell { public static ImpDataCell value(final Object value) { final ErrorMessage errorMessage = null; return new ImpDataCell(value, errorMessage); } public static ImpDataCell error(final ErrorMessage errorMessage) { final Object value = null; return new ImpDataCell(value, errorMessage);...
public boolean isCellError() { return errorMessage != null; } /** @return cell error message or null */ public ErrorMessage getCellErrorMessage() { return errorMessage; } public final Object getJdbcValue() { return value; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\parser\ImpDataCell.java
1
请完成以下Java代码
public void setAuthenticated(boolean authenticated) { Assert.isTrue(!authenticated, "Cannot set this token to trusted"); super.setAuthenticated(authenticated); } @Override public @Nullable Object getCredentials() { return null; } @Override public PublicKeyCredentialUserEntity getPrincipal() { return thi...
/** * Use this principal. It must be of type {@link PublicKeyCredentialUserEntity} * @param principal the principal to use * @return the {@link Builder} for further configurations */ @Override public B principal(@Nullable Object principal) { Assert.isInstanceOf(PublicKeyCredentialUserEntity.class, pr...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\authentication\WebAuthnAuthentication.java
1
请在Spring Boot框架中完成以下Java代码
public BigDecimal getTimePeriod() { return timePeriod; } public void setTimePeriod(BigDecimal timePeriod) { this.timePeriod = timePeriod; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { re...
StringBuilder sb = new StringBuilder(); sb.append("class InsuranceContractMaxPermanentPrescriptionPeriod {\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); sb.append(" timePeriod: ").append(toIndentedString(timePeriod)).append("\n"); sb.append("}"); return sb.toS...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\model\InsuranceContractMaxPermanentPrescriptionPeriod.java
2
请完成以下Java代码
protected ImportRecordResult importRecord(@NonNull final IMutable<Object> state, @NonNull final I_I_ElementValue importRecord, final boolean isInsertOnly) { final ChartOfAccountsId chartOfAccountsId = chartOfAccountsImportHelper.importChartOfAccounts(importRecord); final ElementValueId e...
return parentId; } final ChartOfAccountsId chartOfAccountsId = ChartOfAccountsId.ofRepoId(importRecord.getC_Element_ID()); final String parentAccountNo = StringUtils.trimBlankToNull(importRecord.getParentValue()); if (parentAccountNo != null) { return elementValueService.getByAccountNo(parentAccountNo, ch...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\impexp\AccountImportProcess.java
1
请完成以下Java代码
default List<String> getTokenIntrospectionEndpointAuthenticationMethods() { return getClaimAsStringList( OAuth2AuthorizationServerMetadataClaimNames.INTROSPECTION_ENDPOINT_AUTH_METHODS_SUPPORTED); } /** * Returns the {@code URL} of the OAuth 2.0 Dynamic Client Registration Endpoint * {@code (registration_e...
* Returns {@code true} to indicate support for mutual-TLS client certificate-bound * access tokens {@code (tls_client_certificate_bound_access_tokens)}. * @return {@code true} to indicate support for mutual-TLS client certificate-bound * access tokens, {@code false} otherwise */ default boolean isTlsClientCert...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\OAuth2AuthorizationServerMetadataClaimAccessor.java
1
请完成以下Spring Boot application配置
security: oauth2: client: client-id: app-a client-secret: app-a-1234 user-authorization-uri: http://127.0.0.1:8080/server/oauth/authorize access-token-uri: http://127.0.0.1:8080/server/oauth/token resource: jwt:
key-uri: http://127.0.0.1:8080/server/oauth/token_key server: port: 9090 servlet: context-path: /app1
repos\SpringAll-master\66.Spring-Security-OAuth2-SSO\sso-application-one\src\main\resources\application.yml
2
请在Spring Boot框架中完成以下Java代码
BatchLoaderRegistry batchLoaderRegistry() { return new DefaultBatchLoaderRegistry(); } @Bean @ConditionalOnMissingBean ExecutionGraphQlService executionGraphQlService(GraphQlSource graphQlSource, BatchLoaderRegistry batchLoaderRegistry) { DefaultExecutionGraphQlService service = new DefaultExecutionGraphQlS...
@Bean @SuppressWarnings("unchecked") GraphQlSourceBuilderCustomizer cursorStrategyCustomizer(CursorStrategy<?> cursorStrategy) { if (cursorStrategy.supports(ScrollPosition.class)) { CursorStrategy<ScrollPosition> scrollCursorStrategy = (CursorStrategy<ScrollPosition>) cursorStrategy; ConnectionFieldTypeV...
repos\spring-boot-4.0.1\module\spring-boot-graphql\src\main\java\org\springframework\boot\graphql\autoconfigure\GraphQlAutoConfiguration.java
2
请完成以下Java代码
public int getRemindDays () { Integer ii = (Integer)get_Value(COLUMNNAME_RemindDays); if (ii == null) return 0; return ii.intValue(); } /** Set Request Processor. @param R_RequestProcessor_ID Processor for Requests */ public void setR_RequestProcessor_ID (int R_RequestProcessor_ID) { if (R_Re...
public I_AD_User getSupervisor() throws RuntimeException { return (I_AD_User)MTable.get(getCtx(), I_AD_User.Table_Name) .getPO(getSupervisor_ID(), get_TrxName()); } /** Set Supervisor. @param Supervisor_ID Supervisor for this user/organization - used for escalation and approval */ public void setSup...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_RequestProcessor.java
1
请在Spring Boot框架中完成以下Java代码
public HttpTracing httpTracing(Tracing tracing) { return HttpTracing.create(tracing); } /** * Creates server spans for http requests */ @Bean public Filter tracingFilter(HttpTracing httpTracing) { return TracingFilter.create(httpTracing); } // ==================== Spr...
// ==================== Redis 相关 ==================== @Bean public RedisConnectionFactory redisConnectionFactory(Tracer tracer, RedisProperties redisProperties) { // 创建 JedisConnectionFactory 对象 RedisConnectionFactory connectionFactory = new JedisConnectionFactory(); // 创建 TracingConfigu...
repos\SpringBoot-Labs-master\lab-40\lab-40-redis\src\main\java\cn\iocoder\springboot\lab40\zipkindemo\config\ZipkinConfiguration.java
2
请完成以下Java代码
public void staleTabs(@NonNull final Collection<DetailId> tabIds) { tabIds.stream().map(this::getIncludedTabInfo).forEach(JSONIncludedTabInfo::markAllRowsStaled); } public void staleIncludedRows(@NonNull final DetailId tabId, @NonNull final DocumentIdsSelection rowIds) { getIncludedTabInfo(tabId).staleRows(row...
} if (from.stale != null && from.stale) { stale = from.stale; } from.getIncludedTabsInfo().values().forEach(this::addIncludedTabInfo); if (from.activeTabStaled != null && from.activeTabStaled) { activeTabStaled = from.activeTabStaled; } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\events\JSONDocumentChangedWebSocketEvent.java
1
请完成以下Java代码
public ProcessPreconditionsResolution checkPreconditionsApplicable(final @NonNull IProcessPreconditionsContext context) { if (context.isNoSelection()) { return ProcessPreconditionsResolution.rejectBecauseNoSelection(); } else if (context.isMoreThanOneSelected()) { return ProcessPreconditionsResolution....
.appendParametersToMessage() .setParameter("recordId", getRecord_ID())); final List<RevolutPaymentExport> revolutPaymentExportList = paySelectionService.computeRevolutPaymentExportList(paySelection); final List<RevolutPaymentExport> savedRevolutPaymentExportList = revolutExportService.saveAll(revolutPayment...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.revolut\src\main\java\de\metas\payment\revolut\process\C_PaySelection_RevolutPayment_CSVExport.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonResponseCreditLimitType { public static final String METASFRESH_ID = "metasfreshId"; public static final String NAME = "name"; public static final String SEQNO = "seqNo"; public static final String AUTOAPPROVAL = "autoApproval"; @ApiModelProperty( // required = true, // dataType = "java.lan...
@JsonProperty(AUTOAPPROVAL) boolean autoApproval; @JsonCreator @Builder(toBuilder = true) private JsonResponseCreditLimitType( @JsonProperty(METASFRESH_ID) @NonNull final JsonMetasfreshId metasfreshId, @JsonProperty(NAME) @NonNull final String name, @JsonProperty(AUTOAPPROVAL) final boolean autoApproval)...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-bpartner\src\main\java\de\metas\common\bpartner\v2\response\JsonResponseCreditLimitType.java
2
请完成以下Java代码
public void setSubject (java.lang.String Subject) { set_Value (COLUMNNAME_Subject, Subject); } /** Get Betreff. @return Mail Betreff */ @Override public java.lang.String getSubject () { return (java.lang.String)get_Value(COLUMNNAME_Subject); } @Override public org.compiere.model.I_AD_User getTo_Use...
public void setTo_User_ID (int To_User_ID) { if (To_User_ID < 1) set_Value (COLUMNNAME_To_User_ID, null); else set_Value (COLUMNNAME_To_User_ID, Integer.valueOf(To_User_ID)); } /** Get To User. @return To User */ @Override public int getTo_User_ID () { Integer ii = (Integer)get_Value(COLUMNNAM...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Mail.java
1
请完成以下Java代码
public class LuhnChecker { private static final Logger LOGGER = LoggerFactory.getLogger(LuhnChecker.class); /* * Starting from the rightmost digit, we add all the digits together, performing * a special step for every second digit. * * If the result is not divisible by 10, then the ca...
} boolean result = sum % 10 == 0; LOGGER.info("Luhn check result (sum divisible by 10): " + result); return result; } /* * We apply this method to every second number from the right of the card * number. First, we double the digit, then we sum the di...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-7\src\main\java\com\baeldung\algorithms\luhn\LuhnChecker.java
1
请在Spring Boot框架中完成以下Java代码
private static EdgeEvent createFilteredEdgeEvent(EdgeEvent edgeEvent, JsonNode filteredBody) { EdgeEvent filtered = new EdgeEvent(); filtered.setSeqId(edgeEvent.getSeqId()); filtered.setTenantId(edgeEvent.getTenantId()); filtered.setEdgeId(edgeEvent.getEdgeId()); filtered.setActi...
e.getEntityId(), e.getType().name(), (e.getBody() != null ? e.getBody().toString() : "null")))) .collect(Collectors.toList()); } private record EventKey(TenantId tenantId, EdgeEventActionType action, ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\edge\EdgeMsgConstructorUtils.java
2
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setAD_User_ID (final int AD_User_ID) { if (AD_User_ID < 0) set_Value (COLUMNNAME_AD_User_ID, null); else set_Value (COLUMNNAME_AD_User_ID, AD_User_ID); ...
@Override public int getC_Workplace_ID() { return get_ValueAsInt(COLUMNNAME_C_Workplace_ID); } @Override public void setC_Workplace_User_Assign_ID (final int C_Workplace_User_Assign_ID) { if (C_Workplace_User_Assign_ID < 1) set_ValueNoCheck (COLUMNNAME_C_Workplace_User_Assign_ID, null); else set_V...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Workplace_User_Assign.java
1
请完成以下Java代码
public void setTextValue(String textValue) { this.textValue = textValue; } public String getTextValue2() { return textValue2; } public void setTextValue2(String textValue2) { this.textValue2 = textValue2; } public Long getLongValue() { return longValue; } public void setLongValue(Long lo...
public byte[] getByteArrayValue() { return null; } public void setByteArrayValue(byte[] bytes) { } public String getType() { return type; } public boolean getFindNulledEmptyStrings() { return findNulledEmptyStrings; } public void setFindNulledEmptyStrings(boolean findNulledEmptyStrings) ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\SingleQueryVariableValueCondition.java
1
请完成以下Java代码
public static void deleteFile(String groupName, String remoteFileName) throws Exception { StorageClient storageClient = getStorageClient(); int i = storageClient.delete_file(groupName, remoteFileName); logger.info("delete file successfully!!!" + i); } public static StorageServer[] getStoreStorages(String gr...
public static String getTrackerUrl() throws IOException { return "http://"+getTrackerServer().getInetSocketAddress().getHostString()+":"+ClientGlobal.getG_tracker_http_port()+"/"; } private static StorageClient getStorageClient() throws IOException { TrackerServer trackerServer = getTrackerServer(); StorageCli...
repos\spring-boot-leaning-master\2.x_42_courses\第 2-7 课:使用 Spring Boot 上传文件到 FastDFS\spring-boot-fastDFS\src\main\java\com\neo\fastdfs\FastDFSClient.java
1
请在Spring Boot框架中完成以下Java代码
public String getTypeName() { return TYPE_NAME; } @Override public boolean isCachable() { return true; } @Override public boolean isAbleToStore(Object value) { if (value instanceof Collection) { return EMPTY_LIST_CLASS.isInstance(value) || EMPTY_SET_CLASS.is...
if (EMPTY_LIST_CLASS.isInstance(value)) { valueFields.setTextValue("list"); } else { valueFields.setTextValue("set"); } } @Override public Object getValue(ValueFields valueFields) { String value = valueFields.getTextValue(); if (LIST.equals(value)) { ...
repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\types\EmptyCollectionType.java
2
请完成以下Java代码
public int getFrequency(String from, String to) { return getFrequency(convert(from), convert(to)); } /** * 获取转移频次 * * @param from * @param to * @return */ public int getFrequency(E from, E to) { return matrix[from.ordinal()][to.ordinal()]; } /*...
* @return */ public int getTotalFrequency() { return totalFrequency; } protected E convert(String label) { return Enum.valueOf(enumType, label); } @Override public String toString() { final StringBuilder sb = new StringBuilder("TransformMatrixDictionary...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dictionary\TransformMatrixDictionary.java
1
请完成以下Java代码
public File createPDF(final DocumentTableFields docFields) { throw new UnsupportedOperationException(); } @Override public String completeIt(final DocumentTableFields docFields) { final I_M_Forecast forecast = extractForecast(docFields); forecast.setDocAction(IDocument.ACTION_None); return IDocument.STATU...
@Override public void reverseAccrualIt(final DocumentTableFields docFields) { throw new UnsupportedOperationException(); } @Override public void reactivateIt(final DocumentTableFields docFields) { final I_M_Forecast forecast = extractForecast(docFields); forecast.setProcessed(false); forecast.setDocActio...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\mforecast\ForecastDocumentHandler.java
1
请完成以下Java代码
public static boolean setAttribute(String word, String natureWithFrequency) { CoreDictionary.Attribute attribute = CoreDictionary.Attribute.create(natureWithFrequency); return setAttribute(word, attribute); } /** * 将字符串词性转为Enum词性 * @param name 词性名称 * @param customNatureCollec...
if (customNatureCollector != null) customNatureCollector.add(nature); } return nature; } /** * 将字符串词性转为Enum词性 * @param name 词性名称 * @return 转换结果 */ public static Nature convertStringToNature(String name) { return convertStringToNature(name, null); } }
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\utility\LexiconUtility.java
1
请完成以下Java代码
public void setObjectIdentityPrimaryKeyQuery(String selectObjectIdentityPrimaryKey) { this.selectObjectIdentityPrimaryKey = selectObjectIdentityPrimaryKey; } public void setSidPrimaryKeyQuery(String selectSidPrimaryKey) { this.selectSidPrimaryKey = selectSidPrimaryKey; } public void setUpdateObjectIdentity(St...
this.insertClass = DEFAULT_INSERT_INTO_ACL_CLASS_WITH_ID; } else { log.debug("Insert class statement has already been overridden, so not overridding the default"); } } } /** * Sets the {@link SecurityContextHolderStrategy} to use. The default action is to use * the {@link SecurityContextHolderStra...
repos\spring-security-main\acl\src\main\java\org\springframework\security\acls\jdbc\JdbcMutableAclService.java
1
请完成以下Java代码
private BPartner createBiller(@NonNull final I_C_Invoice invoiceRecord) { final IBPartnerOrgBL bpartnerOrgBL = Services.get(IBPartnerOrgBL.class); final I_C_BPartner orgBPartner = bpartnerOrgBL.retrieveLinkedBPartner(invoiceRecord.getAD_Org_ID()); Check.assumeNotNull(orgBPartner, InvoiceToExportFactoryException...
orgBPartner, invoiceRecord, remittoLocation); gln = null; } else { gln = GLN.of(remittoLocation.getGLN()); } final BPartner biller = BPartner.builder() .id(BPartnerId.ofRepoId(orgBPartner.getC_BPartner_ID())) .gln(gln).build(); return biller; } public static final class InvoiceToExportFact...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\export\InvoiceToExportFactory.java
1
请在Spring Boot框架中完成以下Java代码
public class RouteExampleController { private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(RouteExampleController.class); @GetRoute("/route-example") public String get() { return "get.html"; } @PostRoute("/route-example") public String post() { return ...
@Route(value = "/triggerInternalServerError") public void triggerInternalServerError() { int x = 1 / 0; } @Route(value = "/triggerBaeldungException") public void triggerBaeldungException() throws BaeldungException { throw new BaeldungException("Foobar Exception to threat differently"); ...
repos\tutorials-master\web-modules\blade\src\main\java\com\baeldung\blade\sample\RouteExampleController.java
2
请在Spring Boot框架中完成以下Java代码
class VisitController { private final OwnerRepository owners; public VisitController(OwnerRepository owners) { this.owners = owners; } @InitBinder public void setAllowedFields(WebDataBinder dataBinder) { dataBinder.setDisallowedFields("id"); } /** * Called before each and every @RequestMapping annotate...
@GetMapping("/owners/{ownerId}/pets/{petId}/visits/new") public String initNewVisitForm() { return "pets/createOrUpdateVisitForm"; } // Spring MVC calls method loadPetWithVisit(...) before processNewVisitForm is // called @PostMapping("/owners/{ownerId}/pets/{petId}/visits/new") public String processNewVisitFo...
repos\spring-petclinic-main\src\main\java\org\springframework\samples\petclinic\owner\VisitController.java
2
请完成以下Java代码
public String toString() { if (isProcessInstanceExecution()) { return "ProcessInstance["+getToStringIdentity()+"]"; } else { return (isEventScope? "EventScope":"")+(isConcurrent? "Concurrent" : "")+(isScope() ? "Scope" : "")+"Execution["+getToStringIdentity()+"]"; } } protected String getTo...
if (this.activity != null) { currentActivityName = (String) activity.getProperty("name"); } return currentActivityName; } public FlowElement getBpmnModelElementInstance() { throw new UnsupportedOperationException(BpmnModelExecutionContext.class.getName() +" is unsupported in transient ExecutionIm...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\runtime\ExecutionImpl.java
1
请完成以下Java代码
public Quantity setScale(final UOMPrecision newScale, @NonNull final RoundingMode roundingMode) { final BigDecimal newQty = qty.setScale(newScale.toInt(), roundingMode); return new Quantity( newQty, uom, sourceQty != null ? sourceQty.setScale(newScale.toInt(), roundingMode) : newQty, sourceUom != ...
if (count <= 0) { throw new AdempiereException("count shall be greater than zero, but it was " + count); } else if (count == 1) { return ImmutableList.of(this); } else // count > 1 { final ImmutableList.Builder<Quantity> result = ImmutableList.builder(); final Quantity qtyPerPart = divide(coun...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\quantity\Quantity.java
1
请完成以下Java代码
static Letter createLetter(String salutation, String body) { return new Letter(salutation, body); } static BiFunction<String, String, Letter> SIMPLE_LETTER_CREATOR = // (salutation, body) -> new Letter(salutation, body); static Function<String, Function<String, Letter>> SIMPLE_CURRIED_LETT...
} interface AddReturnAddress { Letter.AddClosing withReturnAddress(String returnAddress); } interface AddClosing { Letter.AddDateOfLetter withClosing(String closing); } interface AddDateOfLetter { Letter.AddInsideAddress withDateOfLetter(LocalDate dateOfLetter); } ...
repos\tutorials-master\patterns-modules\design-patterns-functional\src\main\java\com\baeldung\currying\Letter.java
1
请完成以下Java代码
private JsonQuantity toJsonQuantity(@NonNull final Quantity qty) { return JsonQuantity.builder() .qty(qty.toBigDecimal()) .uomCode(qty.getX12DE355().getCode()) .build(); } private static ManufacturingOrderExportAuditItem createExportedAuditItem(@NonNull final I_PP_Order order) { return Manufacturin...
.stream() .map(order -> PPOrderId.ofRepoId(order.getPP_Order_ID())) .collect(ImmutableSet.toImmutableSet()); _bomLinesByOrderId = ppOrderBOMDAO.retrieveOrderBOMLines(orderIds, I_PP_Order_BOMLine.class) .stream() .collect(ImmutableListMultimap.toImmutableListMultimap( bomLine -> PPOrderId.ofRepo...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\rest_api\v1\ManufacturingOrdersExportCommand.java
1
请完成以下Java代码
public ExecutionEntity getExecutionEntity() { return executionEntity; } @Override public VariableMap getVariables() { return variables; } @Override public String getProcessDefinitionId() { return executionEntity.getProcessDefinitionId(); } @Override public String getBusinessKey() { ...
public boolean isEnded() { return executionEntity.isEnded(); } @Override public String getProcessInstanceId() { return executionEntity.getProcessInstanceId(); } @Override public String getTenantId() { return executionEntity.getTenantId(); } @Override public String getProcessDefinitionK...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\ProcessInstanceWithVariablesImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class ColorValue { public static final ColorValue RED = new ColorValue("#FF0000"); public static final ColorValue GREEN = new ColorValue("#00FF00"); public static ColorValue ofRGB(final int red, final int green, final int blue) { return ofHexString(toHexString(red, green, blue)); } @JsonCreator public...
{ try { final int i = Integer.decode(hexString); final int red = i >> 16 & 0xFF; final int green = i >> 8 & 0xFF; final int blue = i & 0xFF; return toHexString(red, green, blue); } catch (final Exception ex) { throw new AdempiereException("Invalid color hex string: " + hexString, ex); } }...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\ColorValue.java
2
请完成以下Java代码
public ResponseEntity<JsonPurchaseCandidateResponse> createCandidates(@RequestBody final JsonPurchaseCandidateCreateRequest request) { return ResponseEntity.ok(trxManager.call(ITrx.TRXNAME_ThreadInherited, () -> createCandidates0(request))); } private JsonPurchaseCandidateResponse createCandidates0(@RequestBody f...
} @ApiOperation("Enqueues purchase candidates for creation of purchase orders") @PostMapping(path = "/enqueueForOrdering", consumes = "application/json", produces = "application/json") public ResponseEntity<String> enqueue(@RequestBody @NonNull final JsonPurchaseCandidatesRequest request) { enqueuePurchaseCandid...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\order\PurchaseCandidateRestController.java
1
请完成以下Java代码
public int getM_MovementLine_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_MovementLine_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Processed. @param Processed The document has been processed */ public void setProcessed (boolean Processed) { set_Value (COLUMNNAME_Pro...
} /** Get Scrapped Quantity. @return The Quantity scrapped due to QA issues */ public BigDecimal getScrappedQty () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ScrappedQty); if (bd == null) return Env.ZERO; return bd; } /** Set Target Quantity. @param TargetQty Target Movement Quantity...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_MovementLineConfirm.java
1
请在Spring Boot框架中完成以下Java代码
protected void configureDecisionRequirementsDefinitionQuery(DecisionRequirementsDefinitionQueryImpl query) { getAuthorizationManager().configureDecisionRequirementsDefinitionQuery(query); getTenantManager().configureQuery(query); } @Override public DecisionRequirementsDefinitionEntity findLatestDefiniti...
@Override public DecisionRequirementsDefinitionEntity findDefinitionByKeyVersionTagAndTenantId(String definitionKey, String definitionVersionTag, String tenantId) { return null; } @Override public DecisionRequirementsDefinitionEntity findDefinitionByDeploymentAndKey(String deploymentId, String definitionKe...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\dmn\entity\repository\DecisionRequirementsDefinitionManager.java
2
请完成以下Java代码
public void setLeichMehl_PluFile_ConfigGroup_ID (final int LeichMehl_PluFile_ConfigGroup_ID) { if (LeichMehl_PluFile_ConfigGroup_ID < 1) set_Value (COLUMNNAME_LeichMehl_PluFile_ConfigGroup_ID, null); else set_Value (COLUMNNAME_LeichMehl_PluFile_ConfigGroup_ID, LeichMehl_PluFile_ConfigGroup_ID); } @Overr...
public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public void setPLU_File (final String PLU_File) { set_Value (COLUMNNAME_PLU_File, PLU_File); } @Override public String getPLU_File() { return get_ValueAsString(COLUMNNAME_PLU_File); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_LeichMehl_ProductMapping.java
1
请在Spring Boot框架中完成以下Java代码
public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { AnnotationAttributes attributes = AnnotationAttributes .fromMap(metadata.getAnnotationAttributes(ConditionalOnJndi.class.getName())); Assert.state(attributes != null, "'attributes' must not be null"); String[] l...
} protected boolean isJndiAvailable() { return JndiLocatorDelegate.isDefaultJndiEnvironmentAvailable(); } protected JndiLocator getJndiLocator(String[] locations) { return new JndiLocator(locations); } protected static class JndiLocator extends JndiLocatorSupport { private final String[] locations; pu...
repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\condition\OnJndiCondition.java
2
请完成以下Java代码
public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getRemote_Addr()); } /** Set Remote Host. @param Remote_Host Remote host Info */ public void setRemote_Host (String Remote_Host) { set_Value (COLUMNNAME_Remote_Host, Remote_Host); } /** Get Remote Host. @return Re...
if (ii == null) return 0; return ii.intValue(); } /** Set Web Counter. @param W_Counter_ID Individual Count hit */ public void setW_Counter_ID (int W_Counter_ID) { if (W_Counter_ID < 1) set_ValueNoCheck (COLUMNNAME_W_Counter_ID, null); else set_ValueNoCheck (COLUMNNAME_W_Counter_ID, Integ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_Counter.java
1
请完成以下Java代码
private void addConnection(Connection connection) { synchronized (this.connections) { this.connections.add(connection); } } private void removeConnection(Connection connection) { synchronized (this.connections) { this.connections.remove(connection); } } /** * Factory method used to create the {@li...
} } } private void handle() throws Exception { try { try (OutputStream outputStream = this.socket.getOutputStream()) { Connection connection = createConnection(this.socket, this.inputStream, outputStream); runConnection(connection); } finally { this.inputStream.close(); } } ...
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\livereload\LiveReloadServer.java
1
请在Spring Boot框架中完成以下Java代码
public long addStock(String key, Long expire, int num) { boolean hasKey = redisTemplate.hasKey(key); // 判断key是否存在,存在就直接更新 if (hasKey) { return redisTemplate.opsForValue().increment(key, num); } Assert.notNull(expire,"初始化库存失败,库存过期时间不能为null"); RedisLock redisLo...
keys.add(key); // 脚本里的ARGV参数 List<String> args = new ArrayList<>(); args.add(Integer.toString(num)); long result = redisTemplate.execute(new RedisCallback<Long>() { @Override public Long doInRedis(RedisConnection connection) throws DataAccessException { ...
repos\spring-boot-student-master\spring-boot-student-stock-redis\src\main\java\com\xiaolyuh\service\StockService.java
2
请在Spring Boot框架中完成以下Java代码
public String getFileType() { return fileType; } public void setFileType(String fileType) { this.fileType = fileType; } public FileInfo name(String name) { this.name = name; return this; } /** * The seller-provided name of the evidence file. * * @return name **/ @javax.annotation.Nullable...
Objects.equals(this.fileType, fileInfo.fileType) && Objects.equals(this.name, fileInfo.name) && Objects.equals(this.uploadedDate, fileInfo.uploadedDate); } @Override public int hashCode() { return Objects.hash(fileId, fileType, name, uploadedDate); } @Override public String toString() { StringBuil...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\FileInfo.java
2
请完成以下Java代码
public int getUpdatedBy() { return po.getUpdatedBy(); // getUpdatedBy } /************************************************************************** * Update Value or create new record. * To reload call load() - not updated * @return true if saved */ public boolean save() { return po.save(); // save...
public boolean delete(boolean force, String trxName) { return po.delete(force, trxName); // delete } /************************************************************************** * Lock it. * @return true if locked */ public boolean lock() { return po.lock(); // lock } /** * UnLock it * @return...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\model\wrapper\AbstractPOWrapper.java
1
请完成以下Java代码
public boolean hasParameters() { return true; } @Override public Set<String> getDependsOnFieldNames() { return CtxNames.toNames(parameters); } @Override public boolean isNumericKey() { return false; } @Override public LookupDataSourceFetcher getLookupDataSourceFetcher() { return this; } @Over...
{ final String filter = evalCtx.getFilter(); return labelsValuesLookupDataSource.findEntities(evalCtx, filter); } public Set<Object> normalizeStringIds(final Set<String> stringIds) { if (stringIds.isEmpty()) { return ImmutableSet.of(); } if (isLabelsValuesUseNumericKey()) { return stringIds.str...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\lookup\LabelsLookup.java
1
请在Spring Boot框架中完成以下Java代码
public void setNetdate(XMLGregorianCalendar value) { this.netdate = value; } /** * Gets the value of the netDays property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getNetDays() { return netDays; } ...
* */ public void setSinglevat(BigDecimal value) { this.singlevat = value; } /** * Gets the value of the taxfree property. * * @return * possible object is * {@link String } * */ public String getTaxfree() { return taxfree; }...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev1\de\metas\edi\esb\jaxb\metasfreshinhousev1\EDICctop120VType.java
2
请在Spring Boot框架中完成以下Java代码
public class BPartnerAlbertaId implements RepoIdAware { @JsonCreator public static BPartnerAlbertaId ofRepoId(final int repoId) { return new BPartnerAlbertaId(repoId); } @Nullable public static BPartnerAlbertaId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? new BPartnerAlbertaId(repoId) : null; } ...
int repoId; private BPartnerAlbertaId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "C_BPartner_Alberta_ID"); } @Override @JsonValue public int getRepoId() { return repoId; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java\de\metas\vertical\healthcare\alberta\bpartner\albertabpartner\BPartnerAlbertaId.java
2
请完成以下Java代码
private static List<TransportProtos.KeyValueProto> validateKeyValueProtos(List<TransportProtos.KeyValueProto> kvList) { kvList.forEach(keyValueProto -> { String key = keyValueProto.getKey(); if (StringUtils.isEmpty(key)) { throw new IllegalArgumentException("Invalid key v...
public static byte[] convertToRpcRequest(TransportProtos.ToDeviceRpcRequestMsg toDeviceRpcRequestMsg, DynamicMessage.Builder rpcRequestDynamicMessageBuilder) throws AdaptorException { rpcRequestDynamicMessageBuilder = rpcRequestDynamicMessageBuilder.getDefaultInstanceForType().newBuilderForType(); JsonO...
repos\thingsboard-master\common\proto\src\main\java\org\thingsboard\server\common\adaptor\ProtoConverter.java
1
请完成以下Java代码
public class MiddleOfArray { int[] middleOfArray(int[] array) { if (ObjectUtils.isEmpty(array) || array.length < 3) return array; int n = array.length; int mid = n / 2; if (n % 2 == 0) { int mid2 = mid - 1; return new int[] { array[mid2], array[mid...
int[] middleOfArrayWithStartEndBitwise(int[] array, int start, int end) { int mid = (start + end) >>> 1; int n = end - start; if (n % 2 == 0) { int mid2 = mid - 1; return new int[] { array[mid2], array[mid] }; } else { return new int[] { array[mid] }; ...
repos\tutorials-master\core-java-modules\core-java-arrays-operations-advanced-2\src\main\java\com\baeldung\arraymiddle\MiddleOfArray.java
1
请在Spring Boot框架中完成以下Java代码
public class Product implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String name; private double price; private boolean deleted = Boolean.FALSE; public Long getId() { ...
} public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } public boolean isDeleted() { return deleted; } public void setDeleted(boolean deleted) { this.deleted = deleted; } }
repos\tutorials-master\persistence-modules\spring-data-jpa-crud\src\main\java\com\baeldung\softdelete\Product.java
2
请完成以下Java代码
public PageLink nextPageLink() { return new PageLink(this.pageSize, this.page + 1, this.textSearch, this.sortOrder); } public Sort toSort(SortOrder sortOrder, Map<String, String> columnMap, boolean addDefaultSorting) { if (sortOrder == null) { return DEFAULT_SORT; } else { ...
property = columnMap.get(property); } return new Sort.Order(Sort.Direction.fromString(sortOrder.getDirection().name()), property); } public boolean isDefaultSortOrderAvailable(List<SortOrder> sortOrders) { for (SortOrder sortOrder : sortOrders) { if (DEFAULT_SORT_PROPERTY.eq...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\page\PageLink.java
1
请完成以下Java代码
protected void createInstallationProperty(CommandContext commandContext) { String installationId = UUID.randomUUID().toString(); PropertyEntity property = new PropertyEntity(INSTALLATION_PROPERTY_NAME, installationId); commandContext.getPropertyManager().insert(property); LOG.creatingInstallationPropert...
// set the persisted license key in the telemetry data and registry ManagementServiceImpl managementService = (ManagementServiceImpl) processEngineConfiguration.getManagementService(); String licenseKey = managementService.getLicenseKey(); if (licenseKey != null) { LicenseKeyDataImpl licenseKeyData = ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\BootstrapEngineCommand.java
1
请完成以下Java代码
public class FirstNonRepeatingCharacter { public Character firstNonRepeatingCharBruteForce(String inputString) { if (null == inputString || inputString.isEmpty()) { return null; } for (Character c : inputString.toCharArray()) { int indexOfC = inputString.indexOf(c); ...
if (frequency.get(c) == 1) { return c; } } return null; } public Character firstNonRepeatingCharWithArray(String inputString) { if (null == inputString || inputString.isEmpty()) { return null; } int[] frequency = new int[26]; ...
repos\tutorials-master\core-java-modules\core-java-string-algorithms-3\src\main\java\com\baeldung\firstnonrepeatingcharacter\FirstNonRepeatingCharacter.java
1
请完成以下Java代码
public I_PA_Ratio getPA_Ratio() throws RuntimeException { return (I_PA_Ratio)MTable.get(getCtx(), I_PA_Ratio.Table_Name) .getPO(getPA_Ratio_ID(), get_TrxName()); } /** Set Ratio. @param PA_Ratio_ID Performace Ratio */ public void setPA_Ratio_ID (int PA_Ratio_ID) { if (PA_Ratio_ID < 1) set_Val...
return (I_R_RequestType)MTable.get(getCtx(), I_R_RequestType.Table_Name) .getPO(getR_RequestType_ID(), get_TrxName()); } /** Set Request Type. @param R_RequestType_ID Type of request (e.g. Inquiry, Complaint, ..) */ public void setR_RequestType_ID (int R_RequestType_ID) { if (R_RequestType_ID < 1) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_Measure.java
1
请在Spring Boot框架中完成以下Java代码
private static class LineAggregationKey { @NonNull ProductId productId; @NonNull HUPIItemProductId hupiItemProductId; @NonNull AttributeSetInstanceId attributeSetInstanceId; @NonNull UomId uomId; @Nullable DistributionNetworkAndLineId distributionNetworkAndLineId; @Nullable OrderAndLineId salesOrderLineId;...
public LineAggregate(@NonNull final LineAggregationKey key) { this.key = key; this.qty = Quantitys.zero(key.getUomId()); } public void add(@NonNull final DDOrderCandidate candidate) { add(DDOrderCandidateAllocCandidate.builder() .ddOrderCandidateId(candidate.getIdNotNull()) .qty(candidate.ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddordercandidate\DDOrderCandidateProcessCommand.java
2
请完成以下Java代码
private boolean requiresBody(HttpMethod method) { return List.of(PUT, POST, PATCH).contains(method); } @lombok.Data @lombok.Builder(builderClassName = "Builder") public static class InstanceResponse { private final InstanceId instanceId; private final int status; @Nullable @JsonInclude(JsonInclude.Inc...
@lombok.Data @lombok.Builder(builderClassName = "Builder") public static class ForwardRequest { private final URI uri; private final HttpMethod method; private final HttpHeaders headers; private final BodyInserter<?, ? super ClientHttpRequest> body; } }
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\web\InstanceWebProxy.java
1
请完成以下Java代码
public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) { if (DevToolsEnablementDeducer.shouldEnable(Thread.currentThread()) && isLocalApplication(environment)) { if (canAddProperties(environment)) { logger.info(LogMessage.format("Devtools property defaults active...
} catch (Exception ex) { return false; } } private boolean isRemoteRestartEnabled(Environment environment) { return environment.containsProperty("spring.devtools.remote.secret"); } private boolean isWebApplication(Environment environment) { for (String candidate : WEB_ENVIRONMENT_CLASSES) { Class<?>...
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\env\DevToolsPropertyDefaultsPostProcessor.java
1
请完成以下Java代码
public void setName (java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Name */ @Override public java.lang.String getName () { return (java.lang.String)get_Value(COLUMNNAME_Name); } /** Set Reihenfolge. @param SeqNo Zur Bestimmung der Reihenfolge der Einträge; di...
public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Reihenfolge. @return Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst */ @Override public int getSeqNo () { Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); if (ii == null) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\dataentry\model\X_DataEntry_ListValue.java
1
请在Spring Boot框架中完成以下Java代码
public class SelectedReceivingTarget { @Nullable JsonLUReceivingTarget luReceivingTarget; @Nullable JsonTUReceivingTarget tuReceivingTarget; @Builder public SelectedReceivingTarget( @Nullable final JsonLUReceivingTarget luReceivingTarget, @Nullable final JsonTUReceivingTarget tuReceivingTarget) { Check.as...
{ return Optional.ofNullable(luReceivingTarget) .map(JsonLUReceivingTarget::getExistingLU) .orElse(null); } @Nullable public JsonNewTUTarget getReceiveToNewTU() { return Optional.ofNullable(tuReceivingTarget) .map(JsonTUReceivingTarget::getNewTU) .orElse(null); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\service\commands\receive\SelectedReceivingTarget.java
2
请在Spring Boot框架中完成以下Java代码
public void setJobHandlerConfiguration(String jobHandlerConfiguration) { this.jobHandlerConfiguration = jobHandlerConfiguration; } @ApiModelProperty(example = "myAdvancedCfg") public String getAdvancedJobHandlerConfiguration() { return advancedJobHandlerConfiguration; } public void...
} public void setLockOwner(String lockOwner) { this.lockOwner = lockOwner; } @ApiModelProperty(example = "2023-06-03T22:05:05.474+0000") public Date getLockExpirationTime() { return lockExpirationTime; } public void setLockExpirationTime(Date lockExpirationTime) { this...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\management\HistoryJobResponse.java
2
请在Spring Boot框架中完成以下Java代码
public class JSONLookupValuesPage { private static final JSONLookupValuesPage EMPTY = new JSONLookupValuesPage(); List<JSONLookupValue> values; @JsonInclude(JsonInclude.Include.NON_NULL) Boolean hasMoreResults; @JsonInclude(JsonInclude.Include.NON_NULL) Boolean isAlwaysDisplayNewBPartner; @JsonInclude(JsonIn...
public static JSONLookupValuesPage of( @Nullable final LookupValuesPage page, @NonNull final String adLanguage) { return of(page, adLanguage, false); } public static JSONLookupValuesPage of( @Nullable final LookupValuesPage page, @NonNull final String adLanguage, @Nullable final Boolean isAlwaysDis...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\json\JSONLookupValuesPage.java
2
请在Spring Boot框架中完成以下Java代码
public final class ItemIgnore implements Comparable<ItemIgnore> { private final ItemType type; private final String name; private ItemIgnore(ItemType type, String name) { if (type == null) { throw new IllegalArgumentException("'type' must not be null"); } if (name == null) { throw new IllegalArgumentE...
public static ItemIgnore forProperty(String name) { return new ItemIgnore(ItemType.PROPERTY, name); } @Override public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } ItemIgnore that = (ItemIgnore) o; return this.type == that.type && Objects.equals(this.name, t...
repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\metadata\ItemIgnore.java
2
请完成以下Java代码
public class GetProcessInstanceCommentsCmd implements Command<List<Comment>>, Serializable { private static final long serialVersionUID = 1L; protected String processInstanceId; protected String type; public GetProcessInstanceCommentsCmd(String processInstanceId) { this.processInstanceId = pro...
@Override @SuppressWarnings("unchecked") public List<Comment> execute(CommandContext commandContext) { if (StringUtils.isNotBlank(type)) { List<Comment> commentsByProcessInstanceId = commandContext .getCommentEntityManager() .findCommentsByProcessInsta...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\cmd\GetProcessInstanceCommentsCmd.java
1
请完成以下Java代码
protected class ApacheHttpComponentsExecutableHttpRequest implements ExecutableHttpRequest { protected final HttpRequestBase request; public ApacheHttpComponentsExecutableHttpRequest(HttpRequestBase request) { this.request = request; } @Override public HttpResponse...
* A HttpDelete alternative that extends {@link HttpEntityEnclosingRequestBase} to allow DELETE with a request body * * @author ikaakkola */ protected static class HttpDeleteWithBody extends HttpEntityEnclosingRequestBase { public HttpDeleteWithBody(URI uri) { super(); ...
repos\flowable-engine-main\modules\flowable-http-common\src\main\java\org\flowable\http\common\impl\apache\ApacheHttpComponentsFlowableHttpClient.java
1
请完成以下Java代码
public class Problem { protected String errorMessage; protected String resource; protected int line; protected int column; public Problem(String errorMessage, String localName, int lineNumber, int columnNumber) { this.errorMessage = errorMessage; this.resource = localName; ...
this.resource = element.getId(); this.line = element.getXmlRowNumber(); this.column = element.getXmlColumnNumber(); } public Problem(String errorMessage, GraphicInfo graphicInfo) { this.errorMessage = errorMessage; this.line = graphicInfo.getXmlRowNumber(); this.column =...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\parse\Problem.java
1
请完成以下Java代码
public void setHasRegion (boolean HasRegion) { set_Value (COLUMNNAME_HasRegion, Boolean.valueOf(HasRegion)); } /** Get Land hat Regionen. @return Country contains Regions */ @Override public boolean isHasRegion () { Object oo = get_Value(COLUMNNAME_HasRegion); if (oo != null) { if (oo instance...
Object oo = get_Value(COLUMNNAME_IsAddressLinesReverse); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Media Size. @param MediaSize Java Media Size */ @Override public void setMediaSize (java.lang.St...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Country.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable Show getShowDetails() { return this.showDetails; } public void setShowDetails(@Nullable Show showDetails) { this.showDetails = showDetails; } public @Nullable String getAdditionalPath() { return this.additionalPath; } public void setAdditionalPath(@Nullable String additionalPath...
/** * Threshold after which a warning will be logged for slow health indicators. */ private Duration slowIndicatorThreshold = Duration.ofSeconds(10); public Duration getSlowIndicatorThreshold() { return this.slowIndicatorThreshold; } public void setSlowIndicatorThreshold(Duration slowIndicatorThresho...
repos\spring-boot-4.0.1\module\spring-boot-health\src\main\java\org\springframework\boot\health\autoconfigure\actuate\endpoint\HealthEndpointProperties.java
2
请完成以下Java代码
public class UserAuthSettingsEntity extends BaseSqlEntity<UserAuthSettings> implements BaseEntity<UserAuthSettings> { @Column(name = ModelConstants.USER_AUTH_SETTINGS_USER_ID_PROPERTY, nullable = false, unique = true) private UUID userId; @Convert(converter = JsonConverter.class) @Column(name = ModelCo...
} } @Override public UserAuthSettings toData() { UserAuthSettings userAuthSettings = new UserAuthSettings(); userAuthSettings.setId(new UserAuthSettingsId(id)); userAuthSettings.setCreatedTime(createdTime); if (userId != null) { userAuthSettings.setUserId(new Use...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\sql\UserAuthSettingsEntity.java
1
请完成以下Java代码
private void updateRecordWithRecipient( @NonNull final I_C_Doc_Outbound_Log docOutboundLogRecord, @NonNull final DocOutBoundRecipients recipients) { final String tableName = TableRecordReference.ofReferenced(docOutboundLogRecord).getTableName(); final boolean isInvoiceEmailEnabled = I_C_Invoice.Table_Name.eq...
{ final ITableRecordReference from = TableRecordReference.ofReferencedOrNull(archiveRecord); if (from == null) { return; } final AttachmentEntryQuery query = AttachmentEntryQuery .builder() .referencedRecord(from) .tagSetToTrue(AttachmentTags.TAGNAME_IS_DOCUMENT) .build(); final List<Att...
repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java\de\metas\document\archive\spi\impl\DocOutboundArchiveEventListener.java
1
请完成以下Java代码
public int getAD_InfoWindow_From_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_InfoWindow_From_ID); if (ii == null) return 0; return ii.intValue(); } @Override public org.compiere.model.I_AD_InfoWindow getAD_InfoWindow() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_AD_InfoWindow_...
/** * EntityType AD_Reference_ID=389 * Reference name: _EntityTypeNew */ public static final int ENTITYTYPE_AD_Reference_ID=389; /** Set Entitäts-Art. @param EntityType Dictionary Entity Type; Determines ownership and synchronization */ @Override public void setEntityType (java.lang.String EntityType...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_InfoWindow_From.java
1
请完成以下Java代码
public void run() { setBusy(true); process.run(); setBusy(false); } }; worker.start(); return worker; } // startBatch /** * @return Returns the AD_Form_ID. */ public int getAD_Form_ID () { return p_AD_Form_ID; } // getAD_Window_ID public int getWindowNo() { return m_WindowNo; }...
public JMenuBar getMenu() { return menuBar; } public void showFormWindow() { if (m_panel instanceof FormPanel2) { ((FormPanel2)m_panel).showFormWindow(m_WindowNo, this); } else { AEnv.showCenterScreenOrMaximized(this); } } } // FormFrame
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\form\FormFrame.java
1
请完成以下Java代码
public void setC_CompensationGroup_Schema(final de.metas.order.model.I_C_CompensationGroup_Schema C_CompensationGroup_Schema) { set_ValueFromPO(COLUMNNAME_C_CompensationGroup_Schema_ID, de.metas.order.model.I_C_CompensationGroup_Schema.class, C_CompensationGroup_Schema); } @Override public void setC_Compensation...
{ if (M_Product_ID < 1) set_Value (COLUMNNAME_M_Product_ID, null); else set_Value (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public void setSeqNo (final int SeqNo) { set_Value (COLUMNNAME_SeqN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\order\model\X_C_CompensationGroup_SchemaLine.java
1
请在Spring Boot框架中完成以下Java代码
public PaymentAllocationBuilder payableRemainingOpenAmtPolicy(@NonNull final PayableRemainingOpenAmtPolicy payableRemainingOpenAmtPolicy) { assertNotBuilt(); this.payableRemainingOpenAmtPolicy = payableRemainingOpenAmtPolicy; return this; } public PaymentAllocationBuilder dryRun() { this.dryRun = true; r...
return _payableDocuments; } @VisibleForTesting final ImmutableList<PaymentDocument> getPaymentDocuments() { return _paymentDocuments; } public PaymentAllocationBuilder invoiceProcessingServiceCompanyService(@NonNull final InvoiceProcessingServiceCompanyService invoiceProcessingServiceCompanyService) { asse...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\paymentallocation\service\PaymentAllocationBuilder.java
2
请完成以下Java代码
public void setAuthorizationRedirectStrategy(ServerRedirectStrategy authorizationRedirectStrategy) { Assert.notNull(authorizationRedirectStrategy, "authorizationRedirectStrategy cannot be null"); this.authorizationRedirectStrategy = authorizationRedirectStrategy; } /** * Sets the repository used for storing {@...
private Mono<Void> sendRedirectForAuthorization(ServerWebExchange exchange, OAuth2AuthorizationRequest authorizationRequest) { return Mono.defer(() -> { Mono<Void> saveAuthorizationRequest = Mono.empty(); if (AuthorizationGrantType.AUTHORIZATION_CODE.equals(authorizationRequest.getGrantType())) { saveAut...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\web\server\OAuth2AuthorizationRequestRedirectWebFilter.java
1
请在Spring Boot框架中完成以下Java代码
public void customize(MongoClientSettings.Builder settingsBuilder) { settingsBuilder.uuidRepresentation(this.uuidRepresentation); settingsBuilder.applyConnectionString(this.connectionDetails.getConnectionString()); settingsBuilder.applyToSslSettings(this::configureSslIfNeeded); } private void configureSslIfNee...
@Override public int getOrder() { return this.order; } /** * Set the order value of this object. * @param order the new order value * @see #getOrder() */ public void setOrder(int order) { this.order = order; } }
repos\spring-boot-4.0.1\module\spring-boot-mongodb\src\main\java\org\springframework\boot\mongodb\autoconfigure\StandardMongoClientSettingsBuilderCustomizer.java
2
请完成以下Java代码
private static @Nullable Object applyCaching(@Nullable Object response, long timeToLive) { if (response instanceof Mono) { return ((Mono<?>) response).cache(Duration.ofMillis(timeToLive)); } if (response instanceof Flux) { return ((Flux<?>) response).cache(Duration.ofMillis(timeToLive)); } return...
CacheKey other = (CacheKey) obj; return this.apiVersion.equals(other.apiVersion) && ObjectUtils.nullSafeEquals(this.principal, other.principal) && ObjectUtils.nullSafeEquals(this.serverNamespace, other.serverNamespace); } @Override public int hashCode() { final int prime = 31; int result = 1; ...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\invoker\cache\CachingOperationInvoker.java
1
请在Spring Boot框架中完成以下Java代码
public static AvailableToPromiseMultiQuery forDescriptorAndAllPossibleBPartnerIds(@NonNull final MaterialDescriptor materialDescriptor) { final AvailableToPromiseQuery bPartnerQuery = AvailableToPromiseQuery.forMaterialDescriptor(materialDescriptor); final AvailableToPromiseMultiQueryBuilder multiQueryBuilder = A...
@Builder private AvailableToPromiseMultiQuery( @NonNull @Singular final ImmutableSet<AvailableToPromiseQuery> queries, final Boolean addToPredefinedBuckets) { Check.assumeNotEmpty(queries, "queries is not empty"); this.queries = queries; this.addToPredefinedBuckets = CoalesceUtil.coalesce(addToPredefinedB...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\repository\atp\AvailableToPromiseMultiQuery.java
2
请在Spring Boot框架中完成以下Java代码
public UserIdentityAvailability checkUsernameAvailability(@RequestParam(value = "username") String username) { Boolean isAvailable = !userRepository.existsByUsername(username); return new UserIdentityAvailability(isAvailable); } @GetMapping("/user/checkEmailAvialability") public UserIde...
User user = userRepository.findById(id) .orElseThrow(() -> new ResourceNotFoundException("User", "username", id)); UserProfile userProfile = new UserProfile(user.getId(), user.getSurname(), user.getName(), user.getLastname(), user.getUsername(), user.getCreatedAt(), user.getPhone(), user.getEmail(),...
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
请在Spring Boot框架中完成以下Java代码
static MethodInterceptor securedAuthorizationMethodInterceptor( ObjectProvider<SecuredMethodSecurityConfiguration> securedMethodSecurityConfiguration) { Supplier<AuthorizationManagerBeforeMethodInterceptor> supplier = () -> { SecuredMethodSecurityConfiguration configuration = securedMethodSecurityConfiguration....
authoritiesAuthorizationManager.setRoleHierarchy(roleHierarchy); this.authorizationManager.setAuthoritiesAuthorizationManager(authoritiesAuthorizationManager); } @Autowired(required = false) void setSecurityContextHolderStrategy(SecurityContextHolderStrategy securityContextHolderStrategy) { this.methodIntercept...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\method\configuration\SecuredMethodSecurityConfiguration.java
2
请完成以下Java代码
public Optional<String> getReason() { return Optional.ofNullable(this.reason); } /** * Returns an {@link Optional} {@link DistributedMember} identified as the suspect in the {@link MembershipEvent}. * * @return an {@link Optional} {@link DistributedMember} identified as the suspect in the {@link MembershipEv...
} /** * Builder method used to configure the {@link DistributedMember peer member} that is the subject of the suspicion * {@link MembershipEvent}. * * @param suspectMember {@link DistributedMember peer member} that is being suspected; may be {@literal null}. * @return this {@link MemberSuspectEvent}. * @s...
repos\spring-boot-data-geode-main\spring-geode-project\apache-geode-extensions\src\main\java\org\springframework\geode\distributed\event\support\MemberSuspectEvent.java
1
请完成以下Java代码
public Map<String, String> getProperties() { return commandExecutor.execute(new GetPropertiesCmd()); } @Override public <T> T executeCommand(Command<T> command) { if (command == null) { throw new ActivitiIllegalArgumentException("The command is null"); } return c...
Class<MapperType> mapperClass = customSqlExecution.getMapperClass(); return commandExecutor.execute(new ExecuteCustomSqlCmd<>(mapperClass, customSqlExecution)); } @Override public List<EventLogEntry> getEventLogEntries(Long startLogNr, Long pageSize) { return commandExecutor.execute(new Get...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\ManagementServiceImpl.java
1
请在Spring Boot框架中完成以下Java代码
public String xxlJobList(Integer page, Integer size) { Map<String, Object> jobInfo = Maps.newHashMap(); jobInfo.put("start", page != null ? page : 0); jobInfo.put("length", size != null ? size : 10); jobInfo.put("jobGroup", 2); jobInfo.put("triggerStatus", -1); HttpRespo...
/** * 测试手动停止任务 */ @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】= {}", exe...
repos\spring-boot-demo-master\demo-task-xxl-job\src\main\java\com\xkcoding\task\xxl\job\controller\ManualOperateController.java
2
请在Spring Boot框架中完成以下Java代码
public ItemHint applyPrefix(String prefix) { return new ItemHint(ConventionUtils.toDashedCase(prefix) + "." + this.name, this.values, this.providers); } @Override public int compareTo(ItemHint other) { return getName().compareTo(other.getName()); } public static ItemHint newHint(String name, ValueHint... val...
/** * A value provider. */ public static class ValueProvider { private final String name; private final Map<String, Object> parameters; public ValueProvider(String name, Map<String, Object> parameters) { this.name = name; this.parameters = parameters; } public String getName() { return this....
repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\metadata\ItemHint.java
2
请完成以下Java代码
static class SortMapper { protected static Map<String, Consumer<FetchAndLockBuilder>> FIELD_MAPPINGS = Map.of( "createTime", FetchAndLockBuilder::orderByCreateTime ); protected static Map<String, Consumer<FetchAndLockBuilder>> ORDER_MAPPINGS = Map.of( "asc", FetchAndLockBuilder::asc, ...
if (sortOrder != null) { configureFieldOrBadRequest(sortOrder, "sortOrder", ORDER_MAPPINGS); } } return builder; } protected void configureFieldOrBadRequest(String key, String parameterName, Map<String, Consumer<FetchAndLockBuilder>> fieldMappings) { if (!fieldMappings.conta...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\externaltask\FetchExternalTasksDto.java
1
请完成以下Java代码
public Object getCredentials() { return this.getPassword(); } @Override public String getHost() { return this.host; } @Override public void setHost(String host) { this.host = host; } @Override public boolean isRememberMe() { return this.rememberMe; ...
public String getAccessToken() { return accessToken; } public void setAccessToken(String accessToken) { this.accessToken = accessToken; } @Override public void clear() { super.clear(); this.accessToken = null; } }
repos\springBoot-master\springboot-shiro2\src\main\java\cn\abel\rest\shiro\credentials\ThirdPartySupportedToken.java
1
请完成以下Java代码
private JWKSet parse(String body) { try { return JWKSet.parse(body); } catch (ParseException ex) { throw new RuntimeException(ex); } } /** * Returns the first specified key ID (kid) for a JWK matcher. * @param jwkMatcher The JWK matcher. Must not be {@code null}. * @return The first key ID, {@cod...
if (keyIDs == null || keyIDs.isEmpty()) { return null; } for (String id : keyIDs) { if (id != null) { return id; } } return null; // No kid in matcher } void setWebClient(WebClient webClient) { this.webClient = webClient; } }
repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\ReactiveRemoteJWKSource.java
1
请完成以下Java代码
public final class EnclosedInSquareBracketsConverter extends LogEventPatternConverter { private final List<PatternFormatter> formatters; private EnclosedInSquareBracketsConverter(List<PatternFormatter> formatters) { super("enclosedInSquareBrackets", null); this.formatters = formatters; } @Override public vo...
toAppendTo.append("] "); } /** * Creates a new instance of the class. Required by Log4J2. * @param config the configuration * @param options the options * @return a new instance, or {@code null} if the options are invalid */ public static @Nullable EnclosedInSquareBracketsConverter newInstance(@Nullable C...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\logging\log4j2\EnclosedInSquareBracketsConverter.java
1
请完成以下Java代码
public static LinkedList<Integer>[] createUsingRawArray() { @SuppressWarnings("unchecked") LinkedList<Integer>[] groups = new LinkedList[3]; for (int i = 0; i < groups.length; i++) { groups[i] = new LinkedList<>(); } return groups; } public static ArrayList<LinkedLis...
public static ArrayList<LinkedList<Integer>> createUsingStreams() { ArrayList<LinkedList<Integer>> groups = new ArrayList<>(); IntStream.range(0, 3) .forEach(i -> groups.add(new LinkedList<>())); return groups; } public static LinkedList<Integer>[] createUsingSetAll() { ...
repos\tutorials-master\core-java-modules\core-java-collections-list-8\src\main\java\com\baeldung\linkedlistarray\LinkedListArray.java
1
请在Spring Boot框架中完成以下Java代码
public class Delivery { protected String day; protected Integer dateFrom; protected Integer dateTo; protected Integer timeFrom; protected Integer timeTo; /** * Gets the value of the day property. * * @return * possible object is * {@link String } * ...
*/ public Integer getTimeFrom() { return timeFrom; } /** * Sets the value of the timeFrom property. * * @param value * allowed object is * {@link Integer } * */ public void setTimeFrom(Integer value) { this.timeFrom = value; } /*...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\Delivery.java
2
请在Spring Boot框架中完成以下Java代码
ProblemDetail handle(IllegalArgumentException e) { log.info(e.getMessage(), e); return ProblemDetail.forStatusAndDetail(HttpStatus.BAD_REQUEST, e.getMessage()); } @ExceptionHandler(NoSuchElementException.class) ProblemDetail handle(NoSuchElementException e) { log.info(e.getMessage()...
log.info(e.getMessage(), e); return ProblemDetail.forStatusAndDetail(HttpStatus.UNAUTHORIZED, e.getMessage()); } /** * Errors that the developer did not expect are handled here and the log level is recorded as error. * * @param e Exception * @return ProblemDetail */ @Except...
repos\realworld-java21-springboot3-main\server\api\src\main\java\io\zhc1\realworld\config\ApplicationExceptionHandler.java
2
请完成以下Java代码
public class DelegateExpressionUtil { public static Object resolveDelegateExpression(Expression expression, VariableContainer variableContainer, List<FieldExtension> fieldExtensions) { // Note: we can't cache the result of the expression, because the ...
applyFieldExtension(fieldExtension, target, throwExceptionOnMissingField); } } } protected static void applyFieldExtension(FieldExtension fieldExtension, Object target, boolean throwExceptionOnMissingField) { Object value = null; if (fieldExtension.getExpression() != null) {...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\util\DelegateExpressionUtil.java
1
请在Spring Boot框架中完成以下Java代码
private Optional<JsonRequestBPartnerUpsertItem> mapCreatedUpdatedBy() { if (rootBPartnerIdForUsers == null || (createdBy == null && updatedBy == null)) { return Optional.empty(); } final JsonRequestContactUpsert.JsonRequestContactUpsertBuilder requestContactUpsert = JsonRequestContactUpsert.builder(); f...
public static class BPartnerRequestProducerResult { @NonNull String patientBPartnerIdentifier; @NonNull String patientMainAddressIdentifier; @NonNull Map<String, JsonBPRelationRole> bPartnerIdentifier2RelationRole; @NonNull JsonRequestBPartnerUpsert jsonRequestBPartnerUpsert; } }
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\de-metas-camel-alberta-camelroutes\src\main\java\de\metas\camel\externalsystems\alberta\patient\BPartnerUpsertRequestProducer.java
2
请在Spring Boot框架中完成以下Java代码
public int getId() { return id; } /** * Sets the value of the id property. * */ public void setId(int value) { this.id = value; } /** * Gets the value of the name property. * * @return * possible object is * {@link String } * ...
/** * Gets the value of the passportNumber property. * * @return * possible object is * {@link String } * */ public String getPassportNumber() { return passportNumber; } /** * Sets the value of the passportNumber property. * * @param ...
repos\spring-boot-examples-master\spring-boot-tutorial-soap-web-services\src\main\java\com\in28minutes\students\StudentDetails.java
2
请完成以下Java代码
public I_C_UOM getUom() { final UomId uomId = getUomId(); if (uomId == null) { return null; } final IUOMDAO uomDAO = Services.get(IUOMDAO.class); return uomDAO.getById(uomId); } @NonNull public I_C_UOM getUomNotNull() { return Check.assumeNotNull(getUom(), "Expecting UOM to always be present whe...
} final IViewRowAttributes attributes = attributesSupplier.get(); if (attributes == null) { throw new EntityNotFoundException("This PPOrderLineRow does not support attributes; this=" + this); } return attributes; } @Override public HuUnitType getHUUnitTypeOrNull() {return huUnitType;} @Override pub...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pporder\PPOrderLineRow.java
1