instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public AnonymousQueue cacheInvalidationQueue() { final NamingStrategy eventQueueNamingStrategy = new Base64UrlNamingStrategy(EVENTBUS_TOPIC.getName() + "." + appName + "-"); return new AnonymousQueue(eventQueueNamingStrategy); } @Bean public DirectExchange cacheInvalidationExchange() { return new DirectExch...
return cacheInvalidationQueue().getName(); } @Override public Optional<String> getTopicName() { return Optional.of(EVENTBUS_TOPIC.getName()); } @Override public String getExchangeName() { return cacheInvalidationExchange().getName(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\remote\rabbitmq\queues\cache_invalidation\CacheInvalidationQueueConfiguration.java
2
请完成以下Java代码
public class LwM2MTransportServerConfig implements LwM2MSecureServerConfig { @Getter @Value("${transport.lwm2m.dtls.retransmission_timeout:9000}") private int dtlsRetransmissionTimeout; @Getter @Value("${transport.lwm2m.dtls.connection_id_length:8}") private Integer dtlsCidLength; @Getter...
@Getter @Setter private List<TbProperty> networkConfig; @Getter @Setter private Configuration coapConfig; @Bean @ConfigurationProperties(prefix = "transport.lwm2m.server.security.credentials") public SslCredentialsConfig lwm2mServerCredentials() { return new SslCredentialsConfi...
repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\config\LwM2MTransportServerConfig.java
1
请在Spring Boot框架中完成以下Java代码
public class ProductPlanningId implements RepoIdAware { @JsonCreator @NonNull public static ProductPlanningId ofRepoId(final int repoId) { return new ProductPlanningId(repoId); } @Nullable public static ProductPlanningId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? ofRepoId(repoId) : null; } p...
return id != null ? id.getRepoId() : -1; } int repoId; private ProductPlanningId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "PP_Product_Planning_ID"); } @JsonValue public int toJson() { return getRepoId(); } public static boolean equals(@Nullable final ProductPlanningId id1,...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\material\planning\ProductPlanningId.java
2
请完成以下Java代码
private void deactivateBankAccounts(final List<BPartnerId> partnerIds, final Instant date) { final ICompositeQueryUpdater<I_C_BP_BankAccount> queryUpdater = queryBL.createCompositeQueryUpdater(I_C_BP_BankAccount.class) .addSetColumnValue(I_C_BP_BankAccount.COLUMNNAME_IsActive, false); queryBL .createQueryB...
.update(queryUpdater); } private void deactivatePartners(final List<BPartnerId> partnerIds, final Instant date) { final ICompositeQueryUpdater<I_C_BPartner> queryUpdater = queryBL.createCompositeQueryUpdater(I_C_BPartner.class) .addSetColumnValue(I_C_BPartner.COLUMNNAME_IsActive, false); queryBL .creat...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\bpartner\process\C_BPartner_DeactivateAfterOrgChange.java
1
请完成以下Java代码
public void setPropertiesInternal(String properties) { if (properties != null) { JsonObject json = JsonUtil.asObject(properties); this.properties = JsonUtil.asMap(json); } else { this.properties = null; } } public int getRevision() { return revision; } public void setRevi...
persistentState.put("name", this.name); persistentState.put("owner", this.owner); persistentState.put("query", this.query); persistentState.put("properties", this.properties); return persistentState; } protected FilterEntity copyFilter() { FilterEntity copy = new FilterEntity(getResourceType())...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\FilterEntity.java
1
请完成以下Java代码
public class UmsIntegrationConsumeSetting implements Serializable { private Long id; @ApiModelProperty(value = "每一元需要抵扣的积分数量") private Integer deductionPerAmount; @ApiModelProperty(value = "每笔订单最高抵用百分比") private Integer maxPercentPerOrder; @ApiModelProperty(value = "每次使用积分最小单位100") privat...
return couponStatus; } public void setCouponStatus(Integer couponStatus) { this.couponStatus = couponStatus; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Has...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsIntegrationConsumeSetting.java
1
请在Spring Boot框架中完成以下Java代码
public class CustomUserDetailsService implements UserDetailsService { private final PasswordEncoder passwordEncoder; private final Map<String, CustomUserDetails> userRegistry = new HashMap<>(); public CustomUserDetailsService(PasswordEncoder passwordEncoder) { this.passwordEncoder = passwordEncode...
.withEmail("james.davis@email.com") .withUsername("admin") .withPassword(passwordEncoder.encode("admin")) .withAuthorities(Collections.singletonList(new SimpleGrantedAuthority("ROLE_ADMIN"))) .build()); } @Override public UserDetails loadUserByUsername(String...
repos\tutorials-master\spring-security-modules\spring-security-web-thymeleaf\src\main\java\com\baeldung\customuserdetails\CustomUserDetailsService.java
2
请完成以下Java代码
public List<CorrelationHandlerResult> call() throws Exception { return correlationHandler.correlateMessages(commandContext, messageName, correlationSet); } }); // check authorization for (CorrelationHandlerResult correlationResult : correlationResults) { checkAuthorization(correlationRe...
for (MessageCorrelationResultImpl messageCorrelationResultImpl : results) { List<PropertyChange> propChanges = getGenericPropChangesForOperation(); ProcessInstance processInstance = messageCorrelationResultImpl.getProcessInstance(); if(processInstance != null) { propChanges.add(new PropertyCha...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\CorrelateAllMessageCmd.java
1
请完成以下Java代码
public I_M_ShipmentSchedule getM_ShipmentSchedule() throws RuntimeException { return (I_M_ShipmentSchedule)MTable.get(getCtx(), I_M_ShipmentSchedule.Table_Name) .getPO(getM_ShipmentSchedule_ID(), get_TrxName()); } @Override public int getM_ShipmentSchedule_ID() { Integer ii = (Integer)get_Value(COLUMNNAME...
public void setQty(BigDecimal Qty) { set_Value(COLUMNNAME_Qty, Qty); } /** * Get Menge. * * @return Menge */ public BigDecimal getQty() { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty); if (bd == null) return Env.ZERO; return bd; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\compiere\model\X_M_PackagingTreeItemSched.java
1
请完成以下Java代码
public class EchoClient { private static final Logger LOG = LoggerFactory.getLogger(EchoClient.class); private Socket clientSocket; private PrintWriter out; private BufferedReader in; public void startConnection(String ip, int port) { try { clientSocket = new Socket(ip, port);...
try { out.println(msg); return in.readLine(); } catch (Exception e) { return null; } } public void stopConnection() { try { in.close(); out.close(); clientSocket.close(); } catch (IOException e) { ...
repos\tutorials-master\core-java-modules\core-java-networking\src\main\java\com\baeldung\socket\EchoClient.java
1
请完成以下Java代码
protected void setLoopVariable(ActivityExecution execution, String variableName, Object value) { execution.setVariableLocal(variableName, value); } protected Integer getLoopVariable(ActivityExecution execution, String variableName) { IntegerValue value = execution.getVariableLocalTyped(variableName); e...
this.completionConditionExpression = completionConditionExpression; } public Expression getCollectionExpression() { return collectionExpression; } public void setCollectionExpression(Expression collectionExpression) { this.collectionExpression = collectionExpression; } public String getCollection...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\behavior\MultiInstanceActivityBehavior.java
1
请在Spring Boot框架中完成以下Java代码
public int getMaxInactiveIntervalSeconds() { return this.maxInactiveIntervalSeconds; } public void setMaxInactiveIntervalSeconds(int maxInactiveIntervalSeconds) { this.maxInactiveIntervalSeconds = maxInactiveIntervalSeconds; } public void setMaxInactiveInterval(Duration duration) { int maxInactiveIn...
public void setName(String name) { this.name = name; } } public static class SessionSerializerProperties { private String beanName; public String getBeanName() { return this.beanName; } public void setBeanName(String beanName) { this.beanName = beanName; } } }
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\SpringSessionProperties.java
2
请完成以下Java代码
private void init() { /* BOXES: * * boxV Header * ******** * boxH * * boxH * * * * * boxV1 * boxV2 * * * * * * * boxV1 dial1 * ******** * dial2 * * boxV2 HTML * ******** * ...
scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.getViewport().add(boxV1, BorderLayout.CENTER ); scrollPane.setMinimumSize(new Dimension(190, 180)); // RIGHT, HTML + Bars HtmlDashboard contentHtml = new HtmlDashboard("http:///local/home", m_goals, tru...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\adempiere\apps\graph\PAPanel.java
1
请在Spring Boot框架中完成以下Java代码
private de.metas.edi.esb.jaxb.metasfreshinhousev1.EDIExpCLocationType getEDIExpCLocationType(@NonNull final EDIExpCLocationType source) { final de.metas.edi.esb.jaxb.metasfreshinhousev1.EDIExpCLocationType target = DESADV_objectFactory.createEDIExpCLocationType(); target.setAddress1(source.getAddress1()); targe...
{ return null; } return sourceVersionAttr; } @Nullable private ReplicationTypeEnum getReplicationTypeAttr(@Nullable final de.metas.edi.esb.jaxb.metasfreshinhousev2.ReplicationTypeEnum replicationType) { return Optional.ofNullable(replicationType) .map(attr -> ReplicationTypeEnum.fromValue(attr.value...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\desadvexport\metasfreshinhousev1\MetasfreshInHouseV1XMLDesadvBean.java
2
请完成以下Java代码
public void paymentAuthorized(String transactionId, String authorizationId) { log.info("[I116] Payment authorized: transactionId={}, authorizationId={}", transactionId, authorizationId); Workflow.await(() -> payment != null); payment = new PaymentAuthorization( payment.info(), ...
shipping = shipping.toStatus(ShippingStatus.DELIVERED, pickupTime, "Package delivered"); } @Override public void packageReturned(Instant pickupTime) { shipping = shipping.toStatus(ShippingStatus.RETURNED, pickupTime, "Package returned"); } @Override public Order getOrder() { re...
repos\tutorials-master\saas-modules\temporal\src\main\java\com\baeldung\temporal\workflows\sboot\order\workflow\OrderWorkflowImpl.java
1
请完成以下Java代码
public DmnHistoricDecisionExecutionQuery orderByStartTime() { return orderBy(HistoricDecisionExecutionQueryProperty.START_TIME); } @Override public DmnHistoricDecisionExecutionQuery orderByEndTime() { return orderBy(HistoricDecisionExecutionQueryProperty.END_TIME); } @Override ...
return instanceId; } public String getExecutionId() { return executionId; } public String getActivityId() { return activityId; } public String getScopeType() { return scopeType; } public boolean isWithoutScopeType() { return withoutScopeType; }...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\HistoricDecisionExecutionQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public void afterStartUp() { jobStatsConsumer.subscribe(); jobStatsConsumer.launch(); } @SneakyThrows private void processStats(List<TbProtoQueueMsg<JobStatsMsg>> msgs, TbQueueConsumer<TbProtoQueueMsg<JobStatsMsg>> consumer) { Map<JobId, JobStats> stats = new HashMap<>(); f...
log.error("[{}][{}] Failed to process job stats: {}", tenantId, jobId, jobStats, e); } }); consumer.commit(); Thread.sleep(queueConfig.getStatsProcessingInterval()); } @PreDestroy private void destroy() { jobStatsConsumer.stop(); consumerExecutor.shutdow...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\job\JobStatsProcessor.java
2
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setC_Workplace_ExternalSystem_ID (final int C_Workplace_ExternalSystem_ID) { if (C_Workplace_ExternalSystem_ID < 1) set_ValueNoCheck (COLUMNNAME_C_Workplace_Ex...
return get_ValueAsInt(COLUMNNAME_C_Workplace_ID); } @Override public void setExternalSystem_ID (final int ExternalSystem_ID) { if (ExternalSystem_ID < 1) set_Value (COLUMNNAME_ExternalSystem_ID, null); else set_Value (COLUMNNAME_ExternalSystem_ID, ExternalSystem_ID); } @Override public int getExter...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Workplace_ExternalSystem.java
1
请完成以下Java代码
public final class GroovyMethodDeclaration implements Annotatable { private final AnnotationContainer annotations = new AnnotationContainer(); private final String name; private final String returnType; private final int modifiers; private final List<Parameter> parameters; private final CodeBlock code; pr...
return this; } /** * Sets the return type. * @param returnType the return type * @return this for method chaining */ public Builder returning(String returnType) { this.returnType = returnType; return this; } /** * Sets the parameters. * @param parameters the parameters * @return t...
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\groovy\GroovyMethodDeclaration.java
1
请完成以下Java代码
public String getTableName(Class<?> entityClass) { return commandExecutor.execute(new GetTableNameCmd(entityClass)); } @Override public TableMetaData getTableMetaData(String tableName) { return commandExecutor.execute(new GetTableMetaDataCmd(tableName, configuration.getEngineCfgKey())); ...
@Override public String databaseSchemaUpgrade(final Connection connection, final String catalog, final String schema) { CommandConfig config = commandExecutor.getDefaultConfig().transactionNotSupported(); return commandExecutor.execute(config, new Command<>() { @Override publ...
repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\IdmManagementServiceImpl.java
1
请完成以下Java代码
public void collectFinish() { Preconditions.checkState(allowCollecting, "allowCollecting shall be true"); allowCollecting = false; // // Update DocumentNo field flags for (final String fieldName : COLUMNNAMES_DocumentNos) { final DocumentFieldDescriptor.Builder field = collectedFields.get(fieldName); ...
final DocumentFieldDescriptor.Builder fieldDocStatus = collectedFields.get(WindowConstants.FIELDNAME_DocStatus); final DocumentFieldDescriptor.Builder fieldDocAction = collectedFields.get(WindowConstants.FIELDNAME_DocAction); if (fieldDocStatus == null || fieldDocAction == null) { return null; } fieldDocS...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\factory\standard\SpecialDocumentFieldsCollector.java
1
请完成以下Java代码
private DocumentSequenceInfo computeDocumentSequenceInfoByTableName(final String tableName, final int adClientId, final int adOrgId) { Check.assumeNotEmpty(tableName, DocumentNoBuilderException.class, "tableName not empty"); final IDocumentSequenceDAO documentSequenceDAO = Services.get(IDocumentSequenceDAO.class)...
@Override public IDocumentNoBuilder createValueBuilderFor(@NonNull final Object modelRecord) { final IClientOrgAware clientOrg = create(modelRecord, IClientOrgAware.class); final ClientId clientId = ClientId.ofRepoId(clientOrg.getAD_Client_ID()); final ProviderResult providerResult = getDocumentSequenceInfo(mo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\sequence\impl\DocumentNoBuilderFactory.java
1
请完成以下Java代码
public void put(@NonNull final IView view) { final StockDetailsView stockDetailsView = StockDetailsView.cast(view); views.put(view.getViewId(), stockDetailsView); } @Nullable @Override public StockDetailsView getByIdOrNull(final ViewId viewId) { return views.getIfPresent(viewId); } @Override public vo...
final HUStockInfoQueryBuilder query = HUStockInfoQuery.builder(); for (final DocumentFilter filter : filters.toList()) { final HUStockInfoSingleQueryBuilder singleQuery = HUStockInfoSingleQuery.builder(); final int productRepoId = filter.getParameterValueAsInt(I_M_HU_Stock_Detail_V.COLUMNNAME_M_Product_ID, -...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\stockdetails\StockDetailsViewFactory.java
1
请完成以下Java代码
protected boolean allChildExecutionsEnded( ExecutionEntity parentExecutionEntity, ExecutionEntity executionEntityToIgnore ) { for (ExecutionEntity childExecutionEntity : parentExecutionEntity.getExecutions()) { if ( executionEntityToIgnore == null || !executionEnt...
} } return true; } private void handleBoundaryEvent(FlowNode flowNode) { if (flowNode instanceof BoundaryEvent) { BoundaryEvent event = (BoundaryEvent) flowNode; final Activity activity = event.getAttachedToRef(); if (CollectionUtil.isNotEmpty(activit...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\agenda\TakeOutgoingSequenceFlowsOperation.java
1
请完成以下Java代码
public String getIcon() { return null; // no icon } @Override public boolean isAvailable() { return isGridMode(); } @Override public boolean isRunnable() { return isAvailable(); } @Override public void run() { final GridTab gridTab = getGridTab(); if (gridTab == null) { return; } fin...
final String m_columnName = getColumnName(); final Object m_value = getFieldValue(); final VEditor editor = getEditor(); final String columnDisplayName = gridField.getHeader(); final Object valueDisplay = editor == null ? m_value : editor.getDisplay(); final MQuery queryInitial = new MQuery(gridTab.getTableN...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\compiere\grid\ed\FilterContextEditorAction.java
1
请完成以下Java代码
protected Class<ApiUsageStateEntity> getEntityClass() { return ApiUsageStateEntity.class; } @Override protected JpaRepository<ApiUsageStateEntity, UUID> getRepository() { return apiUsageStateRepository; } @Override public ApiUsageState findTenantApiUsageState(UUID tenantId) { ...
} @Override public void deleteApiUsageStateByEntityId(EntityId entityId) { apiUsageStateRepository.deleteByEntityIdAndEntityType(entityId.getId(), entityId.getEntityType().name()); } @Override public PageData<ApiUsageState> findAllByTenantId(TenantId tenantId, PageLink pageLink) { ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\usagerecord\JpaApiUsageStateDao.java
1
请完成以下Java代码
public void setSeries(String series) { this.series = series; } public Double getValue() { return value; } public void setValue(Double value) { this.value = value; } public String getFootnotes() { return footnotes; } public void setFootnotes(String foot...
} public String getSource() { return source; } public void setSource(String source) { this.source = source; } @Override public String toString() { return "TouristData [region=" + region + ", country=" + country + ", year=" + year + ", series=" + series + ", value=" + v...
repos\tutorials-master\apache-spark\src\main\java\com\baeldung\differences\dataframe\dataset\rdd\TouristData.java
1
请完成以下Java代码
public QueueableForwardingEventBus queueEventsUntilTrxCommit(final String trxName) { // If no transaction, there is no point to create a queuing event bus, // but just use the original one. final ITrxManager trxManager = Services.get(ITrxManager.class); if (trxManager.isNull(trxName)) { flushAndStopQueuin...
if (queuedEvents.isEmpty()) { return Collections.emptyList(); } final List<Event> copy = new ArrayList<>(queuedEvents); queuedEvents.clear(); return copy; } /** * Post all queued events. */ public final void flush() { final List<Event> queuedEventsList = getQueuedEventsAndClear(); logger.debu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\QueueableForwardingEventBus.java
1
请在Spring Boot框架中完成以下Java代码
public void setManualProcessing(Boolean value) { this.manualProcessing = value; } /** * The free-text title of the document. * * @return * possible object is * {@link String } * */ public String getDocumentTitle() { return documentTitle; ...
* @param value * allowed object is * {@link String } * */ public void setLanguage(String value) { this.language = value; } /** * @Deprecated. Indicates whether prices in this document are provided in gross or in net. * * @return * possible o...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\DocumentType.java
2
请完成以下Java代码
public Optional<I_C_BPartner_Location> getFirstBPLocationMatching(@NonNull final Predicate<I_C_BPartner_Location> filter) { return getOrLoadBPLocations() .stream() .filter(filter) .findFirst(); } private ArrayList<I_C_BPartner_Location> getOrLoadBPLocations() { if (bpLocations == null) ...
{ contacts = new ArrayList<>(bpartnersRepo.retrieveContacts(record)); } else { contacts = new ArrayList<>(); } } return contacts; } public BPartnerContactId addAndSaveContact(final I_AD_User contact) { bpartnersRepo.save(contact); final BPartnerContactId contactId = BPartne...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\impexp\BPartnersCache.java
1
请完成以下Java代码
public POSTerminalPaymentProcessorConfig getPaymentProcessorConfigNotNull() { if (paymentProcessorConfig == null) { throw new AdempiereException("No payment processor configured"); } return paymentProcessorConfig; } public OrgId getOrgId() {return getShipFrom().getOrgId();} public PriceListId getPriceL...
throw new AdempiereException("Cash journal already open"); } return toBuilder() .cashJournalId(cashJournalId) .build(); } public POSTerminal closingCashJournal(@NonNull final Money cashEndingBalance) { cashEndingBalance.assertCurrencyId(currency.getId()); return toBuilder() .cashJournalId(null...
repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java\de\metas\pos\POSTerminal.java
1
请完成以下Java代码
public void update(int[] goldIndex, int[] predictIndex) { for (int i = 0; i < goldIndex.length; ++i) { if (goldIndex[i] == predictIndex[i]) continue; else // 预测与答案不一致 { parameter[goldIndex[i]]++; // 奖励正确的特征函数(将它的权值加一) ...
public void update(Instance instance) { int[] guessLabel = new int[instance.length()]; viterbiDecode(instance, guessLabel); TagSet tagSet = featureMap.tagSet; for (int i = 0; i < instance.length(); i++) { int[] featureVector = instance.getFeatureAt(i); ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\perceptron\model\StructuredPerceptron.java
1
请完成以下Java代码
public IStringExpression resolvePartial(final Evaluatee ctx) throws ExpressionEvaluationException { final List<Object> expressionChunksNew = new ArrayList<>(); try { StringBuilder lastConstantBuffer = null; boolean somethingChanged = false; // did we changed something (i.e. do we evaluated some context va...
// If there was no change, we return the same expression if (!somethingChanged) { return this; } // Check if our new expression will be constant if (!haveVariables) { assert expressionChunksNew.isEmpty() : "We assume there were no expression chunks collected so far: " + expressionChunksNew; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\impl\StringExpression.java
1
请在Spring Boot框架中完成以下Java代码
public class MainApplication { private final ShoppingCartService shoppingCartService; public MainApplication(ShoppingCartService shoppingCartService) { this.shoppingCartService = shoppingCartService; } public static void main(String[] args) { SpringApplication.run(MainApplication.clas...
System.out.println("\nAdd one book at the end of the current cart ..."); shoppingCartService.addToTheEnd(); System.out.println("\nAdd one book in the middle of the current cart ..."); shoppingCartService.addInTheMiddle(); System.out.println("\nRe...
repos\Hibernate-SpringBoot-master\HibernateSpringBootElementCollectionNoOrderColumn\src\main\java\com\bookstore\MainApplication.java
2
请完成以下Java代码
public String toString() { return invoiceCandidateId + ": " + "@NetAmtToInvoice@: " + netAmtToInvoice + ", @C_Tax_ID@: " + taxId; } /** * Compares this invoice candidate info (old version) object with given info (new version) and logs if there are any differences. * * @return <code>true</code> if the...
if (hasChanges) { Loggables.addLog(infoAfterChange.getC_Invoice_Candidate_ID() + ": " + changesInfo); } return !hasChanges; } public int getC_Invoice_Candidate_ID() { return invoiceCandidateId; } public BigDecimal getLineNetAmt() { return netAmtToInvoice; } public int getC_Tax_ID(...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceCandidatesChangesChecker.java
1
请完成以下Java代码
public void addExecutionListener(ExecutionListener executionListener) { if (executionListeners == null) { executionListeners = new ArrayList<>(); } executionListeners.add(executionListener); } @Override public String toString() { return "(" + source.getId() + ")-...
public void setExecutionListeners(List<ExecutionListener> executionListeners) { this.executionListeners = executionListeners; } public List<Integer> getWaypoints() { return waypoints; } public void setWaypoints(List<Integer> waypoints) { this.waypoints = waypoints; } @...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\pvm\process\TransitionImpl.java
1
请完成以下Java代码
class OIRowUserInputParts { public static final OIRowUserInputParts EMPTY = new OIRowUserInputParts(ImmutableMap.of()); private final ImmutableMap<DocumentId, OIRowUserInputPart> byRowId; private OIRowUserInputParts(@NonNull final ImmutableMap<DocumentId, OIRowUserInputPart> byRowId) { this.byRowId = byRowId; }...
? new OIRowUserInputParts(byRowId) : EMPTY; } public Set<FactAcctId> getFactAcctIds() { return byRowId.values() .stream() .map(OIRowUserInputPart::getFactAcctId) .collect(Collectors.toSet()); } public OIRow applyToRow(@NonNull final OIRow row) { final OIRowUserInputPart userInput = byRowId.g...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.webui\src\main\java\de\metas\acct\gljournal_sap\select_open_items\OIRowUserInputParts.java
1
请完成以下Java代码
public String getName() { return this.name; } public String getImage() { return this.image; } public String getImageTag() { return this.imageTag; } public String getImageWebsite() { return this.imageWebsite; } public Map<String, String> getEnvironment() { return this.environment; } public Set<I...
public Builder image(String image) { this.image = image; return this; } public Builder imageTag(String imageTag) { this.imageTag = imageTag; return this; } public Builder imageWebsite(String imageWebsite) { this.imageWebsite = imageWebsite; return this; } public Builder environment(Stri...
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\container\docker\compose\ComposeService.java
1
请在Spring Boot框架中完成以下Java代码
public void setBPartnerValue (final @Nullable java.lang.String BPartnerValue) { set_Value (COLUMNNAME_BPartnerValue, BPartnerValue); } @Override public java.lang.String getBPartnerValue() { return get_ValueAsString(COLUMNNAME_BPartnerValue); } @Override public void setC_BPartner_Customer_ID (final int C_...
public void setReference (final @Nullable java.lang.String Reference) { set_Value (COLUMNNAME_Reference, Reference); } @Override public java.lang.String getReference() { return get_ValueAsString(COLUMNNAME_Reference); } @Override public void setSerialNo (final @Nullable java.lang.String SerialNo) { se...
repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java-gen\de\metas\servicerepair\repository\model\X_ServiceRepair_Old_Shipped_HU.java
2
请完成以下Java代码
public Segment enableAllNamedEntityRecognize(boolean enable) { config.nameRecognize = enable; config.japaneseNameRecognize = enable; config.translatedNameRecognize = enable; config.placeRecognize = enable; config.organizationRecognize = enable; config.updateNerConfig(...
public Segment enableMultithreading(boolean enable) { if (enable) config.threadNumber = Runtime.getRuntime().availableProcessors(); else config.threadNumber = 1; return this; } /** * 开启多线程 * * @param threadNumber 线程数量 * @return */ public Segment enableMu...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\Segment.java
1
请完成以下Spring Boot application配置
# MySQL and JDBC spring.datasource.url = jdbc:mysql://localhost:3306/management?useSSL=false spring.datasource.username = root spring.datasource.password = posilka2020 ## Hibernate Properties # The SQL dialect makes Hibernate generate better SQL for the chosen database spring.jpa.properties.hibernate.dialect = org.hi...
the schema. #create: creates the schema, destroying previous data. #create-drop: drop the schema when the SessionFactory is closed explicitly, typically when the application is stopped. #none: does nothing with the schema, makes no changes to the database
repos\SpringBoot-Projects-FullStack-master\Part-4 Spring Boot REST API\SpringJerseySimple\src\main\resources\application.properties
2
请完成以下Java代码
public void detachState() { jobEntity.setExecution(null); for (MigratingInstance dependentInstance : migratingDependentInstances) { dependentInstance.detachState(); } } public void attachState(MigratingScopeInstance newOwningInstance) { attachTo(newOwningInstance.resolveRepresentativeExecuti...
// update process definition reference ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity) targetScope.getProcessDefinition(); jobEntity.setProcessDefinitionId(processDefinition.getId()); jobEntity.setProcessDefinitionKey(processDefinition.getKey()); // update deployment reference ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingJobInstance.java
1
请完成以下Java代码
public String getExternalTaskId() { return externalTaskId; } public String getWorkerId() { return workerId; } public Date getLockExpirationBefore() { return lockExpirationBefore; } public Date getLockExpirationAfter() { return lockExpirationAfter; } public String getTopicName() { ...
public String getActivityId() { return activityId; } public SuspensionState getSuspensionState() { return suspensionState; } public Boolean getRetriesLeft() { return retriesLeft; } public Date getNow() { return ClockUtil.getCurrentTime(); } protected void ensureVariablesInitialized()...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ExternalTaskQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class PutConfirmationToMetasfreshRequest extends RequestToMetasfresh { public static PutConfirmationToMetasfreshRequest of(@NonNull final List<SyncConfirmation> syncConfirmations) { return PutConfirmationToMetasfreshRequest.builder().syncConfirmations(syncConfirmations).build(); } String eventId; List<Sy...
{ return syncConfirmations.isEmpty(); } @JsonIgnore public void add(SyncConfirmation syncConfirmation) { syncConfirmations.add(syncConfirmation); } @JsonIgnore public void clear() { syncConfirmations.clear(); } }
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-procurement\src\main\java\de\metas\common\procurement\sync\protocol\request_to_metasfresh\PutConfirmationToMetasfreshRequest.java
2
请在Spring Boot框架中完成以下Java代码
public class DomesticAmountType { @XmlValue protected String content; @XmlAttribute(name = "Currency", namespace = "http://erpel.at/schemas/1p0/documents") protected CurrencyType currency; /** * Gets the value of the content property. * * @return * possible object is ...
*/ public CurrencyType getCurrency() { return currency; } /** * Sets the value of the currency property. * * @param value * allowed object is * {@link CurrencyType } * */ public void setCurrency(CurrencyType value) { this.currency = value...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\DomesticAmountType.java
2
请在Spring Boot框架中完成以下Java代码
public class GetAuth { @XmlElement(required = true) protected String delisId; @XmlElement(required = true) protected String password; @XmlElement(required = true) protected String messageLanguage; /** * Gets the value of the delisId property. * * @return * possible...
/** * Sets the value of the password property. * * @param value * allowed object is * {@link String } * */ public void setPassword(String value) { this.password = value; } /** * Gets the value of the messageLanguage property. * * @ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\ws\loginservice\v2_0\types\GetAuth.java
2
请在Spring Boot框架中完成以下Java代码
public ImmutableSet<ServiceRepairProjectTaskId> retainIdsOfType( @NonNull final ImmutableSet<ServiceRepairProjectTaskId> taskIds, @NonNull final ServiceRepairProjectTaskType type) { if (taskIds.isEmpty()) { return ImmutableSet.of(); } final List<Integer> eligibleRepoIds = queryBL.createQueryBuilder(I...
} public Optional<ServiceRepairProjectTaskId> getTaskIdByRepairOrderId( @NonNull final ProjectId projectId, @NonNull final PPOrderId repairOrderId) { return queryBL.createQueryBuilder(I_C_Project_Repair_Task.class) .addEqualsFilter(I_C_Project_Repair_Task.COLUMNNAME_Type, ServiceRepairProjectTaskType.REP...
repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\project\repository\ServiceRepairProjectTaskRepository.java
2
请完成以下Java代码
public int getPeriodNo () { Integer ii = (Integer)get_Value(COLUMNNAME_PeriodNo); if (ii == null) return 0; return ii.intValue(); } /** PeriodType AD_Reference_ID=115 */ public static final int PERIODTYPE_AD_Reference_ID=115; /** Standard Calendar Period = S */ public static final String PERIODTYPE_St...
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Start Date. @param StartDate First effective day (inclusive) */ public void setStartDate (Timestamp StartDate) { set_Value (COLUMNNAME_StartDate, StartDate); } /** Get Start D...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Period.java
1
请完成以下Java代码
public PlanItemInstanceEntityBuilder silentNameExpressionEvaluation(boolean silentNameExpressionEvaluation) { this.silentNameExpressionEvaluation = silentNameExpressionEvaluation; return this; } @Override public PlanItemInstanceEntity create() { validateData(); return planIte...
return tenantId; } public Map<String, Object> getLocalVariables() { return localVariables; } public boolean hasLocalVariables() { return localVariables != null && localVariables.size() > 0; } public boolean isAddToParent() { return addToParent; } public boolean is...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\PlanItemInstanceEntityBuilderImpl.java
1
请完成以下Java代码
public JsonFinishGoodsReceiveQRCodesGenerateResponse generateFinishGoodsReceiveQRCodes(@NonNull final JsonFinishGoodsReceiveQRCodesGenerateRequest request) { final ManufacturingJob manufacturingJob = getManufacturingJob(getWFProcessById(request.getWfProcessId())); final FinishedGoodsReceiveLine finishedGoodsReceiv...
return attributes.getAttributeValueType(attributeCode) .map(new AttributeValueType.CaseMapper<HUQRCodeGenerateRequest.Attribute>() { @Override public HUQRCodeGenerateRequest.Attribute string() { return resultBuilder.valueString(attributes.getValueAsString(attributeCode)).build(); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\workflows_api\ManufacturingMobileApplication.java
1
请完成以下Java代码
public void setIsWholeTax (final boolean IsWholeTax) { set_Value (COLUMNNAME_IsWholeTax, IsWholeTax); } @Override public boolean isWholeTax() { return get_ValueAsBoolean(COLUMNNAME_IsWholeTax); } @Override public void setProcessed (final boolean Processed) { set_Value (COLUMNNAME_Processed, Processed)...
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_TaxAmt); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setTaxBaseAmt (final BigDecimal TaxBaseAmt) { set_ValueNoCheck (COLUMNNAME_TaxBaseAmt, TaxBaseAmt); } @Override public BigDecimal getTaxBaseAmt() { final BigDecimal bd = get...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_InvoiceTax.java
1
请在Spring Boot框架中完成以下Java代码
public List<MediaType> getStreamingMediaTypes() { return streamingMediaTypes; } public void setStreamingMediaTypes(List<MediaType> streamingMediaTypes) { this.streamingMediaTypes = streamingMediaTypes; } public boolean isUseFrameworkRetryFilter() { return useFrameworkRetryFilter; } public void setUseFram...
} public @Nullable String getTrustedProxies() { return trustedProxies; } public void setTrustedProxies(String trustedProxies) { this.trustedProxies = trustedProxies; } @Override public String toString() { return new ToStringCreator(this).append("routes", routes) .append("routesMap", routesMap) .app...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\config\GatewayMvcProperties.java
2
请完成以下Java代码
public String getText() { return text; } public void setText(String text) { this.text = text; } public boolean getDone() { return done; } public Date getCreatedOn() { return createdOn; } public Date getCompletedOn() { return completedOn; } ...
public void setCompletedOn(Date completedOn) { this.completedOn = completedOn; } public long doneSince() { return done ? Duration .between(createdOn.toInstant(), completedOn.toInstant()) .toMinutes() : 0; } public Function<Object, Object> handleDone() { retu...
repos\tutorials-master\mustache\src\main\java\com\baeldung\mustache\model\Todo.java
1
请完成以下Java代码
public void setValue (double value) { m_value = value; if (m_label != null) m_labelValue = s_format.format(m_value) + " - " + m_label; else m_labelValue = s_format.format(m_value); } // setValue /** * @return Returns the column width in pixels. */ public double getColWidth () { return m_width; ...
MQuery query = null; if (getAchievement() != null) // Single Achievement { MAchievement a = getAchievement(); query = MQuery.getEqualQuery("PA_Measure_ID", a.getPA_Measure_ID()); } else if (getGoal() != null) // Multiple Achievements { MGoal goal = getGoal(); query = MQuery.getEqualQuery("PA_Meas...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\adempiere\apps\graph\GraphColumn.java
1
请完成以下Java代码
public class EvenOdd { static boolean isEven(int x) { return x % 2 == 0; } static boolean isOdd(int x) { return x % 2 != 0; } static boolean isOrEven(int x) { return (x | 1) > x; } static boolean isOrOdd(int x) { return (x | 1) == x; } static bool...
static boolean isXorOdd(int x) { return (x ^ 1) < x; } static boolean isLsbEven(int x) { return Integer.toBinaryString(x) .endsWith("0"); } static boolean isLsbOdd(int x) { return Integer.toBinaryString(x) .endsWith("1"); } }
repos\tutorials-master\core-java-modules\core-java-numbers-5\src\main\java\com\baeldung\evenodd\EvenOdd.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isAll() { return all; } public void setAll(boolean all) { this.all = all; } /** * 判断是否有相同字段 * * @param fieldControlString * @return */ public boolean isAllFieldsValid(String fieldControlString) { //如果白名单中没有配置字段,则返回false String...
} return true; } @Override public String toString() { return "QueryTable{" + "name='" + name + '\'' + ", alias='" + alias + '\'' + ", fields=" + fields + ", all=" + all + '}'; } }
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\config\firewall\SqlInjection\SysDictTableWhite.java
2
请完成以下Java代码
public void start() { createTestData(true); } void createTestData(boolean dropTable) { log.info("Creating tables for testing...1"); if (dropTable) { jdbcTemplate.execute("DROP TABLE BOOKS"); } jdbcTemplate.execute(SQL_CREATE_TABLE); List<Book> boo...
new Book("Thinking in Java", new BigDecimal("46.32")), new Book("Mkyong in Java", new BigDecimal("1.99")), new Book("Getting Clojure", new BigDecimal("37.3")), new Book("Head First Android Development", new BigDecimal("41.19")) ); log.info("[SAVE]"); ...
repos\spring-boot-master\spring-jdbc\src\main\java\com\mkyong\sp\TestData.java
1
请完成以下Java代码
public void deleteJob(QuartzJob quartzJob){ try { JobKey jobKey = JobKey.jobKey(JOB_NAME + quartzJob.getId()); scheduler.pauseJob(jobKey); scheduler.deleteJob(jobKey); } catch (Exception e){ log.error("删除定时任务失败", e); throw new BadRequestExcepti...
scheduler.triggerJob(jobKey,dataMap); } catch (Exception e){ log.error("定时任务执行失败", e); throw new BadRequestException("定时任务执行失败"); } } /** * 暂停一个job * @param quartzJob / */ public void pauseJob(QuartzJob quartzJob){ try { JobKey jobK...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\quartz\utils\QuartzManage.java
1
请完成以下Java代码
public String getFirstName() { return firstName; } /** * Sets the value of the firstName property. * * @param value * allowed object is * {@link String } * */ public void setFirstName(String value) { this.firstName = value; }
/** * Gets the value of the id property. * */ public int getId() { return id; } /** * Sets the value of the id property. * */ public void setId(int value) { this.id = value; } }
repos\tutorials-master\web-modules\jee-7\src\main\java\com\baeldung\jaxws\client\Employee.java
1
请在Spring Boot框架中完成以下Java代码
public CommonResult update(@PathVariable Long id, @RequestBody UmsAdmin admin) { int count = adminService.update(id, admin); if (count > 0) { return CommonResult.success(count); } return CommonResult.failed(); } @ApiOperation("修改指定用户密码") @RequestMapping(value = "...
@ApiOperation("修改帐号状态") @RequestMapping(value = "/updateStatus/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult updateStatus(@PathVariable Long id,@RequestParam(value = "status") Integer status) { UmsAdmin umsAdmin = new UmsAdmin(); umsAdmin.setStatus(status); in...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\controller\UmsAdminController.java
2
请完成以下Java代码
public void operationComplete(ChannelFuture future) throws Exception { // 连接失败 if (!future.isSuccess()) { logger.error("[start][Netty Client 连接服务器({}:{}) 失败]", serverHost, serverPort); reconnect(); return; } ...
public void shutdown() { // 关闭 Netty Client if (channel != null) { channel.close(); } // 优雅关闭一个 EventLoopGroup 对象 eventGroup.shutdownGracefully(); } /** * 发送消息 * * @param invocation 消息体 */ public void send(Invocation invocation) { ...
repos\SpringBoot-Labs-master\lab-67\lab-67-netty-demo\lab-67-netty-demo-client\src\main\java\cn\iocoder\springboot\lab67\nettyclientdemo\client\NettyClient.java
1
请在Spring Boot框架中完成以下Java代码
protected ListenableFuture<Void> processRelationMsg(TenantId tenantId, RelationUpdateMsg relationUpdateMsg) { log.trace("[{}] processRelationMsg [{}]", tenantId, relationUpdateMsg); try { EntityRelation entityRelation = JacksonUtil.fromString(relationUpdateMsg.getEntity(), EntityRelation.cla...
break; case ENTITY_DELETED_RPC_MESSAGE: edgeCtx.getRelationService().deleteRelation(tenantId, entityRelation); break; case UNRECOGNIZED: default: return handleUnsupportedMsgType(relationUpdateMsg.getMsgType()); ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\edge\rpc\processor\relation\BaseRelationProcessor.java
2
请在Spring Boot框架中完成以下Java代码
public String getLINENUMBER() { return linenumber; } /** * Sets the value of the linenumber property. * * @param value * allowed object is * {@link String } * */ public void setLINENUMBER(String value) { this.linenumber = value; } /*...
* */ public String getREFERENCEDATE1() { return referencedate1; } /** * Sets the value of the referencedate1 property. * * @param value * allowed object is * {@link String } * */ public void setREFERENCEDATE1(String value) { thi...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\DREFE1.java
2
请完成以下Java代码
public class ApplicationEnvironmentPreparedEvent extends SpringApplicationEvent { private final ConfigurableBootstrapContext bootstrapContext; private final ConfigurableEnvironment environment; /** * Create a new {@link ApplicationEnvironmentPreparedEvent} instance. * @param bootstrapContext the bootstrap con...
* Return the bootstrap context. * @return the bootstrap context * @since 2.4.0 */ public ConfigurableBootstrapContext getBootstrapContext() { return this.bootstrapContext; } /** * Return the environment. * @return the environment */ public ConfigurableEnvironment getEnvironment() { return this.envi...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\event\ApplicationEnvironmentPreparedEvent.java
1
请完成以下Java代码
public void executeModification(ModificationDto modificationExecutionDto) { try { createModificationBuilder(modificationExecutionDto).execute(); } catch (BadUserRequestException e) { throw new InvalidRequestException(Status.BAD_REQUEST, e.getMessage()); } } @Override public BatchDto ...
ProcessInstanceQuery processInstanceQuery = processInstanceQueryDto.toQuery(getProcessEngine()); builder.processInstanceQuery(processInstanceQuery); } HistoricProcessInstanceQueryDto historicProcessInstanceQueryDto = dto.getHistoricProcessInstanceQuery(); if(historicProcessInstanceQueryDto != null) {...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\ModificationRestServiceImpl.java
1
请在Spring Boot框架中完成以下Java代码
protected Mono<Void> updateStatus(InstanceId instanceId) { return this.statusUpdater.timeout(this.intervalCheck.getInterval()) .updateStatus(instanceId) .onErrorResume((e) -> { log.warn("Unexpected error while updating status for {}", instanceId, e); return Mono.empty(); }) .doFinally((s) -> this....
@Override public void stop() { super.stop(); this.intervalCheck.stop(); } public void setInterval(Duration updateInterval) { this.intervalCheck.setInterval(updateInterval); } public void setLifetime(Duration statusLifetime) { this.intervalCheck.setMinRetention(statusLifetime); } }
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\services\StatusUpdateTrigger.java
2
请完成以下Java代码
class LUTUConfigAsPackingInfo implements IHUPackingInfo { private final I_M_HU_LUTU_Configuration lutuConfig; LUTUConfigAsPackingInfo(@NonNull final I_M_HU_LUTU_Configuration lutuConfig) { this.lutuConfig = lutuConfig; } @Override public String toString() { return MoreObjects.toStringHelper(this).addValue(...
public BigDecimal getQtyTUsPerLU() { return lutuConfig.getQtyTU(); } @Override public boolean isInfiniteQtyCUsPerTU() { return lutuConfig.isInfiniteQtyCU(); } @Override public BigDecimal getQtyCUsPerTU() { return lutuConfig.getQtyCUsPerTU(); } @Override public I_C_UOM getQtyCUsPerTU_UOM() { retu...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\util\LUTUConfigAsPackingInfo.java
1
请完成以下Java代码
public void enqueue(@NonNull final Collection<ModelToIndexEnqueueRequest> requests) { if (!requests.isEmpty()) { getRequestsCollector().addRequests(requests); } } private RequestsCollector getRequestsCollector() { return trxManager.getThreadInheritedTrx(OnTrxMissingPolicy.Fail) // at this point we alway...
private final ArrayList<ModelToIndexEnqueueRequest> requests = new ArrayList<>(); public synchronized void addRequests(@NonNull final Collection<ModelToIndexEnqueueRequest> requests) { assertNotProcessed(); this.requests.addAll(requests); } private void assertNotProcessed() { if (processed) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java\de\metas\fulltextsearch\indexer\queue\ModelsToIndexQueueService.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setC_BP_BankAccount_ID (final int C_BP_BankAccount_ID) { if (C_BP_BankAccount_ID < 1) set_Value (COLUMNNAME_C_BP_BankAccount_ID, null); else set_Value (C...
@Override public int getESR_PostFinanceUserNumber_ID() { return get_ValueAsInt(COLUMNNAME_ESR_PostFinanceUserNumber_ID); } @Override public void setESR_RenderedAccountNo (final java.lang.String ESR_RenderedAccountNo) { set_Value (COLUMNNAME_ESR_RenderedAccountNo, ESR_RenderedAccountNo); } @Override publ...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-gen\de\metas\payment\esr\model\X_ESR_PostFinanceUserNumber.java
1
请完成以下Java代码
public String getCamundaFollowUpDate() { return camundaFollowUpDateAttribute.getValue(this); } public void setCamundaFollowUpDate(String camundaFollowUpDate) { camundaFollowUpDateAttribute.setValue(this, camundaFollowUpDate); } public String getCamundaFormKey() { return camundaFormKeyAttribute.get...
camundaFollowUpDateAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_FOLLOW_UP_DATE) .namespace(CAMUNDA_NS) .build(); camundaFormKeyAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_FORM_KEY) .namespace(CAMUNDA_NS) .build(); camundaPriorityAttribute = typeBuilder.string...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\HumanTaskImpl.java
1
请完成以下Java代码
public void setDescription (final @Nullable java.lang.String Description) { set_Value (COLUMNNAME_Description, Description); } @Override public java.lang.String getDescription() { return get_ValueAsString(COLUMNNAME_Description); } @Override public void setM_Product_ID (final int M_Product_ID) { if (M...
public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } @Override public void setPP_Product_BOMVersions_ID (final int PP_Product_BOMVersions_ID) { if (PP_Product_BOMVersions_ID < 1) set_ValueNoCheck (COLUMNNAME_PP_Product_BOMVersions_ID, null); else set_ValueNoCheck (COLUMN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Product_BOMVersions.java
1
请在Spring Boot框架中完成以下Java代码
public Object execute(CommandContext commandContext) { TimerJobEntity jobToDelete = getJobToDelete(commandContext); sendCancelEvent(commandContext, jobToDelete); jobServiceConfiguration.getTimerJobEntityManager().delete(jobToDelete); return null; } protected void sendCancelEve...
} TimerJobEntity job = jobServiceConfiguration.getTimerJobEntityManager().findById(timerJobId); if (job == null) { throw new FlowableObjectNotFoundException("No timer job found with id '" + timerJobId + "'", Job.class); } // We need to check if the job was locked, ie acquir...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\cmd\DeleteTimerJobCmd.java
2
请完成以下Java代码
private OIViewData getViewData(final @NonNull CreateViewRequest request) { final SAPGLJournalId sapglJournalId = extractSAPGLJournalId(request); final DocumentFilter effectiveFilter = getEffectiveFilter(request); final OIRowUserInputParts initialUserInput = extractInitialUserInput(request); return viewDataServ...
@Nullable private DocumentFilter getEffectiveFilter(final @NonNull CreateViewRequest request) { return request.getFiltersUnwrapped(getFilterDescriptor()) .getFilterById(OIViewFilterHelper.FILTER_ID) .orElse(null); } private DocumentFilterDescriptor getFilterDescriptor() { DocumentFilterDescriptor filt...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.webui\src\main\java\de\metas\acct\gljournal_sap\select_open_items\OIViewFactory.java
1
请在Spring Boot框架中完成以下Java代码
public class EmailGenerator { private static final String AT_APPLE_COM = "@apple.com"; private static final String AT_COMCAST_NET = "@comcast.net"; private static final String AT_GMAIL_COM = "@gmail.com"; private static final String AT_HOME_ORG = "@home.org"; private static final String AT_MICROSOFT_COM = "@micro...
private static final Random index = new Random(System.currentTimeMillis()); public static String generate(String name, String email) { Assert.hasText(name, "Name is required"); if (!StringUtils.hasText(email)) { name = name.toLowerCase(); name = StringUtils.trimAllWhitespace(name); email = String.form...
repos\spring-boot-data-geode-main\spring-geode-samples\caching\near\src\main\java\example\app\caching\near\client\service\support\EmailGenerator.java
2
请完成以下Java代码
private Optional<PostalId> findPostalId( @Nullable final String postal, @NonNull final CountryId countryId, final int regionId, @Nullable final String city) { final String postalNorm = StringUtils.trimBlankToNull(postal); if (postalNorm == null) { return Optional.empty(); } final IQueryBuilde...
.addInArrayFilter(I_C_Location.COLUMNNAME_C_Location_ID, locationIds) .addEqualsFilter(I_C_Location.COLUMNNAME_GeocodingStatus, X_C_Location.GEOCODINGSTATUS_Resolved) .create() .listColumns(I_C_Location.COLUMNNAME_C_Location_ID, I_C_Location.COLUMNNAME_Latitude, I_C_Location.COLUMNNAME_Longitude) .strea...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\location\impl\LocationDAO.java
1
请完成以下Java代码
public List<IdentityLinkEntity> findIdentityLinksByProcessInstanceId(String processInstanceId) { return getList( "selectIdentityLinksByProcessInstance", processInstanceId, identityLinkByProcessInstanceMatcher, true ); } @Override @SuppressWarn...
String processInstanceId, String userId, String groupId, String type ) { Map<String, String> parameters = new HashMap<String, String>(); parameters.put("processInstanceId", processInstanceId); parameters.put("userId", userId); parameters.put("groupId", groupId...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\data\impl\MybatisIdentityLinkDataManager.java
1
请在Spring Boot框架中完成以下Java代码
public void setCaseDefinitionDescription(String caseDefinitionDescription) { this.caseDefinitionDescription = caseDefinitionDescription; } @ApiModelProperty(example = "123") public String getParentId() { return parentId; } public void setParentId(String parentId) { this...
} public List<RestVariable> getVariables() { return variables; } public void setVariables(List<RestVariable> variables) { this.variables = variables; } public void addVariable(RestVariable variable) { variables.add(variable); } public void setTenantId(String tenan...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\caze\CaseInstanceResponse.java
2
请完成以下Java代码
public int getDoc_User_ID(final DocumentTableFields docFields) { return extractRecord(docFields).getCreatedBy(); } @Override public LocalDate getDocumentDate(final DocumentTableFields docFields) { final I_M_CostRevaluation record = extractRecord(docFields); return TimeUtil.asLocalDate(record.getDateAcct(), ...
} final CostRevaluationId costRevaluationId = CostRevaluationId.ofRepoId(costRevaluation.getM_CostRevaluation_ID()); if (!costRevaluationService.hasActiveLines(costRevaluationId)) { throw new AdempiereException("@NoLines@"); } // Make sure all lines are evaluated costRevaluationService.createDetails(co...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costrevaluation\CostRevaluationDocumentHandler.java
1
请完成以下Java代码
public class X_WEBUI_Dashboard extends org.compiere.model.PO implements I_WEBUI_Dashboard, org.compiere.model.I_Persistent { private static final long serialVersionUID = 290974613L; /** Standard Constructor */ public X_WEBUI_Dashboard (final Properties ctx, final int WEBUI_Dashboard_ID, @Nullable final Stri...
{ set_Value (COLUMNNAME_IsDefault, IsDefault); } @Override public boolean isDefault() { return get_ValueAsBoolean(COLUMNNAME_IsDefault); } @Override public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java-gen\de\metas\ui\web\base\model\X_WEBUI_Dashboard.java
1
请完成以下Java代码
public String getLetter() { return letter; } public void setLetter(String letter) { this.letter = letter; } public int getTextSize() { return textSize; } public void setTextSize(int textSize) { this.textSize = textSize; ...
@JsonProperty("ResponseResult") private ResponseResult responseResult; public Fonts getFonts() { return fonts; } public void setFonts(Fonts fonts) { this.fonts = fonts; } public Background getBackground() { return background; } public void setBackground(Backgr...
repos\tutorials-master\libraries-files\src\main\java\com\baeldung\ini\MyConfiguration.java
1
请完成以下Java代码
public static boolean shouldSkipFlowElement(String skipExpressionString, String activityId, DelegateExecution execution, CommandContext commandContext) { ExpressionManager expressionManager = CommandContextUtil.getProcessEngineConfiguration(commandContext).getExpressionManager(); Expression skipExpressi...
} protected static String resolveActiveSkipExpression(String skipExpression, String activityId, String processDefinitionId, CommandContext commandContext) { ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext); Str...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\helper\SkipExpressionUtil.java
1
请在Spring Boot框架中完成以下Java代码
public List<String> getBaseDn() { return this.baseDn; } public void setBaseDn(List<String> baseDn) { this.baseDn = baseDn; } public String getLdif() { return this.ldif; } public void setLdif(String ldif) { this.ldif = ldif; } public Validation getValidation() { return this.validation; } public ...
public void setPassword(@Nullable String password) { this.password = password; } boolean isAvailable() { return StringUtils.hasText(this.username) && StringUtils.hasText(this.password); } } public static class Validation { /** * Whether to enable LDAP schema validation. */ private boolean en...
repos\spring-boot-4.0.1\module\spring-boot-ldap\src\main\java\org\springframework\boot\ldap\autoconfigure\embedded\EmbeddedLdapProperties.java
2
请完成以下Java代码
public class InputStreamSource implements StreamSource { // This class is used for bpmn parsing. // The bpmn parsers needs to go over the stream at least twice: // Once for the schema validation and once for the parsing itself. // So we keep the content of the inputstream in memory so we can // re-...
public byte[] getBytesFromInputStream(InputStream inStream) throws IOException { long length = inStream.available(); byte[] bytes = new byte[(int) length]; int offset = 0; int numRead = 0; while (offset < bytes.length && (numRead = inStream.read(bytes, offset, bytes.length - off...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\util\io\InputStreamSource.java
1
请在Spring Boot框架中完成以下Java代码
public class RestIdentityLink { private String url; private String user; private String group; private String type; @ApiModelProperty(example = "") public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } @ApiModelProperty(exam...
this.user = user; } @ApiModelProperty(example = "sales") public String getGroup() { return group; } public void setGroup(String group) { this.group = group; } @ApiModelProperty(example ="candidate") public String getType() { return type; } public void ...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\engine\RestIdentityLink.java
2
请完成以下Java代码
public List<I_AD_Column> retrieveColumns(final int elementId) { return Services.get(IQueryBL.class).createQueryBuilder(I_AD_Column.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_AD_Column.COLUMN_AD_Element_ID, elementId) .orderBy().addColumn(I_AD_Column.COLUMNNAME_ColumnName).endOrderBy() .c...
final TableDDLSyncService syncService = SpringContextHolder.instance.getBean(TableDDLSyncService.class); syncService.syncToDatabase(AdColumnId.ofRepoId(elementIdColumn.getAD_Column_ID())); } @Override public I_AD_Element getById(final int elementId) { return loadOutOfTrx(elementId, I_AD_Element.class); } @O...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\element\api\impl\ADElementDAO.java
1
请完成以下Java代码
class FutureClearingAmountMap { public static final FutureClearingAmountMap EMPTY = new FutureClearingAmountMap(ImmutableList.of()); private final ImmutableMap<FAOpenItemKey, FutureClearingAmount> byKey; private FutureClearingAmountMap(final List<FutureClearingAmount> list) { this.byKey = list.stream() .coll...
{ return null; } if (!openItemTrxInfo.isClearing()) { return null; } final Amount amount = sapGLJournalLine.getAmount() .negateIf(sapGLJournalLine.getPostingSign().isCredit()) .toAmount(currencyCodeConverter::getCurrencyCodeByCurrencyId); return FutureClearingAmount.builder() .key(openIt...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.webui\src\main\java\de\metas\acct\gljournal_sap\select_open_items\FutureClearingAmountMap.java
1
请完成以下Java代码
private String getTrxName() { return _trxName; } @Override public InvoiceCandBLCreateInvoices setIgnoreInvoiceSchedule(final boolean ignoreInvoiceSchedule) { this._ignoreInvoiceSchedule = ignoreInvoiceSchedule; return this; } private boolean isIgnoreInvoiceSchedule() { if (_ignoreInvoiceSchedule != nu...
if (_collector == null) { // note that we don't want to store the actual invoices in the result if there is a change to encounter memory problems _collector = invoiceCandBL.createInvoiceGenerateResult(_invoicingParams != null && _invoicingParams.isStoreInvoicesInResult()); } return _collector; } @Overrid...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceCandBLCreateInvoices.java
1
请在Spring Boot框架中完成以下Java代码
private Optional<BigDecimal> asBigDecimal(@Nullable final MonetaryAmountType monetaryAmountType) { if (monetaryAmountType == null) { return Optional.empty(); } return Optional.of(monetaryAmountType.getAmount()); } @VisibleForTesting Optional<BigDecimal> getServiceFeeVATRate(@NonNull final REMADVListLin...
.map(TaxType::getVAT) .filter(Objects::nonNull) .map(VATType::getItem) .flatMap(List::stream) .map(ItemType::getTaxRate) .collect(ImmutableSet.toImmutableSet()); if (vatTaxRateSet.size() > 1) { throw new RuntimeException("Multiple vatTax rates found on the line! TaxRates: " + vatTaxRateSet);...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\remadvimport\ecosio\JsonRemittanceAdviceLineProducer.java
2
请完成以下Java代码
public void addActualAllocation(BigDecimal add) { m_actualAllocation = m_actualAllocation.add(add); } // addActualAllocation /** * Is Actual Allocation equals Total * @return true if act allocation = total */ public boolean isActualAllocationEqTotal() { return m_actualAllocation.compareTo(getTotalQty()...
/************************************************************************** * Get Product * @return product */ public MProduct getProduct() { if (m_product == null) m_product = MProduct.get(getCtx(), getM_Product_ID()); return m_product; } // getProduct /** * Get Product Standard Precision * @r...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MDistributionRunLine.java
1
请完成以下Java代码
public class SmsCode { private String code; private LocalDateTime expireTime; public SmsCode(String code, int expireIn) { this.code = code; this.expireTime = LocalDateTime.now().plusSeconds(expireIn); } public SmsCode(String code, LocalDateTime expireTime) { this.code = c...
public String getCode() { return code; } public void setCode(String code) { this.code = code; } public LocalDateTime getExpireTime() { return expireTime; } public void setExpireTime(LocalDateTime expireTime) { this.expireTime = expireTime; } }
repos\SpringAll-master\38.Spring-Security-SmsCode\src\main\java\cc\mrbird\validate\smscode\SmsCode.java
1
请完成以下Java代码
public void setShowInactiveValues (boolean ShowInactiveValues) { set_Value (COLUMNNAME_ShowInactiveValues, Boolean.valueOf(ShowInactiveValues)); } /** Get Inaktive Werte anzeigen. @return Inaktive Werte anzeigen */ @Override public boolean isShowInactiveValues () { Object oo = get_Value(COLUMNNAME_ShowI...
/** Set Sql WHERE. @param WhereClause Fully qualified SQL WHERE clause */ @Override public void setWhereClause (java.lang.String WhereClause) { set_Value (COLUMNNAME_WhereClause, WhereClause); } /** Get Sql WHERE. @return Fully qualified SQL WHERE clause */ @Override public java.lang.String getWh...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Ref_Table.java
1
请完成以下Java代码
public java.lang.String getPermissionIssuer () { return (java.lang.String)get_Value(COLUMNNAME_PermissionIssuer); } /** Set Datensatz-ID. @param Record_ID Direct internal record ID */ @Override public void setRecord_ID (int Record_ID) { if (Record_ID < 0) set_Value (COLUMNNAME_Record_ID, null); ...
/** Get Gültig ab. @return Gültig ab inklusiv (erster Tag) */ @Override public java.sql.Timestamp getValidFrom () { return (java.sql.Timestamp)get_Value(COLUMNNAME_ValidFrom); } /** Set Gültig bis. @param ValidTo Gültig bis inklusiv (letzter Tag) */ @Override public void setValidTo (java.sql.Tim...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User_Record_Access.java
1
请完成以下Java代码
public <T extends Query<?, ?>> Filter extend(T extendingQuery) { ensureNotNull(NotValidException.class, "extendingQuery", extendingQuery); if (!extendingQuery.getClass().equals(query.getClass())) { throw LOG.queryExtensionException(query.getClass().getName(), extendingQuery.getClass().getName()); } ...
copy.setOwner(getOwner()); copy.setQueryInternal(getQueryInternal()); copy.setPropertiesInternal(getPropertiesInternal()); return copy; } public void postLoad() { if (query != null) { query.addValidator(StoredQueryValidator.get()); } } @Override public Set<String> getReferencedEnt...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\FilterEntity.java
1
请完成以下Java代码
public Shutdown getShutdown() { return this.shutdown; } /** * Return the {@link SslBundle} that should be used with this server. * @return the SSL bundle */ protected final SslBundle getSslBundle() { return WebServerSslBundle.get(this.ssl, this.sslBundles); } protected final Map<String, SslBundle> getS...
* Return the absolute temp dir for given web server. * @param prefix server name * @return the temp dir for given server. */ protected final File createTempDir(String prefix) { try { File tempDir = Files.createTempDirectory(prefix + "." + getPort() + ".").toFile(); tempDir.deleteOnExit(); return tempD...
repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\AbstractConfigurableWebServerFactory.java
1
请完成以下Java代码
public void execute(DelegateExecution execution) { ScriptingEngines scriptingEngines = Context.getProcessEngineConfiguration().getScriptingEngines(); if (Context.getProcessEngineConfiguration().isEnableProcessDefinitionInfoCache()) { ObjectNode taskElementProperties = Context.getBpmnOverrid...
if (resultVariable != null) { execution.setVariable(resultVariable, result); } } catch (ActivitiException e) { LOGGER.warn( "Exception while executing " + execution.getCurrentFlowElement().getId() + " : " + e.getMessage() ); noErro...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\ScriptTaskActivityBehavior.java
1
请完成以下Java代码
private static void demoHashMapVsIdentityMap() { IdentityHashMap<String, String> identityHashMap = new IdentityHashMap<>(); identityHashMap.put("title", "Harry Potter and the Goblet of Fire"); identityHashMap.put("author", "J. K. Rowling"); identityHashMap.put("language", "English"); ...
private static void updateWithNewValue(IdentityHashMap<String, String> identityHashMap) { String oldTitle = identityHashMap.put("title", "Harry Potter and the Deathly Hallows"); assertEquals("Harry Potter and the Goblet of Fire", oldTitle); assertEquals("Harry Potter and the Deathly Hallows", id...
repos\tutorials-master\core-java-modules\core-java-collections-maps-5\src\main\java\com\baeldung\map\identity\IdentityHashMapDemonstrator.java
1
请在Spring Boot框架中完成以下Java代码
public class DataSource1Config { @Bean(name = "test1DataSource") @ConfigurationProperties(prefix = "spring.datasource.test1") @Primary public DataSource testDataSource() { return DataSourceBuilder.create().build(); } @Bean(name = "test1SqlSessionFactory") @Primary public SqlSes...
} @Bean(name = "test1TransactionManager") @Primary public DataSourceTransactionManager testTransactionManager(@Qualifier("test1DataSource") DataSource dataSource) { return new DataSourceTransactionManager(dataSource); } @Bean(name = "test1SqlSessionTemplate") @Primary public SqlSes...
repos\spring-boot-leaning-master\2.x_42_courses\第 3-3 课: 如何优雅的使用 MyBatis 注解版\spring-boot-multi-mybatis-annotation\src\main\java\com\neo\datasource\DataSource1Config.java
2
请完成以下Java代码
public Set<Map.Entry<Object, Object>> entrySet() { throw new ActivitiException("unsupported operation on configuration beans"); } @Override public boolean isEmpty() { throw new ActivitiException("unsupported operation on configuration beans"); } @Override public Object put(Obje...
} @Override public Object remove(Object key) { throw new ActivitiException("unsupported operation on configuration beans"); } @Override public int size() { throw new ActivitiException("unsupported operation on configuration beans"); } @Override public Collection<Object...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\cfg\SpringBeanFactoryProxyMap.java
1
请完成以下Java代码
public List<User> findAll() { return userRepo.findAll(); } @Override public List<User> findAll(User sample) { return userRepo.findAll(whereSpec(sample)); } @Override public Page<User> findAll(PageRequest pageRequest) { return userRepo.findAll(pageRequest); } @O...
predicates.add(cb.equal(root.<String>get("username"),sample.getUsername())); } return cb.and(predicates.toArray(new Predicate[predicates.size()])); }; } @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { User sample =...
repos\spring-boot-quick-master\quick-oauth2\quick-github-oauth\src\main\java\com\github\oauth\user\UserService.java
1
请完成以下Java代码
public class FillMandatoryException extends AdempiereException { public static final AdMessageKey MSG_FillMandatory = AdMessageKey.of("FillMandatory"); /** * @param translated if true we consider that fields are already translated */ public FillMandatoryException(final boolean translated, final String... fields...
{ builder.append(", "); } if (fieldsAreAlreadyTranslated) { builder.append(field); } else { builder.appendADElement(field); } firstField = false; } return builder.build(); } private static ITranslatableString buildMessage( final boolean fieldsAreAlreadyTranslated, @Nu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\exceptions\FillMandatoryException.java
1