instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
private static void setMappings(final JTree tree) { final ActionMap map = tree.getActionMap(); map.put(TransferHandler.getCutAction().getValue(Action.NAME), TransferHandler.getCutAction()); map.put(TransferHandler.getPasteAction().getValue(Action.NAME), TransferHandler.getPasteAction()); } public AdempiereTre...
} if (ids != null && ids.size() > 0) { setTreeSelectionPath(ids.get(0), true); } } @Override public void requestFocus() { treeSearch.requestFocus(); } @Override public boolean requestFocusInWindow() { return treeSearch.requestFocusInWindow(); } } // VTreePanel
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\tree\VTreePanel.java
1
请完成以下Java代码
private ProcessPreconditionsResolution getPreconditionsResolution() { return preconditionsResolutionSupplier.get().getValue(); } public Duration getPreconditionsResolutionCalcDuration() { return preconditionsResolutionSupplier.get().getDuration(); } public boolean isDisabled() { return getPreconditionsRe...
{ debugProperties.put("debug-classname", debugProcessClassname); } return debugProperties.build(); } public boolean isDisplayedOn(@NonNull final DisplayPlace displayPlace) { return getDisplayPlaces().contains(displayPlace); } @Value private static class ValueAndDuration<T> { public static <T> Value...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\descriptor\WebuiRelatedProcessDescriptor.java
1
请完成以下Java代码
public PageData<CalculatedField> findByTenantIdAndFilter(TenantId tenantId, CalculatedFieldFilter filter, PageLink pageLink) { return DaoUtil.toPageData(calculatedFieldRepository.findByTenantIdAndFilter(tenantId.getId(), filter.getTypes().stream().map(Enum::name).toList(), filter...
@Override protected Class<CalculatedFieldEntity> getEntityClass() { return CalculatedFieldEntity.class; } @Override protected JpaRepository<CalculatedFieldEntity, UUID> getRepository() { return calculatedFieldRepository; } @Override public EntityType getEntityType() { ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\cf\JpaCalculatedFieldDao.java
1
请在Spring Boot框架中完成以下Java代码
public String getUser(String email) { String userId = ""; String userType = ""; try { User user = userRepository.findByEmail(email); userId = String.valueOf(user.getId()); // get the user type if (user instanceof Person) userType = "Person"; else if (user instanc...
@RequestMapping("/user/update") @ResponseBody public String update(Long id, String email, String name) { try { User user = userRepository.findOne(id); user.setEmail(email); // switch on the user type if (user instanceof Person) { Person person = (Person)user; perso...
repos\spring-boot-samples-master\spring-boot-springdatajpa-inheritance\src\main\java\netgloo\controllers\UserController.java
2
请完成以下Java代码
private long getSelectionSize(final DocumentIdsSelection rowIds) { if (rowIds.isAll()) { return getView().size(); } else { return rowIds.size(); } } private DocumentIdsSelection getSelectedRootDocumentIds() { final DocumentIdsSelection selectedRowIds = getSelectedRowIds(); if (selectedRowIds....
return selectedRowIds.stream().filter(DocumentId::isInt).collect(DocumentIdsSelection.toDocumentIdsSelection()); } } private Optional<ProductBarcodeFilterData> getProductBarcodeFilterData() { return PackageableFilterDescriptorProvider.extractProductBarcodeFilterData(getView()); } private List<ShipmentSchedul...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\process\WEBUI_Picking_Launcher.java
1
请完成以下Java代码
public List<Object> getSqlParams() { buildSql(); return sqlParams; } private boolean sqlBuilt = false; private String sqlWhereClause = null; private List<Object> sqlParams = null; private void buildSql() { if (sqlBuilt) { return; } final StringBuilder sqlWhereClause = new StringBuilder(); fin...
final String sqlColumnNames = modifier.getColumnSql("COALESCE(" + String.join(",", columnNames) + ")"); sqlWhereClause.append(sqlColumnNames); if (value == null) { sqlWhereClause.append(" IS NULL"); sqlParams = null; } else { sqlParams = new ArrayList<>(); sqlWhereClause.append("=").append(modi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\CoalesceEqualsQueryFilter.java
1
请完成以下Java代码
private List<StubFactory> getStubFactories() { if (this.stubFactories == null) { this.stubFactories = new ArrayList<>(this.applicationContext.getBeansOfType(StubFactory.class).values()); this.stubFactories.add(new FallbackStubFactory()); } return this.stubFactories; }...
* @param grpcClientBean The annotation to extract it from. * @return The extracted name. */ private String getBeanName(final GrpcClientBean grpcClientBean) { if (!grpcClientBean.beanName().isEmpty()) { return grpcClientBean.beanName(); } else { return grpcClientBean...
repos\grpc-spring-master\grpc-client-spring-boot-starter\src\main\java\net\devh\boot\grpc\client\inject\GrpcClientBeanPostProcessor.java
1
请完成以下Java代码
public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } /** * Gets the value of the rTyp prop...
* {@link VerfuegbarkeitTyp } * */ public VerfuegbarkeitTyp getRTyp() { return rTyp; } /** * Sets the value of the rTyp property. * * @param value * allowed object is * {@link VerfuegbarkeitTyp } * */ public void setRTyp(Verfueg...
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\VerfuegbarkeitsanfrageEinzelneAntwort.java
1
请在Spring Boot框架中完成以下Java代码
public CommonResult<List<PmsBrand>> getBrandList() { return CommonResult.success(demoService.listAllBrand()); } @ApiOperation(value = "添加品牌") @RequestMapping(value = "/brand/create", method = RequestMethod.POST) @ResponseBody public CommonResult createBrand(@Validated @RequestBody PmsBrandD...
@ApiOperation(value = "删除品牌") @RequestMapping(value = "/brand/delete/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult deleteBrand(@PathVariable("id") Long id) { int count = demoService.deleteBrand(id); if (count == 1) { LOGGER.debug("deleteBrand success :id={}...
repos\mall-master\mall-demo\src\main\java\com\macro\mall\demo\controller\DemoController.java
2
请完成以下Java代码
public <T> IADValidatorResult validate(final Properties ctx, final Class<T> appDictClass) { final Iterator<T> items = Services.get(IADValidatorDAO.class).retrieveApplicationDictionaryItems(ctx, appDictClass); final IADValidatorResult errorLog = new ADValidatorResult(); while (items.hasNext()) { final T it...
} @Override public IADValidator<?> getValidator(final Class<?> registeredClass) { return validators.get(registeredClass); } private <T> void validateItem(final Class<T> appDictClass, final T item) { @SuppressWarnings("unchecked") final IADValidator<T> validator = (IADValidator<T>)validators.get(appDictCla...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\appdict\validation\api\impl\ADValidatorRegistryBL.java
1
请在Spring Boot框架中完成以下Java代码
public class ImportIssueInfo { @Nullable ProjectId projectId; @NonNull ExternalProjectReferenceId externalProjectReferenceId; @NonNull OrgId orgId; @NonNull ExternalProjectType externalProjectType; @Nullable BigDecimal estimation; @Nullable BigDecimal budget; @Nullable BigDecimal roughEstimation; ...
@NonNull ExternalId externalIssueId; @Nullable Integer externalIssueNo; @Nullable String externalIssueURL; @Nullable ImportMilestoneInfo milestone; @Nullable IssueId parentIssueId; @Nullable ExternalId externalParentIssueId; @NonNull @Builder.Default ImmutableList<IssueLabel> issueLabels = Immutable...
repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java\de\metas\serviceprovider\issue\importer\info\ImportIssueInfo.java
2
请完成以下Java代码
public java.lang.String getMSV3_Grund () { return (java.lang.String)get_Value(COLUMNNAME_MSV3_Grund); } /** Set MSV3_LieferPzn. @param MSV3_LieferPzn MSV3_LieferPzn */ @Override public void setMSV3_LieferPzn (java.lang.String MSV3_LieferPzn) { set_Value (COLUMNNAME_MSV3_LieferPzn, MSV3_LieferPzn); } ...
* Reference name: MSV3_Substitutionsgrund */ public static final int MSV3_SUBSTITUTIONSGRUND_AD_Reference_ID=540818; /** Nachfolgeprodukt = Nachfolgeprodukt */ public static final String MSV3_SUBSTITUTIONSGRUND_Nachfolgeprodukt = "Nachfolgeprodukt"; /** ReUndParallelImport = ReUndParallelImport */ public static ...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java-gen\de\metas\vertical\pharma\vendor\gateway\msv3\model\X_MSV3_Substitution.java
1
请完成以下Java代码
public class ASIAwareAttributeStorageFactory extends AbstractModelAttributeStorageFactory<I_M_AttributeSetInstance, ASIWithPackingItemTemplateAttributeStorage> { private final IAttributeSetInstanceAwareFactoryService asiAwareFactory = Services.get(IAttributeSetInstanceAwareFactoryService.class); @Override public bo...
return Util.mkKey(model.getClass().getName(), model.getM_AttributeSetInstance_ID()); } @Override protected boolean isNullModel(final I_M_AttributeSetInstance model) { if (model == null) { return true; } // Case: null marker was returned. See "getModelFromObject" method. return model.getM_AttributeSet...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\ASIAwareAttributeStorageFactory.java
1
请在Spring Boot框架中完成以下Java代码
public void resetExpiredJob(String jobId) { Map<String, Object> params = new HashMap<>(2); params.put("id", jobId); params.put("now", jobServiceConfiguration.getClock().getCurrentTime()); getDbSqlSession().directUpdate("resetExpiredExternalWorkerJob", params); } @Override pu...
public List<ExternalWorkerJobEntity> findJobsByWorkerId(String workerId) { return getList("selectExternalWorkerJobsByWorkerId", workerId); } @Override public List<ExternalWorkerJobEntity> findJobsByWorkerIdAndTenantId(String workerId, String tenantId) { Map<String, String> paramMap = ne...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\persistence\entity\data\impl\MybatisExternalWorkerJobDataManager.java
2
请完成以下Java代码
public List<HandlerMethodArgumentResolver> getResolvers() { return Collections.unmodifiableList(this.argumentResolvers); } /** * Whether the given {@linkplain MethodParameter method parameter} is * supported by any registered {@link HandlerMethodArgumentResolver}. */ @Override public boolean supportsParam...
return resolver.resolveArgument(parameter, environment); } /** * Find a registered {@link HandlerMethodArgumentResolver} that supports * the given method parameter. * @param parameter the method parameter */ public @Nullable HandlerMethodArgumentResolver getArgumentResolver(MethodParameter parameter) { re...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\data\method\HandlerMethodArgumentResolverComposite.java
1
请完成以下Java代码
public int getPriority() { return priority; } /** * Reference to the process definition or null if it is not related to a * process. */ public String getProcessDefinitionId() { return processDefinitionId; } /** * Reference to the process instance or null if it is not related to a process...
} @Override public String toString() { return this.getClass().getSimpleName() + "[id=" + id + ", eventName=" + eventName + ", name=" + name + ", createTime=" + createTime + ", lastUpdated=" + lastUpdated + ", executionId=" + executionId + ", processDefini...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\event\TaskEvent.java
1
请完成以下Java代码
public boolean isOnlySubProcessExecutions() { return onlySubProcessExecutions; } public Date getStartedBefore() { return startedBefore; } public void setStartedBefore(Date startedBefore) { this.startedBefore = startedBefore; } public Date getStartedAfter() { re...
this.startedBy = startedBy; } public List<String> getInvolvedGroups() { return involvedGroups; } public ProcessInstanceQuery involvedGroupsIn(List<String> involvedGroups) { if (involvedGroups == null || involvedGroups.isEmpty()) { throw new ActivitiIllegalArgumentException(...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\ProcessInstanceQueryImpl.java
1
请完成以下Java代码
public EventSubscription execute(CommandContext commandContext) { CaseDefinition caseDefinition = getLatestCaseDefinitionByKey(builder.getCaseDefinitionKey(), builder.getTenantId(), commandContext); Case caze = getCase(caseDefinition.getId(), commandContext); EventSubscription eventSubscription...
.scopeDefinitionId(caseDefinition.getId()) .scopeType(ScopeTypes.CMMN) .configuration(correlationKey); if (caseDefinition.getTenantId() != null) { eventSubscriptionBuilder.tenantId(caseDefinition.getTenantId()); } // if we need to update the case def...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\cmd\RegisterCaseInstanceStartEventSubscriptionCmd.java
1
请完成以下Java代码
public class DataStoreImpl extends RootElementImpl implements DataStore { protected static Attribute<String> nameAttribute; protected static Attribute<Integer> capacityAttribute; protected static Attribute<Boolean> isUnlimitedAttribute; protected static AttributeReference<ItemDefinition> itemSubjectRefAttribut...
@Override public Boolean isUnlimited() { return isUnlimitedAttribute.getValue(this); } @Override public void setUnlimited(Boolean isUnlimited) { isUnlimitedAttribute.setValue(this, isUnlimited); } @Override public ItemDefinition getItemSubject() { return itemSubjectRefAttribute.getReferenceT...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\DataStoreImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class AlarmCommentTriggerProcessor implements NotificationRuleTriggerProcessor<AlarmCommentTrigger, AlarmCommentNotificationRuleTriggerConfig> { private final EntityService entityService; @Override public boolean matchesFilter(AlarmCommentTrigger trigger, AlarmCommentNotificationRuleTriggerConfig t...
.action(trigger.getActionType() == ActionType.ADDED_COMMENT ? "added" : "updated") .userEmail(trigger.getUser().getEmail()) .userFirstName(trigger.getUser().getFirstName()) .userLastName(trigger.getUser().getLastName()) .alarmId(alarm.getUuidId()) ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\notification\rule\trigger\AlarmCommentTriggerProcessor.java
2
请在Spring Boot框架中完成以下Java代码
public String getMerchantOrderNo() { return merchantOrderNo; } public void setMerchantOrderNo(String merchantOrderNo) { this.merchantOrderNo = merchantOrderNo == null ? null : merchantOrderNo.trim(); } public String getTrxNo() { return trxNo; } public void setTrxNo(String trxNo) { this.trxNo = trxNo ==...
public String getPayWayName() { return payWayName; } public void setPayWayName(String payWayName) { this.payWayName = payWayName == null ? null : payWayName.trim(); } public Date getPaySuccessTime() { return paySuccessTime; } public void setPaySuccessTime(Date paySuccessTime) { this.paySuccessTime = pa...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\entity\RpAccountCheckMistakeScratchPool.java
2
请完成以下Java代码
public String getIban() { return iban; } /** * Sets the value of the iban property. * * @param value * allowed object is * {@link String } * */ public void setIban(String value) { this.iban = value; } /** * Gets the value of the...
* {@link String } * */ public void setCodingLine1(String value) { this.codingLine1 = value; } /** * Gets the value of the codingLine2 property. * * @return * possible object is * {@link String } * */ public String getCodingLine...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\EsrRedType.java
1
请在Spring Boot框架中完成以下Java代码
public ResponseEntity<?> registerUser(@RequestBody User signUpRequest, HttpServletRequest request) throws UnsupportedEncodingException { if (userRepository.existsByUsername(signUpRequest.getUsername())) { return ResponseEntity.badRequest() .body("Error: Username is already taken!");...
SecurityContextHolder.getContext() .setAuthentication(authentication); UserDetailsImpl userDetails = (UserDetailsImpl) authentication.getPrincipal(); String jwt = jwtUtils.generateJwtToken(authentication); return ResponseEntity.ok(new JwtResponse(jwt, userDetails.getUsername())); ...
repos\tutorials-master\spring-security-modules\spring-security-core\src\main\java\com\baeldung\jwtsignkey\controller\JwtAuthController.java
2
请完成以下Java代码
public static long numberOfFilesIn_classic(String path) { File currentFile = new File(path); File[] filesOrNull = currentFile.listFiles(); long currentFileNumber = currentFile.isFile() ? 1 : 0; if (filesOrNull == null) { return currentFileNumber; } for (File...
public static long numberOfFilesIn_Walk(String path) { Path dir = Path.of(path); try (Stream<Path> stream = Files.walk(dir)) { return stream.parallel() .map(getFileOrEmpty()) .flatMap(Optional::stream) .filter(it -> !it.isDirectory()) ...
repos\tutorials-master\core-java-modules\core-java-23\src\main\java\com\baeldung\javafeatures\FindFolder.java
1
请完成以下Java代码
public <T extends RepoIdAware> T getAsId(@NonNull final Class<T> type) {return RepoIdAwares.ofObject(value, type);} @NonNull public LocalDate getAsLocalDate() {return LocalDate.parse(value);} // NOTE: Quantity class is not accessible from this project :( @NonNull public ImmutablePair<BigDecimal, Integer> getAsQu...
throw ex; } catch (final Exception ex) { throw new AdempiereException("Cannot get Quantity from " + this, ex); } } @NonNull public String getAsString() {return value;} @NonNull public <T> T deserializeTo(@NonNull final Class<T> targetClass) { return JSONObjectMapper.forClass(targetClass).readValue(...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\rest_workflows\facets\WorkflowLaunchersFacetId.java
1
请完成以下Java代码
public final class NullModelTranslation implements IModelTranslation { public static final transient NullModelTranslation instance = new NullModelTranslation(); public static boolean isNull(@Nullable final IModelTranslation trl) { return trl == null || trl == instance; } private NullModelTranslation() { sup...
} @Override @Nullable public String getTranslation(final String columnName) { return null; } @Override public String getAD_Language() { throw new UnsupportedOperationException("" + NullModelTranslation.class + " does not have a language"); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\impl\NullModelTranslation.java
1
请完成以下Java代码
public Authority getAuthority() { return authority; } public void setAuthority(Authority authority) { this.authority = authority; } @Schema(description = "First name of the user", example = "John") public String getFirstName() { return firstName; } public void setF...
if (title.isEmpty()) { title = email; } return title; } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("User [tenantId="); builder.append(tenantId); builder.append(", customerId="); builder...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\User.java
1
请在Spring Boot框架中完成以下Java代码
public static class ThymeleafConfiguration { @Bean @ConditionalOnMissingBean ThymeleafLanguageDriver thymeleafLanguageDriver(ThymeleafLanguageDriverConfig config) { return new ThymeleafLanguageDriver(config); } @Bean @ConditionalOnMissingBean @ConfigurationProperties(CONFIGURATION_PRO...
public DialectConfig getDialect() { return super.getDialect(); } @ConfigurationProperties(CONFIGURATION_PROPERTY_PREFIX + ".thymeleaf.template-file") @Override public TemplateFileConfig getTemplateFile() { return super.getTemplateFile(); } } } }
repos\spring-boot-starter-master\mybatis-spring-boot-autoconfigure\src\main\java\org\mybatis\spring\boot\autoconfigure\MybatisLanguageDriverAutoConfiguration.java
2
请完成以下Java代码
private static void logColorUsingLogger() { ColorLogger colorLogger = new ColorLogger(); colorLogger.logDebug("Some debug logging"); colorLogger.logInfo("Some info logging"); colorLogger.logError("Some error logging"); } private static void logColorUsingJANSI() { AnsiCon...
* * 0 = black * 1 = red * 2 = green * 3 = yellow * 4 = blue * 5 = purple * 6 = cyan (light blue) * 7 = white * * \u001B[3#m = color font * \u001B[4#m = color background * \u001B[1;3#m = bold font * \u001B[4;3#m = underlined font * \u001B[3;3#m = italics font (not widely supported, works in VS Code) */
repos\tutorials-master\core-java-modules\core-java-console\src\main\java\com\baeldung\color\PrintColor.java
1
请完成以下Java代码
public boolean isHasRegions() { return hasRegions; } public int getSelectedRegionId() { final MRegion region = getSelectedItem(); if (region == null) { return -1; } return region.getC_Region_ID(); } public void setSelectedRegionId(final int regionId) { if(regionId <= 0) { ...
if (this.enabledCustom == enabledCustom) { return; } this.enabledCustom = enabledCustom; update(); } public void setEnabledByCaptureSequence(final LocationCaptureSequence captureSequence) { final boolean enabled = captureSequence.hasPart(partName); setEnabledByCaptureSequence(enabled); }...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VLocationDialog.java
1
请完成以下Java代码
private void process() { int batchSize = 4 * 1024; while (running) { try { MDC.put("destination", destination); connector.connect(); connector.subscribe(); while (running) { Message message = connector.getWit...
} connector.ack(batchId); // 提交确认 } } catch (Exception e) { logger.error("process error!", e); } finally { connector.disconnect(); MDC.remove("destination"); } } } }
repos\spring-boot-leaning-master\2.x_data\3-3 使用 canal 将业务数据从 Mysql 同步到 MongoDB\spring-boot-canal-mongodb\src\main\java\com\neo\canal\CanalClient.java
1
请完成以下Java代码
public boolean before(Authentication authentication, MethodInvocation mi, PreInvocationAttribute attr) { PreInvocationExpressionAttribute preAttr = (PreInvocationExpressionAttribute) attr; EvaluationContext ctx = this.expressionHandler.createEvaluationContext(authentication, mi); Expression preFilter = preAttr.ge...
} Assert.notNull(filterTarget, () -> "A PreFilter expression was set but the method argument type" + arg.getClass() + " is not filterable"); } else if (invocation.getArguments().length > 1) { throw new IllegalArgumentException( "Unable to determine the method argument for filtering. Specify the filt...
repos\spring-security-main\access\src\main\java\org\springframework\security\access\expression\method\ExpressionBasedPreInvocationAdvice.java
1
请完成以下Java代码
private CarrierService getCachedServiceByShipperExternalId(@NonNull final ShipperId shipperId, @Nullable final String externalId) { if (externalId == null) { return null; } return carrierServicesByExternalId.getOrLoad(shipperId + externalId, () -> queryBL.createQueryBuilder(I_Carrier_Service.class) ...
.id(CarrierServiceId.ofRepoId(service.getCarrier_Service_ID())) .externalId(service.getExternalId()) .name(service.getName()) .build(); } private CarrierService createShipperService(@NonNull final ShipperId shipperId, @NonNull final String externalId, @NonNull final String name) { final I_Carrier_Serv...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.commons\src\main\java\de\metas\shipper\gateway\commons\model\CarrierShipmentOrderServiceRepository.java
1
请完成以下Java代码
public java.lang.String getEventChangeLog () { return (java.lang.String)get_Value(COLUMNNAME_EventChangeLog); } /** Set Anpassung/Erweiterung. @param IsCustomization The change is a customization of the data dictionary and can be applied after Migration */ @Override public void setIsCustomization (bool...
/** Get Datensatz-ID. @return Direct internal record ID */ @Override public int getRecord_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_Record_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Redo. @param Redo Redo */ @Override public void setRedo (java.lang.String Redo) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ChangeLog.java
1
请在Spring Boot框架中完成以下Java代码
public class BirtReportController { private static final Logger log = Logger.getLogger(BirtReportController.class); @Autowired private BirtReportService reportService; @RequestMapping(produces = "application/json", method = RequestMethod.GET, value = "/report") @ResponseBody public List<Report...
} catch (EngineException e) { log.error("There was an error reloading the reports in memory: ", e); return ResponseEntity.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).build(); } return ResponseEntity.ok().build(); } @RequestMapping(method = RequestMethod.GET, val...
repos\tutorials-master\spring-boot-modules\spring-boot-mvc-birt\src\main\java\com\baeldung\birt\engine\controller\BirtReportController.java
2
请完成以下Java代码
public IQueryBuilder<I_C_OLCand> retrieveMissingCandidatesQuery(final Properties ctx, final String trxName) { final IQueryBL queryBL = Services.get(IQueryBL.class); final IQueryBuilder<I_C_OLCand> queryBuilder = queryBL.createQueryBuilder(I_C_OLCand.class, ctx, trxName) .addOnlyActiveRecordsFilter() .addOn...
// // Only those which were not already created final IQuery<I_C_Invoice_Candidate> existingICsQuery = queryBL.createQueryBuilder(I_C_Invoice_Candidate.class, ctx, trxName) .addEqualsFilter(I_C_Invoice_Candidate.COLUMNNAME_AD_Table_ID, InterfaceWrapperHelper.getTableId(I_C_OLCand.class)) .create(); queryB...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\invoicecandidate\spi\impl\C_OLCand_HandlerDAO.java
1
请完成以下Java代码
public static DbSqlSession getDbSqlSession() { return getDbSqlSession(getCommandContext()); } public static DbSqlSession getDbSqlSession(CommandContext commandContext) { return commandContext.getSession(DbSqlSession.class); } public static TableDataManager getTableDataManager()...
} public static HistoricDecisionExecutionEntityManager getHistoricDecisionExecutionEntityManager(CommandContext commandContext) { return getDmnEngineConfiguration(commandContext).getHistoricDecisionExecutionEntityManager(); } public static DmnRepositoryService getDmnRepositoryService() { ...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\util\CommandContextUtil.java
1
请在Spring Boot框架中完成以下Java代码
public String getBeginTime() { return beginTime; } public void setBeginTime(String beginTime) { this.beginTime = beginTime; } public String getEndTime() { return endTime; } public void setEndTime(String endTime) { this.endTime = endTime; } public String getCode() { return code; } public void ...
enumMap.put(key, map); } return enumMap; } @SuppressWarnings({ "rawtypes", "unchecked" }) public static List toList() { BusCategoryEnum[] ary = BusCategoryEnum.values(); List list = new ArrayList(); for (int i = 0; i < ary.length; i++) { Map<String, String> map = new HashMap<String, String>(); map.p...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\user\enums\BusCategoryEnum.java
2
请完成以下Java代码
public boolean isMandatoryPL () { Object oo = get_Value(COLUMNNAME_IsMandatoryPL); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Minimum Amt. @param MinimumAmt Minumum Amout in Document Currency */...
/** Set Promotion. @param M_Promotion_ID Promotion */ public void setM_Promotion_ID (int M_Promotion_ID) { if (M_Promotion_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Promotion_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Promotion_ID, Integer.valueOf(M_Promotion_ID)); } /** Get Promotion. @return P...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PromotionLine.java
1
请在Spring Boot框架中完成以下Java代码
private void cleanupAndCancel(TbAbstractSubCtx ctx) { if (ctx != null) { ctx.stop(); if (ctx.getSessionId() != null) { Map<Integer, TbAbstractSubCtx> sessionSubs = subscriptionsBySessionId.get(ctx.getSessionId()); if (sessionSubs != null) { ...
try { cleanupAndCancel(sub); } catch (Exception e) { log.warn("[{}] Failed to remove subscription {} due to ", sub.getTenantId(), sub, e); } } ); } } private int getLi...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\subscription\DefaultTbEntityDataSubscriptionService.java
2
请完成以下Java代码
private void notifyEMail(final MADBoilerPlate text, final MRGroupProspect prospect) { MADBoilerPlate.sendEMail(new IEMailEditor() { @Override public Object getBaseObject() { return prospect; } @Override public int getAD_Table_ID() { return X_R_Group.Table_ID; } @Override pub...
.message(text.getTextSnippetParsed(attributes)) .html(true) .build()); } }); } private void notifyLetter(MADBoilerPlate text, MRGroupProspect prospect) { throw new UnsupportedOperationException(); } private List<MRGroupProspect> getProspects(int R_Group_ID) { final String whereClause = MRGr...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\letters\report\AD_BoilderPlate_SendToGroup.java
1
请在Spring Boot框架中完成以下Java代码
protected Session getSession() { Subject subject = SecurityUtils.getSubject(); Session session = subject.getSession(); return session; } /** * 获取当前用户信息 * * @return */ protected PmsOperator getPmsOperator() { PmsOperator operator = (PmsOperator) this.getSession().getAttribute("PmsOperator"); retur...
model.addAttribute("dwz", dwz); return "common/ajaxDone"; } /** * 响应DWZ的ajax失败成功,跳转到ajaxDone视图. * * @param model * model. * @param dwz * 页面传过来的dwz参数 * @return ajaxDone . */ protected String operateSuccess(Model model, DwzAjax dwz) { dwz.setStatusCode(DWZ.SUCCESS); dwz.se...
repos\roncoo-pay-master\roncoo-pay-web-boss\src\main\java\com\roncoo\pay\controller\common\BaseController.java
2
请完成以下Java代码
public class ProcessCompletedListenerDelegate implements ActivitiEventListener { private List<ProcessRuntimeEventListener<ProcessCompletedEvent>> processRuntimeEventListeners; private ToProcessCompletedConverter processCompletedConverter; public ProcessCompletedListenerDelegate( List<ProcessRunti...
processCompletedConverter .from((ActivitiEntityEvent) event) .ifPresent(convertedEvent -> { for (ProcessRuntimeEventListener<ProcessCompletedEvent> listener : processRuntimeEventListeners) { listener.onEvent(convertedEvent); ...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-runtime-impl\src\main\java\org\activiti\runtime\api\event\internal\ProcessCompletedListenerDelegate.java
1
请完成以下Java代码
public final boolean isGenerateReportsOnOrderComplete(@NonNull final I_C_Order order) { if (!isEligibleForReporting(order)) { return false; // nothing to do; log messages were already created in isEligibleForReporting } final boolean sysConfigValueIsTrue = sysConfigBL.getBooleanValue( SYSCONFIG_ORDERCH...
} } @Override public int getNumberOfCopies(@NonNull final I_C_Printing_Queue queueItem, @NonNull final I_AD_Archive printOut) { final I_C_Order_MFGWarehouse_Report report = getReportOrNull(printOut); if (report != null && report.getDocumentType().equals(X_C_Order_MFGWarehouse_Report.DOCUMENTTYPE_Warehouse)) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\de\metas\fresh\ordercheckup\impl\OrderCheckupBL.java
1
请完成以下Java代码
public class SideActionsGroupModel implements ISideActionsGroupModel { private final String id; private final String title; private final boolean defaultCollapsed; private final DefaultListModel<ISideAction> actions; public SideActionsGroupModel(final String id, final String title, final boolean defaultCollapsed)...
} actions.addElement(action); } @Override public void removeAction(final int index) { actions.remove(index); } @Override public void setActions(final Iterable<? extends ISideAction> actions) { this.actions.clear(); if (actions != null) { final List<ISideAction> actionsList = ListUtils.copyAsLis...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ui\sideactions\model\SideActionsGroupModel.java
1
请完成以下Spring Boot application配置
# the datasource spring.datasource.url=jdbc:h2:mem:2fa;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE spring.datasource.driverClassName=org.h2.Driver # jpa/hibernate spring.jpa.show-sql=false spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy spring.jpa.database...
org.hibernate.dialect.H2Dialect spring.jpa.properties.hibernate.format_sql=true logging.level.root=INFO logging.path=/var/log 2fa.enabled=true
repos\springboot-demo-master\MFA\src\main\resources\application.properties
2
请完成以下Java代码
public int getRowCount() { return m_data.size() - 1; } @Override public boolean isColumnPrinted(final int col) { return true; } @Override public boolean isFunctionRow(final int row) { return false; } @Override public boolean isPageBreak(final int row, final int col) { return false; } @Overrid...
stepToNextRow(); return CellValues.toCellValues(currentRow); } private void stepToNextRow() { currentRow = m_data.get(currentRowNumber); currentRowNumber++; } @Override protected boolean hasNextRow() { return currentRowNumber < m_data.size(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\spreadsheet\excel\ArrayExcelExporter.java
1
请在Spring Boot框架中完成以下Java代码
public class CreateProcessInstanceRequest { ProcessId processId; DocumentPath singleDocumentPath; List<DocumentPath> selectedIncludedDocumentPaths; ViewRowIdsSelection viewRowIdsSelection; DocumentQueryOrderByList viewOrderBys; ViewRowIdsSelection parentViewRowIdsSelection; ViewRowIdsSelection childViewRowIdsSel...
this.viewRowIdsSelection = viewRowIdsSelection; this.viewOrderBys = viewOrderBys; this.parentViewRowIdsSelection = parentViewRowIdsSelection; this.childViewRowIdsSelection = childViewRowIdsSelection; } public void assertProcessIdEquals(final ProcessId expectedProcessId) { if (!Objects.equals(processId, expe...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\CreateProcessInstanceRequest.java
2
请完成以下Java代码
public Integer getParamIdx() { return paramIdx; } public void setParamIdx(Integer paramIdx) { this.paramIdx = paramIdx; } public double getCount() { return count; } public void setCount(double count) { this.count = count; } public int getControlBehavio...
@Override public Long getId() { return id; } @Override public void setId(Long id) { this.id = id; } @Override public String getApp() { return app; } public void setApp(String app) { this.app = app; } @Override public String getIp() { ...
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-sentinel\src\main\java\com\alibaba\csp\sentinel\dashboard\rule\nacos\entity\ParamFlowRuleCorrectEntity.java
1
请完成以下Java代码
public void setAD_Table_ID (final int AD_Table_ID) { if (AD_Table_ID < 1) set_Value (COLUMNNAME_AD_Table_ID, null); else set_Value (COLUMNNAME_AD_Table_ID, AD_Table_ID); } @Override public int getAD_Table_ID() { return get_ValueAsInt(COLUMNNAME_AD_Table_ID); } @Override public void setLookupSQL...
{ return get_ValueAsString(COLUMNNAME_LookupSQL); } @Override public void setSeqNo (final int SeqNo) { set_Value (COLUMNNAME_SeqNo, SeqNo); } @Override public int getSeqNo() { return get_ValueAsInt(COLUMNNAME_SeqNo); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_BusinessRule_WarningTarget.java
1
请在Spring Boot框架中完成以下Java代码
static class ResponseToken { private final Saml2AuthenticationToken token; private final Response response; ResponseToken(Response response, Saml2AuthenticationToken token) { this.token = token; this.response = response; } Response getResponse() { return this.response; } Saml2AuthenticationT...
static class AssertionToken { private final Saml2AuthenticationToken token; private final Assertion assertion; AssertionToken(Assertion assertion, Saml2AuthenticationToken token) { this.token = token; this.assertion = assertion; } Assertion getAssertion() { return this.assertion; } Saml2Auth...
repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\authentication\BaseOpenSamlAuthenticationProvider.java
2
请完成以下Java代码
private void setHostKey(final I_AD_PrinterHW printerHW) { if (Check.isNotBlank(printerHW.getHostKey())) { return; // HostKey was already set, nothing to do } if (!Objects.equals(OutputType.Queue, OutputType.ofNullableCode(printerHW.getOutputType()))) { return; // no hostkey needed } final Propert...
hardwarePrinterRepository.deleteMediaSizes(hardwarePrinterId); } /** * Needed because we want to order by ConfigHostKey and "unspecified" shall always be last. */ @ModelChange( timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFORE_CHANGE }, ifColumnsChanged = I_AD_Printer_Config.COLUMNNAM...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\model\validator\AD_PrinterHW.java
1
请完成以下Java代码
public class Station implements GraphNode { private final String id; private final String name; private final double latitude; private final double longitude; public Station(String id, String name, double latitude, double longitude) { this.id = id; this.name = name; this.lat...
} public double getLatitude() { return latitude; } public double getLongitude() { return longitude; } @Override public String toString() { return new StringJoiner(", ", Station.class.getSimpleName() + "[", "]").add("id='" + id + "'") .add("name='" + name + ...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-2\src\main\java\com\baeldung\algorithms\astar\underground\Station.java
1
请完成以下Java代码
public void processCmmnElements(CmmnModel cmmnModel, CmmnParseResult parseResult) { for (Case caze : cmmnModel.getCases()) { cmmnParseHandlers.parseElement(this, parseResult, caze); } } public void processDI(CmmnModel cmmnModel, List<CaseDefinitionEntity> caseDefinitions) { ...
return cmmnParseHandlers; } public void setCmmnParseHandlers(CmmnParseHandlers cmmnParseHandlers) { this.cmmnParseHandlers = cmmnParseHandlers; } public CmmnActivityBehaviorFactory getActivityBehaviorFactory() { return activityBehaviorFactory; } public void setActivityBehavior...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\parser\CmmnParserImpl.java
1
请完成以下Java代码
public void setNewAmt (final BigDecimal NewAmt) { set_Value (COLUMNNAME_NewAmt, NewAmt); } @Override public BigDecimal getNewAmt() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_NewAmt); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setNewCostPrice (final BigDecimal NewCos...
@Override public void setQty (final BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } @Override public BigDecimal getQty() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty); return bd != null ? bd : BigDecimal.ZERO; } /** * RevaluationType AD_Reference_ID=541641 * Reference name: M_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_CostRevaluation_Detail.java
1
请完成以下Java代码
public BooleanExpression build() { if (params.size() == 0) { return null; } final List<BooleanExpression> predicates = params.stream().map(param -> { MyUserPredicate predicate = new MyUserPredicate(param); return predicate.getPredicate(); }).f...
private BooleanExpression result; public BooleanExpressionWrapper(final BooleanExpression result) { super(); this.result = result; } public BooleanExpression getResult() { return result; } public void setResult(BooleanExpression result) { ...
repos\tutorials-master\spring-web-modules\spring-rest-query-language\src\main\java\com\baeldung\persistence\dao\MyUserPredicatesBuilder.java
1
请完成以下Java代码
public class Employee { public long id; public String title; public Employee() { } public Employee(long id, String title) { this.id = id; this.title = title; } public long getId() { return id; } public void setId(long id) { this.id = id;
} public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } @Override public String toString() { return "Employee #" + id + "[" + title + "]"; } }
repos\tutorials-master\spring-web-modules\spring-resttemplate-1\src\main\java\com\baeldung\resttemplate\lists\dto\Employee.java
1
请完成以下Java代码
private void append(StringBuilder report, Map<String, List<PropertyMigration>> content) { content.forEach((name, properties) -> { report.append(String.format("Property source '%s':%n", name)); properties.sort(PropertyMigration.COMPARATOR); properties.forEach((property) -> { report.append(String.format("\...
private static class LegacyProperties { private final List<PropertyMigration> properties; LegacyProperties(List<PropertyMigration> properties) { this.properties = new ArrayList<>(properties); } List<PropertyMigration> getRenamed() { return this.properties.stream().filter(PropertyMigration::isCompatible...
repos\spring-boot-4.0.1\core\spring-boot-properties-migrator\src\main\java\org\springframework\boot\context\properties\migrator\PropertiesMigrationReport.java
1
请在Spring Boot框架中完成以下Java代码
private class PropertiesSentinel implements Sentinel { private final int database; private final DataRedisProperties.Sentinel properties; PropertiesSentinel(int database, DataRedisProperties.Sentinel properties) { this.database = database; this.properties = properties; } @Override public int getDa...
} @Override public List<Node> getNodes() { return asNodes(this.properties.getNodes()); } @Override public @Nullable String getUsername() { return this.properties.getUsername(); } @Override public @Nullable String getPassword() { return this.properties.getPassword(); } } }
repos\spring-boot-4.0.1\module\spring-boot-data-redis\src\main\java\org\springframework\boot\data\redis\autoconfigure\PropertiesDataRedisConnectionDetails.java
2
请完成以下Java代码
public DocumentZoomIntoInfo overrideWindowIdIfPossible(@Nullable final Optional<WindowId> windowId) { if (windowId == null || !windowId.isPresent()) { return this; } return toBuilder().windowId(windowId.get()).build(); } public DocumentZoomIntoInfo overrideWindowIdIfPossible(@NonNull final CustomizedWind...
.getCustomizedWindowInfo(adWindowId) .map(CustomizedWindowInfo::getCustomizationWindowId) .map(WindowId::of) .orElse(null); if (customizedWindowId == null) { return this; } return !WindowId.equals(this.windowId, customizedWindowId) ? toBuilder().windowId(customizedWindowId).build() : thi...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\lookup\zoom_into\DocumentZoomIntoInfo.java
1
请完成以下Java代码
protected DataManager<ProcessDefinitionInfoEntity> getDataManager() { return processDefinitionInfoDataManager; } public void insertProcessDefinitionInfo(ProcessDefinitionInfoEntity processDefinitionInfo) { insert(processDefinitionInfo); } public void updateProcessDefinitionInfo(Process...
if (processDefinitionInfo.getInfoJsonId() == null) { processDefinitionInfo.setInfoJsonId(ref.getId()); updateProcessDefinitionInfo(processDefinitionInfo); } } } public void deleteInfoJson(ProcessDefinitionInfoEntity processDefinitionInfo) { if (proces...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ProcessDefinitionInfoEntityManagerImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonNewLUTargetsList { @NonNull List<JsonNewLUTarget> values; @Nullable String emptyReason; @Nullable List<String> debugMessages; public static JsonNewLUTargetsList ofList(@NonNull List<JsonNewLUTarget> values, @Nullable final List<String> debugMessages) { Check.assumeNotEmpty(values, "values"); ...
@Builder @Jacksonized private JsonNewLUTargetsList( @Nullable final List<JsonNewLUTarget> values, @Nullable final String emptyReason, @Nullable final List<String> debugMessages) { this.values = values != null ? ImmutableList.copyOf(values) : ImmutableList.of(); this.emptyReason = emptyReason; this.deb...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\workflows_api\activity_handlers\receive\json\JsonNewLUTargetsList.java
2
请完成以下Java代码
public boolean containsAll(Collection<?> c) { for (Object o : c) { if (!contains(o)) { return false; } } return true; } public boolean addAll(Collection<? extends T> c) { for (T element : c) { add(element); } return t...
public boolean retainAll(Collection<?> c) { throw new UnsupportedModelOperationException("retainAll()", "not implemented"); } public void clear() { DomElement domElement = getDomElement(); List<DomElement> childElements = domElement.getChildElements(); for (DomElement childE...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\camunda\CamundaListImpl.java
1
请完成以下Java代码
public Article as(String alias) { return new Article(DSL.name(alias), this); } @Override public Article as(Name alias) { return new Article(alias, this); } /** * Rename this table */ @Override public Article rename(String name) { return new Article(DSL.nam...
* Rename this table */ @Override public Article rename(Name name) { return new Article(name, null); } // ------------------------------------------------------------------------- // Row4 type methods // ------------------------------------------------------------------------- ...
repos\tutorials-master\persistence-modules\jooq\src\main\java\com\baeldung\jooq\model\tables\Article.java
1
请完成以下Java代码
public class Server_RunNow { public static void main(final String[] args) throws InterruptedException { // NOTE: We expect the "PropertyFile" to be configured from eclipse luncher. // final String username = System.getProperty("user.name"); // final String propertyDir = "c:/workspaces//de.metas.endcustomer./";...
Env.getSingleAdempiereInstance(null).startup(RunMode.BACKEND); final Properties ctx = Env.getCtx(); Env.setContext(ctx, Env.CTXNAME_AD_Client_ID, 0); Env.setContext(ctx, Env.CTXNAME_AD_Org_ID, 0); Env.setContext(ctx, Env.CTXNAME_AD_User_ID, 0); Env.setContext(ctx, Env.CTXNAME_AD_Role_ID, 0); Env.setContext...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\serverRoot\de.metas.adempiere.adempiere.serverRoot.base\src\main\java\org\compiere\server\devtools\Server_RunNow.java
1
请在Spring Boot框架中完成以下Java代码
public I_C_Invoice createInvoice(String trxName) { return InterfaceWrapperHelper.create(Env.getCtx(), I_C_Invoice.class, trxName); } @Override public I_C_InvoiceLine createInvoiceLine(final org.compiere.model.I_C_Invoice invoice) { final MInvoice invoicePO = LegacyAdapters.convertToPO(invoice); final MInvoi...
{ logger.error("getLandedCost", e); } finally { DB.close(rs, pstmt); } return list; } // getLandedCost @Override public I_C_LandedCost createLandedCost(String trxName) { return new MLandedCost(Env.getCtx(), 0, trxName); } @Override public List<I_C_InvoiceTax> retrieveTaxes(org.compiere.model...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\service\impl\InvoiceDAO.java
2
请完成以下Java代码
public HistoricVariableInstanceQuery orderByProcessInstanceId() { orderBy(HistoricVariableInstanceQueryProperty.PROCESS_INSTANCE_ID); return this; } public HistoricVariableInstanceQuery orderByVariableName() { orderBy(HistoricVariableInstanceQueryProperty.VARIABLE_NAME); return this; } public ...
} public Boolean getVariableNamesIgnoreCase() { return variableNamesIgnoreCase; } public Boolean getVariableValuesIgnoreCase() { return variableValuesIgnoreCase; } @Override public HistoricVariableInstanceQuery includeDeleted() { includeDeleted = true; return this; } public String ge...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricVariableInstanceQueryImpl.java
1
请完成以下Java代码
public class Item { public int id; public String itemName; public User owner; public Item() { super(); } public Item(final int id, final String itemName, final User owner) { this.id = id; this.itemName = itemName; this.owner = owner; }
// API public int getId() { return id; } public String getItemName() { return itemName; } public User getOwner() { return owner; } }
repos\tutorials-master\jackson-modules\jackson-custom-conversions\src\main\java\com\baeldung\deserialization\Item.java
1
请完成以下Java代码
protected void initClock(AbstractEngineConfiguration engineConfiguration, AbstractEngineConfiguration targetEngineConfiguration) { targetEngineConfiguration.setClock(engineConfiguration.getClock()); } protected void initObjectMapper(AbstractEngineConfiguration engineConfiguration, AbstractEngineConfigu...
targetEngineConfiguration.setDatabaseSchemaUpdate(null); engineConfiguration.addAdditionalSchemaManager(targetEngineConfiguration.createEngineSchemaManager()); } protected abstract List<Class<? extends Entity>> getEntityInsertionOrder(); protected abstract List<Class<? extends Entity>> getEntityDe...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\AbstractEngineConfigurator.java
1
请在Spring Boot框架中完成以下Java代码
public class Deprecation implements Serializable { private Level level = Level.WARNING; private String reason; private String shortReason; private String replacement; /** * Define the {@link Level} of deprecation. * @return the deprecation level */ public Level getLevel() { return this.level; } pu...
this.shortReason = shortReason; } /** * The full name of the property that replaces the related deprecated property, if * any. * @return the replacement property name */ public String getReplacement() { return this.replacement; } public void setReplacement(String replacement) { this.replacement = rep...
repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-metadata\src\main\java\org\springframework\boot\configurationmetadata\Deprecation.java
2
请在Spring Boot框架中完成以下Java代码
private HUTransformService newHUTransformService() { return HUTransformService.builder() .huQRCodesService(huService.getHuQRCodesService()) .build(); } @NonNull private PickingJob reinitializePickingTargetIfDestroyed(final PickingJob pickingJob) { if (isLineLevelPickTarget(pickingJob)) { return p...
final HuId luId = luPickingTarget.getLuId(); if (luId == null) { return luPickingTarget; } final I_M_HU lu = huService.getById(luId); if (!huService.isDestroyedOrEmptyStorage(lu)) { return luPickingTarget; } final HuPackingInstructionsIdAndCaption luPI = huService.getEffectivePackingInstructions...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\service\commands\PickingJobUnPickCommand.java
2
请在Spring Boot框架中完成以下Java代码
public class ActiveMqListenerConfig { @Value("${orderQueryQueueName.query}") private String orderQueryQueueDestinationName; /** * 队列目的地 * * @return 队列目的地 */ @Bean(name = "orderQueryQueueDestination") public ActiveMQQueue orderQueryQueueDestination() { return new ActiveM...
* @param singleConnectionFactory 连接工厂 * @param orderQueryQueueDestination 消息目的地 * @param pollingMessageListener 监听器实现 * @return 消息监听容器 */ @Bean(name = "orderQueryQueueMessageListenerContainer") public DefaultMessageListenerContainer orderQueryQueueMessageListenerContainer(@Qualifier("...
repos\roncoo-pay-master\roncoo-pay-app-order-polling\src\main\java\com\roncoo\pay\config\ActiveMqListenerConfig.java
2
请完成以下Java代码
public void setDescription (String Description) { set_Value (COLUMNNAME_Description, Description); } /** Get Description. @return Optional short description of the record */ public String getDescription () { return (String)get_Value(COLUMNNAME_Description); } /** Set Promotion. @param M_Promotion_I...
*/ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName()); } /** Set Relative Priority. @param PromotionPriority Which promotion should be apply to a product */ public void setPromotionPriority (int PromotionPriority) { set_Value (COLUMNNAME_PromotionPriorit...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Promotion.java
1
请完成以下Java代码
protected @NonNull Predicate<String> getRegionBeanName() { return regionBeanName; } /** * Returns the configured Spring Data {@link CrudRepository} adapted/wrapped as a {@link CacheWriter} * and used to write {@link Region} values to a backend data source/data store. * * @return the configured {@link CrudR...
bean.setCacheWriter(newRepositoryCacheWriter()); } } /** * Constructs a new instance of {@link RepositoryCacheWriter} adapting the {@link CrudRepository} * as an instance of a {@link CacheWriter}. * * @return a new {@link RepositoryCacheWriter}. * @see org.springframework.geode.cache.RepositoryCacheWrite...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\cache\RepositoryCacheWriterRegionConfigurer.java
1
请完成以下Java代码
private JList<E> getJList() { final ComboPopup comboPopup = AdempiereComboBoxUI.getComboPopup(comboBox); if (comboPopup == null) { return null; } @SuppressWarnings("unchecked") final JList<E> list = (JList<E>)comboPopup.getList(); return list; } private final class EditingCommand { private bool...
this.textToSet = textToSet; this.doSetText = true; } public boolean isDoSetText() { return doSetText; } public String getTextToSet() { return textToSet; } public void setHighlightTextStartPosition(int highlightTextStartPosition) { this.highlightTextStartPosition = highlightTextStartPosi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\ComboBoxAutoCompletion.java
1
请完成以下Java代码
public void setAD_Role_ID (final int AD_Role_ID) { if (AD_Role_ID < 0) set_Value (COLUMNNAME_AD_Role_ID, null); else set_Value (COLUMNNAME_AD_Role_ID, AD_Role_ID); } @Override public int getAD_Role_ID() { return get_ValueAsInt(COLUMNNAME_AD_Role_ID); } @Override public void setAD_User_ID (final...
public java.lang.String getEntityType() { return get_ValueAsString(COLUMNNAME_EntityType); } @Override public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } /** * Respon...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WF_Responsible.java
1
请完成以下Java代码
public void setOperation (String Operation) { set_Value (COLUMNNAME_Operation, Operation); } /** Get Operation. @return Compare Operation */ public String getOperation () { return (String)get_Value(COLUMNNAME_Operation); } /** Set Search Key. @param Value Search key for the record in the format...
/** Set Value To. @param Value2 Value To */ public void setValue2 (String Value2) { set_Value (COLUMNNAME_Value2, Value2); } /** Get Value To. @return Value To */ public String getValue2 () { return (String)get_Value(COLUMNNAME_Value2); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Find.java
1
请完成以下Java代码
public class RemoveHUFromPickingSlotCommand { private final IHUPickingSlotBL huPickingSlotBL = Services.get(IHUPickingSlotBL.class); private final IHandlingUnitsDAO handlingUnitsDAO = Services.get(IHandlingUnitsDAO.class); private final PickingCandidateRepository pickingCandidateRepository; private final HuId huId...
pickingCandidateRepository.deletePickingCandidates(candidates); huPickingSlotBL.releasePickingSlotsIfPossible(pickingSlotIds); } @NonNull private List<PickingCandidate> retrievePickingCandidates() { return pickingCandidateRepository.getDraftedByHuIdAndPickingSlotId(getHuIds(), pickingSlotId); } @NonNull p...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\candidate\commands\RemoveHUFromPickingSlotCommand.java
1
请完成以下Java代码
private long addToCentral(List<DataBlock> parts, ZipCentralDirectoryFileHeaderRecord originalRecord, long originalRecordPos, DataBlock name, int offsetToLocalHeader) throws IOException { ZipCentralDirectoryFileHeaderRecord record = originalRecord.withFileNameLength((short) (name.size() & 0xFFFF)) .withOffsetToL...
private final long size; DataPart(long offset, long size) { this.offset = offset; this.size = size; } @Override public long size() throws IOException { return this.size; } @Override public int read(ByteBuffer dst, long pos) throws IOException { int remaining = (int) (this.size - pos); if...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\zip\VirtualZipDataBlock.java
1
请完成以下Java代码
public boolean isDefault () { Object oo = get_Value(COLUMNNAME_IsDefault); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setN...
/** Set Status Category. @param R_StatusCategory_ID Request Status Category */ public void setR_StatusCategory_ID (int R_StatusCategory_ID) { if (R_StatusCategory_ID < 1) set_ValueNoCheck (COLUMNNAME_R_StatusCategory_ID, null); else set_ValueNoCheck (COLUMNNAME_R_StatusCategory_ID, Integer.valueOf...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_StatusCategory.java
1
请在Spring Boot框架中完成以下Java代码
public ManagementService getManagementService() { return processEngine.getManagementService(); } @Bean(name = "authorizationService") @Override public AuthorizationService getAuthorizationService() { return processEngine.getAuthorizationService(); } @Bean(name = "caseService") @Override public...
@Override public FilterService getFilterService() { return processEngine.getFilterService(); } @Bean(name = "externalTaskService") @Override public ExternalTaskService getExternalTaskService() { return processEngine.getExternalTaskService(); } @Bean(name = "decisionService") @Override public...
repos\camunda-bpm-platform-master\engine-spring\core\src\main\java\org\camunda\bpm\engine\spring\SpringProcessEngineServicesConfiguration.java
2
请完成以下Java代码
public I_C_UOM getUOM() {return getQtyToPick().getUOM();} public Quantity getQtyPicked() {return pickedHUs != null ? pickedHUs.getQtyPicked() : getQtyToPick().toZero();} public boolean isPickedFrom() {return pickedHUs != null;} public void assertNotPickedFrom() { if (isPickedFrom()) {throw new AdempiereExcepti...
{ this.status = computeStatus(); } private DDOrderMoveScheduleStatus computeStatus() { if (isDropTo()) { return DDOrderMoveScheduleStatus.COMPLETED; } else if (isPickedFrom()) { return DDOrderMoveScheduleStatus.IN_PROGRESS; } else { return DDOrderMoveScheduleStatus.NOT_STARTED; } } @...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\distribution\ddorder\movement\schedule\DDOrderMoveSchedule.java
1
请在Spring Boot框架中完成以下Java代码
public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getMethod() { return method; } public void setMethod(String method) { this.method = method; } public int getConnectionTimeout() { return con...
this.timeout = timeout; } /** * @return Returns the charset. */ public String getCharset() { return charset; } /** * @param charset The charset to set. */ public void setCharset(String charset) { this.charset = charset; } public HttpResultType getRe...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\utils\alipay\httpClient\HttpRequest.java
2
请完成以下Java代码
public byte[] getBinaryData(final I_AD_Archive archive) { return archiveStorageFactory.getArchiveStorage(archive).getBinaryData(archive); } @Override public void setBinaryData(final I_AD_Archive archive, final byte[] data) { archiveStorageFactory.getArchiveStorage(archive).setBinaryData(archive, data); } @...
return Optional.empty(); } else { return Optional.of(lastArchives.get(0)); } } @Override public Optional<Resource> getLastArchiveBinaryData( @NonNull final TableRecordReference reference) { return getLastArchive(reference).map(AdArchive::getArchiveDataAsResource); } @Override public void update...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\archive\api\impl\ArchiveBL.java
1
请完成以下Java代码
public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName()); } /** Set Expense Type. @param S_ExpenseType_ID Expens...
} /** Set Search Key. @param Value Search key for the record in the format required - must be unique */ public void setValue (String Value) { set_Value (COLUMNNAME_Value, Value); } /** Get Search Key. @return Search key for the record in the format required - must be unique */ public String getVa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_S_ExpenseType.java
1
请完成以下Java代码
public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName()); } /** ShareType AD_Reference_ID=365 */ public static final int SHARETYPE_AD_Reference_ID=365; /** Client (all shared) = C */ public static final String SHARETYPE_ClientAllShared = "C"; /** Org (not shared) = O */ ...
Type of sharing */ public void setShareType (String ShareType) { set_Value (COLUMNNAME_ShareType, ShareType); } /** Get Share Type. @return Type of sharing */ public String getShareType () { return (String)get_Value(COLUMNNAME_ShareType); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ClientShare.java
1
请完成以下Java代码
private void collectFromChanges(@NonNull final ViewChanges changes) { viewChanges(changes.getViewId()).collectFrom(changes); autoflushIfEnabled(); } @Nullable private ViewChangesCollector getParentOrNull() { final ViewChangesCollector threadLocalCollector = getCurrentOrNull(); if (threadLocalCollector !=...
private ImmutableList<ViewChanges> getAndClean() { if (viewChangesMap.isEmpty()) { return ImmutableList.of(); } final ImmutableList<ViewChanges> changesList = ImmutableList.copyOf(viewChangesMap.values()); viewChangesMap.clear(); return changesList; } private void sendToWebsocket(@NonNull final List...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\event\ViewChangesCollector.java
1
请完成以下Java代码
public Set<String> getInvolvedGroups() { return involvedGroups; } public boolean isIncludeCaseVariables() { return includeCaseVariables; } public Collection<String> getVariableNamesToInclude() { return variableNamesToInclude; } public boolean isNeedsCaseDefinitionOuter...
return safeCaseInstanceIds; } public void setSafeCaseInstanceIds(List<List<String>> safeCaseInstanceIds) { this.safeCaseInstanceIds = safeCaseInstanceIds; } public List<List<String>> getSafeInvolvedGroups() { return safeInvolvedGroups; } public void setSafeInvolvedGroups(List<...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\CaseInstanceQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class JobAddedTransactionListener implements TransactionListener { private static final Logger LOGGER = LoggerFactory.getLogger(JobAddedTransactionListener.class); protected JobInfo job; protected AsyncExecutor asyncExecutor; protected CommandExecutor commandExecutor; public JobAddedTransa...
// which would block the current connection/transaction (of the calling thread) // until the job has been handed of to the async executor. // When the connection pool is small, this might lead to contention and (temporary) locks. if (job instanceof Entity) { if (((Entity) job).isDele...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\asyncexecutor\JobAddedTransactionListener.java
2
请在Spring Boot框架中完成以下Java代码
public class ParameterInjectionExampleController { private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(ParameterInjectionExampleController.class); @GetRoute("/params/form") public void formParam(@Param String name, Response response) { log.info("name: " + name); r...
log.error(e.getMessage(), e); return RestResponse.fail(e.getMessage()); } } @GetRoute("/params/header") public void headerParam(@HeaderParam String customheader, Response response) { log.info("Custom header: " + customheader); response.text(customheader); } @Get...
repos\tutorials-master\web-modules\blade\src\main\java\com\baeldung\blade\sample\ParameterInjectionExampleController.java
2
请完成以下Java代码
public class RelationshipImpl extends BaseElementImpl implements Relationship { protected static Attribute<String> typeAttribute; protected static Attribute<RelationshipDirection> directionAttribute; protected static ChildElementCollection<Source> sourceCollection; protected static ChildElementCollection<Targe...
public RelationshipImpl(ModelTypeInstanceContext instanceContext) { super(instanceContext); } public String getType() { return typeAttribute.getValue(this); } public void setType(String type) { typeAttribute.setValue(this, type); } public RelationshipDirection getDirection() { return dire...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\RelationshipImpl.java
1
请完成以下Java代码
public void setDescription (final @Nullable java.lang.String Description) { set_Value (COLUMNNAME_Description, Description); } @Override public java.lang.String getDescription() { return get_ValueAsString(COLUMNNAME_Description); } /** * HU_SourceDocType AD_Reference_ID=541696 * Reference name: HU_So...
@Override public void setLabelReport_Process_ID (final int LabelReport_Process_ID) { if (LabelReport_Process_ID < 1) set_Value (COLUMNNAME_LabelReport_Process_ID, null); else set_Value (COLUMNNAME_LabelReport_Process_ID, LabelReport_Process_ID); } @Override public int getLabelReport_Process_ID() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Label_Config.java
1
请完成以下Java代码
public void parseScriptTask(Element scriptTaskElement, ScopeImpl scope, ActivityImpl activity) { addListeners(activity); } public void parseServiceTask(Element serviceTaskElement, ScopeImpl scope, ActivityImpl activity) { addListeners(activity); } public void parseBusinessRuleTask(Element businessRule...
addListeners(activity); } public void parseEventBasedGateway(Element eventBasedGwElement, ScopeImpl scope, ActivityImpl activity) { addListeners(activity); } public void parseTransaction(Element transactionElement, ScopeImpl scope, ActivityImpl activity) { addListeners(activity); } public void pa...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\metrics\parser\MetricsBpmnParseListener.java
1
请在Spring Boot框架中完成以下Java代码
public class IdManBook implements Serializable { private static final long serialVersionUID = 1L; @Id private Long id; private String title; private String isbn; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String ge...
this.isbn = isbn; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if(obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } IdManBook o...
repos\Hibernate-SpringBoot-master\HibernateSpringBootLombokEqualsAndHashCode\src\main\java\com\app\IdManBook.java
2
请完成以下Java代码
public final class GenerateOneTimeTokenWebFilter implements WebFilter { private final ReactiveOneTimeTokenService oneTimeTokenService; private ServerWebExchangeMatcher matcher = ServerWebExchangeMatchers.pathMatchers(HttpMethod.POST, "/ott/generate"); private ServerGenerateOneTimeTokenRequestResolver generateRequ...
/** * Use the given {@link ServerWebExchangeMatcher} to match the request. * @param matcher */ public void setRequestMatcher(ServerWebExchangeMatcher matcher) { Assert.notNull(matcher, "matcher cannot be null"); this.matcher = matcher; } /** * Use the given {@link ServerGenerateOneTimeTokenRequestResolv...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\authentication\ott\GenerateOneTimeTokenWebFilter.java
1
请完成以下Java代码
public class TwoSum { public boolean twoSum(int[] input, int targetValue) { int pointerOne = 0; int pointerTwo = input.length - 1; while (pointerOne < pointerTwo) { int sum = input[pointerOne] + input[pointerTwo]; if (sum == targetValue) { return t...
} public boolean twoSumSlow(int[] input, int targetValue) { for (int i = 0; i < input.length; i++) { for (int j = 1; j < input.length; j++) { if (input[i] + input[j] == targetValue) { return true; } } } return fal...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-3\src\main\java\com\baeldung\algorithms\twopointertechnique\TwoSum.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonConverterV1 { public static final GlobalQRCodeVersion GLOBAL_QRCODE_VERSION = GlobalQRCodeVersion.ofInt(1); public static GlobalQRCode toGlobalQRCode(@NonNull final ExternalSystemConfigQRCode qrCode) { return GlobalQRCode.of(ExternalSystemConfigQRCodeJsonConverter.GLOBAL_QRCODE_TYPE, GLOBAL_QRCOD...
{ return ExternalSystemWooCommerceConfigId.ofRepoId(repoId); } else if (externalSystemType.isGRSSignum()) { return ExternalSystemGRSSignumConfigId.ofRepoId(repoId); } else if (externalSystemType.isLeichUndMehl()) { return ExternalSystemLeichMehlConfigId.ofRepoId(repoId); } throw new AdempiereEx...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\config\qrcode\v1\JsonConverterV1.java
2
请在Spring Boot框架中完成以下Java代码
ThreadPoolTaskSchedulerBuilder threadPoolTaskSchedulerBuilder(TaskSchedulingProperties properties, ObjectProvider<TaskDecorator> taskDecorator, ObjectProvider<ThreadPoolTaskSchedulerCustomizer> threadPoolTaskSchedulerCustomizers) { TaskSchedulingProperties.Shutdown shutdown = properties.getShutdown(); Thr...
return builder(); } @Bean(name = "simpleAsyncTaskSchedulerBuilder") @ConditionalOnMissingBean @ConditionalOnThreading(Threading.VIRTUAL) SimpleAsyncTaskSchedulerBuilder simpleAsyncTaskSchedulerBuilderVirtualThreads() { return builder().virtualThreads(true); } private SimpleAsyncTaskSchedulerBuilder b...
repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\task\TaskSchedulingConfigurations.java
2
请完成以下Java代码
int CLUSTER6(final List<Integer> cluster6, int id) { return (id >= 0 ? (cluster6.get(id) + kCluster6InFeaturespace) : kNilCluster6); } /** * 获取词聚类特征 * @param ctx 上下文 * @param cluster4 * @param cluster6 * @param cluster * @param features 输出特征 */ void get_cluste...
PUSH(features, CLUSTER(cluster, ctx.N1)); PUSH(features, CLUSTER(cluster, ctx.N2)); PUSH(features, CLUSTER(cluster, ctx.S0L)); PUSH(features, CLUSTER(cluster, ctx.S0R)); PUSH(features, CLUSTER(cluster, ctx.S0L2)); PUSH(features, CLUSTER(cluster, ctx.S0R2)); PUSH(features,...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dependency\nnparser\NeuralNetworkParser.java
1
请在Spring Boot框架中完成以下Java代码
public class DemoSecurityConfig { @Bean SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { http.authorizeHttpRequests((authorize) -> authorize .requestMatchers("/custom/**").access(customAuthManager()) .requestMatchers("/adminonly/**").hasRole("ADMIN")...
.roles("AUTHOR") .build(); UserDetails editor = User.withUsername("editor") .password(passwordEncoder().encode("editor")) .roles("EDITOR") .build(); return new InMemoryUserDetailsManager(admin, author, editor); } @Bean PasswordEncoder password...
repos\tutorials-master\spring-security-modules\spring-security-core-3\src\main\java\com\baeldung\authorizationmanager\DemoSecurityConfig.java
2