instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
private String getAuthenticationType(AuthenticationObservationContext context) { if (context.getAuthenticationRequest() == null) { return "unknown"; } return context.getAuthenticationRequest().getClass().getSimpleName(); } private String getAuthenticationMethod(AuthenticationObservationContext context) { ...
private String getAuthenticationFailureType(AuthenticationObservationContext context) { if (context.getError() == null) { return "n/a"; } return context.getError().getClass().getSimpleName(); } /** * {@inheritDoc} */ @Override public boolean supportsContext(Observation.Context context) { return cont...
repos\spring-security-main\core\src\main\java\org\springframework\security\authentication\AuthenticationObservationConvention.java
1
请完成以下Java代码
public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public Long getPersonNumber() { return personNumber; } public void setPersonNumber(Long personNumber) { this.personNumber = personNumber; } public Boo...
public void setScode(String scode) { this.securityNumber = scode; } public String getDcode() { return departmentCode; } public void setDcode(String dcode) { this.departmentCode = dcode; } public Address getAddress() { return address; } public void setA...
repos\tutorials-master\persistence-modules\java-jpa\src\main\java\com\baeldung\jpa\uniqueconstraints\Person.java
1
请完成以下Java代码
public int delete() { log.info(""); StringBuffer sql = new StringBuffer ("DELETE FROM AD_Preference WHERE "); sql.append("AD_Client_ID=").append(cbClient.isSelected() ? m_AD_Client_ID : 0); sql.append(" AND AD_Org_ID=").append(cbOrg.isSelected() ? m_AD_Org_ID : 0); if (cbUser.isSelected()) { sql.append...
} else { ADialog.warn(m_WindowNo, this, "ValuePreferenceNotInserted"); return; } } // --- Inserting int Client_ID = cbClient.isSelected() ? m_AD_Client_ID : 0; int Org_ID = cbOrg.isSelected() ? m_AD_Org_ID : 0; int AD_Preference_ID = DB.getNextID(m_ctx, I_AD_Preference.Table_Name); // S...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\ValuePreference.java
1
请在Spring Boot框架中完成以下Java代码
private Object getValue(String variableType, ExpressionTree expression, Object defaultValue) throws Exception { Object literalValue = expression.getLiteralValue(); if (literalValue != null) { return literalValue; } Object factoryValue = expression.getFactoryValue(); if (factoryValue != null) { re...
private Object getFactoryValue(ExpressionTree expression, Object factoryValue) { Object durationValue = getFactoryValue(expression, factoryValue, DURATION_OF, DURATION_SUFFIX); if (durationValue != null) { return durationValue; } Object dataSizeValue = getFactoryValue(expression, factoryValue, DATA_SIZE...
repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\fieldvalues\javac\JavaCompilerFieldValuesParser.java
2
请在Spring Boot框架中完成以下Java代码
class Image { @Id @GeneratedValue Long id; String name; String location; @Lob byte[] content; public Image() { } public Image(Long id) { this.id = id; } public Image(String name, String location) { this.name = name; this.location = location;...
} public String getLocation() { return location; } public void setLocation(String location) { this.location = location; } public long getId() { return id; } public void setId(long id) { this.id = id; } }
repos\tutorials-master\persistence-modules\spring-boot-persistence-2\src\main\java\com\baeldung\db\indexing\Image.java
2
请完成以下Java代码
public void setProcessed (boolean Processed) { set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); } /** Get Verarbeitet. @return Checkbox sagt aus, ob der Beleg verarbeitet wurde. */ @Override public boolean isProcessed () { Object oo = get_Value(COLUMNNAME_Processed); if (oo != null) ...
} /** Set UserValue. @param UserValue UserValue */ @Override public void setUserValue (java.lang.String UserValue) { set_Value (COLUMNNAME_UserValue, UserValue); } /** Get UserValue. @return UserValue */ @Override public java.lang.String getUserValue () { return (java.lang.String)get_Value(COLUM...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_User.java
1
请在Spring Boot框架中完成以下Java代码
public String getCustomerId() { return customerId; } public void setCustomerId(String customerId) { this.customerId = customerId; } public ArticleMapping updated(OffsetDateTime updated) { this.updated = updated; return this; } /** * Der Zeitstempel der letzten Änderung * @return up...
} @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArticleMapping {\n"); sb.append(" _id: ").append(toIndentedString(_id)).append("\n"); sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n"); sb.append(" updated:...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\model\ArticleMapping.java
2
请在Spring Boot框架中完成以下Java代码
public class Tweet { private String email; private String tweetText; private Date dateCreated; public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getTweetText() { return tweetText;
} public void setTweetText(String tweetText) { this.tweetText = tweetText; } public Date getDateCreated() { return dateCreated; } public void setDateCreated(Date dateCreated) { this.dateCreated = dateCreated; } }
repos\tutorials-master\patterns-modules\design-patterns-architectural\src\main\java\com\baeldung\repositoryvsdaopattern\Tweet.java
2
请完成以下Java代码
public void setQueues(Map<String, DestinationInfo> queues) { this.queues = queues; } public Map<String, DestinationInfo> getTopics() { return topics; } public void setTopics(Map<String, DestinationInfo> topics) { this.topics = topics; } // DestinationInfo stores the Ex...
return exchange; } public void setExchange(String exchange) { this.exchange = exchange; } public String getRoutingKey() { return routingKey; } public void setRoutingKey(String routingKey) { this.routingKey = routingKey; } ...
repos\tutorials-master\spring-reactive-modules\spring-webflux-amqp\src\main\java\com\baeldung\spring\amqp\DestinationsConfig.java
1
请完成以下Java代码
public Optional<WebuiDocumentReferenceId> getDocumentReferenceId() { return referencing != null && !Check.isBlank(referencing.getReferenceId()) ? Optional.of(WebuiDocumentReferenceId.ofString(referencing.getReferenceId())) : Optional.empty(); } @JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisib...
{ this.documentIds = ImmutableSet.of(documentId); } else { throw new IllegalArgumentException("'documentIds' not provided"); } this.tabId = tabId; if (tabId != null) { if (this.documentIds.size() > 1) { throw new IllegalArgumentException("Only one documentId is allowed when t...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\json\JSONCreateViewRequest.java
1
请在Spring Boot框架中完成以下Java代码
public Quantity getHUCapacity( @NonNull final HuId huId, @NonNull final ProductId productId, @NonNull final I_C_UOM uom) { final I_M_HU hu = handlingUnitsBL.getById(huId); return handlingUnitsBL .getStorageFactory() .getStorage(hu) .getQuantity(productId, uom); } @NonNull public ValidateLo...
return ValidateLocatorInfo.ofSourceLocatorList(sourceLocatorList); } @NonNull public Optional<UomId> getCatchWeightUOMId(@NonNull final ProductId productId) { return productBL.getCatchUOMId(productId); } @NonNull private ImmutableSet<LocatorId> getSourceLocatorIds(@NonNull final PPOrderId ppOrderId) { fin...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\service\ManufacturingJobLoaderAndSaverSupportingServices.java
2
请完成以下Java代码
public EventDefinitionParse sourceResource(String resource) { if (name == null) { name(resource); } setStreamSource(new ResourceStreamSource(resource)); return this; } public EventDefinitionParse sourceString(String string) { if (name == null) { n...
public EventDeploymentEntity getDeployment() { return deployment; } public void setDeployment(EventDeploymentEntity deployment) { this.deployment = deployment; } public EventModel getEventModel() { return eventModel; } public void setEventModel(EventModel eventModel) {...
repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\parser\EventDefinitionParse.java
1
请在Spring Boot框架中完成以下Java代码
public String getDOCUMENTID() { return documentid; } /** * Sets the value of the documentid property. * * @param value * allowed object is * {@link String } * */ public void setDOCUMENTID(String value) { this.documentid = value; } /*...
public void setDATEFROM(String value) { this.datefrom = value; } /** * Gets the value of the dateto property. * * @return * possible object is * {@link String } * */ public String getDATETO() { return dateto; } /** * Sets the va...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\HDATE1.java
2
请在Spring Boot框架中完成以下Java代码
StandardConfigDataReference getReference() { return this.reference; } /** * Return the underlying Spring {@link Resource} being loaded. * @return the underlying resource * @since 2.4.2 */ public Resource getResource() { return this.resource; } /** * Return the profile or {@code null} if the resourc...
try { return "file [" + this.resource.getFile() + "]"; } catch (IOException ex) { // Ignore } } return this.resource.toString(); } private @Nullable File getUnderlyingFile(Resource resource) { try { if (resource instanceof ClassPathResource || resource instanceof FileSystemResource || ...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\StandardConfigDataResource.java
2
请完成以下Java代码
ApplicationContext getContext(ServletContext servletContext) { return SecurityWebApplicationContextUtils.findRequiredWebApplicationContext(servletContext); } /** * Handles the HttpSessionEvent by publishing a {@link HttpSessionCreatedEvent} to the * application appContext. * @param event HttpSessionEvent pas...
} /** * @inheritDoc */ @Override public void sessionIdChanged(HttpSessionEvent event, String oldSessionId) { extracted(event.getSession(), new HttpSessionIdChangedEvent(event.getSession(), oldSessionId)); } private void extracted(HttpSession session, ApplicationEvent e) { Log log = LogFactory.getLog(LOGG...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\session\HttpSessionEventPublisher.java
1
请完成以下Java代码
public void setM_Product_ID (final int M_Product_ID) { 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 setP...
@Override public BigDecimal getPrice() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Price); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQty (final BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } @Override public BigDecimal getQty() { final BigDecimal bd = ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_OrderLine_Detail.java
1
请完成以下Java代码
public int getM_Locator_From_ID() { return locatorFromId; } public int getM_Locator_To_ID() { return locatorToId; } public HUPackingMaterialMovementLineBuilder setProductIdSortComparator(final Comparator<Integer> productIdsSortComparator) { packingMaterialsCollector.setProductIdSortComparator(productIdsS...
{ return packingMaterialsCollector.getAndClearCandidates(); } /** * Sets a shared "seen list" for added HUs. * * To be used in case you have multiple {@link HUPackingMaterialsCollector}s and you want if an HU is added to one of them then don't add it to the others. * * @param seenM_HU_IDs_ToAdd */ pub...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\movement\api\impl\HUPackingMaterialMovementLineBuilder.java
1
请完成以下Java代码
protected Void execute(CommandContext commandContext, TaskEntity task) { // Backwards compatibility if (task.getProcessDefinitionId() != null) { if (Flowable5Util.isFlowable5ProcessDefinitionId(commandContext, task.getProcessDefinitionId())) { Flowable5CompatibilityHandler c...
if (taskFormHandler != null) { taskFormHandler.submitFormProperties(properties, executionEntity); if (completeTask) { TaskHelper.completeTask(task, null, null, null, null, null, commandContext); } } return null; } @Override protected Str...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cmd\SubmitTaskFormCmd.java
1
请完成以下Java代码
public void setSKU (String SKU) { set_Value (COLUMNNAME_SKU, SKU); } /** Get SKU. @return Stock Keeping Unit */ public String getSKU () { return (String)get_Value(COLUMNNAME_SKU); } /** Set Tax Amount. @param TaxAmt Tax Amount for a document */ public void setTaxAmt (BigDecimal TaxAmt) { ...
Short form for Tax to be printed on documents */ public void setTaxIndicator (String TaxIndicator) { set_Value (COLUMNNAME_TaxIndicator, TaxIndicator); } /** Get Tax Indicator. @return Short form for Tax to be printed on documents */ public String getTaxIndicator () { return (String)get_Value(COLUMN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Invoice.java
1
请完成以下Java代码
public I_M_HU_Attribute getByAttributeIdOrNull(final AttributeId attributeId) { return huAttributes.get(attributeId); } public boolean isEmpty() { return huAttributes.isEmpty(); } @Override public Iterator<I_M_HU_Attribute> iterator() { return huAttributes.values().iterator(); } public L...
final AttributeId attributeId = AttributeId.ofRepoId(huAttribute.getM_Attribute_ID()); return huAttributes.put(attributeId, huAttribute); } public void remove(final I_M_HU_Attribute huAttribute) { final AttributeId attributeId = AttributeId.ofRepoId(huAttribute.getM_Attribute_ID()); final I_M_HU_Attribu...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\impl\SaveDecoupledHUAttributesDAO.java
1
请完成以下Java代码
public Date getStartTime() { return startTime; } public Date getEndTime() { return endTime; } public Date getRemovalTime() { return removalTime; } public Date getExecutionStartTime() { return executionStartTime; } public void setExecutionStartTime(final Date executionStartTime) { ...
dto.totalJobs = historicBatch.getTotalJobs(); dto.batchJobsPerSeed = historicBatch.getBatchJobsPerSeed(); dto.invocationsPerBatchJob = historicBatch.getInvocationsPerBatchJob(); dto.seedJobDefinitionId = historicBatch.getSeedJobDefinitionId(); dto.monitorJobDefinitionId = historicBatch.getMonitorJobDefi...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\batch\HistoricBatchDto.java
1
请完成以下Java代码
private String setDataToLevel() { String info = "-"; if (isClientLevelOnly()) { StringBuilder sql = new StringBuilder("UPDATE ") .append(getTableName()) .append(" SET AD_Org_ID=0 WHERE AD_Org_ID<>0 AND AD_Client_ID=?"); int no = DB.executeUpdateAndSaveErrorOnFail(sql.toString(), getAD_Client_ID()...
info.append(TableName); } } catch (Exception e) { log.error(sql, e); } finally { DB.close(rs, pstmt); } return info.toString(); } @Override protected boolean beforeSave(boolean newRecord) { if (getAD_Org_ID() != 0) { setAD_Org_ID(0); } return true; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MClientShare.java
1
请完成以下Java代码
private SelectedModelsList retrieveSelectedModels(final Class<?> modelClass) { final List<?> models = view.retrieveModelsByIds(getSelectedRowIds(), modelClass); return SelectedModelsList.of(models, modelClass); } @Override public <T> IQueryFilter<T> getQueryFilter(@NonNull final Class<T> recordClass) { fina...
private SelectedModelsList(final List<?> models, final Class<?> modelClass) { super(); this.models = ImmutableList.copyOf(models); this.modelClass = modelClass; } @Override public String toString() { return MoreObjects.toStringHelper(this) .omitNullValues() .add("modelClass", modelClass...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\ViewAsPreconditionsContext.java
1
请完成以下Java代码
public void setM_Product_ID(final int productId) { final ProductId productRepoId = ProductId.ofRepoIdOrNull(productId); if (productRepoId == null) { this.onlyProductIds = null; } else { this.onlyProductIds = ImmutableSet.of(productRepoId); } } @Override @Nullable public Set<ProductId> getOnly...
return oneConfigurationPerPI; } @Override public boolean isAllowDifferentCapacities() { return allowDifferentCapacities; } @Override public void setAllowDifferentCapacities(final boolean allowDifferentCapacities) { this.allowDifferentCapacities = allowDifferentCapacities; } @Override public boolean is...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUPIItemProductQuery.java
1
请完成以下Java代码
public Mono<Authentication> authenticate(Authentication authentication) { return Mono.defer(() -> { OAuth2AuthorizationCodeAuthenticationToken token = (OAuth2AuthorizationCodeAuthenticationToken) authentication; OAuth2AuthorizationResponse authorizationResponse = token.getAuthorizationExchange() .getAuthori...
}); } private Function<OAuth2AccessTokenResponse, OAuth2AuthorizationCodeAuthenticationToken> onSuccess( OAuth2AuthorizationCodeAuthenticationToken token) { return (accessTokenResponse) -> { ClientRegistration registration = token.getClientRegistration(); OAuth2AuthorizationExchange exchange = token.getAu...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\authentication\OAuth2AuthorizationCodeReactiveAuthenticationManager.java
1
请在Spring Boot框架中完成以下Java代码
public class PaymentReservationCaptureId implements RepoIdAware { @JsonCreator public static PaymentReservationCaptureId ofRepoId(final int repoId) { return new PaymentReservationCaptureId(repoId); } public static PaymentReservationCaptureId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? new PaymentR...
} int repoId; private PaymentReservationCaptureId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "C_Payment_Reservation_Capture_ID"); } @Override @JsonValue public int getRepoId() { return repoId; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\payment\reservation\PaymentReservationCaptureId.java
2
请完成以下Java代码
public String toString() { return MoreObjects.toStringHelper(this) .addValue(tags) .toString(); } public String getTagsAsString() { return TAGS_STRING_JOINER.join(tags); } /** @return {@code true} if this attachment has a tag with the given name; the label doesn't need to have a value though. */ pu...
return tags.get(tagName); } public boolean hasAllTagsSetToAnyValue(@NonNull final List<String> tagNames) { for (final String tagName : tagNames) { if (getTagValueOrNull(tagName) == null) { return false; } } return true; } public AttachmentTags withTag(@NonNull final String tagName, @NonNull ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\attachments\AttachmentTags.java
1
请在Spring Boot框架中完成以下Java代码
public static void exceptionHandlingExample() { CompletableFuture<String> future = CompletableFuture.supplyAsync(() -> { // Simulate a task that might throw an exception if (true) { throw new RuntimeException("Something went wrong!"); } ...
} catch (InterruptedException e) { System.err.println("Task execution timed out!"); } return "Task completed"; }); CompletableFuture<String> timeoutFuture = future.completeOnTimeout("Timed out!", 2, TimeUnit.SECONDS); String result = timeoutFuture.join();...
repos\tutorials-master\core-java-modules\core-java-concurrency-advanced-5\src\main\java\com\baeldung\executorservicevscompletablefuture\CompletableFutureDemo.java
2
请完成以下Java代码
public ActiveOrHistoricCurrencyAndAmount getAmt() { return amt; } /** * Sets the value of the amt property. * * @param value * allowed object is * {@link ActiveOrHistoricCurrencyAndAmount } * */ public void setAmt(ActiveOrHistoricCurrencyAndAmount va...
* {@link String } * */ public String getCcyOfTrf() { return ccyOfTrf; } /** * Sets the value of the ccyOfTrf property. * * @param value * allowed object is * {@link String } * */ public void setCcyOfTrf(String value) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_001_01_03_ch_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_001_001_03_ch_02\EquivalentAmount2.java
1
请完成以下Java代码
public BigDecimal getPrice () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Price); if (bd == null) return Env.ZERO; return bd; } /** Set Product. @param Product Product */ public void setProduct (String Product) { set_Value (COLUMNNAME_Product, Product); } /** Get Product. @return Prod...
@param W_Basket_ID Web Basket */ public void setW_Basket_ID (int W_Basket_ID) { if (W_Basket_ID < 1) set_ValueNoCheck (COLUMNNAME_W_Basket_ID, null); else set_ValueNoCheck (COLUMNNAME_W_Basket_ID, Integer.valueOf(W_Basket_ID)); } /** Get W_Basket_ID. @return Web Basket */ public int getW_Ba...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_BasketLine.java
1
请在Spring Boot框架中完成以下Java代码
public void setBundle(@Nullable String bundle) { this.bundle = bundle; } } public static class Validation { /** * Whether to enable LDAP schema validation. */ private boolean enabled = true; /** * Path to the custom schema. */ private @Nullable Resource schema; public boolean isEnabled...
public void setEnabled(boolean enabled) { this.enabled = enabled; } public @Nullable Resource getSchema() { return this.schema; } public void setSchema(@Nullable Resource schema) { this.schema = schema; } } }
repos\spring-boot-main\module\spring-boot-ldap\src\main\java\org\springframework\boot\ldap\autoconfigure\embedded\EmbeddedLdapProperties.java
2
请完成以下Java代码
protected void setJobExecutorActivate(ProcessEngineConfigurationImpl configuration, Map<String, String> properties) { // override job executor auto activate: set to true in shared engine scenario // if it is not specified (see #CAM-4817) configuration.setJobExecutorActivate(true); } protected JmxManage...
protected JobExecutor getJobExecutorService(final PlatformServiceContainer serviceContainer) { // lookup container managed job executor String jobAcquisitionName = processEngineXml.getJobAcquisitionName(); JobExecutor jobExecutor = serviceContainer.getServiceValue(ServiceTypes.JOB_EXECUTOR, jobAcquisitionNa...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\deployment\StartProcessEngineStep.java
1
请在Spring Boot框架中完成以下Java代码
public ApplicationDeployedEventProducer applicationDeployedEventProducer( RepositoryService repositoryService, APIDeploymentConverter converter, @Autowired(required = false) List<ProcessRuntimeEventListener<ApplicationDeployedEvent>> listeners, ApplicationEventPublisher eventPublisher ...
public CandidateStartersDeploymentConfigurer candidateStartersDeploymentConfigurer() { return new CandidateStartersDeploymentConfigurer(); } @Bean @ConditionalOnMissingBean @ConditionalOnProperty("spring.activiti.process-definition-cache-name") public DeploymentCache<ProcessDefinitionCacheE...
repos\Activiti-develop\activiti-core\activiti-spring-boot-starter\src\main\java\org\activiti\spring\boot\ProcessEngineAutoConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public SecurityWebFilterChain securityWebFilterChainSecure(ServerHttpSecurity http) { return http .authorizeExchange( (authorizeExchange) -> authorizeExchange.pathMatchers(this.adminServer.path("/assets/**")) .permitAll() .pathMatchers("/actuator/health/**") .permitAll() .pathMatchers(...
// The following two methods are only required when setting a custom base-path (see // 'basepath' profile in application.yml) private ServerLogoutSuccessHandler logoutSuccessHandler(String uri) { RedirectServerLogoutSuccessHandler successHandler = new RedirectServerLogoutSuccessHandler(); successHandler.setLogout...
repos\spring-boot-admin-master\spring-boot-admin-samples\spring-boot-admin-sample-eureka\src\main\java\de\codecentric\boot\admin\SpringBootAdminEurekaApplication.java
2
请完成以下Java代码
private UomId extractProductPriceUomId(final I_C_Campaign_Price record) { final UomId productPriceUomId = UomId.ofRepoIdOrNull(record.getC_UOM_ID()); if (productPriceUomId != null) { return productPriceUomId; } final ProductId productId = ProductId.ofRepoId(record.getM_Product_ID()); return productsSer...
} private CampaignPricePage() { bpartnerPrices = ImmutableListMultimap.of(); bpGroupPrices = ImmutableListMultimap.of(); pricingSystemPrices = ImmutableListMultimap.of(); } public Optional<CampaignPrice> findPrice(@NonNull final CampaignPriceQuery query) { Optional<CampaignPrice> result = findPr...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\rules\campaign_price\CampaignPriceRepository.java
1
请完成以下Java代码
public void setM_Package_ID (final int M_Package_ID) { if (M_Package_ID < 1) set_Value (COLUMNNAME_M_Package_ID, null); else set_Value (COLUMNNAME_M_Package_ID, M_Package_ID); } @Override public int getM_Package_ID() { return get_ValueAsInt(COLUMNNAME_M_Package_ID); } @Override public void setP...
@Override public void setWeightInKg (final BigDecimal WeightInKg) { set_Value (COLUMNNAME_WeightInKg, WeightInKg); } @Override public BigDecimal getWeightInKg() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_WeightInKg); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setWi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Carrier_ShipmentOrder_Parcel.java
1
请完成以下Java代码
public class SoapHttpConnectorImpl extends AbstractHttpConnector<SoapHttpRequest, SoapHttpResponse> implements SoapHttpConnector { protected static final SoapHttpConnectorLogger LOG = SoapHttpLogger.SOAP_HTTP_CONNECTOR_LOGGER; public SoapHttpConnectorImpl() { super(SoapHttpConnector.ID); } public SoapHtt...
// always use the POST method ((AbstractHttpRequest<?, ?>) request).post(); return super.execute(request); } @Override protected <T extends BasicClassicHttpRequest> void applyPayload(T httpRequest, SoapHttpRequest request) { // SOAP requires soap envelop body if (request.getPayload() == null || ...
repos\camunda-bpm-platform-master\connect\soap-http-client\src\main\java\org\camunda\connect\httpclient\soap\impl\SoapHttpConnectorImpl.java
1
请完成以下Java代码
private BigDecimal getQtyFromProductionMaterial(final I_C_UOM uom, final IProductionMaterial productionMaterial) { final BigDecimal result; // note: if the average value is 0 we fall back to the actual value. // this makes us more lenient towards the current unit tests. // imho it's also justifyiable because ...
private final IQualityInspectionLineBuilder newQualityInspectionLine() { final IQualityInspectionLineBuilder reportLineBuilder = new QualityInspectionLineBuilder() { @Override protected void afterLineCreated(final IQualityInspectionLine line) { _createdQualityInspectionLines.add(line); } }; re...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\QualityInspectionLinesBuilder.java
1
请在Spring Boot框架中完成以下Java代码
public class WSOperation implements OperationImplementation { protected String id; protected String name; protected WSService service; public WSOperation(String id, String operationName, WSService service) { this.id = id; this.name = operationName; this.service = service; ...
Object[] results = null; results = this.service.getClient().send(this.name, arguments, overridenEndpointAddresses); if (results == null) { results = new Object[] {}; } return results; } private MessageInstance createResponseMessage(Object[] results, Operation opera...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\webservice\WSOperation.java
2
请完成以下Java代码
class UserDsRequestModel { String name; String password; LocalDateTime creationTime; public UserDsRequestModel(String name, String password, LocalDateTime creationTime) { this.name = name; this.password = password; this.creationTime = creationTime; } public String getN...
} public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public LocalDateTime getCreationTime() { return creationTime; } public void setCreationTime(LocalDateTime creationTime) { this.creatio...
repos\tutorials-master\patterns-modules\clean-architecture\src\main\java\com\baeldung\pattern\cleanarchitecture\usercreation\UserDsRequestModel.java
1
请完成以下Java代码
public static Range<Instant> closedOpenRange(@Nullable final Instant lowerBound, @Nullable final Instant upperBound) { if (lowerBound == null) { return upperBound == null ? Range.all() : Range.upTo(upperBound, BoundType.OPEN); } else { return upperBound == null ? Range.downTo(lowerBound,...
} public List<Object> getSqlParams() { buildSqlIfNeeded(); return sqlParams; } private void buildSqlIfNeeded() { if (sqlWhereClause != null) { return; } if (isConstantTrue()) { final ConstantQueryFilter<Object> acceptAll = ConstantQueryFilter.of(true); sqlParams = acceptAll.getSqlParams()...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\DateIntervalIntersectionQueryFilter.java
1
请在Spring Boot框架中完成以下Java代码
public void init(AuthenticationManagerBuilder auth) { auth.apply(new InitializeUserDetailsManagerConfigurer()); } class InitializeUserDetailsManagerConfigurer extends GlobalAuthenticationConfigurerAdapter { private final Log logger = LogFactory.getLog(getClass()); @Override public void configure(Authentica...
.getBean(beanNames[0], UserDetailsService.class); PasswordEncoder passwordEncoder = getBeanOrNull(PasswordEncoder.class); UserDetailsPasswordService passwordManager = getBeanOrNull(UserDetailsPasswordService.class); CompromisedPasswordChecker passwordChecker = getBeanOrNull(CompromisedPasswordChecker.class); ...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\authentication\configuration\InitializeUserDetailsBeanManagerConfigurer.java
2
请在Spring Boot框架中完成以下Java代码
public TaskResult makePaymentTask(PaymentRequest paymentRequest) { TaskResult result = new TaskResult(); Payment payment = PaymentService.createPayment(paymentRequest); Map<String, Object> output = new HashMap<>(); output.put("orderId", payment.getOrderId()); output.put("payment...
Map<String, Object> result = new HashMap<>(); return result; } @WorkerTask(value = "notify_customer", threadCount = 2, pollingInterval = 300) public Map<String, Object> checkForCustomerNotifications(Order order) { Map<String, Object> result = new HashMap<>(); return result; } //...
repos\tutorials-master\microservices-modules\saga-pattern\src\main\java\io\orkes\example\saga\workers\ConductorWorkers.java
2
请完成以下Java代码
private final String[] toStringArray(final List<ITrx> trxs) { if (trxs == null || trxs.isEmpty()) { return new String[] {}; } final String[] arr = new String[trxs.size()]; for (int i = 0; i < trxs.size(); i++) { final ITrx trx = trxs.get(0); if (trx == null) { arr[i] = "null"; } else...
{ rollbackOk = trx.rollback(true); } catch (SQLException e) { throw new RuntimeException("Could not rollback '" + trx + "' because: " + e.getLocalizedMessage(), e); } if (!rollbackOk) { throw new RuntimeException("Could not rollback '" + trx + "' for unknown reason"); } } @Override public...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\jmx\JMXTrxManager.java
1
请完成以下Java代码
public void setReversalLine(org.compiere.model.I_C_AllocationLine ReversalLine) { set_ValueFromPO(COLUMNNAME_ReversalLine_ID, org.compiere.model.I_C_AllocationLine.class, ReversalLine); } /** Set Storno-Zeile. @param ReversalLine_ID Storno-Zeile */ @Override public void setReversalLine_ID (int ReversalLine_...
{ set_ValueNoCheck (COLUMNNAME_WriteOffAmt, WriteOffAmt); } /** Get Abschreiben. @return Amount to write-off */ @Override public java.math.BigDecimal getWriteOffAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_WriteOffAmt); if (bd == null) return BigDecimal.ZERO; return bd; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_AllocationLine.java
1
请在Spring Boot框架中完成以下Java代码
public class GetInstitutionsRouteContext { @NonNull String orgCode; @NonNull AlbertaConnectionDetails albertaConnectionDetails; @NonNull String albertaResourceId; @NonNull JsonBPartnerRole role; @NonNull DoctorApi doctorApi;
@NonNull HospitalApi hospitalApi; @NonNull NursingHomeApi nursingHomeApi; @NonNull NursingServiceApi nursingServiceApi; @NonNull PayerApi payerApi; @NonNull PharmacyApi pharmacyApi; }
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\institutions\GetInstitutionsRouteContext.java
2
请完成以下Java代码
public static void closeQuietly(final Iterator<?> iterator) { try { close(iterator); } catch (Throwable e) { // ignore the exception e.printStackTrace(); } } public static void close(final BlindIterator<?> iterator) { if (iterator == null) { return; } if (iterator instanceof Closea...
public static <E> PeekIterator<E> asPeekIterator(final Iterator<E> iterator) { if (iterator instanceof PeekIterator) { final PeekIterator<E> peekIterator = (PeekIterator<E>)iterator; return peekIterator; } else { return new PeekIteratorWrapper<>(iterator); } } public static <IT, OT> Iterator<OT...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\collections\IteratorUtils.java
1
请完成以下Java代码
public static ValueNamePair retrieveWarning() { final ValueNamePair lastWarning = getLastErrorsInstance().getLastWarningAndReset(); return lastWarning; } // retrieveWarning /** * Reset Saved Messages/Errors/Info */ public static void resetLast() { getLastErrorsInstance().reset(); } private final st...
final Throwable lastExceptionAndClear = lastException; lastException = null; return lastExceptionAndClear; } public synchronized void setLastException(final Throwable lastException) { this.lastException = lastException; } public synchronized ValueNamePair getLastWarningAndReset() { final Value...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\logging\MetasfreshLastError.java
1
请完成以下Java代码
public java.lang.String getInternalName () { return (java.lang.String)get_Value(COLUMNNAME_InternalName); } /** Set IsDestination. @param IsDestination IsDestination */ @Override public void setIsDestination (boolean IsDestination) { set_Value (COLUMNNAME_IsDestination, Boolean.valueOf(IsDestination)); ...
} /** Get Name. @return Name */ @Override public java.lang.String getName () { return (java.lang.String)get_Value(COLUMNNAME_Name); } /** Set URL. @param URL Full URL address - e.g. http://www.adempiere.org */ @Override public void setURL (java.lang.String URL) { set_Value (COLUMNNAME_URL, URL...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\impex\model\X_AD_InputDataSource.java
1
请完成以下Java代码
public void destroy() { if (statsPrintScheduler != null) { statsPrintScheduler.shutdownNow(); } if (consumer != null) { consumer.close(); } } @Builder @Data private static class GroupTopicStats { private String topic; private int ...
@Override public String toString() { return "[" + "topic=[" + topic + ']' + ", partition=[" + partition + "]" + ", committedOffset=[" + committedOffset + "]" + ", endOffset=[" + endOffset + "]" + ", lag=["...
repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\kafka\TbKafkaConsumerStatsService.java
1
请完成以下Java代码
public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNam...
/** Set Statistics. @param StatisticsInfo Information to help profiling the system for solving support issues */ public void setStatisticsInfo (String StatisticsInfo) { set_Value (COLUMNNAME_StatisticsInfo, StatisticsInfo); } /** Get Statistics. @return Information to help profiling the system for solv...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_IssueProject.java
1
请完成以下Java代码
private static void applyAuthConfig(Map<String, String> headersMap, String metadataStr, HttpServletRequest currentHttpRequest) { if (oConvertUtils.isEmpty(metadataStr)) { return; } try { JSONObject metadata = JSONObject.parseObject(metadataStr); if (metadata ...
} else { log.warn("Token授权配置中tokenParamValue为空,且无法从TokenUtils获取当前请求的token"); } } catch (Exception e) { log.warn("从TokenUtils获取token失败: {}", e.getMessage()); } } if (oConvertUtils.isNotEmpty(tokenPara...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-module\jeecg-boot-module-airag\src\main\java\org\jeecg\modules\airag\llm\handler\PluginToolBuilder.java
1
请完成以下Java代码
public String getFormKey() { return formKey; } public void setFormKey(String formKey) { this.formKey = formKey; } public boolean isSameDeployment() { return sameDeployment; } public void setSameDeployment(boolean sameDeployment) { this.sameDeployment = sameDepl...
public void setCandidateGroups(List<String> candidateGroups) { this.candidateGroups = candidateGroups; } @Override public CasePageTask clone() { CasePageTask clone = new CasePageTask(); clone.setValues(this); return clone; } public void setValues(CasePageTask otherE...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\CasePageTask.java
1
请完成以下Java代码
public String getProcessMsg() { return processMsg; } @Override public int getDoc_User_ID() { return handler.getDoc_User_ID(model); } @Override public int getC_Currency_ID() { return handler.getC_Currency_ID(model); } @Override public BigDecimal getApprovalAmt() { return handler.getApprovalAmt(mo...
return InterfaceWrapperHelper.getModelTableId(model); } @Override public String get_TrxName() { return InterfaceWrapperHelper.getTrxName(model); } @Override public void set_TrxName(final String trxName) { InterfaceWrapperHelper.setTrxName(model, trxName); } @Override public boolean isActive() { ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\engine\DocumentWrapper.java
1
请完成以下Java代码
protected JobDefinitionEntity getJobDefinitionFor(String jobDefinitionId) { if (jobDefinitionId != null) { return Context.getCommandContext() .getJobDefinitionManager() .findById(jobDefinitionId); } else { return null; } } protected Long getActivityPriority(ExecutionEntity e...
} return null; } @Override protected void logNotDeterminingPriority(ExecutionEntity execution, Object value, ProcessEngineException e) { LOG.couldNotDeterminePriority(execution, value, e); } protected String describeContext(JobDeclaration<?, ?> jobDeclaration, ExecutionEntity executionEntity) { ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\DefaultJobPriorityProvider.java
1
请完成以下Java代码
public java.lang.String getJSONPathEmail() { return get_ValueAsString(COLUMNNAME_JSONPathEmail); } @Override public void setJSONPathMetasfreshID (final @Nullable java.lang.String JSONPathMetasfreshID) { set_Value (COLUMNNAME_JSONPathMetasfreshID, JSONPathMetasfreshID); } @Override public java.lang.String...
@Override public void setM_FreightCost_ReducedVAT_Product_ID (final int M_FreightCost_ReducedVAT_Product_ID) { if (M_FreightCost_ReducedVAT_Product_ID < 1) set_Value (COLUMNNAME_M_FreightCost_ReducedVAT_Product_ID, null); else set_Value (COLUMNNAME_M_FreightCost_ReducedVAT_Product_ID, M_FreightCost_Reduce...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_Shopware6.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setBill_BPartner_ID (final int Bill_BPartner_ID) { if (Bill_BPartner_ID < 1) set_Value (COLUMNNAME_Bill_BPartner_ID, null); else set_Value (COLUMNNAME_Bi...
@Override public void setIsPaid (final boolean IsPaid) { throw new IllegalArgumentException ("IsPaid is virtual column"); } @Override public boolean isPaid() { return get_ValueAsBoolean(COLUMNNAME_IsPaid); } @Override public void setM_Shipment_Constraint_ID (final int M_Shipment_Constraint_ID) { if (M...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inoutcandidate\model\X_M_Shipment_Constraint.java
1
请完成以下Java代码
public void addFiscalRepresentationLocationId(final I_C_Fiscal_Representation fiscalRep) { fiscalRepresentationBL.updateCountryId(fiscalRep); } @CalloutMethod(columnNames = { I_C_Fiscal_Representation.COLUMNNAME_ValidFrom }) public void updateFiscalRepresentationValidFrom(final I_C_Fiscal_Representation fiscalRe...
public void updateFiscalRepresentationValidTo(final I_C_Fiscal_Representation fiscalRep) { if (fiscalRep.getValidTo() != null && fiscalRep.getValidFrom() != null && !fiscalRepresentationBL.isValidToDate(fiscalRep)) { fiscalRepresentationBL.updateValidTo(fiscalRep); } } @CalloutMethod(columnNames = { I_C_Fi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\organization\interceptors\C_Fiscal_Representation.java
1
请完成以下Java代码
private void onRecordCopied(@NonNull final PO to, @NonNull final PO from, @NonNull final CopyTemplate template) { if (InterfaceWrapperHelper.isInstanceOf(to, I_C_OrderLine.class) && InterfaceWrapperHelper.isInstanceOf(from, I_C_OrderLine.class)) { final I_C_OrderLine newSalesOrderLine = InterfaceWrapperHelp...
} } } private void completeSalesOrderIfNeeded(final I_C_Order newSalesOrder) { if (completeIt) { documentBL.processEx(newSalesOrder, IDocument.ACTION_Complete, IDocument.STATUS_Completed); } else { newSalesOrder.setDocAction(IDocument.ACTION_Prepare); orderDAO.save(newSalesOrder); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\order\createFrom\CreateSalesOrderFromProposalCommand.java
1
请完成以下Java代码
public static Optional<Integer> getCpuUsage() { try { return Optional.of((int) (HARDWARE.getProcessor().getSystemCpuLoad(1000) * 100.0)); } catch (Throwable e) { log.debug("Failed to get cpu usage!!!", e); } return Optional.empty(); } public static Option...
return Optional.of(toPercent(total - available, total)); } catch (Throwable e) { log.debug("Failed to get free disc space!!!", e); } return Optional.empty(); } public static Optional<Long> getTotalDiscSpace() { try { FileStore store = Files.getFileStore(P...
repos\thingsboard-master\common\util\src\main\java\org\thingsboard\common\util\SystemUtil.java
1
请在Spring Boot框架中完成以下Java代码
public void setPassword(String password) { this.password = password; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getMail() { return mail; } public void setMail(String mail) { ...
} public void setUserStateEnum(UserStateEnum userStateEnum) { this.userStateEnum = userStateEnum; } public RoleEntity getRoleEntity() { return roleEntity; } public void setRoleEntity(RoleEntity roleEntity) { this.roleEntity = roleEntity; } @Override public S...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\entity\user\UserEntity.java
2
请在Spring Boot框架中完成以下Java代码
public void configureWebSocketTransport(WebSocketTransportRegistration registry) { // TODO Auto-generated method stub } @Override public void configureClientInboundChannel(ChannelRegistration registration) { // TODO Auto-generated method stub } @Override public void configure...
} @Override public void addReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers) { // TODO Auto-generated method stub } @Override public boolean configureMessageConverters(List<MessageConverter> messageConverters) { // TODO Auto-generated method stub ...
repos\tutorials-master\spring-security-modules\spring-security-web-sockets\src\main\java\com\baeldung\springsockets\config\WebSocketMessageBrokerConfig.java
2
请完成以下Java代码
public TbQueueProducer<TbProtoQueueMsg<ToEdgeMsg>> getTbEdgeMsgProducer() { return toEdge; } @Override public TbQueueProducer<TbProtoQueueMsg<ToEdgeNotificationMsg>> getTbEdgeNotificationsMsgProducer() { return toEdgeNotifications; } @Override public TbQueueProducer<TbProtoQueu...
@Override public TbQueueProducer<TbProtoQueueMsg<ToHousekeeperServiceMsg>> getHousekeeperMsgProducer() { return toHousekeeper; } @Override public TbQueueProducer<TbProtoQueueMsg<ToCalculatedFieldMsg>> getCalculatedFieldsMsgProducer() { return toCalculatedFields; } @Override ...
repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\provider\TbRuleEngineProducerProvider.java
1
请完成以下Java代码
public class ScriptExecutionException extends ScriptException { /** * */ private static final long serialVersionUID = -1165299685098998072L; private IDatabase database; private IScript script; private IScriptExecutor executor; private List<String> log; public ScriptExecutionException(final String message, ...
addParameter("script", script); this.script = script; return this; } public IScriptExecutor getExecutor() { return executor; } public ScriptExecutionException setExecutor(final IScriptExecutor executor) { addParameter("executor", executor); this.executor = executor; return this; } public ScriptEx...
repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\exception\ScriptExecutionException.java
1
请完成以下Java代码
protected void applySortBy(HistoricIncidentQuery query, String sortBy, Map<String, Object> parameters, ProcessEngine engine) { if (sortBy.equals(SORT_BY_INCIDENT_ID)) { query.orderByIncidentId(); } else if (sortBy.equals(SORT_BY_INCIDENT_MESSAGE)) { query.orderByIncidentMessage(); } else if (sor...
query.orderByCauseIncidentId(); } else if (sortBy.equals(SORT_BY_ROOT_CAUSE_INCIDENT_ID)) { query.orderByRootCauseIncidentId(); } else if (sortBy.equals(SORT_BY_CONFIGURATION)) { query.orderByConfiguration(); } else if (sortBy.equals(SORT_BY_HISTORY_CONFIGURATION)) { query.orderByHistoryCo...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricIncidentQueryDto.java
1
请完成以下Java代码
public void setDunningGraceIfAutomatic(final I_C_Invoice invoice) { Services.get(IInvoiceSourceBL.class).setDunningGraceIfManaged(invoice); InterfaceWrapperHelper.save(invoice); } /** * This method is triggered when DunningGrace field is changed. * * NOTE: to developer: please keep this method with only i...
if (callerCandidate != null && callerCandidate.getC_Dunning_Candidate_ID() == candidate.getC_Dunning_Candidate_ID()) { // skip the caller candidate to avoid cycles continue; } if (candidate.isProcessed()) { logger.debug("Skip processed candidate: {}", candidate); continue; } if (dunn...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\invoice\model\validator\C_Invoice.java
1
请完成以下Java代码
public String getSeparator() { return this.separator; } /** * Sets the statement separator to use when reading the schema and data scripts. * @param separator statement separator used in the schema and data scripts */ public void setSeparator(String separator) { this.separator = separator; } /** * Re...
/** * Gets the mode to use when determining whether database initialization should be * performed. * @return the initialization mode * @since 2.5.1 */ public DatabaseInitializationMode getMode() { return this.mode; } /** * Sets the mode the use when determining whether database initialization should b...
repos\spring-boot-4.0.1\module\spring-boot-sql\src\main\java\org\springframework\boot\sql\init\DatabaseInitializationSettings.java
1
请完成以下Java代码
public class Authentication implements Principal, Serializable { public static final Authentication ANONYMOUS = new Authentication(null, null); private static final long serialVersionUID = 1L; protected final String identityId; protected final String processEngineName; public Authentication(String iden...
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Authentication other = (Authentication) obj; if (identityId == null) { if (other.identityId != null) return fal...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\security\auth\Authentication.java
1
请完成以下Java代码
public Collection<Decision> getDecisionsMade() { return decisionDecisionMadeRefCollection.getReferenceTargetElements(this); } public Collection<Decision> getDecisionsOwned() { return decisionDecisionOwnedRefCollection.getReferenceTargetElements(this); } public static void registerType(ModelBuilder mod...
SequenceBuilder sequenceBuilder = typeBuilder.sequence(); decisionDecisionMadeRefCollection = sequenceBuilder.elementCollection(DecisionMadeReference.class) .uriElementReferenceCollection(Decision.class) .build(); decisionDecisionOwnedRefCollection = sequenceBuilder.elementCollection(DecisionOwned...
repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\OrganizationUnitImpl.java
1
请完成以下Java代码
public class BaseRootResource extends AbstractCockpitPluginRootResource { @Context protected Providers providers; public BaseRootResource() { super("base"); } @Path("{engine}" + ProcessDefinitionRestService.PATH) public ProcessDefinitionRestService getProcessDefinitionResource(@PathParam("engine") Str...
@Path("{engine}" + IncidentRestService.PATH) public IncidentRestService getIncidentRestService(@PathParam("engine") String engineName) { return subResource(new IncidentRestService(engineName), engineName); } protected ObjectMapper getObjectMapper() { if(providers != null) { return ProvidersUtil ...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\cockpit\impl\plugin\resources\BaseRootResource.java
1
请完成以下Java代码
public static int longToIntCast(long number) { return (int) number; } public static int longToIntJavaWithMath(long number) { return Math.toIntExact(number); } public static int longToIntJavaWithLambda(long number) { return convert.apply(number); } public static int lon...
} public static int longToIntGuava(long number) { return Ints.checkedCast(number); } public static int longToIntGuavaSaturated(long number) { return Ints.saturatedCast(number); } public static int longToIntWithBigDecimal(long number) { return new BigDecimal(number).intValu...
repos\tutorials-master\core-java-modules\core-java-numbers-4\src\main\java\com\baeldung\convertLongToInt\ConvertLongToInt.java
1
请完成以下Java代码
public static DocumentKey of( @NonNull final WindowId windowId, @NonNull final DocumentId documentId) { return new DocumentKey(DocumentType.Window, windowId.toDocumentId(), documentId); } private final DocumentType documentType; private final DocumentId documentTypeId; private final DocumentId doc...
if (this == obj) { return true; } if (!(obj instanceof DocumentKey)) { return false; } final DocumentKey other = (DocumentKey)obj; return Objects.equals(documentType, other.documentType) && Objects.equals(documentTypeId, other.documentTypeId) && Objects.equals(documentId, other.d...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentCollection.java
1
请完成以下Java代码
public void afterMessageHandled(Message<?> message, MessageChannel channel, MessageHandler handler, @Nullable Exception ex) { cleanup(); } private void setup(Message<?> message) { Authentication authentication = message.getHeaders().get(this.authenticationHeaderName, Authentication.class); SecurityContext c...
originalContext.remove(); return; } SecurityContext context = contextStack.pop(); try { if (this.empty.equals(context)) { this.securityContextHolderStrategy.clearContext(); originalContext.remove(); } else { this.securityContextHolderStrategy.setContext(context); } } catch (Throwabl...
repos\spring-security-main\messaging\src\main\java\org\springframework\security\messaging\context\SecurityContextPropagationChannelInterceptor.java
1
请完成以下Java代码
public void setIsAllowInvoicing (final boolean IsAllowInvoicing) { set_Value (COLUMNNAME_IsAllowInvoicing, IsAllowInvoicing); } @Override public boolean isAllowInvoicing() { return get_ValueAsBoolean(COLUMNNAME_IsAllowInvoicing); } @Override public void setIsAllowOnPurchase (final boolean IsAllowOnPurcha...
public int getM_CostElement_ID() { return get_ValueAsInt(COLUMNNAME_M_CostElement_ID); } @Override public void setM_Product_ID (final int M_Product_ID) { if (M_Product_ID < 1) set_Value (COLUMNNAME_M_Product_ID, null); else set_Value (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public i...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Cost_Type.java
1
请在Spring Boot框架中完成以下Java代码
private SourceHUsCollection retrieveActiveSourceHusFromWarehouse(@NonNull final ProductId productId) { final List<I_M_Source_HU> sourceHUs = sourceHUsService.retrieveMatchingSourceHuMarkers( SourceHUsService.MatchingSourceHusQuery.builder() .productId(productId) .warehouseIds(getIssueFromWarehouseIds...
.listImmutable(I_M_HU.class); final ImmutableList<I_M_Source_HU> sourceHUs = sourceHUsService.retrieveSourceHuMarkers(extractHUIdsFromHUs(activeHUsMatchingProduct)); return SourceHUsCollection.builder() .husThatAreFlaggedAsSource(activeHUsMatchingProduct) .sourceHUs(sourceHUs) .build(); } private s...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\service\commands\issue_what_was_received\SourceHUsCollectionProvider.java
2
请完成以下Java代码
public class BarURLHandler extends AbstractURLStreamHandlerService { private static final Logger LOGGER = LoggerFactory.getLogger(BarURLHandler.class); private static final String SYNTAX = "bar: bar-xml-uri"; private URL barXmlURL; /** * Open the connection for the given URL. * * @pa...
public Connection(URL url) { super(url); } @Override public void connect() throws IOException { } @Override public InputStream getInputStream() throws IOException { final PipedInputStream pin = new PipedInputStream(); final PipedOutpu...
repos\flowable-engine-main\modules\flowable-osgi\src\main\java\org\flowable\osgi\BarURLHandler.java
1
请完成以下Java代码
public <T> List<IHUDocument> createHUDocuments(final Properties ctx, final Class<T> modelClass, final Iterator<T> records) { final String tableName = InterfaceWrapperHelper.getTableName(modelClass); assumeTableName(tableName); final List<IHUDocumentLine> lines = new ArrayList<IHUDocumentLine>(); while (record...
// // Just those that are not processed // .filter(new EqualsQueryFilter<I_M_ReceiptSchedule>(I_M_ReceiptSchedule.COLUMNNAME_Processed, false)) .create() // Only active records .setOnlyActiveRecords(true) // Only those on which logged in user has RW access .setRequiredAccess(Access.WRITE) /...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\receiptschedule\impl\ReceiptScheduleHUDocumentFactory.java
1
请在Spring Boot框架中完成以下Java代码
static class GenericConfiguration { @Bean ConnectionFactory connectionFactory(R2dbcProperties properties, ObjectProvider<R2dbcConnectionDetails> connectionDetails, ResourceLoader resourceLoader, ObjectProvider<ConnectionFactoryOptionsBuilderCustomizer> customizers, ObjectProvider<ConnectionFactoryDecor...
if (pool.isBound() && !ClassUtils.isPresent("io.r2dbc.pool.ConnectionPool", context.getClassLoader())) { throw new MissingR2dbcPoolDependencyException(); } if (pool.orElseGet(Pool::new).isEnabled()) { return ConditionOutcome.match("Property-based pooling is enabled"); } return ConditionOutcome.noMat...
repos\spring-boot-4.0.1\module\spring-boot-r2dbc\src\main\java\org\springframework\boot\r2dbc\autoconfigure\ConnectionFactoryConfigurations.java
2
请完成以下Java代码
public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } public static Effect getRootAsEffect(ByteBuffer _bb) { return getRootAsEffect(_bb, new Effect()); } public static Effect getRootAsEffect(ByteBuffer _bb, Effect obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.pos...
public static void startEffect(FlatBufferBuilder builder) { builder.startTable(2); } public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); } public static void addDamage(FlatBufferBuilder builder, short damage) { builder.addShort(1, damage, 0); } public stati...
repos\tutorials-master\libraries-data-io-2\src\main\java\com\baeldung\flatbuffers\MyGame\terrains\Effect.java
1
请在Spring Boot框架中完成以下Java代码
EmbeddedActiveMQ embeddedActiveMq(org.apache.activemq.artemis.core.config.Configuration configuration, JMSConfiguration jmsConfiguration, ObjectProvider<ArtemisConfigurationCustomizer> configurationCustomizers) { for (JMSQueueConfiguration queueConfiguration : jmsConfiguration.getQueueConfigurations()) { Str...
private void addQueues(JMSConfiguration configuration, String[] queues) { boolean persistent = this.properties.getEmbedded().isPersistent(); for (String queue : queues) { JMSQueueConfigurationImpl jmsQueueConfiguration = new JMSQueueConfigurationImpl(); jmsQueueConfiguration.setName(queue); jmsQueueConfigu...
repos\spring-boot-4.0.1\module\spring-boot-artemis\src\main\java\org\springframework\boot\artemis\autoconfigure\ArtemisEmbeddedServerConfiguration.java
2
请完成以下Java代码
public void setHasStartFormKey(boolean hasStartFormKey) { this.hasStartFormKey = hasStartFormKey; } @Override public boolean isGraphicalNotationDefined() { return isGraphicalNotationDefined; } @Override public boolean hasGraphicalNotation() { return isGraphicalNotationD...
return derivedVersion; } @Override public void setDerivedVersion(int derivedVersion) { this.derivedVersion = derivedVersion; } @Override public String getEngineVersion() { return engineVersion; } @Override public void setEngineVersion(String engineVersion) { ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\ProcessDefinitionEntityImpl.java
1
请完成以下Java代码
public int create(String name, Integer age) { return jdbcTemplate.update("insert into USER(NAME, AGE) values(?, ?)", name, age); } @Override public List<User> getByName(String name) { List<User> users = jdbcTemplate.query("select NAME, AGE from USER where NAME = ?", (resultSet, i) -> { ...
@Override public int deleteByName(String name) { return jdbcTemplate.update("delete from USER where NAME = ?", name); } @Override public int getAllUsers() { return jdbcTemplate.queryForObject("select count(1) from USER", Integer.class); } @Override public int deleteAllUsers...
repos\SpringBoot-Learning-master\2.x\chapter3-1\src\main\java\com\didispace\chapter31\UserServiceImpl.java
1
请完成以下Java代码
public Advice getAdvice() { return this; } @Override public boolean isPerInstance() { return true; } /** * Sets the {@link SecurityContextHolderStrategy} to use. The default action is to use * the {@link SecurityContextHolderStrategy} stored in {@link SecurityContextHolder}. * * @since 5.8 */ publ...
} MethodSecurityExpressionHandler expressionHandler = this.registry.getExpressionHandler(); EvaluationContext ctx = expressionHandler.createEvaluationContext(this::getAuthentication, mi); return expressionHandler.filter(returnedObject, attribute.getExpression(), ctx); } private Authentication getAuthentication...
repos\spring-security-main\core\src\main\java\org\springframework\security\authorization\method\PostFilterAuthorizationMethodInterceptor.java
1
请完成以下Java代码
public OrgId getOrgId(@NonNull final ShipmentScheduleId shipmentScheduleId) { final I_M_ShipmentSchedule shipmentSchedule = getShipmentScheduleById(shipmentScheduleId); return OrgId.ofRepoId(shipmentSchedule.getAD_Org_ID()); } public BPartnerId getBPartnerId(@NonNull final ShipmentScheduleId shipmentScheduleId)...
return shipper != null ? shipper.getTrackingURL() : null; } @Nullable private I_M_Shipper loadShipper(@NonNull final String shipperInternalName) { return shipperDAO.getByInternalName(ImmutableSet.of(shipperInternalName)).get(shipperInternalName); } public ProductId getProductId(@NonNull final Shipment...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipmentschedule\api\ShippingInfoCache.java
1
请完成以下Java代码
public void setQtyLU(@NonNull final BigDecimal qtyLU) { orderLine.setQtyLU(qtyLU); } public BigDecimal getQtyLU() { return orderLine.getQtyLU(); } @Override public void setLuId(@Nullable final HuPackingInstructionsId luId) { orderLine.setM_LU_HU_PI_ID(HuPackingInstructionsId.toRepoId(luId)); } @Overr...
@Override public void setInDispute(final boolean inDispute) { values.setInDispute(inDispute); } @Override public String toString() { return String .format("OrderLineHUPackingAware [orderLine=%s, getM_Product_ID()=%s, getM_Product()=%s, getQty()=%s, getM_HU_PI_Item_Product()=%s, getM_AttributeSetInstance_...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\impl\OrderLineHUPackingAware.java
1
请在Spring Boot框架中完成以下Java代码
public int hashCode() { return Objects.hash(fulfillments, total, warnings); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ShippingFulfillmentPagedCollection {\n"); sb.append(" fulfillments: ").append(toIndentedString(fulfillments)).append("\n"); sb.ap...
/** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
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\ShippingFulfillmentPagedCollection.java
2
请完成以下Java代码
public static boolean isEventBusPostAsync(@NonNull final Topic topic) { if (alwaysConsiderAsyncTopics.contains(topic)) { return true; } // NOTE: in case of unit tests which are checking what notifications were arrived, // allowing the events to be posted async could be a problem because the event might a...
if (Check.isNotBlank(valueForTopic)) { getLogger(EventBusConfig.class).debug("SysConfig returned value={} for keyForTopic={}", valueForTopic, keyForTopic); return StringUtils.toBoolean(valueForTopic); } final String standardValue = valuesForPrefix.get(nameForAllTopics); getLogger(EventBusConfig.class).de...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\EventBusConfig.java
1
请完成以下Java代码
public void markAsRead(final String notificationId) { notificationsRepo.markAsReadById(Integer.parseInt(notificationId)); fireEventOnWebsocket(JSONNotificationEvent.eventRead(notificationId, getUnreadCount())); } public void markAllAsRead() { logger.trace("Marking all notifications as read (if any) for {}......
} public void delete(final String notificationId) { notificationsRepo.deleteById(Integer.parseInt(notificationId)); fireEventOnWebsocket(JSONNotificationEvent.eventDeleted(notificationId, getUnreadCount())); } public void deleteAll() { notificationsRepo.deleteAllByUserId(getUserId()); fireEventOnWebsocke...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\notification\UserNotificationsQueue.java
1
请完成以下Java代码
public class ScriptBindingsFactory { protected ProcessEngineConfigurationImpl processEngineConfiguration; protected List<ResolverFactory> resolverFactories; public ScriptBindingsFactory( ProcessEngineConfigurationImpl processEngineConfiguration, List<ResolverFactory> resolverFactories ...
if (resolver != null) { scriptResolvers.add(resolver); } } return scriptResolvers; } public List<ResolverFactory> getResolverFactories() { return resolverFactories; } public void setResolverFactories(List<ResolverFactory> resolverFactories) { ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\scripting\ScriptBindingsFactory.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO (Properties ctx) { org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo (ctx, Table_Name, get_TrxName()); return poi; } @Override public String toString() { StringBuffer sb = new StringBuffer ("X_C_ReferenceNo[") .a...
@Override public void setIsManual (boolean IsManual) { set_Value (COLUMNNAME_IsManual, Boolean.valueOf(IsManual)); } /** Get Manuell. @return Dies ist ein manueller Vorgang */ @Override public boolean isManual () { Object oo = get_Value(COLUMNNAME_IsManual); if (oo != null) { if (oo instanceo...
repos\metasfresh-new_dawn_uat\backend\de.metas.document.refid\src\main\java-gen\de\metas\document\refid\model\X_C_ReferenceNo.java
1
请完成以下Java代码
public final void setPoolable(final boolean poolable) throws SQLException { getStatementImpl().setPoolable(poolable); } @Override public final boolean isPoolable() throws SQLException { return getStatementImpl().isPoolable(); } @Override public final void closeOnCompletion() throws SQLException { getSt...
@Nullable private static Trx getTrx(@NonNull final CStatementVO vo) { final ITrxManager trxManager = Services.get(ITrxManager.class); final String trxName = vo.getTrxName(); if (trxManager.isNull(trxName)) { return (Trx)ITrx.TRX_None; } else { final ITrx trx = trxManager.get(trxName, false); // cr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\sql\impl\AbstractCStatementProxy.java
1
请在Spring Boot框架中完成以下Java代码
public class User { @Id private int id; private String login; private String password; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getLogin() {
return login; } public void setLogin(String login) { this.login = login; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } }
repos\tutorials-master\persistence-modules\spring-boot-persistence-h2\src\main\java\com\baeldung\h2\exceptions\models\User.java
2
请完成以下Java代码
private MLocator findOldestLocatorWithSameWarehouse(final int M_Locator_ID) { final String trxName = null; MLocator retValue = null; final String sql = "SELECT * FROM M_Locator l " + "WHERE IsActive = 'Y' AND IsDefault='Y'" + " AND EXISTS (SELECT * FROM M_Locator lx " + "WHERE l.M_Warehouse_ID=lx.M_...
String sql = "SELECT * " + "FROM M_Storage s " + "WHERE QtyOnHand > 0" + " AND M_Product_ID=?" // Empty ASI + " AND (M_AttributeSetInstance_ID=0" + " OR EXISTS (SELECT * FROM M_AttributeSetInstance asi " + "WHERE s.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID" + " AND asi.Desc...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\process\StorageCleanup.java
1
请完成以下Java代码
protected abstract class TransactionSynchronizationAdapter implements TransactionSynchronization, Ordered { @Override public void suspend() { } @Override public void resume() { } @Override public void flush() { } @Override publi...
public void afterCommit() { } @Override public void afterCompletion(int status) { } @Override public int getOrder() { return transactionSynchronizationAdapterOrder; } } }
repos\flowable-engine-main\modules\flowable-spring-common\src\main\java\org\flowable\common\spring\SpringTransactionContext.java
1
请完成以下Java代码
public ProcessPreconditionsResolution checkPreconditionsApplicable(final @NonNull IProcessPreconditionsContext context) { if (!context.isSingleSelection()) { return ProcessPreconditionsResolution.rejectBecauseNotSingleSelection().toInternal(); } final PaySelectionId paySelectionId = PaySelectionId.ofRepoIdO...
@NonNull private PaySelectionId getPaySelectionId() { return PaySelectionId.ofRepoId(getRecord_ID()); } private BPartnerId getBPartnerIdFromSelectedLines() { final PaySelectionId paySelectionId = getPaySelectionId(); final ImmutableSet<PaySelectionLineId> paySelectionLineIds = getSelectedIncludedRecordIds(I...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\payment_allocation\process\PaymentView_Launcher_From_PaySelection.java
1
请完成以下Java代码
public Void execute(CommandContext commandContext) { ensureNotNull(NotValidException.class, "jobDefinitionId", jobDefinitionId); JobDefinitionEntity jobDefinition = commandContext.getJobDefinitionManager().findById(jobDefinitionId); ensureNotNull(NotFoundException.class, "Job definition with id '"...
JOB_DEFINITION_OVERRIDING_PRIORITY, previousPriority, jobDefinition.getOverridingJobPriority()); UserOperationLogContextEntry entry = UserOperationLogContextEntryBuilder .entry(UserOperationLogEntry.OPERATION_TYPE_SET_PRIORITY, EntityTypes.JOB_DEFINITION) .inContextOf(jobDefinition) .proper...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\SetJobDefinitionPriorityCmd.java
1
请在Spring Boot框架中完成以下Java代码
public Integer getAge() { return age; } /** * 设置age属性的值。 * * @param value * allowed object is * {@link Integer } * */ public void setAge(Integer value) { this.age = value; } /** * 获取id属性的值。 * * @return * poss...
* {@link String } * */ public String getName() { return name; } /** * 设置name属性的值。 * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } }
repos\SpringBootBucket-master\springboot-cxf\src\main\java\com\xncoding\webservice\client\User.java
2
请在Spring Boot框架中完成以下Java代码
public ProcessPreconditionsResolution checkPreconditionsApplicable(final @NonNull IProcessPreconditionsContext context) { final ProjectId projectId = ProjectId.ofRepoIdOrNull(context.getSingleSelectedRecordId()); if (projectId == null) { return ProcessPreconditionsResolution.rejectBecauseNotSingleSelection()....
{ throw new AdempiereException("Not a spare parts task"); } final ServiceRepairProjectTask task = projectService.getTaskById(taskId); final IView view = viewsRepository.createView( husToIssueViewFactory.createViewRequest(HUsToIssueViewContext.builder() .taskId(taskId) .productId(task.getProdu...
repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.webui\src\main\java\de\metas\servicerepair\project\process\C_Project_OpenHUsToIssue.java
2
请在Spring Boot框架中完成以下Java代码
private List<ConfigDataResolutionResult> resolve(ConfigDataLocationResolver<?> resolver, ConfigDataLocationResolverContext context, ConfigDataLocation location, @Nullable Profiles profiles) { List<ConfigDataResolutionResult> resolved = resolve(location, false, () -> resolver.resolve(context, location)); if (prof...
private <T> List<T> nonNullList(@Nullable List<? extends T> list) { return (list != null) ? (List<T>) list : Collections.emptyList(); } private <T> List<T> merge(List<T> list1, List<T> list2) { List<T> merged = new ArrayList<>(list1.size() + list2.size()); merged.addAll(list1); merged.addAll(list2); return...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\ConfigDataLocationResolvers.java
2
请完成以下Java代码
public ImmutableCredentialRecordBuilder uvInitialized(boolean uvInitialized) { this.uvInitialized = uvInitialized; return this; } public ImmutableCredentialRecordBuilder transports(Set<AuthenticatorTransport> transports) { this.transports = transports; return this; } public ImmutableCredentialReco...
return this; } public ImmutableCredentialRecordBuilder created(Instant created) { this.created = created; return this; } public ImmutableCredentialRecordBuilder lastUsed(Instant lastUsed) { this.lastUsed = lastUsed; return this; } public ImmutableCredentialRecordBuilder label(String label) { ...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\api\ImmutableCredentialRecord.java
1