instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public void removeEventListener(FlowableEventListener listenerToRemove) { commandExecutor.execute(new RemoveEventListenerCommand(listenerToRemove)); } @Override public void dispatchEvent(FlowableEvent event) { commandExecutor.execute(new DispatchEventCommand(event)); } @Override ...
return new CaseInstanceStartEventSubscriptionDeletionBuilderImpl(this); } public EventSubscription registerCaseInstanceStartEventSubscription(CaseInstanceStartEventSubscriptionBuilderImpl builder) { return commandExecutor.execute(new RegisterCaseInstanceStartEventSubscriptionCmd(builder)); } p...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\CmmnRuntimeServiceImpl.java
1
请完成以下Java代码
public int getC_Print_Job_Instructions_ID() { return get_ValueAsInt(COLUMNNAME_C_Print_Job_Instructions_ID); } @Override public void setc_print_job_name (java.lang.String c_print_job_name) { set_ValueNoCheck (COLUMNNAME_c_print_job_name, c_print_job_name); } @Override public java.lang.String getc_print_j...
@Override public java.lang.String getDocumentNo() { return (java.lang.String)get_Value(COLUMNNAME_DocumentNo); } @Override public void setFirstname (java.lang.String Firstname) { set_ValueNoCheck (COLUMNNAME_Firstname, Firstname); } @Override public java.lang.String getFirstname() { return (java.lan...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_RV_Prt_Bericht_Statistik_List_Per_Org.java
1
请完成以下Java代码
public GridWorkbench getGridWorkbench() { return m_mWorkbench; } // metas-2009_0021_AP1_CR064 @Override public void requestFocus() { m_curGC.requestFocus(); } @Override public boolean requestFocusInWindow() { return m_curGC.requestFocusInWindow(); } public GridController getCurrentGridController() ...
{ // Check if the component has a key binding defined for our panel key binding. final Object compAction = compInputMap.get(key); if (compAction == null) { continue; } if (isRemoveKeyStrokePredicate != null && !isRemoveKeyStrokePredicate.apply(key)) { continue; } // NOTE: Instead of...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\APanel.java
1
请完成以下Java代码
public long executeCount(CommandContext commandContext) { ensureVariablesInitialized(); checkQueryOk(); return commandContext .getExternalTaskManager() .findExternalTaskCountByQueryCriteria(this); } @Override public List<ExternalTask> executeList(CommandContext commandContext, Page page) ...
public String getProcessDefinitionName() { return processDefinitionName; } public String getProcessDefinitionNameLike() { return processDefinitionNameLike; } public String getActivityId() { return activityId; } public SuspensionState getSuspensionState() { return suspensionState; } p...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ExternalTaskQueryImpl.java
1
请完成以下Java代码
public WindowId getWindowId() { return WINDOW_ID; } @Override public void put(final IView view) { throw new UnsupportedOperationException(); } @Nullable @Override public PaymentsToReconcileView getByIdOrNull(@NonNull final ViewId paymentsToReconcileViewId) { final ViewId bankStatementReconciliationVie...
@Override public Stream<IView> streamAllViews() { return banksStatementReconciliationViewFactory.streamAllViews() .map(BankStatementReconciliationView::cast) .map(BankStatementReconciliationView::getPaymentsToReconcileView); } @Override public void invalidateView(final ViewId paymentsToReconcileViewId) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\bankstatement_reconciliation\PaymentsToReconcileViewFactory.java
1
请在Spring Boot框架中完成以下Java代码
private MaterialDescriptor createMaterialDescriptorForPPOrder(@NonNull final PPOrder ppOrder) { return MaterialDescriptor.builder() .date(ppOrder.getPpOrderData().getDatePromised()) .productDescriptor(ppOrder.getPpOrderData().getProductDescriptor()) .quantity(ppOrder.getPpOrderData().getQtyOpen()) .w...
{ if (ppOrderData.getShipmentScheduleId() <= 0) { return Optional.empty(); } final DemandDetailsQuery demandDetailsQuery = DemandDetailsQuery. ofShipmentScheduleId(ppOrderData.getShipmentScheduleId()); final MaterialDescriptorQuery materialDescriptorQuery = MaterialDescriptorQuery.builder() .prod...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\pporder\PPOrderCreatedHandler.java
2
请完成以下Java代码
public OAuth2TokenValidatorResult validate(Jwt token) { if (token.getClaim(this.claimName) == null) { return OAuth2TokenValidatorResult .failure(new OAuth2Error(OAuth2ErrorCodes.INVALID_TOKEN, this.claimName + " must have a value", "https://datatracker.ietf.org/doc/html/rfc9068#name-data-structure"))...
if (predicate.test(jwt)) { return OAuth2TokenValidatorResult.success(); } return OAuth2TokenValidatorResult.failure(error); }); } OAuth2TokenValidator<Jwt> and(OAuth2TokenValidator<Jwt> that) { return (jwt) -> { OAuth2TokenValidatorResult result = validate(jwt); return (result.hasErrors(...
repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\JwtValidators.java
1
请完成以下Java代码
public void consume(final I_AD_UI_Column uiColumn, final I_AD_UI_Section parent) { logger.debug("Generated in memory {} for {}", uiColumn, parent); section2columns.put(parent, uiColumn); } @Override public List<I_AD_UI_Column> getUIColumns(final I_AD_UI_Section uiSection) { return section2columns.get(uiSect...
} @Override public List<I_AD_UI_Element> getUIElementsOfType(@NonNull final AdTabId adTabId, @NonNull final LayoutElementType layoutElementType) { return elementGroup2elements.values().stream() .filter(uiElement -> layoutElementType.getCode().equals(uiElement.getAD_UI_ElementType())) .collect(ImmutableLis...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\factory\standard\InMemoryUIElementsProvider.java
1
请完成以下Java代码
public class PurchaseOrderItem { @ProductCheckDigit @NotNull @Pattern(regexp = "A-\\d{8}-\\d") private String productId; private String sourceWarehouse; private String destinationCountry; @AvailableChannel private String tenantChannel; private int numberOfIndividuals; private...
} public void setNumberOfIndividuals(int numberOfIndividuals) { this.numberOfIndividuals = numberOfIndividuals; } public int getNumberOfPacks() { return numberOfPacks; } public void setNumberOfPacks(int numberOfPacks) { this.numberOfPacks = numberOfPacks; } public...
repos\tutorials-master\spring-boot-modules\spring-boot-validation\src\main\java\com\baeldung\customstatefulvalidation\model\PurchaseOrderItem.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setC_DocType_Invoicing_Pool_ID (final int C_DocType_Invoicing_Pool_ID) { if (C_DocType_Invoicing_Pool_ID < 1) set_ValueNoCheck (COLUMNNAME_C_DocType_Invoicing_...
{ if (Negative_Amt_C_DocType_ID < 1) set_Value (COLUMNNAME_Negative_Amt_C_DocType_ID, null); else set_Value (COLUMNNAME_Negative_Amt_C_DocType_ID, Negative_Amt_C_DocType_ID); } @Override public int getNegative_Amt_C_DocType_ID() { return get_ValueAsInt(COLUMNNAME_Negative_Amt_C_DocType_ID); } @Ov...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_DocType_Invoicing_Pool.java
1
请在Spring Boot框架中完成以下Java代码
public class RepositoryCheckBook { @Id @GeneratedValue private Long id; private String title; public RepositoryCheckBook() { } public RepositoryCheckBook(String title) { this.title = title; } public void setId(Long id) {
this.id = id; } public Long getId() { return id; } public void setTitle(String title) { this.title = title; } public String getTitle() { return title; } }
repos\tutorials-master\persistence-modules\spring-data-jpa-repo-4\src\main\java\com\baeldung\spring\insertableonly\repositorycheck\RepositoryCheckBook.java
2
请完成以下Java代码
protected Templates reloadFormattingTemplates() { final TransformerFactory transformerFactory = this.domXmlDataFormat.getTransformerFactory(); try (final InputStream formattingConfiguration = getFormattingConfiguration()) { if (formattingConfiguration == null) { throw LOG.unableToFindStripSpaceXs...
Transformer transformer = formattingTemplates.newTransformer(); transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2"); return transformer; } catch (...
repos\camunda-bpm-platform-master\spin\dataformat-xml-dom\src\main\java\org\camunda\spin\impl\xml\dom\format\DomXmlDataFormatWriter.java
1
请完成以下Java代码
public double getFree() { return NumberUtil.div(free, (1024 * 1024), 2); } public void setFree(double free) { this.free = free; } public double getUsed() { return NumberUtil.div(total - free, (1024 * 1024), 2); } public double getUsage() { return NumberUtil.mul...
public String getHome() { return home; } public void setHome(String home) { this.home = home; } public void setStartTime(String startTime) { this.startTime = startTime; } public String getStartTime() { return DateUtil.formatDateTime(new Date(ManagementFactory.g...
repos\spring-boot-demo-master\demo-websocket\src\main\java\com\xkcoding\websocket\model\server\Jvm.java
1
请完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public DmnTypeDefinition getTypeDefinition() { return typeDefinition; } public void setTypeDefi...
", expressionLanguage='" + expressionLanguage + '\'' + ", expression='" + expression + '\'' + '}'; } public void cacheCompiledScript(CompiledScript compiledScript) { this.cachedCompiledScript = compiledScript; } public CompiledScript getCachedCompiledScript() { return this.cachedCompiledSc...
repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DmnExpressionImpl.java
1
请完成以下Java代码
protected void unsubscribe(TopicSubscriptionImpl subscription) { subscriptions.remove(subscription); } public EngineClient getEngineClient() { return engineClient; } public List<TopicSubscription> getSubscriptions() { return subscriptions; } public boolean isRunning() { return isRunning.g...
LOG.exceptionWhileExecutingBackoffStrategyMethod(e); } finally { ACQUISITION_MONITOR.unlock(); } } } protected void resume() { ACQUISITION_MONITOR.lock(); try { IS_WAITING.signal(); } finally { ACQUISITION_MONITOR.unlock(); } } public void disableB...
repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\topic\impl\TopicSubscriptionManager.java
1
请完成以下Java代码
private void initComponents() throws InstantiationException, IllegalAccessException { // 获取需要扫描的包名 String pkgName = getPackage(); // 获取包下所有类 List<Class<?>> classes = ClassUtil.getClasses(pkgName); if (CollectionUtils.isEmpty(classes)) { return; } // ...
field.set(processor, componentList); System.out.println(processor); System.out.println(componentList); System.out.println("---------------"); } /** * 初始化componentList * @param injectComponents componentList上的注解 */ private List<BaseComponent> initComponentList(InjectC...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Order\src\main\java\com\gaoxi\order\init\InitComponentList.java
1
请完成以下Java代码
public String getScheduleConf() { return scheduleConf; } public void setScheduleConf(String scheduleConf) { this.scheduleConf = scheduleConf; } public String getMisfireStrategy() { return misfireStrategy; } public void setMisfireStrategy(String misfireStrategy) { this.misfireStrategy = misfireStrategy;...
public Date getGlueUpdatetime() { return glueUpdatetime; } public void setGlueUpdatetime(Date glueUpdatetime) { this.glueUpdatetime = glueUpdatetime; } public String getChildJobId() { return childJobId; } public void setChildJobId(String childJobId) { this.childJobId = childJobId; } public int getTr...
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\model\XxlJobInfo.java
1
请完成以下Java代码
public int getM_ShipmentSchedule_ExportAudit_ID() { return get_ValueAsInt(COLUMNNAME_M_ShipmentSchedule_ExportAudit_ID); } @Override public void setM_ShipmentSchedule_ExportAudit_Item_ID (final int M_ShipmentSchedule_ExportAudit_Item_ID) { if (M_ShipmentSchedule_ExportAudit_Item_ID < 1) set_ValueNoCheck ...
set_ValueNoCheck (COLUMNNAME_M_ShipmentSchedule_ID, M_ShipmentSchedule_ID); } @Override public int getM_ShipmentSchedule_ID() { return get_ValueAsInt(COLUMNNAME_M_ShipmentSchedule_ID); } @Override public void setTransactionIdAPI (final @Nullable java.lang.String TransactionIdAPI) { throw new IllegalArgum...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inoutcandidate\model\X_M_ShipmentSchedule_ExportAudit_Item.java
1
请在Spring Boot框架中完成以下Java代码
public class X_MobileConfiguration extends org.compiere.model.PO implements I_MobileConfiguration, org.compiere.model.I_Persistent { private static final long serialVersionUID = -1713061336L; /** Standard Constructor */ public X_MobileConfiguration (final Properties ctx, final int MobileConfiguration_ID, @N...
{ set_Value (COLUMNNAME_DefaultAuthenticationMethod, DefaultAuthenticationMethod); } @Override public java.lang.String getDefaultAuthenticationMethod() { return get_ValueAsString(COLUMNNAME_DefaultAuthenticationMethod); } @Override public void setMobileConfiguration_ID (final int MobileConfiguration_ID) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_MobileConfiguration.java
2
请完成以下Java代码
public final class UserDashboard { @Getter @NonNull private final UserDashboardId id; @NonNull private final ClientId adClientId; private final ImmutableMap<UserDashboardItemId, UserDashboardItem> _targetIndicatorItemsById; private final ImmutableMap<UserDashboardItemId, UserDashboardItem> _kpiItemsById; @Builde...
} public ImmutableSet<UserDashboardItemId> getItemIds(final DashboardWidgetType dashboardWidgetType) { return getItemsById(dashboardWidgetType).keySet(); } public Collection<UserDashboardItem> getItems(final DashboardWidgetType dashboardWidgetType) { return getItemsById(dashboardWidgetType).values(); } pu...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\dashboard\UserDashboard.java
1
请完成以下Java代码
public void deleteOauth2ClientsByTenantId(TenantId tenantId) { log.trace("Executing deleteOauth2ClientsByTenantId, tenantId [{}]", tenantId); oauth2ClientDao.deleteByTenantId(tenantId.getId()); } @Override public PageData<OAuth2ClientInfo> findOAuth2ClientInfosByTenantId(TenantId tenantId, ...
@Override public Optional<HasId<?>> findEntity(TenantId tenantId, EntityId entityId) { return Optional.ofNullable(findOAuth2ClientById(tenantId, new OAuth2ClientId(entityId.getId()))); } @Override public FluentFuture<Optional<HasId<?>>> findEntityAsync(TenantId tenantId, EntityId entityId) { ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\oauth2\OAuth2ClientServiceImpl.java
1
请在Spring Boot框架中完成以下Java代码
public void add(final @NonNull ServiceRepairProjectCostCollector costCollector) { final QuotationLineKey lineKey = QuotationLineAggregator.extractKey(costCollector); final QuotationLineAggregator lineAggregator = lineAggregators.computeIfAbsent(lineKey, this::newLineAggregator); lineAggregator.add(costCollector)...
lineAggregators.values() .forEach(lineAggregator -> lineAggregator.createOrderLines(orderFactory)); } @Override public Stream<Map.Entry<ServiceRepairProjectCostCollectorId, OrderAndLineId>> streamQuotationLineIdsIndexedByCostCollectorId() { return lineAggregators.values() .stream() .flatMap(Quotation...
repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\project\service\commands\createQuotationFromProjectCommand\OtherLinesAggregator.java
2
请完成以下Java代码
public boolean isAllowed(String uri, @Nullable Authentication authentication) { return isAllowed(null, uri, null, authentication); } /** * Determines whether the user represented by the supplied <tt>Authentication</tt> * object is allowed to invoke the supplied URI, with the given . * <p> * Note the defaul...
return false; } try { this.securityInterceptor.getAccessDecisionManager().decide(authentication, filterInvocation, attributes); return true; } catch (AccessDeniedException ex) { logger.debug(LogMessage.format("%s denied for %s", filterInvocation, authentication), ex); return false; } } @Overrid...
repos\spring-security-main\access\src\main\java\org\springframework\security\web\access\DefaultWebInvocationPrivilegeEvaluator.java
1
请完成以下Java代码
public class ChatRequest { @Schema(description = "模型ID,目前只支持gpt-3.5-turbo和gpt-3.5-turbo-0301", example = "gpt-3.5-turbo", required = true) private String model; @Schema(description = "要为其生成聊天内容的消息列表", required = true) private List<Message> messages; @Schema(description = "抽样温度,范围为0到2。较高的值(如0.8)会使...
private Integer maxTokens; @Schema(description = "基于它们是否已在到目前为止的文本中出现,对新标记进行惩罚的数字,介于-2.0和2.0之间的数字。正值会增加模型谈论新话题的可能性。") private Double presencePenalty; @Schema(description = "基于它们到目前为止在文本中的现有频率对新标记进行惩罚的数字,介于-2.0和2.0之间的数字。正值会减少模型直接重复相同内容的可能性。") private Double frequencyPenalty; @Schema(description = ...
repos\spring-boot-quick-master\quick-sse\src\main\java\com\quick\vo\ChatRequest.java
1
请完成以下Java代码
protected MessageCorrelationBatchConfiguration createJobConfiguration(MessageCorrelationBatchConfiguration configuration, List<String> processIdsForJob) { return new MessageCorrelationBatchConfiguration( processIdsForJob, configuration.getMessageName(), configuration.getBatchId()); } @O...
} protected void setVariables(String batchId, MessageCorrelationBuilder correlationBuilder, CommandContext commandContext) { Map<String, ?> variables = null; if (batchId != null) { variables = VariableUtil.findBatchVariablesSerialized(batchId,...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\message\MessageCorrelationBatchJobHandler.java
1
请完成以下Java代码
public List<CustomProperty> getCustomProperties() { return customProperties; } public void setCustomProperties(List<CustomProperty> customProperties) { this.customProperties = customProperties; } public String getSkipExpression() { return skipExpression; } public void ...
setCandidateGroups(new ArrayList<String>(otherElement.getCandidateGroups())); setCandidateUsers(new ArrayList<String>(otherElement.getCandidateUsers())); setCustomGroupIdentityLinks(otherElement.customGroupIdentityLinks); setCustomUserIdentityLinks(otherElement.customUserIdentityLinks); ...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\UserTask.java
1
请完成以下Java代码
public String getFirstName() { return firstName; } public void setFirstName(final String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(final String lastName) { this.lastName = lastName; }...
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((email == null) ? 0 : email.hashCode()); return result; } @Override public boolean equals(final Object obj) { if (this == obj) return true; if (...
repos\tutorials-master\spring-web-modules\spring-rest-query-language\src\main\java\com\baeldung\persistence\model\User.java
1
请完成以下Java代码
public I_M_HU_PI getM_LU_HU_PI() { return luPI; } @Override public I_M_HU_PI getM_TU_HU_PI() { return null; } @Override public boolean isInfiniteQtyTUsPerLU() { return true; } @Override public BigDecimal getQtyTUsPerLU() { return null; } @Override
public boolean isInfiniteQtyCUsPerTU() { return true; } @Override public BigDecimal getQtyCUsPerTU() { return null; } @Override public I_C_UOM getQtyCUsPerTU_UOM() { return null; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\util\LUPIPackingInfo.java
1
请完成以下Spring Boot application配置
management.endpoints.web.exposure.include=info,health,metrics # JPA and Security is not required for Metrics application spring.autoconfigure.exclude= org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, \ org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, \ org.sprin...
ration, \ org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration, \ org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration
repos\tutorials-master\spring-boot-modules\spring-boot-actuator\src\main\resources\application-metrics.properties
2
请完成以下Java代码
class DateFilterUtil { private static final AdMessageKey MSG_FILTER_CAPTION = AdMessageKey.of("Date"); public static DocumentFilterDescriptor createFilterDescriptor() { final DocumentFilterParamDescriptor.Builder standaloneParamDescriptor = DocumentFilterParamDescriptor.builder() .fieldName(DateFilterVO.PARAM...
public DateFilterVO extractDateFilterVO(final DocumentFilterList filters) { return filters.getFilterById(DateFilterVO.FILTER_ID) .map(filter -> extractDateFilterVO(filter)) .orElse(DateFilterVO.EMPTY); } public DateFilterVO extractDateFilterVO(final DocumentFilter filter) { Check.assume(DateFilterVO.FI...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\filters\DateFilterUtil.java
1
请在Spring Boot框架中完成以下Java代码
public class ChangeLogConfigRepository { @NonNull private final IQueryBL queryBL = Services.get(IQueryBL.class); @VisibleForTesting public static ChangeLogConfigRepository newInstanceForUnitTesting() { Adempiere.assertUnitTestMode(); return new ChangeLogConfigRepository(); } @NonNull public ImmutableList<C...
.create() .stream() .map(ChangeLogConfigRepository::fromRecord) .collect(ImmutableList.toImmutableList()); } private static ChangeLogConfig fromRecord(@NonNull final I_AD_ChangeLog_Config changeLogConfig) { return ChangeLogConfig.builder() .tableId(AdTableId.ofRepoId(changeLogConfig.getAD_Table_ID...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\table\ChangeLogConfigRepository.java
2
请完成以下Java代码
public String getId() { return id; } /** * The date/time when this task was last updated. * All operations that fire {@link TaskListener#EVENTNAME_UPDATE} count as an update to the task. * Returns null if the task was never updated before (i.e. it was only created). * */ public Date getLastUpdate...
/** * The id of the activity in the process defining this task or null if this is * not related to a process */ public String getTaskDefinitionKey() { return taskDefinitionKey; } /** * Return the id of the tenant this task belongs to. Can be <code>null</code> * if the task belongs to no single...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\event\TaskEvent.java
1
请完成以下Java代码
public boolean addAll(Collection<T> values) { this.lock.writeLock().lock(); try { for (T value : values) { if (add(value).isEmpty()) { return false; } } return true; } finally { this.lock.writeLoc...
tail = tail.getPrev(); oldTail.detach(); } if (!oldTail.isEmpty()) { size.decrementAndGet(); } return oldTail; } finally { this.lock.writeLock().unlock(); } } public LinkedListNode<T> moveToFront(LinkedL...
repos\tutorials-master\data-structures\src\main\java\com\baeldung\lrucache\DoublyLinkedList.java
1
请在Spring Boot框架中完成以下Java代码
public class CustomMFToExternalSystemMessageSender { private final RabbitTemplate rabbitTemplate; private final Queue queue; public CustomMFToExternalSystemMessageSender( @NonNull final RabbitTemplate rabbitTemplate, @NonNull @Qualifier(QUEUE_NAME_MF_TO_ES_CUSTOM) final Queue queue ) { this.rabbitTemplate...
{ messageAsBytes = JsonObjectMapperHolder.sharedJsonObjectMapper().writeValueAsBytes(externalSystemMessage); } catch (final JsonProcessingException e) { throw new AdempiereException("Exception serializing externalSystemRequest", e) .appendParametersToMessage() .setParameter("externalSystemRequest"...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\rabbitmq\custom\CustomMFToExternalSystemMessageSender.java
2
请完成以下Java代码
public java.lang.String getValue () { return (java.lang.String)get_Value(COLUMNNAME_Value); } /** Set Datum. @param ValueDate Datum */ @Override public void setValueDate (java.sql.Timestamp ValueDate) { set_Value (COLUMNNAME_ValueDate, ValueDate); } /** Get Datum. @return Datum */ @Override pub...
Numeric Value */ @Override public void setValueNumber (java.math.BigDecimal ValueNumber) { set_Value (COLUMNNAME_ValueNumber, ValueNumber); } /** Get Zahlwert. @return Numeric Value */ @Override public java.math.BigDecimal getValueNumber () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ValueN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_AttributeInstance.java
1
请在Spring Boot框架中完成以下Java代码
public BpmnInterface getInterface() { return bpmnInterface; } public void setInterface(BpmnInterface bpmnInterface) { this.bpmnInterface = bpmnInterface; } public MessageDefinition getInMessage() { return inMessage; } public void setInMessage(MessageDefinition inMessag...
return outMessage; } public void setOutMessage(MessageDefinition outMessage) { this.outMessage = outMessage; } public OperationImplementation getImplementation() { return implementation; } public void setImplementation(OperationImplementation implementation) { this.imp...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\webservice\Operation.java
2
请完成以下Java代码
public Criteria andCouponStatusNotIn(List<Integer> values) { addCriterion("coupon_status not in", values, "couponStatus"); return (Criteria) this; } public Criteria andCouponStatusBetween(Integer value1, Integer value2) { addCriterion("coupon_status between", value1,...
protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condit...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsIntegrationConsumeSettingExample.java
1
请完成以下Java代码
public class BatchingApp { static void simpleProcessing() throws Exception { final Path testPath = Paths.get("./testio.txt"); testPath.toFile().createNewFile(); ScheduledExecutorService executorService = Executors.newScheduledThreadPool(100); Set<Future> futures = new HashSet<>(); ...
SmartBatcher batcher = new SmartBatcher(10, strings -> { List<String> content = new ArrayList<>(strings); content.add("-----Batch Operation-----"); try { Files.write(testPath, content, StandardOpenOption.APPEND); } catch (IOException e) { e...
repos\tutorials-master\patterns-modules\design-patterns-behavioral-2\src\main\java\com\baeldung\smartbatching\BatchingApp.java
1
请完成以下Java代码
public String getTp() { return tp; } /** * Sets the value of the tp property. * * @param value * allowed object is * {@link String } * */ public void setTp(String value) { this.tp = value; } /** * Gets the value of the dt proper...
* */ public DateAndDateTimeChoice getDt() { return dt; } /** * Sets the value of the dt property. * * @param value * allowed object is * {@link DateAndDateTimeChoice } * */ public void setDt(DateAndDateTimeChoice value) { this.d...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\ProprietaryDate2.java
1
请在Spring Boot框架中完成以下Java代码
public IntegrationContextBuilder integrationContextBuilder( ExtensionsVariablesMappingProvider variablesMappingProvider, ExpressionManager expressionManager ) { return new IntegrationContextBuilder(variablesMappingProvider, expressionManager); } @Bean(name = DefaultActivityBehaviorF...
VariableParsingService variableParsingService ) { return new ExtensionsVariablesMappingProvider( processExtensionService, expressionResolver, variableParsingService ); } @Bean @ConditionalOnMissingBean public VariablesPropagator variablesPropagato...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-runtime-impl\src\main\java\org\activiti\runtime\api\conf\ConnectorsAutoConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public java.lang.String getImportErrorMsg() { return get_ValueAsString(COLUMNNAME_ImportErrorMsg); } @Override public void setJSONValue (final @Nullable java.lang.String JSONValue) { set_Value (COLUMNNAME_JSONValue, JSONValue); } @Override public java.lang.String getJSONValue() { return get_ValueAsSt...
@Override public void setS_FailedTimeBooking_ID (final int S_FailedTimeBooking_ID) { if (S_FailedTimeBooking_ID < 1) set_ValueNoCheck (COLUMNNAME_S_FailedTimeBooking_ID, null); else set_ValueNoCheck (COLUMNNAME_S_FailedTimeBooking_ID, S_FailedTimeBooking_ID); } @Override public int getS_FailedTimeBook...
repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java-gen\de\metas\serviceprovider\model\X_S_FailedTimeBooking.java
2
请完成以下Java代码
public static ExternalSystemRabbitMQConfigId ofRepoId(final int repoId) { return new ExternalSystemRabbitMQConfigId(repoId); } @Nullable public static ExternalSystemRabbitMQConfigId ofRepoIdOrNull(@Nullable final Integer repoId) { return repoId != null && repoId > 0 ? new ExternalSystemRabbitMQConfigId(repoId...
@JsonValue public int toJson() { return getRepoId(); } private ExternalSystemRabbitMQConfigId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "ExternalSystem_Config_RabbitMQ_HTTP_ID"); } @Override public ExternalSystemType getType() { return ExternalSystemType.RabbitMQ; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\rabbitmqhttp\ExternalSystemRabbitMQConfigId.java
1
请完成以下Java代码
public int getM_Replenish_ID() { return get_ValueAsInt(COLUMNNAME_M_Replenish_ID); } @Override public void setM_Warehouse_ID (int M_Warehouse_ID) { if (M_Warehouse_ID < 1) set_Value (COLUMNNAME_M_Warehouse_ID, null); else set_Value (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID)); } ...
return (java.lang.String)get_Value(COLUMNNAME_ProductValue); } /** * ReplenishType AD_Reference_ID=164 * Reference name: M_Replenish Type */ public static final int REPLENISHTYPE_AD_Reference_ID=164; /** Maximalbestand beibehalten = 2 */ public static final String REPLENISHTYPE_MaximalbestandBeibehalten = ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Replenish.java
1
请完成以下Java代码
public void addFacetCollector(final IFacetCollector<ModelType> facetCollector) { Check.assumeNotNull(facetCollector, "facetCollector not null"); facetCollectors.add(facetCollector); } /** @return true if this composite has at least one collector */ public boolean hasCollectors() { return !facetCollectors.is...
final AdempiereException ex = new AdempiereException("Failed to collect facets from collector" + "\n Collector: " + facetCollector + "\n Request: " + request , e); logger.warn("Skip collector because it failed", ex); } } return aggregatedResult.build(); } @Override public List<IFacetCat...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\facet\impl\CompositeFacetCollector.java
1
请完成以下Java代码
public class X_C_Phonecall_Schema extends org.compiere.model.PO implements I_C_Phonecall_Schema, org.compiere.model.I_Persistent { /** * */ private static final long serialVersionUID = -168721881L; /** Standard Constructor */ public X_C_Phonecall_Schema (Properties ctx, int C_Phonecall_Schema_ID, Strin...
public void setC_Phonecall_Schema_ID (int C_Phonecall_Schema_ID) { if (C_Phonecall_Schema_ID < 1) set_ValueNoCheck (COLUMNNAME_C_Phonecall_Schema_ID, null); else set_ValueNoCheck (COLUMNNAME_C_Phonecall_Schema_ID, Integer.valueOf(C_Phonecall_Schema_ID)); } /** Get Anrufliste. @return Anrufliste */ ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Phonecall_Schema.java
1
请完成以下Java代码
public BigDecimal getStmtAmt() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_StmtAmt); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setTrxAmt (final @Nullable BigDecimal TrxAmt) { set_Value (COLUMNNAME_TrxAmt, TrxAmt); } @Override public BigDecimal getTrxAmt() { fina...
{ set_Value (COLUMNNAME_TrxType, TrxType); } @Override public java.lang.String getTrxType() { return get_ValueAsString(COLUMNNAME_TrxType); } @Override public void setValutaDate (final @Nullable java.sql.Timestamp ValutaDate) { set_Value (COLUMNNAME_ValutaDate, ValutaDate); } @Override public java....
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java-gen\org\compiere\model\X_I_BankStatement.java
1
请完成以下Java代码
public CountryId getCountryId() { return CoalesceUtil.coalesceSuppliersNotNull( // first, try the contract's location from the tine the contract was created () -> { final I_C_Location billLocationValue = getC_Flatrate_Term().getBill_Location_Value(); return billLocationValue != null ? CountryId.ofR...
{ _flatrateTerm = Services.get(IFlatrateDAO.class).getById(materialTracking.getC_Flatrate_Term_ID()); // shouldn't be null because we prevent even material-tracking purchase orders without a flatrate term. Check.errorIf(_flatrateTerm == null, "M_Material_Tracking {} has no flatrate term", materialTracking); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\MaterialTrackingAsVendorInvoicingInfo.java
1
请完成以下Java代码
public void setQtyToOrder (java.math.BigDecimal QtyToOrder) { set_Value (COLUMNNAME_QtyToOrder, QtyToOrder); } /** Get Quantity to Order. @return Quantity to Order */ @Override public java.math.BigDecimal getQtyToOrder () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyToOrder); if (bd == null) ...
public void setQtyToOrder_TU (java.math.BigDecimal QtyToOrder_TU) { set_Value (COLUMNNAME_QtyToOrder_TU, QtyToOrder_TU); } /** Get Quantity to Order (TU). @return Quantity to Order (TU) */ @Override public java.math.BigDecimal getQtyToOrder_TU () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyToO...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java-gen\de\metas\procurement\base\model\X_PMM_PurchaseCandidate.java
1
请完成以下Java代码
public class UnknownHostExceptionHandling { public static int getResponseCode(String hostname) throws IOException { URL url = null; try { url = new URI(hostname.trim()).toURL(); } catch (URISyntaxException e) { throw new IOException(e); } HttpURLConne...
} return resCode; } public static int getResponseCodeUnhandled(String hostname) throws IOException { URL url = null; try { url = new URI(hostname.trim()).toURL(); } catch (URISyntaxException e) { throw new IOException(e); } HttpURLConn...
repos\tutorials-master\core-java-modules\core-java-exceptions\src\main\java\com\baeldung\exceptions\unknownhostexception\UnknownHostExceptionHandling.java
1
请完成以下Java代码
public static OrderAndLineId ofRepoIds(@NonNull final OrderId orderId, final int orderLineRepoId) { return new OrderAndLineId(orderId, OrderLineId.ofRepoId(orderLineRepoId)); } public static OrderAndLineId of(final OrderId orderId, final OrderLineId orderLineId) { return new OrderAndLineId(orderId, orderLineId...
private OrderAndLineId(@NonNull final OrderId orderId, @NonNull final OrderLineId orderLineId) { this.orderId = orderId; this.orderLineId = orderLineId; } public int getOrderRepoId() { return orderId.getRepoId(); } public int getOrderLineRepoId() { return orderLineId.getRepoId(); } public static boo...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\OrderAndLineId.java
1
请在Spring Boot框架中完成以下Java代码
public IdentityLinkDataManager getIdentityLinkDataManager() { return identityLinkDataManager; } public IdentityLinkServiceConfiguration setIdentityLinkDataManager(IdentityLinkDataManager identityLinkDataManager) { this.identityLinkDataManager = identityLinkDataManager; return this; ...
} @Override public ObjectMapper getObjectMapper() { return objectMapper; } @Override public IdentityLinkServiceConfiguration setObjectMapper(ObjectMapper objectMapper) { this.objectMapper = objectMapper; return this; } public IdentityLinkEventHandler getIdentit...
repos\flowable-engine-main\modules\flowable-identitylink-service\src\main\java\org\flowable\identitylink\service\IdentityLinkServiceConfiguration.java
2
请完成以下Java代码
public void setM_DemandLine_ID (int M_DemandLine_ID) { if (M_DemandLine_ID < 1) set_ValueNoCheck (COLUMNNAME_M_DemandLine_ID, null); else set_ValueNoCheck (COLUMNNAME_M_DemandLine_ID, Integer.valueOf(M_DemandLine_ID)); } /** Get Demand Line. @return Material Demand Line */ public int getM_DemandLi...
if (ii == null) return 0; return ii.intValue(); } public I_M_RequisitionLine getM_RequisitionLine() throws RuntimeException { return (I_M_RequisitionLine)MTable.get(getCtx(), I_M_RequisitionLine.Table_Name) .getPO(getM_RequisitionLine_ID(), get_TrxName()); } /** Set Requisition Line. @param M_Requ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_DemandDetail.java
1
请在Spring Boot框架中完成以下Java代码
void accept(TreeVisitor visitor) throws Exception { this.acceptMethod.invoke(getInstance(), Proxy.newProxyInstance(getInstance().getClass().getClassLoader(), new Class<?>[] { this.treeVisitorType }, new TreeVisitorInvocationHandler(visitor)), 0); } /** * {@link InvocationHandler} to call the {@link TreeVisit...
Iterable members = (Iterable) Tree.this.getClassTreeMembers.invoke(args[0]); for (Object member : members) { if (member != null) { Tree.this.acceptMethod.invoke(member, proxy, ((Integer) args[1]) + 1); } } } if (method.getName().equals("visitVariable")) { this.treeVisitor.visitVariable...
repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\fieldvalues\javac\Tree.java
2
请完成以下Java代码
public @Nullable ThreadPool getThreadPool() { return this.threadPool; } @Override public void setThreadPool(@Nullable ThreadPool threadPool) { this.threadPool = threadPool; } public boolean isUseForwardHeaders() { return this.useForwardHeaders; } @Override public void setUseForwardHeaders(boolean useFo...
connector.setHost(address.getHostString()); connector.setPort(address.getPort()); return connector; } protected void customizeSsl(Server server, InetSocketAddress address) { Ssl ssl = getSsl(); Assert.state(ssl != null, "'ssl' must not be null"); Assert.state(ssl.getServerNameBundles().isEmpty(), "Server n...
repos\spring-boot-4.0.1\module\spring-boot-jetty\src\main\java\org\springframework\boot\jetty\JettyWebServerFactory.java
1
请完成以下Java代码
public void validate(ValidatingMigrationInstruction instruction, ValidatingMigrationInstructions instructions, MigrationInstructionValidationReportImpl report) { ActivityImpl targetActivity = instruction.getTargetActivity(); if (isWaitStateGateway(targetActivity)) { validateIncomingSequenceFlows(i...
} } protected void validateSingleInstruction(ValidatingMigrationInstruction instruction, ValidatingMigrationInstructions instructions, MigrationInstructionValidationReportImpl report) { ActivityImpl targetActivity = instruction.getTargetActivity(); List<ValidatingMigrationInstruction> instructionsToT...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\validation\instruction\GatewayMappingValidator.java
1
请完成以下Java代码
private static Object invokeMethod(Method method, @Nullable Object instance, Object... args) { try { return method.invoke(instance, args); } catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException ex) { String message = "Error while invoking method " + method.getClass().getName(...
} return getSecurityName; } private static Method getNarrowMethod() { if (narrow == null) { narrow = getMethod(PORTABLE_REMOTE_OBJECT_CLASSNAME, "narrow", new String[] { Object.class.getName(), Class.class.getName() }); } return narrow; } // SEC-803 private static Class<?> getWSCredentialClass() ...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\preauth\websphere\DefaultWASUsernameAndGroupsExtractor.java
1
请完成以下Java代码
private String createSysConfigName(Object key) { return createSysConfigPrefix() + "." + key.toString(); } private String createSysConfigPrefix() { return SYSCONFIG_PREFIX + lookAndFeelId; } public void loadAllFromSysConfigTo(final UIDefaults uiDefaults) { if (!DB.isConnected()) { return; } fina...
final Map<String, String> map = sysConfigBL.getValuesForPrefix(prefix, removePrefix, clientAndOrgId); for (final Map.Entry<String, String> mapEntry : map.entrySet()) { final String key = mapEntry.getKey(); final String valueStr = mapEntry.getValue(); try { final Object value = serializer.fromStrin...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\plaf\SysConfigUIDefaultsRepository.java
1
请完成以下Java代码
public Class<Person> getObjectType() { return Person.class; } @Override public Object getObject() throws Exception { return new Person(); } public boolean isSingleton() { return true; } public String getFirstName() { return firstName; }
public void setFirstName(String firstName) { this.firstName = firstName; } public String getSecondName() { return secondName; } public void setSecondName(String secondName) { this.secondName = secondName; } @Override public String toString() { return "Perso...
repos\tutorials-master\spring-boot-modules\spring-boot-annotations\src\main\java\com\baeldung\multibeaninstantiation\solution3\Person.java
1
请完成以下Java代码
public Comment execute(CommandContext commandContext) { TaskEntity task = null; // Validate task if (taskId != null) { task = commandContext.getTaskEntityManager().findById(taskId); if (task == null) { throw new ActivitiObjectNotFoundException("Cannot fin...
String eventMessage = message.replaceAll("\\s+", " "); if (eventMessage.length() > 163) { eventMessage = eventMessage.substring(0, 160) + "..."; } comment.setMessage(eventMessage); comment.setFullMessage(message); commandContext.getCommentEntityManager().insert(comm...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\AddCommentCmd.java
1
请完成以下Java代码
public Foo findById(@PathVariable @Min(0) final long id) { return repo.findById(id).orElse(null); } @GetMapping("/foos") public List<Foo> findAll() { return repo.findAll(); } @GetMapping( value="/foos", params = { "page", "size" }) @Validated public L...
@PutMapping("/foos/{id}") @ResponseStatus(HttpStatus.OK) public Foo update(@PathVariable("id") final String id, @RequestBody final Foo foo) { return foo; } @PostMapping("/foos") @ResponseStatus(HttpStatus.CREATED) public void create( @RequestBody final Foo foo) { if (nul...
repos\tutorials-master\spring-web-modules\spring-5-mvc\src\main\java\com\baeldung\web\FooController.java
1
请完成以下Java代码
default ProducerFactory<K, V> getProducerFactory() { throw new UnsupportedOperationException("This implementation does not support this operation"); } /** * Receive a single record with the default poll timeout (5 seconds). * @param topic the topic. * @param partition the partition. * @param offset the off...
* @return the record or null. * @since 2.8 */ ConsumerRecords<K, V> receive(Collection<TopicPartitionOffset> requested, Duration pollTimeout); /** * A callback for executing arbitrary operations on the {@link Producer}. * @param <K> the key type. * @param <V> the value type. * @param <T> the return type....
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\core\KafkaOperations.java
1
请完成以下Java代码
public void process(@NonNull final I_EDI_Desadv desadv) { enqueueShipmentsForDesadv(queue, desadv); } }) .process(createIterator()); return MSG_OK; } private void enqueueShipmentsForDesadv( final @NonNull IWorkPackageQueue queue, final @NonNull I_EDI_Desadv desadv) { final List<I_...
} @NonNull private Iterator<I_EDI_Desadv> createIterator() { final IQueryBuilder<I_EDI_Desadv> queryBuilder = queryBL.createQueryBuilder(I_EDI_Desadv.class, getCtx(), get_TrxName()) .addOnlyActiveRecordsFilter() .filter(getProcessInfo().getQueryFilterOrElseFalse()); queryBuilder.orderBy() .addColum...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\process\EDI_Desadv_InOut_EnqueueForExport.java
1
请完成以下Java代码
public static MRegistrationAttribute[] getAll (Properties ctx) { // Store/Refresh Cache and add to List ArrayList<MRegistrationAttribute> list = new ArrayList<MRegistrationAttribute>(); String sql = "SELECT * FROM A_RegistrationAttribute " + "WHERE AD_Client_ID=? " + "ORDER BY SeqNo"; int AD_Client_ID = ...
* @param A_RegistrationAttribute_ID id * @return Registration Attribute */ public static MRegistrationAttribute get (Properties ctx, int A_RegistrationAttribute_ID, String trxName) { Integer key = new Integer(A_RegistrationAttribute_ID); MRegistrationAttribute retValue = (MRegistrationAttribute)s_cache.get(ke...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MRegistrationAttribute.java
1
请完成以下Java代码
public Builder clientRegistrationEndpoint(String clientRegistrationEndpoint) { return setting(ConfigurationSettingNames.AuthorizationServer.CLIENT_REGISTRATION_ENDPOINT, clientRegistrationEndpoint); } /** * Sets the OpenID Connect 1.0 Client Registration endpoint. * @param oidcClientRegistrationEndpo...
} /** * Builds the {@link AuthorizationServerSettings}. * @return the {@link AuthorizationServerSettings} */ @Override public AuthorizationServerSettings build() { AuthorizationServerSettings authorizationServerSettings = new AuthorizationServerSettings(getSettings()); if (authorizationServerSetti...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\settings\AuthorizationServerSettings.java
1
请完成以下Java代码
public static class OneToManyMappingConverter extends BaseActivityMigrationMappingConverter<ActivityMigrationMapping.OneToManyMapping> { @Override protected ObjectNode convertMappingInfoToJson(ActivityMigrationMapping.OneToManyMapping mapping, ObjectMapper objectMapper) { ObjectNode mapping...
}); ActivityMigrationMapping.OneToManyMapping oneToManyMapping = ActivityMigrationMapping.createMappingFor(fromActivityId, toActivityIds); convertAdditionalMappingInfoFromJson(oneToManyMapping, jsonNode); Map<String, Map<String, Object>> localVariables = getLocalVariablesFromJson(j...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\migration\ProcessInstanceMigrationDocumentConverter.java
1
请完成以下Java代码
private final I_M_HU createNewIncludedHU( @NonNull final I_M_HU_Item item, @NonNull final IAllocationRequest request) { final IHUItemStorage storage = getHUItemStorage(item, request); if (!storage.requestNewHU()) { return null; } final I_M_HU_PI includedHUDef; if (X_M_HU_Item.ITEMTYPE_HUAggregate...
} // we cannot create an instance which has no included handling unit definition Check.errorIf(includedHUDef == null, "Unable to get a M_HU_PI for the given request and item; request={}; item={}", request, item); return AllocationUtils.createHUBuilder(request) .setM_HU_Item_Parent(item) .create(included...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\strategy\FIFOAllocationStrategy.java
1
请完成以下Java代码
MqttClient getMqttClient(TbContext ctx, MqttClientConfig config) { return MqttClient.create(config, null, ctx.getExternalCallExecutor()); } protected void prepareMqttClientConfig(MqttClientConfig config) { ClientCredentials credentials = mqttNodeConfiguration.getCredentials(); if (crede...
hasChanges = true; ((ObjectNode) oldConfiguration).put(parseToPlainText, false); } case 1: String protocolVersion = "protocolVersion"; if (!oldConfiguration.has(protocolVersion)) { hasChanges = true; ...
repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\mqtt\TbMqttNode.java
1
请完成以下Java代码
public static Builder builder() { return new Builder(); } /** * Creates a builder to build {@link StartMessageDeploymentDefinitionImpl} and initialize it with the given object. * @param startMessageEventSubscriptionImpl to initialize the builder with * @return created builder */ ...
* @return builder */ public Builder withMessageSubscription(StartMessageSubscription messageEventSubscription) { this.messageSubscription = messageEventSubscription; return this; } /** * Builder method for processDefinition parameter. * @param ...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\StartMessageDeploymentDefinitionImpl.java
1
请完成以下Java代码
public int getDLM_Partition_Config_ID() { final Integer ii = (Integer)get_Value(COLUMNNAME_DLM_Partition_Config_ID); if (ii == null) { return 0; } return ii.intValue(); } /** * Set DLM Partitionierungskonfigzeile. * * @param DLM_Partition_Config_Line_ID DLM Partitionierungskonfigzeile */ @Ove...
} } /** * Get Referenzierende Tabelle. * * @return Referenzierende Tabelle */ @Override public int getDLM_Referencing_Table_ID() { final Integer ii = (Integer)get_Value(COLUMNNAME_DLM_Referencing_Table_ID); if (ii == null) { return 0; } return ii.intValue(); } /** * Set DLM aktiviert. ...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java-gen\de\metas\dlm\model\X_DLM_Partition_Config_Line.java
1
请完成以下Java代码
public class PrintingDataToPDFWriter implements IAutoCloseable { private final static Logger logger = LogManager.getLogger(PrintingDataToPDFWriter.class); private final PdfCopy pdfCopy; private final Document document; public PrintingDataToPDFWriter(@NonNull final OutputStream out) { document = new Document();...
{ // shall not happen at this point logger.debug("Page to ({}) is greater then number of pages. Considering number of pages: {}", new Object[] { pageTo, archivePageNums }); pageTo = archivePageNums; } if (pageFrom > pageTo) { // shall not happen at this point logger.warn("Page from ({}) is ...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\printingdata\PrintingDataToPDFWriter.java
1
请在Spring Boot框架中完成以下Java代码
public String getScopeId() { return scopeId; } @Override public void setScopeId(String scopeId) { this.scopeId = scopeId; } @Override public String getSubScopeId() { return subScopeId; } @Override public void setSubScopeId(String subScopeId) { this....
@Override public String getStatus() { return status; } @Override public void setStatus(String status) { this.status = status; } @Override public ByteArrayRef getResultDocRefId() { return resultDocRefId; } public void setResultDocRefId(ByteArrayRef resultDoc...
repos\flowable-engine-main\modules\flowable-batch-service\src\main\java\org\flowable\batch\service\impl\persistence\entity\BatchPartEntityImpl.java
2
请完成以下Java代码
default boolean inTransaction() { return false; } /** * Return the producer factory used by this template. * @return the factory. * @since 2.5 */ default ProducerFactory<K, V> getProducerFactory() { throw new UnsupportedOperationException("This implementation does not support this operation"); } /** ...
ConsumerRecords<K, V> receive(Collection<TopicPartitionOffset> requested, Duration pollTimeout); /** * A callback for executing arbitrary operations on the {@link Producer}. * @param <K> the key type. * @param <V> the value type. * @param <T> the return type. * @since 1.3 */ interface ProducerCallback<K,...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\core\KafkaOperations.java
1
请完成以下Java代码
private static class RemindersQueue { private final SortedSet<PurchaseCandidateReminder> reminders = new TreeSet<>(Comparator.comparing(PurchaseCandidateReminder::getNotificationTime)); public List<PurchaseCandidateReminder> toList() { return ImmutableList.copyOf(reminders); } public boolean add(@NonNul...
return builder() .task(task) .scheduledFuture(scheduledFuture) .notificationTime(date) .build(); } Runnable task; ScheduledFuture<?> scheduledFuture; ZonedDateTime notificationTime; public void cancel() { final boolean canceled = scheduledFuture.cancel(false); logger.trace("Cance...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\purchasecandidate\reminder\PurchaseCandidateReminderScheduler.java
1
请完成以下Java代码
public void init(final IModelValidationEngine engine) { // Register one document interceptor for each table name/handler. { final IInvoiceCandidateHandlerBL invoiceCandidateHandlerBL = Services.get(IInvoiceCandidateHandlerBL.class); final IInvoiceCandidateHandlerDAO invoiceCandidateHandlerDAO = Services.get(...
final ILHandlerModelInterceptor modelInterceptor = new ILHandlerModelInterceptor(handler); engine.addModelValidator(modelInterceptor); } } } @ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFORE_CHANGE } , ifColumnsChanged = { I_C_ILCandHandler.COLUMNNAME_Classname }) publi...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\modelvalidator\C_ILCandHandler.java
1
请完成以下Java代码
public V get(String key) { return trie.get(key); } /** * 是否含有键 * * @param key * @return */ public boolean contains(String key) { return get(key) != null; } /** * 词典大小 * * @return */ public int size() {
return trie.size(); } /** * 从一行词典条目创建值 * * @param params 第一个元素为键,请注意跳过 * @return */ protected abstract V createValue(String[] params); /** * 文本词典加载完毕的回调函数 * * @param map */ protected void onLoaded(TreeMap<String, V> map) { } }
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dictionary\common\CommonDictionary.java
1
请完成以下Java代码
public class Car { private String make; private String model; private int year; private int seats; private String plant1; private String plant1Loc; private String plant2; private String plant2Loc; public Car(String make, String model, int year, int seats) { this.make = make...
this.plant1 = plant1; } public int getSeats() { return seats; } public void setSeats(int seats) { this.seats = seats; } public String getMake() { return make; } public String getModel() { return model; } public int getYear() { return y...
repos\tutorials-master\mapstruct-2\src\main\java\com\baeldung\list\entity\Car.java
1
请完成以下Java代码
public GroupQuery orderByGroupId() { return orderBy(GroupQueryProperty.GROUP_ID); } public GroupQuery orderByGroupName() { return orderBy(GroupQueryProperty.NAME); } public GroupQuery orderByGroupType() { return orderBy(GroupQueryProperty.TYPE); } //getters ///////////////////////////////////...
return nameLike; } public String getType() { return type; } public String getUserId() { return userId; } public String getTenantId() { return tenantId; } public String[] getIds() { return ids; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\GroupQueryImpl.java
1
请完成以下Java代码
public void setShipperName (final @Nullable java.lang.String ShipperName) { set_Value (COLUMNNAME_ShipperName, ShipperName); } @Override public java.lang.String getShipperName() { return get_ValueAsString(COLUMNNAME_ShipperName); } @Override public void setShipperRouteCodeName (final @Nullable java.lang....
return get_ValueAsString(COLUMNNAME_Title); } @Override public void setURL (final @Nullable java.lang.String URL) { set_Value (COLUMNNAME_URL, URL); } @Override public java.lang.String getURL() { return get_ValueAsString(COLUMNNAME_URL); } @Override public void setURL3 (final @Nullable java.lang.Stri...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_BPartner.java
1
请完成以下Java代码
public class UnboundIdContainer implements EmbeddedLdapServerContainer, InitializingBean, DisposableBean, Lifecycle, ApplicationContextAware { private InMemoryDirectoryServer directoryServer; private final String defaultPartitionSuffix; private int port = 53389; private boolean isEphemeral; private Configur...
importLdif(directoryServer); directoryServer.startListening(); this.port = directoryServer.getListenPort(); this.directoryServer = directoryServer; this.running = true; } catch (LDAPException ex) { throw new RuntimeException("Server startup failed", ex); } } private void importLdif(InMemoryDirec...
repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\server\UnboundIdContainer.java
1
请完成以下Java代码
private ClassicHttpResponse executeInitializrMetadataRetrieval(String url) { HttpGet request = new HttpGet(url); request.setHeader(new BasicHeader(HttpHeaders.ACCEPT, ACCEPT_META_DATA)); return execute(request, URI.create(url), "retrieve metadata"); } private ClassicHttpResponse execute(HttpUriRequest request,...
// Ignore } } return null; } private JSONObject getContentAsJson(HttpEntity entity) throws IOException, JSONException { return new JSONObject(getContent(entity)); } private String getContent(HttpEntity entity) throws IOException { ContentType contentType = ContentType.create(entity.getContentType()); ...
repos\spring-boot-4.0.1\cli\spring-boot-cli\src\main\java\org\springframework\boot\cli\command\init\InitializrService.java
1
请完成以下Java代码
private static <T> T singleNonNullValue(@NonNull final String name, @Nullable final T value1, @Nullable final T value2) { if (value1 == null && value2 == null) { throw new IllegalArgumentException("No value for " + name + " found"); } if (value1 != null && value2 != null && !Objects.equals(value2, value1)) ...
if (Objects.equals(attributes2New, this.attributes2)) { return this; } return toBuilder() .attributes2(attributes2New) .attributes(attributes2New.toJsonHUAttributeCodeAndValues()) .build(); } public JsonHU withLayoutSections(@Nullable List<String> layoutSections) { final ImmutableList<String...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-manufacturing\src\main\java\de\metas\common\handlingunits\JsonHU.java
1
请完成以下Java代码
public BadUserRequestException exceptionSettingTransientVariablesAsyncNotSupported(String variableName) { return new BadUserRequestException(exceptionMessage( "044", "Setting transient variable '{}' asynchronously is currently not supported.", variableName)); } public void debugNotAllow...
"051", "You must specify at least one of or one of processInstanceIds, processInstanceQuery, or historicProcessInstanceQuery.")); } public ProcessEngineException exceptionSettingJobRetriesJobsNotSpecifiedCorrectly() { return new ProcessEngineException(exceptionMessage( "052", "You must ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\CommandLogger.java
1
请在Spring Boot框架中完成以下Java代码
public Object size() { return partsMap.size(); } public <T> Stream<T> map(@NonNull final Function<PackingItemPart, T> mapper) { return partsMap .values() .stream() .map(mapper); } public <T> Optional<T> mapReduce(@NonNull final Function<PackingItemPart, T> mapper) { final ImmutableSet<T> resu...
return toList().get(0).getQty().getUOM(); } @Override public Iterator<PackingItemPart> iterator() { return toList().iterator(); } public void clear() { partsMap.clear(); } public void addQtys(final PackingItemParts partsToAdd) { partsToAdd.toList() .forEach(this::addQty); } private void addQty...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\picking\service\PackingItemParts.java
2
请完成以下Java代码
public TargetDataLine getTargetDataLineForRecord() { TargetDataLine line; DataLine.Info info = new DataLine.Info(TargetDataLine.class, format); if (!AudioSystem.isLineSupported(info)) { return null; } try { line = (TargetDataLine) AudioSystem.getLine(info)...
return format; } public void setFormat(AudioFormat format) { this.format = format; } public Thread getThread() { return thread; } public double getDuration() { return duration; } }
repos\tutorials-master\core-java-modules\core-java-os-2\src\main\java\com\baeldung\example\soundapi\SoundRecorder.java
1
请在Spring Boot框架中完成以下Java代码
public void sortStepsByCreated(I_AD_Migration migration) { if (migration == null || migration.getAD_Migration_ID() <= 0) { return; } final List<I_AD_MigrationStep> steps = Services.get(IMigrationDAO.class).retrieveSteps(migration, true); Collections.sort(steps, new Comparator<I_AD_MigrationStep>() { ...
+ ", ID=" + migration.getAD_Migration_ID() + "]"; } @Override public void setSeqNo(final I_AD_Migration migration) { final int maxSeqNo = Services.get(IMigrationDAO.class).getMigrationLastSeqNo(migration); final int nextSeqNo = maxSeqNo + 10; migration.setSeqNo(nextSeqNo); } @Override public String g...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\service\impl\MigrationBL.java
2
请完成以下Java代码
public void setProcessDefinitionKey(String processDefinitionKey) { this.processDefinitionKey = processDefinitionKey; } @CamundaQueryParam("processInstanceId") public void setProcessInstanceId(String processInstanceId) { this.processInstanceId = processInstanceId; } @CamundaQueryParam("executionId") ...
this.externalTaskId = externalTaskId; } @CamundaQueryParam("operationType") public void setOperationType(String operationType) { this.operationType = operationType; } @CamundaQueryParam("entityType") public void setEntityType(String entityType) { this.entityType = entityType; } @CamundaQueryP...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\UserOperationLogQueryDto.java
1
请在Spring Boot框架中完成以下Java代码
public void init(H http) { super.init(http); initDefaultLoginFilter(http); ExceptionHandlingConfigurer<H> exceptions = http.getConfigurer(ExceptionHandlingConfigurer.class); if (exceptions != null) { AuthenticationEntryPoint entryPoint = getAuthenticationEntryPoint(); RequestMatcher requestMatcher = getAu...
* @param http the {@link HttpSecurityBuilder} to use */ private void initDefaultLoginFilter(H http) { DefaultLoginPageGeneratingFilter loginPageGeneratingFilter = http .getSharedObject(DefaultLoginPageGeneratingFilter.class); if (loginPageGeneratingFilter != null && !isCustomLoginPage()) { loginPageGenerat...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\FormLoginConfigurer.java
2
请完成以下Java代码
public final IHUAttributesDAO getHUAttributesDAO() { Check.assumeNotNull(huAttributesDAO, "huAttributesDAO not null"); return huAttributesDAO; } @Override public void setHUAttributesDAO(final IHUAttributesDAO huAttributesDAO) { this.huAttributesDAO = huAttributesDAO; for (final IAttributeStorageFactory f...
public void setHUStorageFactory(final IHUStorageFactory huStorageFactory) { this.huStorageFactory = huStorageFactory; for (final IAttributeStorageFactory factory : factories) { factory.setHUStorageFactory(huStorageFactory); } } @Override public void flush() { for (final IAttributeStorageFactory fact...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\CompositeAttributeStorageFactory.java
1
请完成以下Java代码
private static POSCashJournalLine fromRecord(final I_C_POS_JournalLine record, final CurrencyId currencyId) { return POSCashJournalLine.builder() .type(POSCashJournalLineType.ofCode(record.getType())) .amount(Money.of(record.getAmount(), currencyId)) .cashierId(UserId.ofRepoId(record.getCashier_ID())) ...
final ImmutableList<POSCashJournalLine> lines = journal.getLines(); for (int i = 0; i < lines.size(); i++) { final POSCashJournalLine line = lines.get(i); I_C_POS_JournalLine lineRecord = i < lineRecords.size() ? lineRecords.get(i) : null; if (lineRecord == null) { lineRecord = InterfaceWrapperHelpe...
repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java\de\metas\pos\POSCashJournalRepository.java
1
请完成以下Java代码
private static void addContainers(Workspace workspace) { Model model = workspace.getModel(); SoftwareSystem paymentTerminal = model.getSoftwareSystemWithName(PAYMENT_TERMINAL); Container f5 = paymentTerminal.addContainer("Payment Load Balancer", "Payment Load Balancer", "F5"); Container...
SoftwareSystem fraudDetector = model.addSoftwareSystem(FRAUD_DETECTOR, "Fraud Detector"); paymentTerminal.uses(fraudDetector, "Obtains fraud score"); ViewSet viewSet = workspace.getViews(); SystemContextView contextView = viewSet.createSystemContextView(workspace.getModel().getSoftwareSystemWi...
repos\tutorials-master\spring-structurizr\src\main\java\com\baeldung\structurizr\StructurizrSimple.java
1
请完成以下Java代码
public class M_ShipmentSchedule_CloseShipmentSchedules extends JavaProcess { @Override protected String doIt() throws Exception { final IShipmentSchedulePA shipmentSchedulePA = Services.get(IShipmentSchedulePA.class); final IShipmentScheduleBL shipmentScheduleBL = Services.get(IShipmentScheduleBL.class); fina...
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 boolean canTransform(String feelExpression) { return splitExpression(feelExpression).size() > 1; } public String transform(FeelToJuelTransform transform, String feelExpression, String inputName) { List<String> juelExpressions = transformExpressions(transform, feelExpression, inputName); return j...
else { throw LOG.invalidListExpression(feelExpression); } } return juelExpressions; } protected String joinExpressions(List<String> juelExpressions) { StringBuilder builder = new StringBuilder(); builder.append("(").append(juelExpressions.get(0)).append(")"); for (int i = 1; i < j...
repos\camunda-bpm-platform-master\engine-dmn\feel-juel\src\main\java\org\camunda\bpm\dmn\feel\impl\juel\transform\ListTransformer.java
1
请完成以下Java代码
public void setM_ReceiptSchedule(final de.metas.inoutcandidate.model.I_M_ReceiptSchedule M_ReceiptSchedule) { set_ValueFromPO(COLUMNNAME_M_ReceiptSchedule_ID, de.metas.inoutcandidate.model.I_M_ReceiptSchedule.class, M_ReceiptSchedule); } @Override public void setM_ReceiptSchedule_ID (final int M_ReceiptSchedule_...
{ return get_ValueAsInt(COLUMNNAME_M_ReceiptSchedule_ID); } @Override public void setTransactionIdAPI (final @Nullable java.lang.String TransactionIdAPI) { set_Value (COLUMNNAME_TransactionIdAPI, TransactionIdAPI); } @Override public java.lang.String getTransactionIdAPI() { return get_ValueAsString(COL...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inoutcandidate\model\X_M_ReceiptSchedule_ExportAudit.java
1
请完成以下Java代码
public I_C_AcctSchema_GL retrieveAcctSchemaGLRecordOrNull(@NonNull final AcctSchemaId acctSchemaId) { return queryBL.createQueryBuilderOutOfTrx(I_C_AcctSchema_GL.class) .addEqualsFilter(I_C_AcctSchema_GL.COLUMN_C_AcctSchema_ID, acctSchemaId) .create() .firstOnly(I_C_AcctSchema_GL.class); } @Override ...
{ result.add(getById(primaryAcctSchemaId)); } for (final AcctSchema acctSchema : acctSchemas.values()) { if (acctSchema.getId().equals(primaryAcctSchemaId)) { continue; } if (clientId.equals(acctSchema.getClientId())) { result.add(acctSchema); } } return result.bu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\acct\api\impl\AcctSchemaDAO.java
1
请完成以下Java代码
public void enableTLSv12UsingSSLParameters() throws UnknownHostException, IOException { SSLSocketFactory socketFactory = (SSLSocketFactory) SSLSocketFactory.getDefault(); SSLSocket sslSocket = (SSLSocket) socketFactory.createSocket(url.trim(), port); SSLParameters params = new SSLParameters(); ...
connection.setSSLSocketFactory(sslContext.getSocketFactory()); try (BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream()))) { String input; while ((input = br.readLine()) != null) { logger.info(input); } } lo...
repos\tutorials-master\core-java-modules\core-java-security-5\src\main\java\com\baeldung\ssl\EnableTLSv12.java
1
请在Spring Boot框架中完成以下Java代码
public class ShipmentData { ProductId productId; @JsonIgnore boolean empty; Quantity qtyInStockUom; Quantity qtyNominal; Quantity qtyCatch; List<DeliveredQtyItem> deliveredQtyItems; @Builder @JsonCreator private ShipmentData( @JsonProperty("productId") @NonNull ProductId productId, @JsonProperty("...
public StockQtyAndUOMQty computeInvoicableQtyDelivered(@NonNull final InvoicableQtyBasedOn invoicableQtyBasedOn) { if(empty) { return StockQtyAndUOMQtys.createZero(productId, getQtyNominal().getUomId()); } Quantity deliveredInUom; switch (invoicableQtyBasedOn) { case CatchWeight: deliveredInUom =...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\internalbusinesslogic\ShipmentData.java
2
请在Spring Boot框架中完成以下Java代码
public VirtualThreadTaskExecutor taskExecutor() { return new VirtualThreadTaskExecutor("virtual-thread-executor"); } @Bean public FlatFileItemReader<Coffee> reader() { return new FlatFileItemReaderBuilder<Coffee>().name("coffeeItemReader") .resource(new ClassPathResource(fileInp...
public Job importUserJob(JobRepository jobRepository, JobCompletionNotificationListener listener, Step step1) { return new JobBuilder("importUserJob", jobRepository) .incrementer(new RunIdIncrementer()) .listener(listener) .flow(step1) .end() .build();...
repos\tutorials-master\spring-batch\src\main\java\com\baeldung\bootbatch\BatchConfiguration.java
2
请完成以下Java代码
public class PrintDeviceQRCodes extends JavaProcess { private final DeviceAccessorsHubFactory deviceAccessorsHubFactory = SpringContextHolder.instance.getBean(DeviceAccessorsHubFactory.class); private final GlobalQRCodeService globalQRCodeService = SpringContextHolder.instance.getBean(GlobalQRCodeService.class); pu...
{ final DeviceAccessor deviceAccessor = deviceAccessorsHubFactory.getDefaultDeviceAccessorsHub() .getDeviceAccessorById(onlyDeviceId) .orElseThrow(() -> new AdempiereException("No device found for id: " + onlyDeviceId)); return Stream.of(deviceAccessor); } else { return deviceAccessorsHubFactor...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\devices\webui\process\PrintDeviceQRCodes.java
1
请完成以下Java代码
public class DocumentDeliveryLocationAdapter implements IDocumentDeliveryLocationAdapter, RecordBasedLocationAdapter<DocumentDeliveryLocationAdapter> { private final I_M_InOut delegate; DocumentDeliveryLocationAdapter(@NonNull final I_M_InOut delegate) { this.delegate = delegate; } @Override public int getD...
@Override public boolean isDropShip() { return delegate.isDropShip(); } @Override public String getDeliveryToAddress() { return delegate.getDeliveryToAddress(); } @Override public void setDeliveryToAddress(final String address) { delegate.setDeliveryToAddress(address); } @Override public void setR...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\inout\location\adapter\DocumentDeliveryLocationAdapter.java
1
请完成以下Java代码
public void setIsShipTo (final boolean IsShipTo) { set_Value (COLUMNNAME_IsShipTo, IsShipTo); } @Override public boolean isShipTo() { return get_ValueAsBoolean(COLUMNNAME_IsShipTo); } @Override public void setIsShipToDefault (final boolean IsShipToDefault) { set_Value (COLUMNNAME_IsShipToDefault, IsSh...
@Override public java.lang.String getPhone2() { return get_ValueAsString(COLUMNNAME_Phone2); } @Override public void setSetup_Place_No (final @Nullable java.lang.String Setup_Place_No) { set_Value (COLUMNNAME_Setup_Place_No, Setup_Place_No); } @Override public java.lang.String getSetup_Place_No() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_Location_QuickInput.java
1