instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public void setUpdateQty (final @Nullable java.lang.String UpdateQty) { set_Value (COLUMNNAME_UpdateQty, UpdateQty); } @Override public java.lang.String getUpdateQty() { return get_ValueAsString(COLUMNNAME_UpdateQty); } @Override public org.compiere.model.I_C_ElementValue getUser1() { return get_Value...
return get_ValueAsPO(COLUMNNAME_User2_ID, org.compiere.model.I_C_ElementValue.class); } @Override public void setUser2(final org.compiere.model.I_C_ElementValue User2) { set_ValueFromPO(COLUMNNAME_User2_ID, org.compiere.model.I_C_ElementValue.class, User2); } @Override public void setUser2_ID (final int User...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Inventory.java
1
请完成以下Java代码
public class PlanFragmentXmlConverter extends TaskXmlConverter { @Override public String getXMLElementName() { return CmmnXmlConstants.ELEMENT_PLAN_FRAGMENT; } @Override protected CmmnElement convert(XMLStreamReader xtr, ConversionHelper conversionHelper) { /* * A pla...
planFragment.setCase(conversionHelper.getCurrentCase()); planFragment.setParent(conversionHelper.getCurrentPlanFragment()); conversionHelper.setCurrentPlanFragment(planFragment); conversionHelper.addPlanFragment(planFragment); return planFragment; } @Override protected voi...
repos\flowable-engine-main\modules\flowable-cmmn-converter\src\main\java\org\flowable\cmmn\converter\PlanFragmentXmlConverter.java
1
请在Spring Boot框架中完成以下Java代码
public class HttpBearerAuth implements Authentication { private final String scheme; private String bearerToken; public HttpBearerAuth(String scheme) { this.scheme = scheme; } /** * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. * * @return The bea...
@Override public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) { if (bearerToken == null) { return; } headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); } private static String upperCas...
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\invoker\auth\HttpBearerAuth.java
2
请完成以下Java代码
public int getLotNo_Sequence_ID() { return get_ValueAsInt(COLUMNNAME_LotNo_Sequence_ID); } @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); } @Override public ...
public org.compiere.model.I_R_RequestType getR_RequestType() { return get_ValueAsPO(COLUMNNAME_R_RequestType_ID, org.compiere.model.I_R_RequestType.class); } @Override public void setR_RequestType(final org.compiere.model.I_R_RequestType R_RequestType) { set_ValueFromPO(COLUMNNAME_R_RequestType_ID, org.compie...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_DocType.java
1
请在Spring Boot框架中完成以下Java代码
public DirectExchange effortControlExchange() { return new DirectExchange(EXCHANGE_NAME_PREFIX); } @Bean public Binding effortControlBinding() { return BindingBuilder.bind(effortControlQueue()) .to(effortControlExchange()).with(EXCHANGE_NAME_PREFIX); } @Override public String getQueueName() {
return effortControlQueue().getName(); } @Override public Optional<String> getTopicName() { return Optional.of(EVENTBUS_TOPIC.getName()); } @Override public String getExchangeName() { return effortControlExchange().getName(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\remote\rabbitmq\queues\effort_control\EffortControlQueueConfiguration.java
2
请完成以下Java代码
private ApiRequestAuditLog createLogEntry(@NonNull final String msg, final Object... msgParameters) { final LoggableWithThrowableUtil.FormattedMsgWithAdIssueId msgAndAdIssueId = LoggableWithThrowableUtil.extractMsgAndAdIssue(msg, msgParameters); return ApiRequestAuditLog.builder() .message(msgAndAdIssueId.get...
.recordReference(recordRef) .type(StateType.ofCode(type)) .trxName(trxName) .build(); } private void addToBuffer(final ApiRequestAuditLog logEntry) { List<ApiRequestAuditLog> buffer = this.buffer; if (buffer == null) { buffer = this.buffer = new ArrayList<>(bufferSize); } buffer.add(logEntr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\audit\apirequest\ApiAuditLoggable.java
1
请完成以下Java代码
public BigDecimal getQty() { // TODO: shall we use QtyToOrder instead... but that could affect our price (if we have some prices defined on breaks) return candidate.getQtyPromised(); } @Override public void setM_PricingSystem_ID(int M_PricingSystem_ID) { candidate.setM_PricingSystem_ID(M_PricingSystem_ID); ...
candidate.setM_PriceList_ID(M_PriceList_ID); } @Override public void setCurrencyId(final CurrencyId currencyId) { candidate.setC_Currency_ID(CurrencyId.toRepoId(currencyId)); } @Override public void setPrice(BigDecimal priceStd) { candidate.setPrice(priceStd); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\order\impl\PMMPricingAware_PurchaseCandidate.java
1
请完成以下Java代码
protected void createCamelActivityBehavior(BpmnParse bpmnParse, ServiceTask serviceTask) { serviceTask.setBehavior(bpmnParse.getActivityBehaviorFactory().createCamelActivityBehavior(serviceTask)); } protected void createShellActivityBehavior(BpmnParse bpmnParse, ServiceTask serviceTask) { servi...
} protected void createServiceTaskExpressionActivityBehavior(BpmnParse bpmnParse, ServiceTask serviceTask) { serviceTask.setBehavior( bpmnParse.getActivityBehaviorFactory().createServiceTaskExpressionActivityBehavior(serviceTask) ); } protected void createWebServiceActivityBeha...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\parser\handler\ServiceTaskParseHandler.java
1
请完成以下Java代码
public AddResult onRecordAdded( final ITableRecordReference r, final AddResult preliminaryResult) { final PlainContextAware ctx = PlainContextAware.newWithThreadInheritedTrx(Env.getCtx()); final Object model = r.getModel(ctx); final String tableName = r.getTableName(); if (tableName.startsWith("M_HU") &...
final Object model) { final String soTrxColName1 = "IsSOTrx"; final String soTrxColName2 = "SOTrx"; if (!InterfaceWrapperHelper.hasModelColumnName(model, soTrxColName1) && !InterfaceWrapperHelper.hasModelColumnName(model, soTrxColName2)) { return; } final Boolean soTrx = CoalesceUtil.coalesceSuppliers...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\partitioner\impl\SalesPurchaseWatchDog.java
1
请在Spring Boot框架中完成以下Java代码
public C withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor) { addObjectPostProcessor(objectPostProcessor); return (C) this; } /** * Allows specifying the {@link PasswordEncoder} to use with the * {@link DaoAuthenticationProvider}. The default is to use plain text. * @param passwordEncoder ...
this.provider = postProcess(this.provider); builder.authenticationProvider(this.provider); } /** * Gets the {@link UserDetailsService} that is used with the * {@link DaoAuthenticationProvider} * @return the {@link UserDetailsService} that is used with the * {@link DaoAuthenticationProvider} */ @Override...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\authentication\configurers\userdetails\AbstractDaoAuthenticationConfigurer.java
2
请在Spring Boot框架中完成以下Java代码
public DeviceToCreateMaintenances nextServiceDate(String nextServiceDate) { this.nextServiceDate = nextServiceDate; return this; } /** * Nächste Prüfung * @return nextServiceDate **/ @Schema(example = "01.12.2020", description = "Nächste Prüfung") public String getNextServiceDate() { retur...
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeviceToCreateMaintenances {\n"); sb.append(" maintenanceCode: ").append(toIndentedString(maintenanceCode)).append("\n"); sb.append(" maintenanceInterval: ").append(toIndentedString(maintenanceInte...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\model\DeviceToCreateMaintenances.java
2
请完成以下Java代码
private void fillProcessDefinitionData(HistoryEvent event, UserOperationLogContextEntry userOperationLogContextEntry) { String processDefinitionId = userOperationLogContextEntry.getProcessDefinitionId(); if (processDefinitionId != null) { fillProcessDefinitionData(event, processDefinitionId); } else {...
event.setProcessDefinitionVersion(entity.getVersion()); event.setProcessDefinitionName(entity.getName()); } } protected ProcessDefinitionEntity getProcessDefinitionEntity(String processDefinitionId) { DbEntityManager dbEntityManager = (Context.getCommandContext() != null) ? Context.getCommand...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\producer\DefaultHistoryEventProducer.java
1
请完成以下Java代码
public String getName() { return this.name; } /** * Return the listener ids of the containers in this group. * @return the listener ids. */ public Collection<String> getListenerIds() { return this.containers.stream() .map(container -> container.getListenerId()) .map(id -> { Assert.state(id !=...
@Override public synchronized void start() { if (!this.running) { this.containers.forEach(container -> { LOGGER.debug(() -> "Starting: " + container); container.start(); }); this.running = true; } } @Override public synchronized void stop() { if (this.running) { this.containers.forEach(co...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\ContainerGroup.java
1
请完成以下Java代码
public void setRemunerationType (String RemunerationType) { set_Value (COLUMNNAME_RemunerationType, RemunerationType); } /** Get Remuneration Type. @return Type of Remuneration */ public String getRemunerationType () { return (String)get_Value(COLUMNNAME_RemunerationType); } /** Set Standard Hours. ...
{ set_Value (COLUMNNAME_StandardHours, Integer.valueOf(StandardHours)); } /** Get Standard Hours. @return Standard Work Hours based on Remuneration Type */ public int getStandardHours () { Integer ii = (Integer)get_Value(COLUMNNAME_StandardHours); if (ii == null) return 0; return ii.intValue(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Remuneration.java
1
请完成以下Java代码
private IAllocationRequest createSplitAllocationRequest(final IHUContext huContext) { final ProductId productId = getProductId(); final I_C_UOM uom = productBL.getStockUOM(productId); return AllocationUtils.builder() .setHUContext(huContext) .setProduct(productId) .setQuantity(getQtyCUsPerTU(), uom)...
private void autoProcessPicking(final HuId splitCUId) { final ShipmentScheduleId shipmentScheduleId = null; pickingCandidateService.processForHUIds(ImmutableSet.of(splitCUId), shipmentScheduleId); } private HuId retrieveHUIdToSplit() { return retrieveEligibleHUEditorRows() .map(HUEditorRow::getHuId) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\husToPick\process\WEBUI_HUsToPick_PickCU.java
1
请完成以下Java代码
public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getSelectType() { return selectType; } public void setSelectType(Integer selectType) { this.selectType = selectType; } public Integer getInpu...
public Integer getType() { return type; } public void setType(Integer type) { this.type = type; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = "...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsProductAttribute.java
1
请完成以下Java代码
public final class StandardClaimNames { /** * {@code sub} - the Subject identifier */ public static final String SUB = "sub"; /** * {@code name} - the user's full name */ public static final String NAME = "name"; /** * {@code given_name} - the user's given name(s) or first name(s) */ public static ...
*/ public static final String ZONEINFO = "zoneinfo"; /** * {@code locale} - the user's locale */ public static final String LOCALE = "locale"; /** * {@code phone_number} - the user's preferred phone number */ public static final String PHONE_NUMBER = "phone_number"; /** * {@code phone_number_verified...
repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\oidc\StandardClaimNames.java
1
请完成以下Java代码
public Builder setOrderId(final @Nullable OrderId orderId) { this.orderId = orderId; return this; } public Builder setIsSOTrx(final boolean isSOTrx) { this.isSOTrx = isSOTrx; return this; } public boolean isSOTrx() { return isSOTrx; } public BPartnerId getBPartnerId() { return b...
final BigDecimal discountAmt = getDiscountAmt(); return openAmt.subtract(discountAmt); } public BigDecimal getDiscountAmt() { return CoalesceUtil.coalesceNotNull(_discountAmt, BigDecimal.ZERO); } public Builder setDiscountAmt(final BigDecimal discountAmt) { this._discountAmt = discountAmt; ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\impl\PaySelectionLineCandidate.java
1
请完成以下Java代码
protected CmmnElement convert(XMLStreamReader xtr, ConversionHelper conversionHelper) { HumanTask task = new HumanTask(); convertCommonTaskAttributes(xtr, task); task.setAssignee(xtr.getAttributeValue(CmmnXmlConstants.FLOWABLE_EXTENSIONS_NAMESPACE, CmmnXmlConstants.ATTRIBUTE_ASSIGNEE));...
task.setTaskIdVariableName(xtr.getAttributeValue(CmmnXmlConstants.FLOWABLE_EXTENSIONS_NAMESPACE, CmmnXmlConstants.ATTRIBUTE_TASK_ID_VARIABLE_NAME)); task.setTaskCompleterVariableName(xtr.getAttributeValue(CmmnXmlConstants.FLOWABLE_EXTENSIONS_NAMESPACE, CmmnXmlConstants.ATTRIBUTE_TASK_COMPLETER_VARIABLE_NAME)); ...
repos\flowable-engine-main\modules\flowable-cmmn-converter\src\main\java\org\flowable\cmmn\converter\HumanTaskXmlConverter.java
1
请完成以下Java代码
public void cancelFutureSchedulerTasks() { scheduledTasks.forEach((k, v) -> { if (k instanceof SpringBatchScheduler) { v.cancel(false); } }); } @Bean public Job job(JobRepository jobRepository, PlatformTransactionManager transactionManager) { ...
.names(new String[] { "id", "name" }) .fieldSetMapper(new BeanWrapperFieldSetMapper<>() { { setTargetType(Book.class); } }) .build(); } @Bean public ItemWriter<Book> writer() { return ite...
repos\tutorials-master\spring-batch\src\main\java\com\baeldung\batchscheduler\SpringBatchScheduler.java
1
请在Spring Boot框架中完成以下Java代码
public String getBuyerGTINTU() { return buyerGTINTU; } /** * Sets the value of the buyerGTINTU property. * * @param value * allowed object is * {@link String } * */ public void setBuyerGTINTU(String value) { this.buyerGTINTU = value; } ...
* */ public void setBuyerEANCU(String value) { this.buyerEANCU = value; } /** * Gets the value of the supplierGTINCU property. * * @return * possible object is * {@link String } * */ public String getSupplierGTINCU() { return su...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev2\de\metas\edi\esb\jaxb\metasfreshinhousev2\EDICctopInvoic500VType.java
2
请完成以下Java代码
private final static String format(int intval) { String formatted = Integer.toHexString(intval); StringBuilder buf = new StringBuilder("00000000"); buf.replace(8 - formatted.length(), 8, formatted); return buf.toString(); } private final static String format(short shortval) { String formatted = Integer.toH...
*/ private final static short getHiTime() { return (short) (System.currentTimeMillis() >>> 32); } private final static int getLoTime() { return (int) System.currentTimeMillis(); } private final static int toInt(byte[] bytes) { int result = 0; int length = 4; for (int i = 0; i < length; i++) { result...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\UUIDGenerator.java
1
请完成以下Java代码
public static IModelCopyHelper copy() { return new ModelCopyHelper(); } public static boolean isOldValues(@NonNull final Object model) { if (POWrapper.isHandled(model)) { return POWrapper.isOldValues(model); } else if (GridTabWrapper.isHandled(model)) { return GridTabWrapper.isOldValues(model); ...
{ // not all columns of clazz are also in model => we can't do it. return null; } } return InterfaceWrapperHelper.create(model, clazz); } /** * Disables the read only (i.e. not updateable) columns enforcement. * So basically, after you are calling this method you will be able to change the values...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\model\InterfaceWrapperHelper.java
1
请完成以下Java代码
public QueueBuilder singleActiveConsumer() { return withArgument("x-single-active-consumer", true); } /** * Set the queue argument to declare a queue of type 'quorum' instead of 'classic'. * @return the builder. * @since 2.2.2 */ public QueueBuilder quorum() { return withArgument("x-queue-type", "quorum...
* @return the value. */ public String getValue() { return this.value; } } /** * Locate the queue leader. * * @since 2.3.7 * */ public enum LeaderLocator { /** * Deploy on the node with the fewest queue leaders. */ minLeaders("min-masters"), /** * Deploy on the node we are conne...
repos\spring-amqp-main\spring-amqp\src\main\java\org\springframework\amqp\core\QueueBuilder.java
1
请完成以下Java代码
public Authentication authenticate(Authentication authentication) throws AuthenticationException { OAuth2TokenRevocationAuthenticationToken tokenRevocationAuthentication = (OAuth2TokenRevocationAuthenticationToken) authentication; OAuth2ClientAuthenticationToken clientPrincipal = OAuth2AuthenticationProviderUtils ...
OAuth2Authorization.Token<OAuth2Token> token = authorization.getToken(tokenRevocationAuthentication.getToken()); authorization = OAuth2Authorization.from(authorization).invalidate(token.getToken()).build(); this.authorizationService.save(authorization); if (this.logger.isTraceEnabled()) { this.logger.trace("S...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\OAuth2TokenRevocationAuthenticationProvider.java
1
请完成以下Java代码
public void processBatchEvent(@RequestBody final MSV3UserChangedBatchEvent batchEvent) { authService.handleEvent(batchEvent); } // TODO: remove this endpoint, it's only for testing/debugging @PostMapping("/toRabbitMQ") public void forwardEventToRabbitMQ(@RequestBody final MSV3UserChangedEvent event) { msv3Se...
.stream() .map(this::toMSV3UserChangedEvent) .collect(ImmutableList.toImmutableList()); } private MSV3UserChangedEvent toMSV3UserChangedEvent(final MSV3User user) { return MSV3UserChangedEvent.prepareCreatedOrUpdatedEvent(user.getMetasfreshMSV3UserId()) .username(user.getUsername()) .password("N/A...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server\src\main\java\de\metas\vertical\pharma\msv3\server\security\sync\UserSyncRestEndpoint.java
1
请完成以下Java代码
public String getVia() { return via; } /** * Sets the value of the via property. * * @param value * allowed object is * {@link String } * */ public void setVia(String value) { this.via = value; ...
public int getSequenceId() { return sequenceId; } /** * Sets the value of the sequenceId property. * */ public void setSequenceId(int value) { this.sequenceId = value; } } }
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\TransportType.java
1
请完成以下Java代码
public boolean isMandatory() { return false; } @Override public int getDisplaySeqNo() { return 0; } @Override public NamePair getNullAttributeValue() { return null; }
/** * @return true; we consider Null attributes as always generated */ @Override public boolean isNew() { return true; } @Override public boolean isOnlyIfInProductAttributeSet() { return false; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\impl\NullAttributeValue.java
1
请在Spring Boot框架中完成以下Java代码
CommandLineRunner customMybatisMapper(final ManagementService managementService) { return new CommandLineRunner() { @Override public void run(String... args) throws Exception { String processDefinitionId = managementService.executeCustomSql(new AbstractCustomSqlExecution<...
return (String) CommandContextUtil.getDbSqlSession() .selectOne("selectProcessDefinitionDeploymentIdByKey", "waiter"); } }); LOGGER.info("Process definition deployment id = {}", processDefinitionDeploymentId); } }; ...
repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-samples\flowable-spring-boot-sample-custom-mybatis-mapper\src\main\java\flowable\Application.java
2
请完成以下Java代码
private void changeFlatrateTermQty(@NonNull final I_C_Flatrate_Term term, @NonNull final BigDecimal qty) { term.setPlannedQtyPerUnit(qty); InterfaceWrapperHelper.save(term); invalidateInvoiceCandidatesOfFlatrateTerm(term); } private void invalidateInvoiceCandidatesOfFlatrateTerm(@NonNull final I_C_Flatrate_T...
final List<I_C_SubscriptionProgress> deliveries = subscriptionPA.retrieveSubscriptionProgresses(SubscriptionProgressQuery.builder() .term(term) .excludedStatus(X_C_SubscriptionProgress.STATUS_Done) .excludedStatus(X_C_SubscriptionProgress.STATUS_Delivered) .excludedStatus(X_C_SubscriptionProgress.STATUS...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\impl\ContractChangePriceQtyService.java
1
请完成以下Java代码
private boolean isOperand(char ch) { return (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9'); } private char associativity(char ch) { if (ch == '^') return 'R'; return 'L'; } public String infixToPostfix(String infix) { StringBuilder result = new StringB...
while (!stack.isEmpty() && stack.peek() != '(') { result.append(stack.pop()); } stack.pop(); } else { while (!stack.isEmpty() && (operatorPrecedenceCondition(infix, i, stack))) { result.append(stack.pop()); ...
repos\tutorials-master\core-java-modules\core-java-lang-operators-3\src\main\java\com\baeldung\infixpostfix\InfixToPostFixExpressionConversion.java
1
请完成以下Java代码
public Builder setAllowedWriteOffTypes(final Set<InvoiceWriteOffAmountType> allowedWriteOffTypes) { this.allowedWriteOffTypes.clear(); if (allowedWriteOffTypes != null) { this.allowedWriteOffTypes.addAll(allowedWriteOffTypes); } return this; } public Builder addAllowedWriteOffType(final Invoic...
} public Builder setFilter_POReference(String filterPOReference) { this.filterPOReference = filterPOReference; return this; } public Builder allowPurchaseSalesInvoiceCompensation(final boolean allowPurchaseSalesInvoiceCompensation) { this.allowPurchaseSalesInvoiceCompensation = allowPurchaseSalesIn...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.swingui\src\main\java\de\metas\banking\payment\paymentallocation\model\PaymentAllocationContext.java
1
请完成以下Java代码
private Iterator<I_C_ValidCombination> retriveAccounts() { final IQueryBuilder<I_C_ValidCombination> queryBuilder = Services.get(IQueryBL.class) .createQueryBuilder(I_C_ValidCombination.class, getCtx(), ITrx.TRXNAME_None) .addOnlyContextClient() .addOnlyActiveRecordsFilter(); queryBuilder.orderBy() ...
return true; } catch (Exception e) { addLog(account.getCombination() + ": " + e.getLocalizedMessage()); log.warn(e.getLocalizedMessage(), e); } finally { DB.restoreConstraints(); } return false; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\process\C_ValidCombination_UpdateDescriptionForAll.java
1
请在Spring Boot框架中完成以下Java代码
public class User { @Id private int id; private String login; private String password; private Role role; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getLogin() { return login; } public void setL...
return password; } public void setPassword(String password) { this.password = password; } public Role getRole() { return role; } public void setRole(Role role) { this.role = role; } }
repos\tutorials-master\persistence-modules\hibernate-enterprise\src\main\java\com\baeldung\hibernate\exception\User.java
2
请完成以下Java代码
public PageData<AuditLog> findAuditLogsByTenantIdAndCustomerId(UUID tenantId, CustomerId customerId, List<ActionType> actionTypes, TimePageLink pageLink) { return DaoUtil.toPageData( auditLogRepository .findAuditLogsByTenantIdAndCustomerId( ...
} @Override public void createPartition(AuditLogEntity entity) { partitioningRepository.createPartitionIfNotExists(AUDIT_LOG_TABLE_NAME, entity.getCreatedTime(), TimeUnit.HOURS.toMillis(partitionSizeInHours)); } @Override protected Class<AuditLogEntity> getEntityClass() { return Au...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\audit\JpaAuditLogDao.java
1
请完成以下Java代码
public ActivityInstance[] getActivityInstances(String activityId) { EnsureUtil.ensureNotNull("activityId", activityId); List<ActivityInstance> instances = new ArrayList<ActivityInstance>(); collectActivityInstances(activityId, instances); return instances.toArray(new ActivityInstance[instances.size()]...
for (TransitionInstance childTransitionInstance : childTransitionInstances) { if (activityId.equals(childTransitionInstance.getActivityId())) { instances.add(childTransitionInstance); instanceFound = true; } } if (!instanceFound) { for (ActivityInstance childActivityInstance :...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\ActivityInstanceImpl.java
1
请在Spring Boot框架中完成以下Java代码
public PublicKeyCredentialUserEntity findById(Bytes id) { log.info("findById: id={}", id.toBase64UrlString()); var externalId = id.toBase64UrlString(); return userRepository.findByExternalId(externalId) .map(DbPublicKeyCredentialUserEntityRepository::mapToUserEntity) .orElse(...
entity.setName(userEntity.getName()); entity.setDisplayName(userEntity.getDisplayName()); userRepository.save(entity); } @Override public void delete(Bytes id) { log.info("delete: id={}", id.toBase64UrlString()); userRepository.findByExternalId(id.toBase64UrlString()) ...
repos\tutorials-master\spring-security-modules\spring-security-passkey\src\main\java\com\baeldung\tutorials\passkey\repository\DbPublicKeyCredentialUserEntityRepository.java
2
请完成以下Java代码
public static HistoricIncidentDto fromHistoricIncident(HistoricIncident historicIncident) { HistoricIncidentDto dto = new HistoricIncidentDto(); dto.id = historicIncident.getId(); dto.processDefinitionKey = historicIncident.getProcessDefinitionKey(); dto.processDefinitionId = historicIncident.getProces...
dto.configuration = historicIncident.getConfiguration(); dto.historyConfiguration = historicIncident.getHistoryConfiguration(); dto.incidentMessage = historicIncident.getIncidentMessage(); dto.open = historicIncident.isOpen(); dto.deleted = historicIncident.isDeleted(); dto.resolved = historicIncide...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricIncidentDto.java
1
请完成以下Java代码
public class DLM_Partition_Migrate extends JavaProcess { @Param(mandatory = true, parameterName = "IsTest") private boolean testMigrate; private final IMigratorService migratorService = Services.get(IMigratorService.class); private final IDLMService dlmService = Services.get(IDLMService.class); @RunOutOfTrx @O...
public void process(final I_DLM_Partition partitionDB) throws Exception { process0(partitionDB); } }) .setExceptionHandler(LoggableTrxItemExceptionHandler.instance) .process(partitionsToMigrate); return MSG_OK; } private void process0(final I_DLM_Partition partitionDB) { final Parti...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\migrator\process\DLM_Partition_Migrate.java
1
请完成以下Java代码
public Optional<TemplateDefinition> findCandidateTemplateForTask(String taskUUID) { return templates.findCandidateTemplateForTask(taskUUID); } public VariableDefinition getProperty(String propertyUUID) { return properties != null ? properties.get(propertyUUID) : null; } public Variable...
public boolean shouldMapAllOutputs(String elementId) { ProcessVariablesMapping processVariablesMapping = mappings.get(elementId); return ( processVariablesMapping.getMappingType() != null && (processVariablesMapping.getMappingType().equals(MappingType.MAP_ALL_OUTPUTS) || ...
repos\Activiti-develop\activiti-core\activiti-spring-process-extensions\src\main\java\org\activiti\spring\process\model\Extension.java
1
请完成以下Java代码
public void setAD_UI_Section(org.compiere.model.I_AD_UI_Section AD_UI_Section) { set_ValueFromPO(COLUMNNAME_AD_UI_Section_ID, org.compiere.model.I_AD_UI_Section.class, AD_UI_Section); } /** Set UI Section. @param AD_UI_Section_ID UI Section */ @Override public void setAD_UI_Section_ID (int AD_UI_Section_ID)...
public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Reihenfolge. @return Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst */ @Override public int getSeqNo () { Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); if (ii == null) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_UI_Column.java
1
请完成以下Java代码
public abstract class AbstractResourceProvider<T extends Query<?, U>, U, DTO> { protected String id; protected ProcessEngine engine; public AbstractResourceProvider(String detailId, ProcessEngine engine) { this.id = detailId; this.engine = engine; } @GET @Produces(MediaType.APPLICATION_JSON) pu...
protected ProcessEngine getEngine() { return engine; } /** * Create the query we need for fetching the desired result. Setting * properties in the query like disableCustomObjectDeserialization() or * disableBinaryFetching() should be done in this method. */ protected abstract Query<T, U> baseQuer...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\AbstractResourceProvider.java
1
请在Spring Boot框架中完成以下Java代码
public AnonymousConfigurer<H> authorities(String... authorities) { return authorities(AuthorityUtils.createAuthorityList(authorities)); } /** * Sets the {@link AuthenticationProvider} used to validate an anonymous user. If this * is set, no attributes on the {@link AnonymousConfigurer} will be set on the * {...
@Override public void init(H http) { if (this.authenticationProvider == null) { this.authenticationProvider = new AnonymousAuthenticationProvider(getKey()); } this.authenticationProvider = postProcess(this.authenticationProvider); http.authenticationProvider(this.authenticationProvider); } @Override pub...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\AnonymousConfigurer.java
2
请完成以下Java代码
public List<String> extractSuffix(int length, int size, boolean extend) { TFDictionary suffixTreeSet = new TFDictionary(); for (String key : tfDictionary.keySet()) { if (key.length() > length) { suffixTreeSet.add(key.substring(key.length() - length, ke...
suffixTreeSet.add(combine(termList.subList(termList.size() - length, termList.size()))); if (extend) { for (int l = 1; l < length; ++l) { suffixTreeSet.add(combine(termList.subList(termList.size() - l, termList.size()))); ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dictionary\CommonSuffixExtractor.java
1
请完成以下Java代码
private StorageType getStorageType(final ClientId adClientId) { final I_AD_Client client = clientDAO.getById(adClientId); if (client.isStoreArchiveOnFileSystem()) { return StorageType.Filesystem; } else { return StorageType.Database; } } private StorageType getStorageType(final I_AD_Archive arch...
private IArchiveStorage createArchiveStorage(@NonNull final ArchiveStorageKey key) { final Class<? extends IArchiveStorage> storageClass = getArchiveStorageClass(key.getStorageType(), key.getAccessMode()); try { final IArchiveStorage storage = storageClass.newInstance(); storage.init(key.getClientId()); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\archive\api\impl\ArchiveStorageFactory.java
1
请在Spring Boot框架中完成以下Java代码
protected void validateDataImpl(TenantId tenantId, OtaPackage otaPackage) { validateImpl(otaPackage); if (!otaPackage.hasUrl()) { if (StringUtils.isEmpty(otaPackage.getFileName())) { throw new DataValidationException("OtaPackage file name should be specified!"); ...
} } } @Override protected OtaPackage validateUpdate(TenantId tenantId, OtaPackage otaPackage) { OtaPackage otaPackageOld = otaPackageDao.findById(tenantId, otaPackage.getUuidId()); validateUpdate(otaPackage, otaPackageOld); if (otaPackageOld.getData() != null && !otaPackag...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\service\validator\OtaPackageDataValidator.java
2
请在Spring Boot框架中完成以下Java代码
public class EdgeBulkImportService extends AbstractBulkImportService<Edge> { private final EdgeService edgeService; private final TbEdgeService tbEdgeService; private final RuleChainService ruleChainService; @Override protected void setEntityFields(Edge entity, Map<BulkImportColumnType, String> fie...
entity.setAdditionalInfo(additionalInfo); } @SneakyThrows @Override protected Edge saveEntity(SecurityUser user, Edge entity, Map<BulkImportColumnType, String> fields) { RuleChain edgeTemplateRootRuleChain = ruleChainService.getEdgeTemplateRootRuleChain(user.getTenantId()); return tbEdg...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\edge\EdgeBulkImportService.java
2
请完成以下Java代码
public void setR_IssueRecommendation_ID (int R_IssueRecommendation_ID) { if (R_IssueRecommendation_ID < 1) set_Value (COLUMNNAME_R_IssueRecommendation_ID, null); else set_Value (COLUMNNAME_R_IssueRecommendation_ID, Integer.valueOf(R_IssueRecommendation_ID)); } /** Get Issue Recommendation. @return Rec...
/** Get Request. @return Request from a Business Partner or Prospect */ public int getR_Request_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_R_Request_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Source Class. @param SourceClassName Source Class Name */ public void ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_IssueKnown.java
1
请完成以下Java代码
public Map<String, String> getEnvironment() { return this.environment; } public Set<Integer> getPorts() { return this.ports; } public String getCommand() { return this.command; } public Map<String, String> getLabels() { return this.labels; } /** * Builder for {@link ComposeService}. */ public s...
public Builder environment(String key, String value) { this.environment.put(key, value); return this; } public Builder environment(Map<String, String> environment) { this.environment.putAll(environment); return this; } public Builder ports(Collection<Integer> ports) { this.ports.addAll(ports); ...
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\container\docker\compose\ComposeService.java
1
请完成以下Java代码
public class DuplicateCheckController { @Autowired ISysDictService sysDictService; /** * 校验数据是否在系统中是否存在 * * @return */ @RequestMapping(value = "/check", method = RequestMethod.GET) @Operation(summary="重复校验接口") public Result<String> doDuplicateCheck(DuplicateCheckVo duplicateCheckVo, HttpServletRequest ...
return rs; } // 2.返回结果 if (sysDictService.duplicateCheckData(duplicateCheckVo)) { // 该值可用 return Result.ok("该值可用!"); } else { // 该值不可用 log.info("该值不可用,系统中已存在!"); return Result.error("该值不可用,系统中已存在!"); } } }
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\controller\DuplicateCheckController.java
1
请在Spring Boot框架中完成以下Java代码
class Metadata { @NonNull Type type; @NonNull String className; @NonNull String functionName; @Nullable String windowNameAndId; boolean isGroupingPlaceholder; @Singular Map<String, String> labels; public String getFunctionNameFQ() {return className + " - " + functionName;} } enum Type...
REST_CONTROLLER_WITH_WINDOW_ID("rest-controller-with-windowId"), PO("po"), DB("db"); Type(final String code) { this.code = code; } public boolean isAnyRestControllerType() { return this == Type.REST_CONTROLLER || this == Type.REST_CONTROLLER_WITH_WINDOW_ID; } @Getter private final String ...
repos\metasfresh-new_dawn_uat\backend\de.metas.monitoring\src\main\java\de\metas\monitoring\adapter\PerformanceMonitoringService.java
2
请在Spring Boot框架中完成以下Java代码
public class UnitType { @XmlValue protected BigDecimal value; @XmlAttribute(name = "Unit", namespace = "http://erpel.at/schemas/1p0/documents/extensions/edifact") protected String unit; /** * Gets the value of the value property. * * @return * possible object is * ...
/** * The type of unit. ERPEL recommends the use of code list UN/ECE recommendation 20. Note, that ERPEL supports both representations for piece: PCE and C62. A list of valid codes may be found under https://docs.ecosio.com/files/Measure_Unit_Qualifiers_6411.pdf * * @return * possible object is...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\UnitType.java
2
请完成以下Java代码
public String customers(Principal principal, Model model) { addCustomers(); Iterable<Customer> customers = customerDAO.findAll(); model.addAttribute("customers", customers); model.addAttribute("username", principal.getName()); return "customers"; } // add customers for d...
customerDAO.save(customer1); Customer customer2 = new Customer(); customer2.setAddress("2222 bar street"); customer2.setName("Bar LLP"); customer2.setServiceRendered("Important services"); customerDAO.save(customer2); Customer customer3 = new Customer(); custome...
repos\tutorials-master\spring-boot-modules\spring-boot-keycloak-adapters\src\main\java\com\baeldung\keycloak\WebController.java
1
请在Spring Boot框架中完成以下Java代码
public class PersonModule extends AbstractModule { @Provides PersonController personController(PersonService personService) { return new PersonController(personService); } @Provides PersonService personService(PersonRepository personRepository) { return new PersonService(personRepo...
} @Override public void setLogWriter(PrintWriter out) throws SQLException { } @Override public void setLoginTimeout(int seconds) throws SQLException { } @Override public int getLoginTimeout() throws SQLException { ...
repos\tutorials-master\libraries\src\main\java\com\baeldung\activej\config\PersonModule.java
2
请完成以下Java代码
public static String parseByte2HexStr(byte buf[]) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < buf.length; i++) { String hex = Integer.toHexString(buf[i] & 0xFF); if (hex.length() == 1) { hex = '0' + hex; } sb.append(hex.toUpperCase()); } return sb.toString(); } public static b...
public static void main(String[] args) { String content = "test"; String password = "12345678"; // 加密 System.out.println("加密前:" + content); byte[] encryptResult = encrypt(content, password); String encryptResultStr = parseByte2HexStr(encryptResult); System.out.println("加密后:" + encryptResultStr); // 解密 ...
repos\spring-boot-student-master\spring-boot-student-encode\src\main\java\com\xiaolyuh\utils\AESUtil.java
1
请完成以下Java代码
public void setName(String name) { this.name = name; } public void setVersion(Integer version) { this.version = version; } public void setProjectReleaseVersion(String projectReleaseVersion) { this.projectReleaseVersion = projectReleaseVersion; } @Override public St...
return version; } @Override public String getProjectReleaseVersion() { return projectReleaseVersion; } @Override public String getId() { return id; } public void setId(String id) { this.id = id; } }
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\DeploymentImpl.java
1
请完成以下Java代码
private void cuToExistingCU(@NonNull final I_M_HU sourceCuHU, @NonNull final I_M_HU targetHU) { trxManager.runInThreadInheritedTrx(() -> cuToExistingCU_InTrx(sourceCuHU, targetHU)); } private void cuToExistingCU_InTrx( @NonNull final I_M_HU sourceCuHU, @NonNull final I_M_HU targetHU) { final IMutableHUCo...
: productStorages.get(0).getProductId(); Check.assume(sourceProductStorage.getProductId().equals(targetHUProductId), "Source and Target HU productId must match!"); HULoader.of(source, destination) .load(AllocationUtils.builder() .setHUContext(huContextWithOrgId) .setDateAsToday() .setProduct...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\transfer\HUTransformService.java
1
请完成以下Java代码
public IRfQResponseProducer newRfQResponsesProducerFor(final I_C_RfQ rfq) { Check.assumeNotNull(rfq, "rfq not null"); final IRfQResponseProducer producer = rfqResponsesProducerFactory.newRfQResponsesProducerFor(rfq); if (producer != null) { return producer; } // Fallback to default producer return n...
@Override public IRfQResponseRankingStrategy newRfQResponseRankingStrategyFor(final I_C_RfQ rfq) { // TODO: implement custom providers return new DefaultRfQResponseRankingStrategy(); } @Override public IRfQResponsePublisher getRfQResponsePublisher() { return rfqResponsePublisher; } @Override public IRf...
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\impl\RfQConfiguration.java
1
请完成以下Java代码
public T orElseThrow(@NonNull final Function<ITranslatableString, RuntimeException> exceptionFactory) { if (value != null) { return value; } else { throw exceptionFactory.apply(explanation); } } public T get() { return orElseThrow(); } public boolean isPresent() { return value != null; }...
if (isPresent()) { consumer.accept(value); } return this; } @SuppressWarnings("UnusedReturnValue") public ExplainedOptional<T> ifAbsent(@NonNull final Consumer<ITranslatableString> consumer) { if (!isPresent()) { consumer.accept(explanation); } return this; } /** * @see #resolve(Function, ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\ExplainedOptional.java
1
请完成以下Java代码
public void setProductId(Long productId) { this.productId = productId; } public Long getMemberLevelId() { return memberLevelId; } public void setMemberLevelId(Long memberLevelId) { this.memberLevelId = memberLevelId; } public BigDecimal getMemberPrice() { retur...
public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", productId=").append(productId); sb.append(", memberLevel...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsMemberPrice.java
1
请完成以下Java代码
protected String doIt() throws Exception { final IShipmentSchedulePA shipmentSchedulePA = Services.get(IShipmentSchedulePA.class); final IShipmentScheduleBL shipmentScheduleBL = Services.get(IShipmentScheduleBL.class); final IQueryFilter<I_M_ShipmentSchedule> userSelectionFilter = getProcessInfo().getQueryFilte...
if (!schedulesToUpdateIterator.hasNext()) { throw new AdempiereException("@NoSelection@"); } while (schedulesToUpdateIterator.hasNext()) { final I_M_ShipmentSchedule schedule = schedulesToUpdateIterator.next(); shipmentScheduleBL.closeShipmentSchedule(schedule); } return MSG_OK; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\process\M_ShipmentSchedule_CloseShipmentSchedules.java
1
请完成以下Java代码
public static class PlanItemInstanceByStageInstanceIdAndPlanItemIdCachedEntityMatcher extends CachedEntityMatcherAdapter<PlanItemInstanceEntity> { @Override public boolean isRetained(PlanItemInstanceEntity entity, Object param) { Map<String, Object> map = (Map<String, Object>) param; ...
&& (ended ? entity.getEndedTime() != null : entity.getEndedTime() == null); } } protected void setSafeInValueLists(PlanItemInstanceQueryImpl planItemInstanceQuery) { if (planItemInstanceQuery.getInvolvedGroups() != null) { planItemInstanceQuery.setSafeInvolvedGroups(createSafeI...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\data\impl\MybatisPlanItemInstanceDataManagerImpl.java
1
请完成以下Java代码
private boolean isDeliveryDateMatching(final PickingJobReference pickingJobReference) { final ZonedDateTime deliveryDate = pickingJobReference.getDeliveryDate(); return deliveryDate != null && isDeliveryDateMatching(deliveryDate.toLocalDate()); } private boolean isDeliveryDateMatching(final LocalDate deliv...
{ if (isEmpty()) { return ImmutableSet.of(); } return Streams.concat( customerIds.stream().map(customerId -> Facets.builder().customerId(customerId).build()), deliveryDays.stream().map(deliveryDay -> Facets.builder().deliveryDay(deliveryDay).build()), handoverLocationIds.stream().m...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\PickingJobQuery.java
1
请完成以下Java代码
public class PvmAtomicOperationTransitionNotifyListenerStart extends PvmAtomicOperationActivityInstanceStart { protected ScopeImpl getScope(PvmExecutionImpl execution) { return execution.getActivity(); } protected String getEventName() { return ExecutionListener.EVENTNAME_START; } protected void ev...
if (execution.isProcessInstanceStarting()) { // only call this method if we are currently in the starting phase; // if not, this may make an unnecessary request to fetch the process // instance from the database execution.setProcessInstanceStarting(false); } execution.dispatchDelayedEve...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\runtime\operation\PvmAtomicOperationTransitionNotifyListenerStart.java
1
请完成以下Java代码
public int getId() { return id.get(); } public IntegerProperty idProperty() { return id; } public void setId(int id) { this.id.set(id); } public String getName() { return name.get(); } public StringProperty nameProperty() { return name; } ...
} public BooleanProperty isEmployedProperty() { return isEmployed; } public void setIsEmployed(boolean isEmployed) { this.isEmployed.set(isEmployed); } @Override public String toString() { return "Person{" + "id=" + id + ", name='" + nam...
repos\tutorials-master\javafx\src\main\java\com\baeldung\model\Person.java
1
请在Spring Boot框架中完成以下Java代码
public class TaskCommentResource extends TaskBaseResource { @ApiOperation(value = " Get a comment on a task", tags = { "Task Comments" }, nickname = "getTaskComment") @ApiResponses(value = { @ApiResponse(code = 200, message = "Indicates the task and comment were found and the comment is returned.")...
@ApiResponse(code = 204, message = "Indicates the task and comment were found and the comment is deleted. Response body is left empty intentionally."), @ApiResponse(code = 404, message = "Indicates the requested task was not found or the tasks does not have a comment with the given ID.") }) @DeleteM...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\task\TaskCommentResource.java
2
请完成以下Java代码
public int powerOf10(int n){ if (n == 0){ return 1; } return powerOf10(n-1)*10; } public int fibonacci(int n){ if (n <=1 ){ return n; } return fibonacci(n-1) + fibonacci(n-2); } public String toBinary(int n){ if (n...
return toBinary(n / 2) + String.valueOf(n % 2); } public int calculateTreeHeight(BinaryNode root){ if (root!= null){ if (root.getLeft() != null || root.getRight() != null){ return 1 + max(calculateTreeHeight(root.left) , calculateTreeHeight(root.right)); } ...
repos\tutorials-master\core-java-modules\core-java-lang-8\src\main\java\com\baeldung\recursion\RecursionExample.java
1
请在Spring Boot框架中完成以下Java代码
public ApiResponse<PatientNoteMapping> patientNotePatchWithHttpInfo(String apiKey, String id, PatientNote body) throws ApiException { com.squareup.okhttp.Call call = patientNotePatchValidateBeforeCall(apiKey, id, body, null, null); Type localVarReturnType = new TypeToken<PatientNoteMapping>(){}.getType(...
callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-patient-api\src\main\java\io\swagger\client\api\PatientNoteApi.java
2
请完成以下Java代码
int getLoad(int S_Resource_ID, Timestamp start, Timestamp end) { int load = 0; String sql = "SELECT SUM( CASE WHEN ow.DurationUnit = 's' THEN 1 * (onode.QueuingTime + onode.SetupTime + (onode.Duration * (o.QtyOrdered - o.QtyDelivered - o.QtyScrap)) + onode.MovingTime + onode.WaitingTime) WHEN ow.DurationUnit =...
int getLoad() { return Load; } int getDifference() { return Capacity - Load; } void setSummary(int summary) { Summary = summary; } int getSummary() { return Summary; } void setFrom(String from) { From = from; } String getFrom() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\process\CRPSummary.java
1
请完成以下Java代码
public int getAD_ChangeLog_Config_ID() { return get_ValueAsInt(COLUMNNAME_AD_ChangeLog_Config_ID); } @Override 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 pu...
return get_ValueAsInt(COLUMNNAME_AD_Table_ID); } @Override public void setKeepChangeLogsDays (final int KeepChangeLogsDays) { set_Value (COLUMNNAME_KeepChangeLogsDays, KeepChangeLogsDays); } @Override public int getKeepChangeLogsDays() { return get_ValueAsInt(COLUMNNAME_KeepChangeLogsDays); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ChangeLog_Config.java
1
请完成以下Java代码
public void onAttributeValueCreated(final IAttributeValueContext attributeValueContext, final IAttributeStorage storage, final IAttributeValue attributeValue) { final I_M_Attribute attribute = attributeValue.getM_Attribute(); final Object valueOld = null; final Object valueNew = attributeValue.getValue(); call...
@Override public void onAttributeValueDeleted(final IAttributeValueContext attributeValueContext, final IAttributeStorage storage, final IAttributeValue attributeValue) { final I_M_Attribute attribute = attributeValue.getM_Attribute(); final Object valueOld = attributeValue.getValue(); final Object valueNew = n...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\CalloutAttributeStorageListener.java
1
请在Spring Boot框架中完成以下Java代码
public class BPRelationId implements RepoIdAware { int repoId; @JsonCreator public static BPRelationId ofRepoId(final int repoId) { return new BPRelationId(repoId); } @Nullable public static BPRelationId ofRepoIdOrNull(@Nullable final Integer repoId) { return repoId != null && repoId > 0 ? new BPRelationI...
{ return toRepoIdOr(bpartnerId, -1); } public static int toRepoIdOr(@Nullable final BPRelationId bpartnerId, final int defaultValue) { return bpartnerId != null ? bpartnerId.getRepoId() : defaultValue; } private BPRelationId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "C_BP_Relat...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\service\BPRelationId.java
2
请完成以下Java代码
default <K> ListMultimap<K, T> listMultimap(@NonNull Function<T, K> keyFunction) {return listMultimap(getModelClass(), keyFunction);} /** * Retrieves the records and then splits them in groups based on the indexing key provided by <code>keyFunction</code>. * * @param keyFunction key function used to provide the...
*/ default Stream<T> stream() throws DBException { return list().stream(); } default Stream<T> iterateAndStream() throws DBException { final Iterator<T> iterator = iterate(getModelClass()); final boolean parallel = false; return StreamSupport.stream(Spliterators.spliteratorUnknownSize(iterator, Spliterato...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\model\IQuery.java
1
请在Spring Boot框架中完成以下Java代码
public <R> R updateById( @NonNull final SAPGLJournalId id, @NonNull Function<SAPGLJournal, R> processor) { final SAPGLJournal glJournal = getById(id); final R result = processor.apply(glJournal); save(glJournal); return result; } public DocStatus getDocStatus(final SAPGLJournalId glJournalId) { re...
.ifPresent(fixedConversionRate -> headerRecord.setCurrencyRate(fixedConversionRate.getMultiplyRate())); headerRecord.setDateAcct(TimeUtil.asTimestamp(createRequest.getDateDoc())); headerRecord.setDateDoc(TimeUtil.asTimestamp(createRequest.getDateDoc())); headerRecord.setGL_Category_ID(createRequest.getGlCategory...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\gljournal_sap\service\SAPGLJournalLoaderAndSaver.java
2
请完成以下Java代码
public String getType() { return type; } public void setType(String type) { this.type = type; } /** * 获取字典数据 * * @return */ public static List<DictModel> getDictList() { List<DictModel> list = new ArrayList<>(); DictModel dictModel = null; ...
/** * 根据type获取枚举 * * @param type * @return */ public static MessageTypeEnum valueOfType(String type) { for (MessageTypeEnum e : MessageTypeEnum.values()) { if (e.getType().equals(type)) { return e; } } return null; } }
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\constant\enums\MessageTypeEnum.java
1
请在Spring Boot框架中完成以下Java代码
public class ResourceEndpoint { @GetMapping(value = "/default/users/{name}") public ResponseEntity<UserDto> getUserWithDefaultCaching(@PathVariable String name) { return ResponseEntity.ok(new UserDto(name)); } @GetMapping("/users/{name}") public ResponseEntity<UserDto> getUser(@PathVariabl...
public ResponseEntity<TimestampDto> getServerTimestamp() { return ResponseEntity .ok() .cacheControl(CacheControl.noStore()) .body(new TimestampDto(LocalDateTime .now() .toInstant(ZoneOffset.UTC) .toEpochMilli())); } @GetMapping("/privat...
repos\tutorials-master\spring-security-modules\spring-security-web-boot-3\src\main\java\com\baeldung\cachecontrol\ResourceEndpoint.java
2
请完成以下Java代码
public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Date getStartDate() { return startDate; } public void setStartDate(Date startDate) { this.startDate = startDate; ...
public Date getEndDate() { return endDate; } public void setEndDate(Date endDate) { this.endDate = endDate; } public String getTeacher() { return teacher; } public void setTeacher(String teacher) { this.teacher = teacher; } }
repos\tutorials-master\spring-web-modules\spring-thymeleaf-2\src\main\java\com\baeldung\thymeleaf\customhtml\Course.java
1
请完成以下Java代码
public DocumentFilterDescriptorsProvider createFiltersProvider(@NonNull final CreateFiltersProviderContext context) { final String tableName = StringUtils.trimBlankToNull(context.getTableName()); final AdTabId adTabId = context.getAdTabId(); if (tableName == null || adTabId == null) { return NullDocumentFil...
.build(); return new UserQueryDocumentFilterDescriptorsProvider(repository); } private static UserQueryField createUserQueryField(final DocumentFieldDescriptor field) { return UserQueryField.builder() .columnName(field.getFieldName()) .displayName(field.getCaption()) .widgetType(field.getWidgetType...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\provider\userQuery\UserQueryDocumentFilterDescriptorsProviderFactory.java
1
请完成以下Java代码
public final class PackageableList implements Iterable<Packageable> { public static PackageableList EMPTY = new PackageableList(ImmutableList.of()); private final ImmutableList<Packageable> list; private PackageableList(@NonNull final Collection<Packageable> list) { this.list = list.stream() .sorted(Compara...
if (values.isEmpty()) { return Optional.empty(); } else if (values.size() == 1) { return Optional.of(values.get(0)); } else { //throw new AdempiereException("More than one value were extracted (" + values + ") from " + list); return Optional.empty(); } } public Stream<PackageableList> gro...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\picking\api\PackageableList.java
1
请完成以下Java代码
private I_M_ProductScalePrice createScalePrice(final String trxName) { return InterfaceWrapperHelper.newInstance(I_M_ProductScalePrice.class, PlainContextAware.newWithTrxName(Env.getCtx(), trxName)); } /** * Returns an existing scale price or (if <code>createNew</code> is true) creates a new one. */ @Nullabl...
{ logger.debug("Returning new instance for M_ProductPrice " + productPriceId + " and quantity " + qty); final I_M_ProductScalePrice newInstance = createScalePrice(trxName); newInstance.setM_ProductPrice_ID(productPriceId); newInstance.setQty(qty); return newInstance; } return null; } cat...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\product\impl\ProductPA.java
1
请完成以下Java代码
public Date getDueDate() { return dueDate; } public Date getDueBefore() { return dueBefore; } public Date getDueAfter() { return dueAfter; } public boolean isWithoutDueDate() { return withoutDueDate; } public SuspensionState getSuspensionState() { ...
} public String getDescriptionLikeIgnoreCase() { return descriptionLikeIgnoreCase; } public String getAssigneeLikeIgnoreCase() { return assigneeLikeIgnoreCase; } public String getOwnerLikeIgnoreCase() { return ownerLikeIgnoreCase; } public String getProcessInstanc...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\TaskQueryImpl.java
1
请完成以下Java代码
class AddToColumnQueryUpdater<T> implements ISqlQueryUpdater<T> { private final String columnName; private final BigDecimal value; private final IQueryFilter<T> onlyWhenFilter; public AddToColumnQueryUpdater(final String columnName, final BigDecimal value, @Nullable final IQueryFilter<T> onlyWhenFilter) { Check...
params.addAll(onlyWhenSqlFilter.getSqlParams(ctx)); // sqlEnding.append(" ELSE ").append(columnName).append(" END)"); } else { throw new DBException("Cannot convert filter to SQL: "+onlyWhenFilter); } sql.append(columnName).append(" + ?").append(sqlEnding); params.add(value); return sql.toStrin...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\AddToColumnQueryUpdater.java
1
请完成以下Java代码
public void init (int WindowNo, FormFrame frame) { log.debug(""); m_WindowNo = WindowNo; m_frame = frame; try { // Top Selection Panel // m_frame.getContentPane().add(selectionPanel, BorderLayout.NORTH); // Center initPanel(); CScrollPane scroll = new CScrollPane (this); m_frame.getContentP...
* Init Panel */ private void initPanel() { BoxLayout layout = new BoxLayout(this, BoxLayout.PAGE_AXIS); MGoal[] goals = MGoal.getGoals(Env.getCtx()); for (int i = 0; i < goals.length; i++) { PerformanceIndicator pi = new PerformanceIndicator(goals[i]); pi.addActionListener(this); add (pi); } } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\adempiere\apps\graph\ViewPI.java
1
请完成以下Java代码
public void updateTable(final I_DLM_Partition_Config_Reference ref) { if (ref.getDLM_Referencing_Column_ID() <= 0) { ref.setDLM_Referenced_Table_ID(0); return; } final I_AD_Column adColumn = ref.getDLM_Referencing_Column(); final int displayType = adColumn.getAD_Reference_ID(); if (!DisplayType.isLo...
else { final String columnName = adColumn.getColumnName(); tableRefInfo = adReferenceService.getTableDirectRefInfo(columnName); } if (tableRefInfo == null) { // what we do further up is not very sophisticated. e.g. for "CreatedBy", we currently don't find the table name. // therefore, don't set the...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\model\interceptor\DLM_Partition_Config_Reference.java
1
请在Spring Boot框架中完成以下Java代码
public void setLabel(String label) { this.label = label; } public Region parent(String parent) { this.parent = parent; return this; } /** * Id der übergeordneten Region * @return parent **/ @Schema(example = "5afc1d30b37364c26e9ca501", description = "Id der übergeordneten Region") pub...
Objects.equals(this.label, region.label) && Objects.equals(this.parent, region.parent) && Objects.equals(this.timestamp, region.timestamp); } @Override public int hashCode() { return Objects.hash(_id, label, parent, timestamp); } @Override public String toString() { StringBuilder ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-patient-api\src\main\java\io\swagger\client\model\Region.java
2
请在Spring Boot框架中完成以下Java代码
public class CCacheConfigDefaults { public static final CCacheConfigDefaults DEFAULTS = builder() .cacheMapType(CCache.CacheMapType.LRU) .initialCapacity(0) .maximumSize(1000) .expireMinutes(0) .captureStacktrace(false) .build(); @NonNull CCache.CacheMapType cacheMapType; int initialCapacity; int...
private static final String PROPERTY_PREFIX = "metasfresh.cache.defaults."; public static CCacheConfigDefaults computeFrom(@NonNull final SpringContextHolder springContextHolder) { return builder() .cacheMapType(springContextHolder.getProperty(PROPERTY_PREFIX + "cacheMapType").map(CCache.CacheMapType::valueOf)...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\CCacheConfigDefaults.java
2
请完成以下Java代码
protected final void invalidateAndGoBackToPickingSlotsView() { // https://github.com/metasfresh/metasfresh-webui-frontend/issues/1447 // commenting this out because we now close the current view; currently this is a must, // because currently the frontend then load *this* view's data into the pickingSlotView /...
return; } final ViewId packablesViewId = pickingSlotsView.getParentViewId(); if (packablesViewId == null) { return; } invalidateView(packablesViewId); } protected final void addHUIdToCurrentPickingSlot(@NonNull final HuId huId) { final PickingSlotView pickingSlotsView = getPickingSlotView(); fi...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\husToPick\process\HUsToPickViewBasedProcess.java
1
请完成以下Java代码
public static int toRepoId(@Nullable final OrgId orgId) { return orgId != null ? orgId.getRepoId() : -1; } public static int toRepoIdOrAny(@Nullable final OrgId orgId) { return orgId != null ? orgId.getRepoId() : ANY.repoId; } @Override @JsonValue public int getRepoId() { return repoId; } public boo...
{ if (isRegular()) { consumer.accept(this); } } @Nullable public OrgId asRegularOrNull() {return isRegular() ? this : null;} public static boolean equals(@Nullable final OrgId id1, @Nullable final OrgId id2) { return Objects.equals(id1, id2); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\organization\OrgId.java
1
请完成以下Java代码
public static <T> T post(String url, String interfaceName, RequestBody requestBody, Object param, Class<T> clazz) { Request request = new Request.Builder() //请求的url .url(url) .post(requestBody) .build(); Response response = null; S...
logger.warn(e.getMessage(), e); result = e.getMessage(); throw e; } catch (Exception e) { logger.warn(e.getMessage(), e); if (Objects.isNull(response)) { errorMsg = String.format("访问外部系统异常::%s", e.getMessage()); throw new RemoteAcce...
repos\spring-boot-student-master\spring-boot-student-okhttp\src\main\java\com\xiaolyuh\util\OkHttpClientUtil.java
1
请完成以下Java代码
protected static DefaultCaseDiagramCanvas initCaseDiagramCanvas(CmmnModel cmmnModel, String imageType, String activityFontName, String labelFontName, String annotationFontName, ClassLoader customClassLoader) { // We need to calculate maximum values to know how big the image will be in its entirety ...
} if (stageInfo.getY() < minY) { minY = stageInfo.getY(); } } return new DefaultCaseDiagramCanvas((int) maxX + 10, (int) maxY + 10, (int) minX, (int) minY, imageType, activityFontName, labelFontName, annotationFontName, customClassLoader); } ...
repos\flowable-engine-main\modules\flowable-cmmn-image-generator\src\main\java\org\flowable\cmmn\image\impl\DefaultCaseDiagramGenerator.java
1
请在Spring Boot框架中完成以下Java代码
final List<JsonExternalReferenceTarget> computeTargets(@NonNull final AttachmentMetadata metadata) { final ImmutableList.Builder<JsonExternalReferenceTarget> targets = ImmutableList.builder(); final String createdBy = metadata.getCreatedBy(); if (!EmptyUtil.isEmpty(createdBy)) { targets.add(JsonExternalRef...
tags.add(JsonTag.of(GetAttachmentRouteConstants.ALBERTA_ATTACHMENT_UPLOAD_DATE, uploadDate)); } final BigDecimal type = metadata.getType(); if (type != null) { tags.add(JsonTag.of(GetAttachmentRouteConstants.ALBERTA_ATTACHMENT_TYPE, String.valueOf(type))); } final OffsetDateTime createdAt = metadata.ge...
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\attachment\processor\AttachmentProcessor.java
2
请完成以下Java代码
public UserQuery orderByUserId() { return orderBy(UserQueryProperty.USER_ID); } @Override public UserQuery orderByUserEmail() { return orderBy(UserQueryProperty.EMAIL); } @Override public UserQuery orderByUserFirstName() { return orderBy(UserQueryProperty.FIRST_NAME); ...
public String getLastNameLikeIgnoreCase() { return lastNameLikeIgnoreCase; } public String getEmail() { return email; } public String getEmailLike() { return emailLike; } public String getGroupId() { return groupId; } public List<String> getGroupIds() ...
repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\UserQueryImpl.java
1
请完成以下Java代码
public void onValidationError(String params, String msg) { processRemove.run(); callback.onValidationError(params, msg); } @Override public void onError(String params, Exception e) { try { if (e instanceof TimeoutEx...
@Override public void removeUpdates(String endpoint) { currentModelConfigs.remove(endpoint); modelStore.remove(endpoint); } @PreDestroy private void destroy() { currentModelConfigs.values().forEach(model -> { if (model != null && !model.isEmpty()) { m...
repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\server\model\LwM2MModelConfigServiceImpl.java
1
请完成以下Java代码
public void setC_BPartner_Customer_ID (final int C_BPartner_Customer_ID) { if (C_BPartner_Customer_ID < 1) set_Value (COLUMNNAME_C_BPartner_Customer_ID, null); else set_Value (COLUMNNAME_C_BPartner_Customer_ID, C_BPartner_Customer_ID); } @Override public int getC_BPartner_Customer_ID() { return get...
else set_Value (COLUMNNAME_M_Product_Category_ID, M_Product_Category_ID); } @Override public int getM_Product_Category_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_Category_ID); } @Override public void setM_Product_ID (final int M_Product_ID) { if (M_Product_ID < 1) set_Value (COLUMNNAME_M_P...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\commission\model\X_C_Customer_Trade_Margin_Line.java
1
请完成以下Java代码
public class X_M_Product_Mapping extends org.compiere.model.PO implements I_M_Product_Mapping, org.compiere.model.I_Persistent { /** * */ private static final long serialVersionUID = 13779372L; /** Standard Constructor */ public X_M_Product_Mapping (Properties ctx, int M_Product_Mapping_ID, String trxN...
public int getM_Product_Mapping_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_Mapping_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Suchschlüssel. @param Value Suchschlüssel für den Eintrag im erforderlichen Format - muss eindeutig sein */ @Override public void s...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\product\model\X_M_Product_Mapping.java
1
请完成以下Java代码
private HUPIItemProductId getPackingMaterialId(final IPricingContext pricingCtx) { final Object referencedObj = pricingCtx.getReferencedObject(); if (referencedObj == null) { return null; } // // check if we have an piip-aware if (referencedObj instanceof I_M_HU_PI_Item_Product_Aware) { final in...
return null; } public static IProductPriceQueryMatcher createHUPIItemProductMatcher(@Nullable final HUPIItemProductId packingMaterialId) { if (packingMaterialId == null || !packingMaterialId.isRegular()) { return HUPIItemProductMatcher_None; } else { return ProductPriceQueryMatcher.of(HUPIItemProduc...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pricing\spi\impl\HUPricing.java
1
请完成以下Java代码
private Optional<Object> extractAttributeValueToTransfer(final I_M_HU hu, final I_M_Attribute attribute, final IAttributeStorageFactory attributeStorageFactory) { if (hu != null) { final IAttributeStorage vhuStorage = attributeStorageFactory.getAttributeStorage(hu); if (vhuStorage.hasAttribute(attribute)) ...
/** * Sets a online {@link Set} which contains the list of TU Ids which were already assigned. * <p> * This set will be updated by this builder when TUs are assigned. * <p> * When this shipment line will try to assign an TU which is on this list, it will set the {@link I_M_HU_Assignment#setIsTransferPackingMa...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipmentschedule\spi\impl\ShipmentLineBuilder.java
1
请在Spring Boot框架中完成以下Java代码
public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } public String getDecisionKey() { return decisionKey; } public void setDecisionKey(String decisionKey) { this.decisionKey = decisionKey; }...
return decisionName; } public void setDecisionName(String decisionName) { this.decisionName = decisionName; } public String getDecisionVersion() { return decisionVersion; } public void setDecisionVersion(String decisionVersion) { this.decisionVersion = decisionVersion;...
repos\flowable-engine-main\modules\flowable-dmn-rest\src\main\java\org\flowable\dmn\rest\service\api\history\HistoricDecisionExecutionResponse.java
2
请完成以下Java代码
public TimeRange createTimeRange( @Nullable final Instant from, @Nullable final Instant to) { final Instant toEffective = to != null ? to : calculateTo(); final Instant fromEffective = from != null ? from : calculateFrom(toEffective); return TimeRange.main(fromEffective, toEffective); } public TimeRange...
} else { return to.minus(defaultTimeRange.abs()); } } public KPITimeRangeDefaults compose(final KPITimeRangeDefaults fallback) { return builder() .defaultTimeRange(CoalesceUtil.coalesce(getDefaultTimeRange(), fallback.getDefaultTimeRange())) .defaultTimeRangeEndOffset(CoalesceUtil.coalesce(getDef...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\kpi\KPITimeRangeDefaults.java
1
请在Spring Boot框架中完成以下Java代码
public List<CaseDefinition> findCaseDefinitionsByQueryCriteria(CaseDefinitionQueryImpl caseDefinitionQuery, Page page) { configureCaseDefinitionQuery(caseDefinitionQuery); return getDbEntityManager().selectList("selectCaseDefinitionsByQueryCriteria", caseDefinitionQuery, page); } public long findCaseDefini...
return getDbEntityManager().getCachedEntity(CaseDefinitionEntity.class, definitionId); } @Override public CaseDefinitionEntity findLatestDefinitionByKeyAndTenantId(String definitionKey, String tenantId) { return findLatestCaseDefinitionByKeyAndTenantId(definitionKey, tenantId); } @Override public Case...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\entity\repository\CaseDefinitionManager.java
2