instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public class TbGetTenantDetailsNode extends TbAbstractGetEntityDetailsNode<TbGetTenantDetailsNodeConfiguration, TenantId> { private static final String TENANT_PREFIX = "tenant_"; @Override protected TbGetTenantDetailsNodeConfiguration loadNodeConfiguration(TbNodeConfiguration configuration) throws TbNodeE...
protected ListenableFuture<Tenant> getContactBasedFuture(TbContext ctx, TbMsg msg) { return ctx.getTenantService().findTenantByIdAsync(ctx.getTenantId(), ctx.getTenantId()); } @Override public TbPair<Boolean, JsonNode> upgrade(int fromVersion, JsonNode oldConfiguration) throws TbNodeException { ...
repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\metadata\TbGetTenantDetailsNode.java
1
请在Spring Boot框架中完成以下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 String getAssignee() { return assignee; } public void...
this.taskId = taskId; } public String getProcessDefinitionId() { return processDefinitionId; } public void setProcessDefinitionId(String processDefinitionId) { this.processDefinitionId = processDefinitionId; } public boolean isJoinParallelActivitiesOnComplete() { return j...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\process\InjectActivityRequest.java
2
请完成以下Java代码
public static class Palette { private String shade50 = "#EEFCFA"; private String shade100 = "#D9F7F4"; private String shade200 = "#B7F0EA"; private String shade300 = "#91E8E0"; private String shade400 = "#6BE0D5"; private String shade500 = "#47D9CB"; private String shade600 = "#27BEAF"; private ...
} public void set300(String shade300) { this.shade300 = shade300; } public void set400(String shade400) { this.shade400 = shade400; } public void set500(String shade500) { this.shade500 = shade500; } public void set600(String shade600) { this.shade600 = shade600; } public void set700(...
repos\spring-boot-admin-master\spring-boot-admin-server-ui\src\main\java\de\codecentric\boot\admin\server\ui\config\AdminServerUiProperties.java
1
请完成以下Java代码
public String getEanParty() { return eanParty; } /** * Sets the value of the eanParty property. * * @param value * allowed object is * {@link String } * */ public void setEanParty(String value) { this.eanParty = value; } /** * G...
* possible object is * {@link String } * */ public String getRegNumber() { return regNumber; } /** * Sets the value of the regNumber property. * * @param value * allowed object is * {@link String } * */ public void set...
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\EmployerAddressType.java
1
请完成以下Java代码
public boolean isNeedsProcessDefinitionOuterJoin() { if (isNeedsPaging()) { if (AbstractEngineConfiguration.DATABASE_TYPE_ORACLE.equals(databaseType) || AbstractEngineConfiguration.DATABASE_TYPE_DB2.equals(databaseType) || AbstractEngineConfiguration.DATABASE_...
} public List<List<String>> getSafeInvolvedGroups() { return safeInvolvedGroups; } public void setSafeInvolvedGroups(List<List<String>> safeInvolvedGroups) { this.safeInvolvedGroups = safeInvolvedGroups; } public String getRootScopeId() { return rootScopeId; } pub...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\HistoricProcessInstanceQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class PhonecallSchema { @NonNull PhonecallSchemaId id; @NonNull String name; @Getter(AccessLevel.PRIVATE) ImmutableList<PhonecallSchemaVersion> versions; @Builder private PhonecallSchema( @NonNull final PhonecallSchemaId id, @NonNull final String name, @NonNull final List<PhonecallSchemaVersio...
ImmutableList<PhonecallSchemaVersion> phonecallVersionsForDateRange = versions.stream() .filter(version -> version.getValidFrom().compareTo(endDate) <= 0) .collect(ImmutableList.toImmutableList()); if (phonecallVersionsForDateRange.isEmpty()) { throw new AdempiereException("No version found before " + e...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\phonecall\PhonecallSchema.java
2
请在Spring Boot框架中完成以下Java代码
public class MyServiceImpl implements MyService { private static final Logger logger = LoggerFactory.getLogger(MyServiceImpl.class); @Override public void retryService() { // This is correct for logging the retry count (0 on first attempt, 1 on first retry, etc.) logger.info("Retry Number:...
throw new SQLException(); } } @Override public void recover(SQLException e, String sql) { logger.info("In recover method"); } @Override public void templateRetryService() { logger.info("throw RuntimeException in method templateRetryService()"); throw new Runtime...
repos\tutorials-master\spring-scheduling\src\main\java\com\baeldung\springretry\MyServiceImpl.java
2
请在Spring Boot框架中完成以下Java代码
public OrgMappingId getCreateOrgMappingId(@NonNull final BPartnerBankAccount existingBankAccountInInitialPartner) { final OrgMappingId orgMappingId = existingBankAccountInInitialPartner.getOrgMappingId(); if (orgMappingId != null) { return orgMappingId; } final I_AD_Org_Mapping orgMapping = newInstance(I...
save(orgMapping); return OrgMappingId.ofRepoId(orgMapping.getAD_Org_Mapping_ID()); } public OrgMappingId getCreateOrgMappingId(@NonNull final BPartnerId bpartnerId) { final I_C_BPartner bPartnerRecord = bPartnerDAO.getById(bpartnerId); OrgMappingId orgMappingId = OrgMappingId.ofRepoIdOrNull(bPartnerRecord.g...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\bpartner\repository\OrgMappingRepository.java
2
请完成以下Java代码
public InventoryLineHU withZeroQtyCount() { return withQtyCount(getQtyCount().toZero()); } public InventoryLineHU withQtyCount(@NonNull final Quantity newQtyCount) { assertPhysicalInventory(); return toBuilder().qtyCount(newQtyCount).build(); } public static ImmutableSet<HuId> extractHuIds(@NonNull final ...
} // // // // ------------------------------------------------------------------------- // // // @SuppressWarnings("unused") public static class InventoryLineHUBuilder { InventoryLineHUBuilder updatingFrom(@NonNull final InventoryLineCountRequest request) { return huId(request.getHuId()) .huQRCo...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\InventoryLineHU.java
1
请完成以下Java代码
public class OrderKafkaResponse { private Long id; private String email; private String additionsPhone; private String address; private String name; private String comment; private UserResponse user; private OrderStatus orderStatus; private List<GoodOrderDetailsResponse> goo...
this.name = orders.getName(); this.comment = orders.getComment(); this.user = new UserResponse(orders.getUser()); this.orderStatus = orders.getStatus(); this.deliveryPrice = orders.getDeliveryPrice(); if(orders.getOrderDetailsList() != null) { List<GoodOrderDe...
repos\SpringBoot-Projects-FullStack-master\Part-9.SpringBoot-React-Projects\Project-2.SpringBoot-React-ShoppingMall\fullstack\backend\src\main\java\com\urunov\payload\order\OrderKafkaResponse.java
1
请完成以下Java代码
public Object run() { RequestContext context = RequestContext.getCurrentContext(); Throwable throwable = context.getThrowable(); if (throwable instanceof ZuulException) { final ZuulException zuulException = (ZuulException) throwable; log.error("Zuul exception: " + zuulEx...
} return null; } @Override public boolean shouldFilter() { return true; } @Override public int filterOrder() { return -1; } @Override public String filterType() { return "error"; } }
repos\tutorials-master\spring-cloud-modules\spring-cloud-zuul\spring-zuul-ui\src\main\java\com\baeldung\spring\cloud\zuul\filter\CustomZuulErrorFilter.java
1
请完成以下Java代码
public class NumberAndSumOfTransactions1 { @XmlElement(name = "NbOfNtries") protected String nbOfNtries; @XmlElement(name = "Sum") protected BigDecimal sum; /** * Gets the value of the nbOfNtries property. * * @return * possible object is * {@link String } * ...
* */ public BigDecimal getSum() { return sum; } /** * Sets the value of the sum property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setSum(BigDecimal value) { this.sum = value; } }
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\NumberAndSumOfTransactions1.java
1
请在Spring Boot框架中完成以下Java代码
DynamicClientRegistrationRepository.RegistrationRestTemplate registrationRestTemplate(RestTemplateBuilder restTemplateBuilder) { return restTemplateBuilder.build(DynamicClientRegistrationRepository.RegistrationRestTemplate.class); } // As of Spring Boot 3.2, we could use a record instead of a class. ...
return resolver; } @Bean SecurityFilterChain oauth2SecurityFilterChain(HttpSecurity http, OAuth2AuthorizationRequestResolver resolver) throws Exception { http.authorizeHttpRequests((requests) -> { requests.anyRequest().authenticated(); }); http.oauth2Login(a -> a.authori...
repos\tutorials-master\spring-security-modules\spring-security-dynamic-registration\oauth2-dynamic-client\src\main\java\com\baeldung\spring\security\dynreg\client\config\OAuth2DynamicClientConfiguration.java
2
请完成以下Java代码
public void createTopicWithOptions(String topicName) throws Exception { Properties props = new Properties(); props.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092"); try (Admin admin = Admin.create(props)) { int partitions = 1; short replicationFactor = 1...
int partitions = 1; short replicationFactor = 1; // Create a compacted topic with 'lz4' compression codec Map<String, String> newTopicConfig = new HashMap<>(); newTopicConfig.put(TopicConfig.CLEANUP_POLICY_CONFIG, TopicConfig.CLEANUP_POLICY_COMPACT); newTopic...
repos\tutorials-master\apache-kafka-2\src\main\java\com\baeldung\kafka\admin\KafkaTopicApplication.java
1
请在Spring Boot框架中完成以下Java代码
public String getDeploymentId() { return deploymentId; } public void setDeploymentId(String deploymentId) { this.deploymentId = deploymentId; } @ApiModelProperty(example = "3") public String getProcessDefinitionId() { return processDefinitionId; } public void setPr...
public void setTaskUrl(String taskUrl) { this.taskUrl = taskUrl; } public List<RestFormProperty> getFormProperties() { return formProperties; } public void setFormProperties(List<RestFormProperty> formProperties) { this.formProperties = formProperties; } public void ad...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\form\FormDataResponse.java
2
请在Spring Boot框架中完成以下Java代码
public int getOrder() { return 0; } @Override public void customize(ConfigurableServletWebServerFactory factory) { PropertyMapper map = PropertyMapper.get(); map.from(this.serverProperties::getPort).to(factory::setPort); map.from(this.serverProperties::getAddress).to(factory::setAddress); map.from(this.se...
map.from(this.serverProperties::getCompression).to(factory::setCompression); map.from(this.serverProperties::getHttp2).to(factory::setHttp2); map.from(this.serverProperties::getServerHeader).to(factory::setServerHeader); map.from(this.serverProperties.getServlet()::getContextParameters).to(factory::setInitParamet...
repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\autoconfigure\servlet\ServletWebServerFactoryCustomizer.java
2
请在Spring Boot框架中完成以下Java代码
public void generateSitemap() { log.info("start generate sitemap"); String tempPath = "D://tmp/"; File file = new File(tempPath); if (!file.exists()) { file.mkdirs(); } String domain = "http://www.liuhaihua.cn"; try { WebSitemapGenerator g1...
List<File> tagFiles = g2.write(); tagFiles.forEach(e -> fileNames.add(e.getName())); List<File> typeFiles = g3.write(); typeFiles.forEach(e -> fileNames.add(e.getName())); // 构造 sitemap_index 生成器 W3CDateFormat dateFormat = new W3CDateFormat(W3CDateFormat.Patt...
repos\springboot-demo-master\sitemap\src\main\java\com\et\sitemap\job\SiteMapJob.java
2
请完成以下Java代码
protected void configureQuery(HistoricBatchQueryImpl query) { getAuthorizationManager().configureHistoricBatchQuery(query); getTenantManager().configureQuery(query); } @SuppressWarnings("unchecked") public List<CleanableHistoricBatchReportResult> findCleanableHistoricBatchesReportByCriteria(CleanableHist...
public void addRemovalTimeById(String id, Date removalTime) { CommandContext commandContext = Context.getCommandContext(); commandContext.getHistoricIncidentManager() .addRemovalTimeToHistoricIncidentsByBatchId(id, removalTime); commandContext.getHistoricJobLogManager() .addRemovalTimeToJobLog...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\HistoricBatchManager.java
1
请完成以下Java代码
public List<String> getProcessInstanceIds() { return processInstanceIds; } public void setProcessInstanceIds(List<String> processInstanceIds) { this.processInstanceIds = processInstanceIds; } public ExternalTaskQueryDto getExternalTaskQuery() { return externalTaskQuery; } public void setExter...
public HistoricProcessInstanceQueryDto getHistoricProcessInstanceQuery() { return historicProcessInstanceQuery; } public void setHistoricProcessInstanceQuery(HistoricProcessInstanceQueryDto historicProcessInstanceQueryDto) { this.historicProcessInstanceQuery = historicProcessInstanceQueryDto; } public...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\externaltask\SetRetriesForExternalTasksDto.java
1
请完成以下Java代码
public CallableElement getCallableElement() { return callableElement; } public void setCallableElement(CallableElement callableElement) { this.callableElement = callableElement; } protected String getBusinessKey(ActivityExecution execution) { return getCallableElement().getBusinessKey(execution); ...
protected CallableElementBinding getBinding() { return getCallableElement().getBinding(); } protected boolean isLatestBinding() { return getCallableElement().isLatestBinding(); } protected boolean isDeploymentBinding() { return getCallableElement().isDeploymentBinding(); } protected boolean i...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\behavior\CallableElementActivityBehavior.java
1
请完成以下Java代码
public class TenantProfileCacheKey implements Serializable { @Serial private static final long serialVersionUID = 8220455917177676472L; private final TenantProfileId tenantProfileId; private final boolean defaultProfile; private TenantProfileCacheKey(TenantProfileId tenantProfileId, boolean defau...
public static TenantProfileCacheKey defaultProfile() { return new TenantProfileCacheKey(null, true); } @Override public String toString() { if (defaultProfile) { return "default"; } else { return tenantProfileId.toString(); } } }
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\tenant\TenantProfileCacheKey.java
1
请完成以下Java代码
protected static abstract class SelectableRowProcessor { public abstract void process(SelectableRowAdapter row); public boolean isContinue() { return true; } } protected static final class SelectableRowAdapter { private final AnnotatedTableModel<?> tableModel; private final int rowModelIndex; pri...
super(); this.tableModel = tableModel; this.rowModelIndex = rowModelIndex; this.selectedColumnIndex = selectedColumnIndex; } public void setSelected(final boolean selected) { tableModel.setValueAt(selected, rowModelIndex, selectedColumnIndex); } public boolean isSelected() { final Object va...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\swing\table\AbstractManageSelectableRowsAction.java
1
请在Spring Boot框架中完成以下Java代码
public boolean supportsLimit() { return true; } protected String getLimitString(String query, boolean hasOffset) { return new StringBuffer(query.length() + 20). append(query). append(hasOffset ? " limit ? offset ?" : " limit ?"). toString(); ...
public String getDropForeignKeyString() { throw new UnsupportedOperationException("No drop foreign key syntax supported by SQLiteDialect"); } public String getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referenced...
repos\SpringBoot-vue-master\src\main\java\com\boylegu\springboot_vue\config\SQLiteDialect.java
2
请完成以下Java代码
public static void dumpHistogram(final Map<String, Set<ITableRecordReference>> result) { final Set<ITableRecordReference> allRecords = result.values() .stream() .flatMap(records -> records.stream()) .collect(Collectors.toSet()); System.out.println("overall size=" + allRecords.size()); final PlainCo...
.setOption(IQuery.OPTION_GuaranteedIteratorRequired, true) .setOption(IQuery.OPTION_IteratorBufferSize, 5000) .iterate(I_DLM_Partition_Workqueue.class); return new Iterator<WorkQueue>() { @Override public boolean hasNext() { return iterator.hasNext(); } @Override public WorkQueue nex...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\partitioner\impl\PartitionerTools.java
1
请在Spring Boot框架中完成以下Java代码
public class CityHandler { private final CityRepository cityRepository; @Autowired public CityHandler(CityRepository cityRepository) { this.cityRepository = cityRepository; } public Mono<City> save(City city) { return cityRepository.save(city); } public Mono<City> findCit...
public Flux<City> findAllCity() { return cityRepository.findAll(); } public Mono<City> modifyCity(City city) { return cityRepository.save(city); } public Mono<Long> deleteCity(Long id) { return cityRepository.deleteById(id).flatMap(mono -> Mono.create(cityMonoSink -> cityMono...
repos\springboot-learning-example-master\springboot-webflux-3-mongodb\src\main\java\org\spring\springboot\handler\CityHandler.java
2
请完成以下Java代码
public void setFeature_index_(FeatureIndex feature_index_) { this.feature_index_ = feature_index_; } public List<List<String>> getX_() { return x_; } public void setX_(List<List<String>> x_) { this.x_ = x_; } public List<List<Node>> getNode_() { ...
TaggerImpl tagger = new TaggerImpl(Mode.TEST); InputStream stream = null; try { stream = IOUtil.newInputStream(args[0]); } catch (IOException e) { System.err.printf("model not exits for %s", args[0]); return; } if (strea...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\crf\crfpp\TaggerImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class LombokDefaultBook implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String title; private String isbn; public Long getId() { return id; } public void se...
return title; } public void setTitle(String title) { this.title = title; } public String getIsbn() { return isbn; } public void setIsbn(String isbn) { this.isbn = isbn; } }
repos\Hibernate-SpringBoot-master\HibernateSpringBootLombokEqualsAndHashCode\src\main\java\com\app\LombokDefaultBook.java
2
请完成以下Java代码
public class SysUserOnlineVO { /** * 会话id */ private String id; /** * 会话编号 */ private String token; /** * 用户名 */ private String username; /** * 用户名 */ private String realname; /** * 头像
*/ private String avatar; /** * 生日 */ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") private Date birthday; /** * 性别(1:男 2:女) */ @Dict(dicCode = "sex") private Integer sex; /** * 手机号 */ private Stri...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\vo\SysUserOnlineVO.java
1
请完成以下Java代码
public Integer getIntegration() { return integration; } public void setIntegration(Integer integration) { this.integration = integration; } public Integer getGrowth() { return growth; } public void setGrowth(Integer growth) { this.growth = growth; } pu...
sb.append(", id=").append(id); sb.append(", memberLevelId=").append(memberLevelId); sb.append(", username=").append(username); sb.append(", password=").append(password); sb.append(", nickname=").append(nickname); sb.append(", phone=").append(phone); sb.append(", status=")...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsMember.java
1
请完成以下Java代码
public XMLGregorianCalendar getYr() { return yr; } /** * Sets the value of the yr property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setYr(XMLGregorianCalendar value) { this.yr = value; } ...
* allowed object is * {@link TaxRecordPeriod1Code } * */ public void setTp(TaxRecordPeriod1Code value) { this.tp = value; } /** * Gets the value of the frToDt property. * * @return * possible object is * {@link DatePeriodDetails } *...
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\TaxPeriod1.java
1
请完成以下Java代码
public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKey...
} /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\center.java
1
请完成以下Java代码
public String getHeroName() { return heroName; } public void setHeroName(String heroName) { this.heroName = heroName; } public String getUniquePower() { return uniquePower; } public void setUniquePower(String uniquePower) { this.uniquePower = uniquePower; }
public int getHealth() { return health; } public void setHealth(int health) { this.health = health; } public int getDefense() { return defense; } public void setDefense(int defense) { this.defense = defense; } }
repos\tutorials-master\core-java-modules\core-java-documentation\src\main\java\com\baeldung\javadoc\SuperHero.java
1
请完成以下Java代码
public class DiagramInterchangeInfoValidator extends ValidatorImpl { @Override public void validate(BpmnModel bpmnModel, List<ValidationError> errors) { if (!bpmnModel.getLocationMap().isEmpty()) { // Location map for (String bpmnReference : bpmnModel.getLocationMap().keySet())...
// flowlocation map for (String bpmnReference : bpmnModel.getFlowLocationMap().keySet()) { if (bpmnModel.getFlowElement(bpmnReference) == null) { // ACT-1625: don't warn when artifacts are referenced from // DI if (bpmnModel.getArti...
repos\flowable-engine-main\modules\flowable-process-validation\src\main\java\org\flowable\validation\validator\impl\DiagramInterchangeInfoValidator.java
1
请完成以下Java代码
public ReplicationTrxLinesProcessorResult getResult() { return result; } @Override public boolean isSameChunk(final I_EXP_ReplicationTrxLine item) { return false; } @Override public void newChunk(final I_EXP_ReplicationTrxLine item) { currentTrxLines = new ArrayList<I_EXP_ReplicationTrxLine>(); } @O...
public void completeChunk() { for (final I_EXP_ReplicationTrxLine line : currentTrxLines) { line.setReplicationTrxStatus(X_EXP_ReplicationTrxLine.REPLICATIONTRXSTATUS_Vollstaendig); InterfaceWrapperHelper.save(line); } } @Override public void cancelChunk() { currentTrxLines = null; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\server\rpl\trx\api\impl\ReplicationTrxLinesProcessor.java
1
请在Spring Boot框架中完成以下Java代码
public class DummyTaskProcessor extends TaskProcessor<DummyTask, DummyTaskResult> { @Override public DummyTaskResult process(DummyTask task) throws Exception { if (task.getProcessingTimeMs() > 0) { Thread.sleep(task.getProcessingTimeMs()); } if (task.isFailAlways()) { ...
@Override public long getProcessingTimeout(DummyTask task) { return task.getProcessingTimeoutMs() > 0 ? task.getProcessingTimeoutMs() : 2000; } public Map<Object, Pair<Task<DummyTaskResult>, Future<DummyTaskResult>>> getCurrentTasks() { return currentTasks; } @Override public J...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\job\task\DummyTaskProcessor.java
2
请完成以下Java代码
public void setPropagationType (final java.lang.String PropagationType) { set_Value (COLUMNNAME_PropagationType, PropagationType); } @Override public java.lang.String getPropagationType() { return get_ValueAsString(COLUMNNAME_PropagationType); } @Override public void setSeqNo (final int SeqNo) { set_V...
{ if (SplitterStrategy_JavaClass_ID < 1) set_Value (COLUMNNAME_SplitterStrategy_JavaClass_ID, null); else set_Value (COLUMNNAME_SplitterStrategy_JavaClass_ID, SplitterStrategy_JavaClass_ID); } @Override public int getSplitterStrategy_JavaClass_ID() { return get_ValueAsInt(COLUMNNAME_SplitterStrategy...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_PI_Attribute.java
1
请完成以下Java代码
default void onPartitionsRevokedAfterCommit(Consumer<?, ?> consumer, Collection<TopicPartition> partitions) { } /** * The same as {@link #onPartitionsLost(Collection)} with an additional consumer parameter. * @param consumer the consumer. * @param partitions the partitions. * @since 2.4 */ default void on...
default void onPartitionsAssigned(Consumer<?, ?> consumer, Collection<TopicPartition> partitions) { onPartitionsAssigned(partitions); } @Override default void onPartitionsRevoked(Collection<TopicPartition> partitions) { } @Override default void onPartitionsAssigned(Collection<TopicPartition> partitions) { } ...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\ConsumerAwareRebalanceListener.java
1
请完成以下Java代码
public class MigrationPlanImpl implements MigrationPlan { protected String sourceProcessDefinitionId; protected String targetProcessDefinitionId; protected List<MigrationInstruction> instructions; protected VariableMap variables; public MigrationPlanImpl(String sourceProcessDefinitionId, String targetProc...
} public List<MigrationInstruction> getInstructions() { return instructions; } public void setInstructions(List<MigrationInstruction> instructions) { this.instructions = instructions; } public String toString() { return "MigrationPlan[" + "sourceProcessDefinitionId='" + sourceProcessDefin...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\MigrationPlanImpl.java
1
请完成以下Java代码
public static List<Event> readEventsByDateRange(LocalDateTime from, LocalDateTime to) { BasicDBObject object = new BasicDBObject(); object.put("dateTime", BasicDBObjectBuilder .start("$gte", from) .add("$lte", to) .get()); try { List<Ev...
return result.getModifiedCount(); } catch(MongoException me) { System.err.println("Failed to replace/update with error: " + me); throw me; } } public static long deleteEventsByDate(LocalDate from, LocalDate to) { Bson query = and(gte("dateTime", from), lt("dateTi...
repos\tutorials-master\persistence-modules\java-mongodb-queries\src\main\java\com\baeldung\mongo\crud\CrudClient.java
1
请完成以下Java代码
public String getErrorCode() { return errorCode; } /** * Sets the value of the errorCode property. * * @param value * allowed object is * {@link String } * */ public void setErrorCode(String value) { this.errorCode = value; } /** ...
return errorMessage; } /** * Sets the value of the errorMessage property. * * @param value * allowed object is * {@link String } * */ public void setErrorMessage(String value) { this.errorMessage = value; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\ws\authentication\v2_0\types\AuthenticationFault.java
1
请完成以下Java代码
public int getC_Queue_Processor_Assign_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_Queue_Processor_Assign_ID); if (ii == null) return 0; return ii.intValue(); } @Override public de.metas.async.model.I_C_Queue_Processor getC_Queue_Processor() { return get_ValueAsPO(COLUMNNAME_C_Queue_Processo...
if (C_Queue_Processor_ID < 1) set_ValueNoCheck (COLUMNNAME_C_Queue_Processor_ID, null); else set_ValueNoCheck (COLUMNNAME_C_Queue_Processor_ID, Integer.valueOf(C_Queue_Processor_ID)); } /** Get Queue Processor Definition. @return Queue Processor Definition */ @Override public int getC_Queue_Processor...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java-gen\de\metas\async\model\X_C_Queue_Processor_Assign.java
1
请在Spring Boot框架中完成以下Java代码
public static class Card { @NonNull String type; @NonNull String last4Digits; @Override @Deprecated public String toString() {return getAsString();} public String getAsString() {return type + "-" + last4Digits;} } // // // // // // @RequiredArgsConstructor @Getter public enum LastSyncStatus i...
@Value @Builder @Jacksonized @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) public static class LastSync { @NonNull LastSyncStatus status; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sumup\src\main\java\de\metas\payment\sumup\SumUpTransaction.java
2
请完成以下Java代码
public final class BearerTokenAuthenticationConverter implements AuthenticationConverter { private AuthenticationDetailsSource<HttpServletRequest, ?> authenticationDetailsSource = new WebAuthenticationDetailsSource(); private BearerTokenResolver bearerTokenResolver = new DefaultBearerTokenResolver(); @Override p...
Assert.notNull(bearerTokenResolver, "bearerTokenResolver cannot be null"); this.bearerTokenResolver = bearerTokenResolver; } /** * Set the {@link AuthenticationDetailsSource} to use. Defaults to * {@link WebAuthenticationDetailsSource}. * @param authenticationDetailsSource the {@code AuthenticationDetailsSou...
repos\spring-security-main\oauth2\oauth2-resource-server\src\main\java\org\springframework\security\oauth2\server\resource\web\authentication\BearerTokenAuthenticationConverter.java
1
请完成以下Java代码
public Set<String> getHeaders() { return headers; } public void setHeaders(Set<String> headers) { Objects.requireNonNull(headers, "headers may not be null"); this.headers = headers.stream().map(String::toLowerCase).collect(Collectors.toSet()); } @Override public int getOrder() { return order; } public...
for (Map.Entry<String, List<String>> entry : originalHeaders.headerSet()) { if (!headersToRemove.contains(entry.getKey().toLowerCase(Locale.ROOT))) { filtered.addAll(entry.getKey(), entry.getValue()); } } return filtered; } @Override public boolean supports(Type type) { return type.equals(Type.REQU...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\headers\RemoveHopByHopHeadersFilter.java
1
请在Spring Boot框架中完成以下Java代码
public class PushArticlesProcessor implements Processor { @Override public void process(final Exchange exchange) throws Exception { final AlbertaProductApi albertaProductApi = getPropertyOrThrowError(exchange, ROUTE_PROPERTY_ALBERTA_PRODUCT_API, AlbertaProductApi.class); final UpsertArticleRequest upsertArticle...
@NonNull private JsonRequestExternalReferenceUpsert buildUpsertExternalRefRequest( @NonNull final ArticleMapping articleMapping, @NonNull final JsonMetasfreshId productId) { return JsonRequestExternalReferenceUpsert.builder() .systemName(JsonExternalSystemName.of(ALBERTA_EXTERNAL_REFERENCE_SYSTEM)) .e...
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\product\processor\PushArticlesProcessor.java
2
请完成以下Java代码
public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } public String getState() { return state; } public void setState(String state) { this.state = state; } public String getRestartedProcessInstanceId() { return r...
+ ", superCaseInstanceId=" + superCaseInstanceId + ", deleteReason=" + deleteReason + ", durationInMillis=" + durationInMillis + ", startTime=" + startTime + ", endTime=" + endTime + ", removalTime=" + removalTime + ", endActivityId=" + endActivityId ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricProcessInstanceEventEntity.java
1
请完成以下Java代码
public void setM_HU_Item_Storage_ID (final int M_HU_Item_Storage_ID) { if (M_HU_Item_Storage_ID < 1) set_Value (COLUMNNAME_M_HU_Item_Storage_ID, null); else set_Value (COLUMNNAME_M_HU_Item_Storage_ID, M_HU_Item_Storage_ID); } @Override public int getM_HU_Item_Storage_ID() { return get_ValueAsInt(CO...
return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public void setQty (final BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } @Override public BigDecimal getQty() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty); return bd != null ? bd : BigDecimal.ZERO; } @Override public...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Item_Storage_Snapshot.java
1
请完成以下Java代码
public boolean isActive() { return getActiveStatus() == JsonProductPackageState.ACTIVE; } public boolean isFraud() { return getActiveStatus() == JsonProductPackageState.FRAUD; } public void productDecommissioned(@NonNull final String decommissionedServerTransactionId) { if (decommissioned) { throw n...
this.decommissioned = true; this.decommissionedServerTransactionId = decommissionedServerTransactionId; } public void productDecommissionUndo(@NonNull final String undoDecommissionedServerTransactionId) { if (!decommissioned) { throw new AdempiereException("Product is not decommissioned: " + this); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java\de\metas\vertical\pharma\securpharm\product\ProductDetails.java
1
请完成以下Java代码
public static String getSenderId() { return SENDER_ID; } /** * @return true of calls to {@link IEventBus#processEvent(Event)} shall be performed asynchronously */ public static boolean isEventBusPostAsync(@NonNull final Topic topic) { if (alwaysConsiderAsyncTopics.contains(topic)) { return true; } ...
final Map<String, String> valuesForPrefix = sysConfigBL.getValuesForPrefix(nameForAllTopics, ClientAndOrgId.SYSTEM); final String keyForTopic = nameForAllTopics + ".topic_" + topic.getName(); final String valueForTopic = valuesForPrefix.get(keyForTopic); if (Check.isNotBlank(valueForTopic)) { getLogger(Even...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\EventBusConfig.java
1
请在Spring Boot框架中完成以下Java代码
public String getKey(String key) { try { String _response = evCache.<String>get(key); return _response; } catch (Exception e) { e.printStackTrace(); return null; } } public void setVerboseMode( boolean verboseMode ) { this.verboseM...
// try { // EVCacheClientSample evCacheClientSample = new EVCacheClientSample(); // // // Set ten keys to different values // for (int i = 0; i < 10; i++) { // String key = "key_" + i; // String value = "data_" + i; // // Set the TTL t...
repos\Spring-Boot-In-Action-master\springbt_evcache\src\main\java\cn\codesheep\springbt_evcache\config\EVCacheClientSample.java
2
请完成以下Java代码
public Optional<HuId> getHUIdByValueOrExternalBarcode(@NonNull final ScannedCode scannedCode) { return Optionals.firstPresentOfSuppliers( () -> getHUIdByValue(scannedCode.getAsString()), () -> getByExternalBarcode(scannedCode) ); } private Optional<HuId> getHUIdByValue(final String value) { final HuI...
.setOnlyActiveHUs(true) .setOnlyTopLevelHUs() .addOnlyWithAttribute(AttributeConstants.ATTR_ExternalBarcode, scannedCode.getAsString()) .firstIdOnly(); } @Override public Set<HuPackingMaterialId> getHUPackingMaterialIds(@NonNull final HuId huId) { return handlingUnitsRepo.retrieveAllItemsNoCache(Coll...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HandlingUnitsBL.java
1
请完成以下Java代码
public int getMinorVersion() { return minorVersion; } public SentinelVersion setMinorVersion(int minorVersion) { this.minorVersion = minorVersion; return this; } public int getFixVersion() { return fixVersion; } public SentinelVersion setFixVersion(int fixVersi...
if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SentinelVersion that = (SentinelVersion)o; if (getFullVersion() != that.getFullVersion()) { return false; } return postfix != null ? postfix.equals(that.postfix) : that.postfix == null; }...
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\datasource\entity\SentinelVersion.java
1
请完成以下Java代码
private static boolean isAggregable(@NonNull final I_M_Attribute attribute) { return !Weightables.isWeightableAttribute(AttributeCode.ofString(attribute.getValue())); } // // // @RequiredArgsConstructor private static class AttributeAggregator { private final AttributeCode attributeCode; private final A...
@Nullable @Override public Object list() { return from.getValueAsString(attributeCode); } }); values.add(value); } void updateAggregatedValueTo(@NonNull final IAttributeSet to) { if (values.size() == 1 && to.hasAttribute(attributeCode)) { to.setValue(attributeCode, values.it...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\AttributeSetAggregator.java
1
请完成以下Java代码
static ServerResponse.BodyBuilder permanentRedirect(URI location) { ServerResponse.BodyBuilder builder = status(HttpStatus.PERMANENT_REDIRECT); return builder.location(location); } /** * Create a builder with a {@linkplain HttpStatus#BAD_REQUEST 400 Bad Request} status. * @return the created builder */ st...
} /** * Create a (built) response with the given asynchronous response. Parameter * {@code asyncResponse} can be a {@link CompletableFuture * CompletableFuture&lt;ServerResponse&gt;} or {@link Publisher * Publisher&lt;ServerResponse&gt;} (or any asynchronous producer of a single * {@code ServerResponse} tha...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\handler\GatewayServerResponse.java
1
请完成以下Java代码
public void createShipmentDeclarationIfNeeded(final I_M_InOut inout) { try (final MDCCloseable inoutRecordMDC = TableRecordMDC.putTableRecordReference(inout)) { if (!inout.isSOTrx()) { // Only applies to shipments return; } final InOutId shipmentId = InOutId.ofRepoId(inout.getM_InOut_ID()); ...
return; } final InOutId shipmentId = InOutId.ofRepoId(inout.getM_InOut_ID()); if (shipmentDeclarationRepo.existCompletedShipmentDeclarationsForShipmentId(shipmentId)) { throw new AdempiereException(ERR_ShipmentDeclaration).markAsUserValidationError(); } } } @ModelChange(timings = { ModelVal...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\shipment\model\interceptor\M_InOut.java
1
请在Spring Boot框架中完成以下Java代码
public String secure(Map<String, Object> model, Principal principal) { model.put("title", "SECURE AREA"); model.put("message", "Only Authorised Users Can See This Page"); model.put("username", getUserName(principal)); model.put("userroles", getUserRoles(principal)); return "home"...
private Collection<String> getUserRoles(Principal principal) { if (principal == null) { return Arrays.asList("none"); } else { Set<String> roles = new HashSet<String>(); final UserDetails currentUser = (UserDetails) ((Authentication) principal).getPrincipal(); ...
repos\tutorials-master\spring-security-modules\spring-security-ldap\src\main\java\com\baeldung\controller\MyController.java
2
请完成以下Java代码
public Date getDeploymentTime() { return deploymentTime; } @Override public void setDeploymentTime(Date deploymentTime) { this.deploymentTime = deploymentTime; } @Override public boolean isNew() { return isNew; } @Override public void setNew(boolean isNew) ...
@Override public String getDerivedFromRoot() { return null; } @Override public String getEngineVersion() { return null; } // common methods ////////////////////////////////////////////////////////// @Override public String toString() { return "AppDeploymentEnti...
repos\flowable-engine-main\modules\flowable-app-engine\src\main\java\org\flowable\app\engine\impl\persistence\entity\AppDeploymentEntityImpl.java
1
请完成以下Java代码
final protected void execute() throws IOException { vectorsReader.readVectorFile(); final int words = vectorsReader.getNumWords(); final int size = vectorsReader.getSize(); try { scanner = new Scanner(System.in); Result result = null; whil...
} System.out.printf("\n Word Cosine cosine\n------------------------------------------------------------------------\n"); for (int j = 0; j < N; j++) System.out.printf("%50s\t\t%f\n", bestw[j], bestd[j]); ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\AbstractClosestVectors.java
1
请完成以下Java代码
public String getFileType() { return fileType; } public void setFileType(String fileType) { this.fileType = fileType; } public String getStoreType() { return storeType; } public void setStoreType(String storeType) { this.storeType = storeType; } public...
return fileSize; } public void setFileSize(Double fileSize) { this.fileSize = fileSize; } public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } }
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\system\vo\SysFilesModel.java
1
请完成以下Java代码
protected Map<String, String> extractExternalSystemParameters(@NonNull final ExternalSystemParentConfig externalSystemParentConfig) { final ExternalSystemGRSSignumConfig grsConfig = ExternalSystemGRSSignumConfig.cast(externalSystemParentConfig.getChildConfig()); if (EmptyUtil.isEmpty(grsConfig.getCamelHttpResourc...
protected long getSelectedRecordCount(final IProcessPreconditionsContext context) { return context.getSelectedIncludedRecords() .stream() .filter(recordRef -> I_ExternalSystem_Config_GRSSignum.Table_Name.equals(recordRef.getTableName())) .count(); } @Override protected String getOrgCode(@NonNull fina...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\process\InvokeGRSSignumAction.java
1
请完成以下Java代码
protected void validateParams(String userId, String groupId, String processInstanceId, String type) { if (processInstanceId == null) { throw new FlowableIllegalArgumentException("processInstanceId is null"); } if (type == null) { throw new FlowableIllegalArgumentExceptio...
} if (Flowable5Util.isFlowable5ProcessDefinitionId(commandContext, processInstance.getProcessDefinitionId())) { Flowable5CompatibilityHandler compatibilityHandler = Flowable5Util.getFlowable5CompatibilityHandler(); compatibilityHandler.deleteIdentityLinkForProcessInstance(processInstanc...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cmd\DeleteIdentityLinkForProcessInstanceCmd.java
1
请在Spring Boot框架中完成以下Java代码
public class ProductsToPick_MarkWillNotPickSelected extends ProductsToPickViewBasedProcess { @Autowired private PickingCandidateService pickingCandidatesService; @Override protected ProcessPreconditionsResolution checkPreconditionsApplicable() { final List<ProductsToPickRow> selectedRows = getSelectedRows(); ...
invalidateView(); return MSG_OK; } private void markAsWillNotPick(final ProductsToPickRow row) { final RejectPickingResult result = pickingCandidatesService.rejectPicking(RejectPickingRequest.builder() .shipmentScheduleId(row.getShipmentScheduleId()) .qtyToReject(row.getQtyEffective()) .rejectPicki...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\productsToPick\process\ProductsToPick_MarkWillNotPickSelected.java
2
请完成以下Java代码
public Inventory updateById(final InventoryId inventoryId, UnaryOperator<Inventory> updater) { final Inventory inventory = loadById(inventoryId); final Inventory inventoryChanged = updater.apply(inventory); if (Objects.equals(inventory, inventoryChanged)) { return inventory; } saveInventory(inventoryCh...
} private InventoryReference toInventoryJobReference(final I_M_Inventory inventory) { return InventoryReference.builder() .inventoryId(extractInventoryId(inventory)) .documentNo(inventory.getDocumentNo()) .movementDate(extractMovementDate(inventory)) .warehouseId(WarehouseId.ofRepoId(inventory.getM...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\InventoryLoaderAndSaver.java
1
请在Spring Boot框架中完成以下Java代码
public class JobDefinitionRestServiceImpl extends AbstractRestProcessEngineAware implements JobDefinitionRestService { public JobDefinitionRestServiceImpl(String engineName, ObjectMapper objectMapper) { super(engineName, objectMapper); } @Override public JobDefinitionResource getJobDefinition(String jobDe...
public CountResultDto queryJobDefinitionsCount(JobDefinitionQueryDto queryDto) { queryDto.setObjectMapper(getObjectMapper()); JobDefinitionQuery query = queryDto.toQuery(getProcessEngine()); long count = query.count(); CountResultDto result = new CountResultDto(); result.setCount(count); retur...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\JobDefinitionRestServiceImpl.java
2
请完成以下Java代码
public MessagesMap getMap() { return messagesCache.getOrLoad(0, MessagesMapRepository::retrieveMap); } private static MessagesMap retrieveMap() { if (Adempiere.isUnitTestMode()) { return MessagesMap.EMPTY; } final Stopwatch stopwatch = Stopwatch.createStarted(); final String sql = "SELECT" + " ...
} if (currentAdMessageId == null) { currentAdMessageId = adMessageId; currentAdMessage = AdMessageKey.of(rs.getString("Value")); msgTextBuilder = ImmutableTranslatableString.builder().defaultValue(normalizeToJavaMessageFormat(rs.getString("MsgText"))); msgTipBuilder = ImmutableTranslatableS...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\MessagesMapRepository.java
1
请完成以下Java代码
public abstract class MultiWorker { protected abstract class WorkerThread extends Thread { abstract public Object doWork(); @Override public void run() { isWorking = true; value = doWork(); isWorking = false; } @Override public void interrupt() { super.interrupt(); isWorking = ...
this.timeout = timeout; } public boolean isWorking() { return isWorking; } public void waitForComplete(int timeout) { setTimeout(timeout); waitForComplete(); } public void stop() { workerThread.interrupt(); } public void waitForComplete() { boolean to = getTimeout() > -1; int ...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\tools\worker\MultiWorker.java
1
请完成以下Java代码
public static HttpResponse<String> sendPostWithFormData(String serviceUrl) throws IOException, InterruptedException { HttpClient client = HttpClient.newHttpClient(); Map<String, String> formData = new HashMap<>(); formData.put("username", "baeldung"); formData.put("message", "hello"); ...
HttpResponse<String> response = client .send(request, HttpResponse.BodyHandlers.ofString()); return response; } private static String getFormDataAsString(Map<String, String> formData) { StringBuilder formBodyBuilder = new StringBuilder(); for (Map.Entry<String, String> single...
repos\tutorials-master\core-java-modules\core-java-httpclient\src\main\java\com\baeldung\httpclient\HttpClientPost.java
1
请在Spring Boot框架中完成以下Java代码
public boolean send() { // 创建 Message Demo01Message message = new Demo01Message() .setId(new Random().nextInt()); // 创建 Spring Message 对象 Message<Demo01Message> springMessage = MessageBuilder.withPayload(message) .build(); // 发送消息 return my...
for (String tag : new String[]{"yunai", "yutou", "tudou"}) { // 创建 Message Demo01Message message = new Demo01Message() .setId(new Random().nextInt()); // 创建 Spring Message 对象 Message<Demo01Message> springMessage = MessageBuilder.withPayload(message) ...
repos\SpringBoot-Labs-master\labx-06-spring-cloud-stream-rocketmq\labx-06-sca-stream-rocketmq-producer-actuator\src\main\java\cn\iocoder\springcloudalibaba\labx6\rocketmqdemo\producerdemo\controller\Demo01Controller.java
2
请完成以下Java代码
public CSVWriter setFieldDelimiter(String delimiter) { this.fieldDelimiter = delimiter; return this; } public void setFieldQuote(String quote) { this.fieldQuote = quote; } public void setLineEnding(String lineEnding) { this.lineEnding = lineEnding; } @SuppressWarnings("UnusedReturnValue") public CS...
line.append(csvValueQuoted); } writer.append(line.toString()); writer.append(lineEnding); } private String toCsvValue(Object value) { final String valueStr; if (value == null) { valueStr = ""; } else if (value instanceof java.util.Date) { valueStr = dateFormat.format(value); } else { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\data\export\api\impl\CSVWriter.java
1
请完成以下Java代码
public void setType(String value) { this.type = value; } /** * Gets the value of the participantNumber property. * * @return * possible object is * {@link String } * */ public String getParticipantNumber() { return participantNumber; } ...
*/ public void setReferenceNumber(String value) { this.referenceNumber = value; } /** * Gets the value of the codingLine property. * * @return * possible object is * {@link String } * */ public String getCodingLine() { return codingLine; ...
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\Esr5Type.java
1
请完成以下Java代码
private byte[] computeDataWithCopyFlagSetToTrue(@NonNull final AttachmentEntry attachmentEntry) { byte[] attachmentData = attachmentEntryService.retrieveData(attachmentEntry.getId()); // get the converter to use final String xsdName = XmlIntrospectionUtil.extractXsdValueOrNull(new ByteArrayInputStream(attachmen...
return outputStream.toByteArray(); } private XmlRequest updateCrossVersionRequest(@NonNull final XmlRequest crossVersionRequest) { final RequestMod mod = RequestMod .builder() .payloadMod(PayloadMod .builder() .copy(true) .build()) .build(); return crossVersionRequest.withMod(mod);...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_base\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\base\store\StoreForumDatenaustauschAttachmentService.java
1
请完成以下Java代码
protected CmmnActivityBehavior createDefaultHttpActivityBehaviour(PlanItem planItem, ServiceTask serviceTask) { if (ImplementationType.IMPLEMENTATION_TYPE_CLASS.equals(serviceTask.getImplementationType())) { return createCmmnClassDelegate(planItem, serviceTask); } else if (ImplementationType...
public ExpressionManager getExpressionManager() { return expressionManager; } public void setExpressionManager(ExpressionManager expressionManager) { this.expressionManager = expressionManager; } protected Expression createExpression(String refExpressionString) { Expression exp...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\parser\DefaultCmmnActivityBehaviorFactory.java
1
请完成以下Java代码
public Component getTableCellEditorComponent(final JTable table, final Object value, final boolean isSelected, final int row, final int col) { updateEditor(table, row); return super.getTableCellEditorComponent(table, value, isSelected, row, col); } @Override protected CComboBox<Operator> getEditor() { if (_...
else if (DisplayType.isAnyLookup(displayType)) { editor.setModel(modelForLookupColumns); } else if (DisplayType.YesNo == displayType) { editor.setModel(modelForYesNoColumns); } else { editor.setModel(modelDefault); } } else { editor.setModel(modelEmpty); } } private IUs...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\FindOperatorCellEditor.java
1
请完成以下Java代码
public void setM_Product_ID (int M_Product_ID) { if (M_Product_ID < 1) set_Value (COLUMNNAME_M_Product_ID, null); else set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); } /** Get Produkt. @return Produkt, Leistung, Artikel */ @Override public int getM_Product_ID () { Integer...
Integer ii = (Integer)get_Value(COLUMNNAME_M_RequisitionLine_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Einzelpreis. @param PriceActual Actual Price */ @Override public void setPriceActual (java.math.BigDecimal PriceActual) { set_Value (COLUMNNAME_PriceActual, PriceActual); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_RequisitionLine.java
1
请完成以下Java代码
public static void clear_UUID_TO_PAGE() { UUID_TO_PAGE.clear(); } @Override public <ET extends T> QueryResultPage<ET> paginate(Class<ET> clazz, int pageSize) throws DBException { final List<ET> bigList = list(clazz); final String firstUUID = UIDStringUtil.createRandomUUID(); final Instant resultTimestamp...
} return firstQueryResultPage; } @SuppressWarnings("unchecked") public static <T> QueryResultPage<T> getPage(Class<T> clazz, String next) { return (QueryResultPage<T>)UUID_TO_PAGE.get(next); } @Override public List<Money> sumMoney(@NonNull String amountColumnName, @NonNull String currencyIdColumnName) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\POJOQuery.java
1
请完成以下Java代码
public String getTenantId() { return tenantId; } @Override public FlowElement getCurrentFlowElement() { return currentFlowElement; } @Override public boolean isActive() { return active; } @Override public boolean isEnded() { return ended; } ...
@Override public boolean isMultiInstanceRoot() { return multiInstanceRoot; } @Override public Object getVariable(String variableName) { return variables.get(variableName); } @Override public boolean hasVariable(String variableName) { return variables.containsKey(var...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\delegate\ReadOnlyDelegateExecutionImpl.java
1
请完成以下Java代码
public boolean isMatching(final @NonNull EAN13ProductCode expectedProductCode) { final EAN13 ean13 = toEAN13().orElse(null); return ean13 != null && ean13.isMatching(expectedProductCode); } public boolean productCodeEndsWith(final @NonNull EAN13ProductCode expectedProductCode) { final EAN13 ean13 = toEAN13()...
public boolean isFixed() { final EAN13 ean13 = toEAN13().orElse(null); return ean13 == null || ean13.isFixed(); } /** * @return true if fixed code (e.g. not a variable weight EAN13 etc) */ public boolean isVariable() { final EAN13 ean13 = toEAN13().orElse(null); return ean13 == null || ean13.isVariabl...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\gs1\GTIN.java
1
请完成以下Java代码
protected Void execute(CommandContext commandContext, TaskEntity task) { if (variables != null) { if (localScope) { task.setVariablesLocal(variables); } else if (task.getExecutionId() != null) { task.setExecutionVariables(variables); } else { ...
return "Cannot complete a suspended task"; } public Map<String, Object> getTaskVariables() { return taskVariables; } private void setTaskVariables(Map<String, Object> taskVariables) { this.taskVariables = taskVariables; } public String getTaskId() { return taskId; ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\CompleteTaskCmd.java
1
请完成以下Java代码
public class Server { private static final List<User> AUTHENTICATED_USERS = List.of( new User("1", "admin", "123456", true), new User("2", "user", "123456", false) ); public final static ScopedValue<User> LOGGED_IN_USER = ScopedValue.newInstance(); private final Controller contr...
response.setStatus(401); } } private Optional<User> authenticateUser(HttpServletRequest request) { return AUTHENTICATED_USERS.stream() .filter(user -> checkUserPassword(user, request)) .findFirst(); } private boolean checkUserPassword(User user, HttpServ...
repos\tutorials-master\core-java-modules\core-java-20\src\main\java\com\baeldung\scopedvalues\scoped\Server.java
1
请完成以下Java代码
public int getAD_Tree_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_Tree_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Node_ID. @param Node_ID Node_ID */ public void setNode_ID (int Node_ID) { if (Node_ID < 0) set_ValueNoCheck (COLUMNNAME_Node_ID, null); else se...
else set_Value (COLUMNNAME_Parent_ID, Integer.valueOf(Parent_ID)); } /** Get Parent. @return Parent of Entity */ public int getParent_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_Parent_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Sequence. @param SeqNo Method of...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_TreeNode.java
1
请完成以下Java代码
public abstract class DataObjectPropertyName { private DataObjectPropertyName() { } /** * Return the specified Java Bean property name in dashed form. * @param name the source name * @return the dashed from */ public static String toDashedForm(String name) { StringBuilder result = new StringBuilder(name...
} else { if (ch == '[') { inIndex = true; result.append(ch); } else { ch = (ch != '_') ? ch : '-'; if (Character.isUpperCase(ch) && !result.isEmpty() && result.charAt(result.length() - 1) != '-') { result.append('-'); } result.append(Character.toLowerCase(ch)); } ...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\properties\bind\DataObjectPropertyName.java
1
请完成以下Java代码
public OrgId getOrgId() {return OrgId.ofRepoId(po.getAD_Org_ID());} @Override public UserId getUpdatedBy() {return UserId.ofRepoIdOrSystem(po.getUpdatedBy());} @Override @Nullable public DocStatus getDocStatus() { final int index = po.get_ColumnIndex("DocStatus"); return index >= 0 ? DocStatus.ofNullabl...
@Override @Nullable public LocalDateAndOrgId getValueAsLocalDateOrNull(@NonNull final String columnName, @NonNull final Function<OrgId, ZoneId> timeZoneMapper) { final int index = po.get_ColumnIndex(columnName); if (index != -1) { final Timestamp ts = po.get_ValueAsTimestamp(index); if (ts != null) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\doc\POAcctDocModel.java
1
请完成以下Java代码
public boolean accept(File file) { // Need to accept directories if (file.isDirectory()) return true; String ext = file.getName(); int pos = ext.lastIndexOf('.'); // No extension if (pos == -1) return false; ext = ext.substring(pos+1); if (m_extension.equalsIgnoreCase(ext)) return true; ...
* @param filter filter * @return file */ public static File getFile(File file, FileFilter filter) { String fName = file.getAbsolutePath(); if (fName == null || fName.equals("")) fName = "Adempiere"; // ExtensionFileFilter eff = null; if (filter instanceof ExtensionFileFilter) eff = (ExtensionFil...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\ExtensionFileFilter.java
1
请完成以下Java代码
private static String buildMsg(final int warehouseId, final boolean maxVolumeExceeded, final boolean maxWeightExceeded) { final StringBuffer sb = new StringBuffer(); sb.append(Msg.translate(Env.getCtx(), MSG_NO_SUFFICIENT_CONTAINERS)); if (warehouseId > 0) { sb.append("\n@M_Warehouse_ID@ "); sb.append...
appendExceed(sb, I_M_PackagingContainer.COLUMNNAME_MaxVolume); } if (maxWeightExceeded) { appendExceed(sb, I_M_PackagingContainer.COLUMNNAME_MaxWeight); } return sb.toString(); } private static void appendExceed(final StringBuffer sb, final String colName) { sb.append("\n"); sb.append("@"); sb.ap...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\exception\NoContainerException.java
1
请完成以下Java代码
public Optional<BPartnerLocation> extractLocation(@NonNull final BPartnerLocationId bPartnerLocationId) { final Predicate<BPartnerLocation> predicate = l -> bPartnerLocationId.equals(l.getId()); return createFilteredLocationStream(predicate).findAny(); } public Optional<BPartnerLocation> extractBillToLocation(...
{ bankAccounts.add(bankAccount); } public Optional<BPartnerBankAccount> getBankAccountByIBAN(@NonNull final String iban) { Check.assumeNotEmpty(iban, "iban is not empty"); return bankAccounts.stream() .filter(bankAccount -> iban.equals(bankAccount.getIban())) .findFirst(); } public void addCreditL...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\composite\BPartnerComposite.java
1
请完成以下Java代码
private static DistributionFacetId ofRepoId(@NonNull DistributionFacetGroupType groupType, @NonNull RepoIdAware id) { final WorkflowLaunchersFacetId workflowLaunchersFacetId = WorkflowLaunchersFacetId.ofId(groupType.toWorkflowLaunchersFacetGroupId(), id); return ofWorkflowLaunchersFacetId(workflowLaunchersFacetId)...
) ); } public static DistributionFacetId ofPlantId(@NonNull final ResourceId plantId) { return ofRepoId(DistributionFacetGroupType.PLANT_RESOURCE_ID, plantId); } private static Quantity getAsQuantity(final @NonNull WorkflowLaunchersFacetId workflowLaunchersFacetId) { final ImmutablePair<BigDecimal, Intege...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\launchers\facets\DistributionFacetId.java
1
请完成以下Java代码
public ResourceId getTargetPlantId() {return getDdOrderCandidate().getTargetPlantId();} @NonNull @JsonIgnore public WarehouseId getTargetWarehouseId() {return getDdOrderCandidate().getTargetWarehouseId();} @NonNull @JsonIgnore public WarehouseId getSourceWarehouseId() {return getDdOrderCandidate().getSourceWare...
public MaterialDispoGroupId getMaterialDispoGroupId() {return getDdOrderCandidate().getMaterialDispoGroupId();} @Nullable @JsonIgnore public PPOrderRef getForwardPPOrderRef() {return getDdOrderCandidate().getForwardPPOrderRef();} @JsonIgnore public int getExistingDDOrderCandidateId() {return getDdOrderCandidate(...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\ddordercandidate\AbstractDDOrderCandidateEvent.java
1
请完成以下Java代码
public class ProductsToPick_Request4EyesReview extends ProductsToPickViewBasedProcess { @Override protected ProcessPreconditionsResolution checkPreconditionsApplicable() { if (isReviewProfile()) { return ProcessPreconditionsResolution.rejectWithInternalReason("already reviewing"); } final ProductsToPickV...
return ProcessPreconditionsResolution.accept(); } @Override protected String doIt() { final ProductsToPickView view = getView(); final ViewId viewId = view.getViewId(); final GlobalActionEvent openViewEvent = GlobalActionEvents.openView(viewId, PickingConstantsV2.PROFILE_ID_ProductsToPickView_Review); get...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\productsToPick\process\ProductsToPick_Request4EyesReview.java
1
请在Spring Boot框架中完成以下Java代码
public class ExampleController { @RequestMapping("/string") public String string(ModelMap map) { map.addAttribute("userName", "ityouknow"); return "string"; } @RequestMapping("/if") public String ifunless(ModelMap map) { map.addAttribute("flag", "yes"); return "if";...
map.addAttribute("flag", "yes"); return "eq"; } @RequestMapping("/switch") public String switchcase(ModelMap map) { map.addAttribute("sex", "woman"); return "switch"; } private List<User> getUserList(){ List<User> list=new ArrayList<User>(); User user1=new U...
repos\spring-boot-leaning-master\2.x_42_courses\第 2-3 课 模板引擎 Thymeleaf 基础使用\spring-boot-thymeleaf\src\main\java\com\neo\web\ExampleController.java
2
请完成以下Java代码
public Integer getVersion(VariableScope variableScope) { Object result = versionValueProvider.getValue(variableScope); if (result != null) { if (result instanceof String) { return Integer.valueOf((String) result); } else if (result instanceof Integer) { return (Integer) result; ...
this.deploymentId = deploymentId; } public String getDefinitionTenantId(VariableScope variableScope, String defaultTenantId) { if (tenantIdProvider != null) { return (String) tenantIdProvider.getValue(variableScope); } else { return defaultTenantId; } } public ParameterValueProvider ge...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\core\model\BaseCallableElement.java
1
请完成以下Java代码
public void onGroupEvent(SocketIOClient client, AckRequest request, GroupMessageRequest data) { Collection<SocketIOClient> clients = server.getRoomOperations(data.getGroupId()).getClients(); boolean inGroup = false; for (SocketIOClient socketIOClient : clients) { if (ObjectUtil.equa...
/** * 广播 */ public void sendToBroadcast(BroadcastMessageRequest message) { log.info("系统紧急广播一条通知:{}", message.getMessage()); for (UUID clientId : dbTemplate.findAll()) { if (server.getClient(clientId) == null) { continue; } server.getClien...
repos\spring-boot-demo-master\demo-websocket-socketio\src\main\java\com\xkcoding\websocket\socketio\handler\MessageEventHandler.java
1
请完成以下Java代码
protected String getXMLElementName() { return ELEMENT_EVENT_CATCH; } @Override @SuppressWarnings("unchecked") protected BaseElement convertXMLToElement(XMLStreamReader xtr, BpmnModel model) throws Exception { IntermediateCatchEvent catchEvent = new IntermediateCatchEvent(); Bpmn...
} @Override protected boolean writeExtensionChildElements(BaseElement element, boolean didWriteExtensionStartElement, XMLStreamWriter xtw) throws Exception { IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) element; didWriteExtensionStartElement = writeVariableListenerDefinition...
repos\flowable-engine-main\modules\flowable-bpmn-converter\src\main\java\org\flowable\bpmn\converter\CatchEventXMLConverter.java
1
请完成以下Java代码
protected void addRemovalTime(String instanceId, Date removalTime, CommandContext commandContext) { commandContext.getHistoricBatchManager() .addRemovalTimeById(instanceId, removalTime); } protected boolean hasBaseTime(HistoricBatchEntity instance, CommandContext commandContext) { return isStrategySt...
public JobDeclaration<BatchJobContext, MessageEntity> getJobDeclaration() { return JOB_DECLARATION; } protected SetRemovalTimeBatchConfiguration createJobConfiguration(SetRemovalTimeBatchConfiguration configuration, List<String> batchIds) { return new SetRemovalTimeBatchConfiguration(batchIds) .setRe...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\removaltime\BatchSetRemovalTimeJobHandler.java
1
请在Spring Boot框架中完成以下Java代码
public void deleteIdentityLink(IdentityLinkEntity identityLink) { delete(identityLink); } @Override public void deleteIdentityLinksByTaskId(String taskId) { dataManager.deleteIdentityLinksByTaskId(taskId); } @Override public void deleteIdentityLinksByProcDef(String processDefId...
dataManager.deleteIdentityLinksByScopeIdAndScopeType(scopeId, scopeType); } @Override public void deleteIdentityLinksByScopeDefinitionIdAndScopeType(String scopeDefinitionId, String scopeType) { dataManager.deleteIdentityLinksByScopeDefinitionIdAndScopeType(scopeDefinitionId, scopeType); } ...
repos\flowable-engine-main\modules\flowable-identitylink-service\src\main\java\org\flowable\identitylink\service\impl\persistence\entity\IdentityLinkEntityManagerImpl.java
2
请在Spring Boot框架中完成以下Java代码
public void setFlushMode(FlushMode flushMode) { this.flushMode = flushMode; } public SaveMode getSaveMode() { return this.saveMode; } public void setSaveMode(SaveMode saveMode) { this.saveMode = saveMode; } public @Nullable String getCleanupCron() { return this.cleanupCron; } public void setCleanupC...
/** * No not attempt to apply any custom Redis configuration. */ NONE } /** * Type of Redis session repository to auto-configure. */ public enum RepositoryType { /** * Auto-configure a RedisSessionRepository or ReactiveRedisSessionRepository. */ DEFAULT, /** * Auto-configure a RedisInd...
repos\spring-boot-4.0.1\module\spring-boot-session-data-redis\src\main\java\org\springframework\boot\session\data\redis\autoconfigure\SessionDataRedisProperties.java
2
请在Spring Boot框架中完成以下Java代码
private static void updateRecord(final I_M_Picking_Job_Step_HUAlternative existingRecord, final PickingJobStepPickFrom pickFrom) { existingRecord.setPickFrom_HU_ID(pickFrom.getPickFromHUId().getRepoId()); updateRecord(existingRecord, pickFrom.getPickedTo()); } private static void updateRecord(final I_M_Picking_...
qtyRejectedBD = qtyRejected.toBigDecimal(); rejectReason = qtyRejected.getReasonCode().getCode(); } else { uomId = null; qtyRejectedBD = BigDecimal.ZERO; rejectReason = null; } existingRecord.setC_UOM_ID(UomId.toRepoId(uomId)); existingRecord.setQtyRejectedToPick(qtyRejectedBD); existingRecor...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\repository\PickingJobSaver.java
2
请完成以下Spring Boot application配置
# make sure the same data is configured in KerberosMiniKdc # otherwise configuration/communication error will occur app.service-principal=HTTP/localhost app.user-principal=client/localhost app.keytab-location=@proj
ect.basedir@\\krb-test-workdir\\example.keytab app.access-url=http://localhost:8080/endpoint
repos\tutorials-master\spring-security-modules\spring-security-oauth2-sso\spring-security-sso-kerberos\src\main\resources\application.properties
2
请完成以下Java代码
public boolean matches(Message<?> message) { return true; } @Override public String toString() { return "ANY_MESSAGE"; } }; /** * Returns true if the {@link Message} matches, else false * @param message the {@link Message} to match on * @return true if the {@link Message} matches, else false ...
* Returns the extracted variable values where the key is the variable name and * the value is the variable value * @return a map containing key-value pairs representing extracted variable names * and variable values */ public Map<String, String> getVariables() { return this.variables; } /** * C...
repos\spring-security-main\messaging\src\main\java\org\springframework\security\messaging\util\matcher\MessageMatcher.java
1
请在Spring Boot框架中完成以下Java代码
public ISyncAfterCommitCollector add(@NonNull final Rfq rfq) { createAndStoreSyncConfirmRecord(rfq); rfqs.add(rfq); return this; } @Override public ISyncAfterCommitCollector add(@NonNull final User user) { users.add(user); return this; } /** * Creates a new local DB record for the give...
this.productSupplies.clear(); pushDailyReportsAsync(productSupplies); } // // Sync weekly product supplies { final List<WeekSupply> weeklySupplies = ImmutableList.copyOf(this.weeklySupplies); this.weeklySupplies.clear(); pushWeeklyReportsAsync(weeklySupplies); } // // Sync RfQ cha...
repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\sync\SenderToMetasfreshService.java
2
请完成以下Java代码
public List<HistoricProcessInstance> findHistoricProcessInstancesAndVariablesByQueryCriteria(HistoricProcessInstanceQueryImpl historicProcessInstanceQuery) { setSafeInValueLists(historicProcessInstanceQuery); return getDbSqlSession().selectList("selectHistoricProcessInstancesWithVariablesByQueryCriteria...
public void deleteHistoricProcessInstances(HistoricProcessInstanceQueryImpl historicProcessInstanceQuery) { getDbSqlSession().delete("bulkDeleteHistoricProcessInstances", historicProcessInstanceQuery, HistoricProcessInstanceEntityImpl.class); } @Override public void bulkDeleteHistoricProcessInstanc...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\data\impl\MybatisHistoricProcessInstanceDataManager.java
1