instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public Mono<Void> fireAndForget(Payload payload) { try { dataPublisher.publish(payload); // forward the payload return Mono.empty(); } catch (Exception x) { return Mono.error(x); } } /** * Handle Request/Stream...
* Handle request for bidirectional channel * * @param payloads Stream of payloads delivered from the client * @return */ @Override public Flux<Payload> requestChannel(Publisher<Payload> payloads) { Flux.from(payloads) .subscribe(gameControlle...
repos\tutorials-master\spring-reactive-modules\rsocket\src\main\java\com\baeldung\rsocket\Server.java
1
请完成以下Java代码
public class ScriptTaskXMLConverter extends BaseBpmnXMLConverter { protected Map<String, BaseChildElementParser> childParserMap = new HashMap<String, BaseChildElementParser>(); public ScriptTaskXMLConverter() { ScriptTextParser scriptTextParser = new ScriptTextParser(); childParserMap.put(scri...
throws Exception { ScriptTask scriptTask = (ScriptTask) element; writeDefaultAttribute(ATTRIBUTE_TASK_SCRIPT_FORMAT, scriptTask.getScriptFormat(), xtw); writeQualifiedAttribute(ATTRIBUTE_TASK_SCRIPT_RESULTVARIABLE, scriptTask.getResultVariable(), xtw); writeQualifiedAttribute( ...
repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\ScriptTaskXMLConverter.java
1
请完成以下Java代码
public class ExecuteDecisionCmd extends AbstractExecuteDecisionCmd implements Command<Void> { private static final long serialVersionUID = 1L; private static final Logger LOGGER = LoggerFactory.getLogger(ExecuteDecisionCmd.class); public ExecuteDecisionCmd(ExecuteDecisionBuilderImpl decisionBuilder) { ...
public ExecuteDecisionCmd(ExecuteDecisionContext executeDecisionContext) { super(executeDecisionContext); } @Override public Void execute(CommandContext commandContext) { if (executeDecisionContext.getDecisionKey() == null) { throw new FlowableIllegalArgumentException("decisionK...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\cmd\ExecuteDecisionCmd.java
1
请完成以下Java代码
public void setMaxLoadWeight (final @Nullable BigDecimal MaxLoadWeight) { set_Value (COLUMNNAME_MaxLoadWeight, MaxLoadWeight); } @Override public BigDecimal getMaxLoadWeight() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_MaxLoadWeight); return bd != null ? bd : BigDecimal.ZERO; } @Override ...
public void setStackabilityFactor (final int StackabilityFactor) { set_Value (COLUMNNAME_StackabilityFactor, StackabilityFactor); } @Override public int getStackabilityFactor() { return get_ValueAsInt(COLUMNNAME_StackabilityFactor); } @Override public void setWidth (final @Nullable BigDecimal Width) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_PackingMaterial.java
1
请完成以下Java代码
public DeadLetterJobEntity findJobById(String jobId) { return (DeadLetterJobEntity) getDbSqlSession().selectOne("selectDeadLetterJob", jobId); } @SuppressWarnings("unchecked") public List<DeadLetterJobEntity> findDeadLetterJobsByDuedate(Date duedate, Page page) { final String query = "selec...
Map<String, String> params = new HashMap<>(3); params.put("handlerType", jobHandlerType); params.put("processDefinitionKey", processDefinitionKey); params.put("tenantId", tenantId); return getDbSqlSession().selectList("selectDeadLetterJobByTypeAndProcessDefinitionKeyAndTenantId", params)...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\DeadLetterJobEntityManager.java
1
请完成以下Java代码
public void rejectIt(final DocumentTableFields docFields) { throw new UnsupportedOperationException(); } @Override public void voidIt(final DocumentTableFields docFields) { throw new UnsupportedOperationException(); } @Override public void closeIt(final DocumentTableFields docFields) { final I_C_RfQ rf...
continue; } rfqBL.unclose(rfqResponse); } // rfqEventDispacher.fireAfterUnClose(rfq); // Make sure it's saved InterfaceWrapperHelper.save(rfq); } @Override public void reverseCorrectIt(final DocumentTableFields docFields) { throw new UnsupportedOperationException(); } @Override public void...
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\RfQDocumentHandler.java
1
请完成以下Java代码
public String initCreationForm(Owner owner, ModelMap model) { Pet pet = new Pet(); owner.addPet(pet); return VIEWS_PETS_CREATE_OR_UPDATE_FORM; } @PostMapping("/pets/new") public String processCreationForm(Owner owner, @Valid Pet pet, BindingResult result, RedirectAttributes redirectAttributes) { if (Str...
redirectAttributes.addFlashAttribute("message", "Pet details has been edited"); return "redirect:/owners/{ownerId}"; } /** * Updates the pet details if it exists or adds a new pet to the owner. * @param owner The owner of the pet * @param pet The pet with updated details */ private void updatePetDetails(O...
repos\spring-petclinic-main\src\main\java\org\springframework\samples\petclinic\owner\PetController.java
1
请完成以下Java代码
private void init() { this.requestHttpHeadersFilters = this.requestHttpHeadersFiltersProvider.orderedStream().toList(); this.responseHttpHeadersFilters = this.responseHttpHeadersFiltersProvider.orderedStream().toList(); } @Override public ServerResponse handle(ServerRequest serverRequest) { URI uri = uriResol...
ProxyExchange.Request proxyRequest = proxyExchange.request(serverRequest).uri(url) .headers(filteredRequestHeaders) // TODO: allow injection of ResponseConsumer .responseConsumer((response, serverResponse) -> { HttpHeaders httpHeaders = filterHeaders(this.responseHttpHeadersFilters, response.getHeaders...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\handler\ProxyExchangeHandlerFunction.java
1
请完成以下Java代码
public void setContinent(String continent) { this.continent = continent == null ? null : continent.trim(); } public String getRegion() { return region; } public void setRegion(String region) { this.region = region == null ? null : region.trim(); } public Float getSurfa...
} public void setLocalname(String localname) { this.localname = localname == null ? null : localname.trim(); } public String getGovernmentform() { return governmentform; } public void setGovernmentform(String governmentform) { this.governmentform = governmentform == null ?...
repos\spring-boot-quick-master\quick-modules\dao\src\main\java\com\modules\entity\Country.java
1
请在Spring Boot框架中完成以下Java代码
public BigDecimal getMinimumPayment() { return minimumPayment; } /** * Sets the value of the minimumPayment property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setMinimumPayment(BigDecimal value) { this.minim...
/** * Gets the value of the paymentConditionsExtension property. * * @return * possible object is * {@link PaymentConditionsExtensionType } * */ public PaymentConditionsExtensionType getPaymentConditionsExtension() { return paymentConditionsExtension; } ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\PaymentConditionsType.java
2
请完成以下Java代码
public static BufferedImage generateCaptchaPic(final String captchaCode) { Assert.notNull(captchaCode, "captchaCode must not be null"); // 定义图像buffer BufferedImage buffImg = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB); Graphics gd = buffImg.getGraphics(); Random ...
green = random.nextInt(255); blue = random.nextInt(255); // 用随机产生的颜色将验证码绘制到图像中。 gd.setColor(new Color(red, green, blue)); gd.drawString(captchaCode, 18, 27); return buffImg; } /** * 生成随机字符串。 * @return 字符串 */ public static String generateCaptchaCode() {...
repos\kkFileView-master\server\src\main\java\cn\keking\utils\CaptchaUtil.java
1
请完成以下Java代码
public int getMinCount() { return minCount; } public Config setNegative(int negative) { this.negative = negative; return this; } public int getNegative() { return negative; } public Config setLayer1Size(int layer1Size) { this.layer1Size ...
} public boolean useContinuousBagOfWords() { return cbow; } public Config setSample(float sample) { this.sample = sample; return this; } public float getSample() { return sample; } public Config setAlpha(float alpha) { this.alpha = ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\Config.java
1
请完成以下Java代码
public class AdhocSubProcessActivityBehavior extends AbstractBpmnActivityBehavior { private static final long serialVersionUID = 1L; public void execute(DelegateExecution execution) { SubProcess subProcess = getSubProcessFromExecution(execution); execution.setScope(true); // initializ...
" to a SubProcess instance, but got an instance of " + flowElement ); } return subProcess; } protected Map<String, Object> processDataObjects(Collection<ValuedDataObject> dataObjects) { Map<String, Object> variablesMap = new HashMap<String, Object>(); ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\AdhocSubProcessActivityBehavior.java
1
请完成以下Java代码
public void setEnforceClientSecurity (boolean EnforceClientSecurity) { set_Value (COLUMNNAME_EnforceClientSecurity, Boolean.valueOf(EnforceClientSecurity)); } /** Get Enforce Client Security. @return Send alerts to recipient only if the client security rules of the role allows */ public boolean isEnforceCli...
{ return (String)get_Value(COLUMNNAME_Help); } /** Set Valid. @param IsValid Element is valid */ public void setIsValid (boolean IsValid) { set_Value (COLUMNNAME_IsValid, Boolean.valueOf(IsValid)); } /** Get Valid. @return Element is valid */ public boolean isValid () { Object oo = get_Val...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Alert.java
1
请完成以下Java代码
private void initEndTimeAsDate() { try { endTimeAsDate = HistoryCleanupHelper.parseTimeConfiguration(endTime); } catch (ParseException e) { throw LOG.invalidPropertyValue("endTime", endTime); } } public String getStartTime() { return startTime; } public void setStartTime(String sta...
if (o == null || getClass() != o.getClass()) return false; BatchWindowConfiguration that = (BatchWindowConfiguration) o; if (startTime != null ? !startTime.equals(that.startTime) : that.startTime != null) return false; return endTime != null ? endTime.equals(that.endTime) : that.endTime == nul...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cfg\BatchWindowConfiguration.java
1
请完成以下Java代码
public HistoricExternalTaskLogQuery createHistoricExternalTaskLogQuery() { return new HistoricExternalTaskLogQueryImpl(commandExecutor); } @Override public String getHistoricExternalTaskLogErrorDetails(String historicExternalTaskLogId) { return commandExecutor.execute(new GetHistoricExternalTaskLogErrorD...
} public SetRemovalTimeSelectModeForHistoricBatchesBuilder setRemovalTimeToHistoricBatches() { return new SetRemovalTimeToHistoricBatchesBuilderImpl(commandExecutor); } public void setAnnotationForOperationLogById(String operationId, String annotation) { commandExecutor.execute(new SetAnnotationForOpera...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoryServiceImpl.java
1
请完成以下Java代码
private static InvoiceRow mergeFromOldRow( @NonNull final InvoiceRow newRow, @NonNull final ImmutableMap<DocumentId, InvoiceRow> oldRowsById) { final InvoiceRow oldRow = oldRowsById.get(newRow.getId()); if (oldRow == null) { return newRow; } return newRow.withPreparedForAllocation(oldRow.isPrepared...
public ImmutableList<InvoiceRow> getRowsWithPreparedForAllocationFlagSet() { return getAllRows() .stream() .filter(InvoiceRow::isPreparedForAllocation) .collect(ImmutableList.toImmutableList()); } public void markPreparedForAllocation(@NonNull final DocumentIdsSelection rowIds) { rowsHolder.compute...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\payment_allocation\InvoiceRows.java
1
请在Spring Boot框架中完成以下Java代码
public void setType(ChangeType type) { this.type = type; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public Date getNoticeTime() { return noticeTime; }
public void setNoticeTime(Date noticeTime) { this.noticeTime = noticeTime; } @Override public String toString() { return "ConfigChangeNotice{" + "noticeTime=" + noticeTime + ", appid='" + appid + '\'' + ", type=" + type + ", va...
repos\spring-boot-quick-master\quick-wx-public\src\main\java\com\wx\pn\api\config\ConfigChangeNotice.java
2
请在Spring Boot框架中完成以下Java代码
private LocalDate getDateCandidate(@NonNull final Order orderLine) { if (orderLine.getLastModifiedDate() != null) { return EbayUtils.toLocalDate(orderLine.getLastModifiedDate()); } else if (orderLine.getCreationDate() != null) { return EbayUtils.toLocalDate(orderLine.getCreationDate()); } return n...
.filter(responseItem -> responseItem.getIdentifier().equals(externalIdentifier) && responseItem.getMetasfreshId() != null) .findFirst() .map(JsonResponseUpsertItem::getMetasfreshId) .orElseThrow(() -> new RuntimeException("Something went wrong! No JsonResponseUpsertItem was found for the externalIdentifier:...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\de-metas-camel-ebay-camelroutes\src\main\java\de\metas\camel\externalsystems\ebay\processor\order\CreateOrderLineCandidateUpsertReqForEbayOrderProcessor.java
2
请完成以下Java代码
public class Book { private String bookId; private String title; private double price; private boolean available; public Book(String bookId, String title) { this.bookId = bookId; this.title = title; } public Book(String bookId, String title, int price, boolean available) {...
} public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } public boolean isAvailable() { re...
repos\tutorials-master\spring-reactive-modules\spring-webflux\src\main\java\com\baeldung\spring\convertmonoobject\Book.java
1
请在Spring Boot框架中完成以下Java代码
public class TravelDeal { @Id private BigInteger id; private String destination; private String description; @Field("deal_price") private double dealPrice; @Field("old_price") private double oldPrice; @Field("departure_date") private Date departureDate; @Field("arrival...
public double getDealPrice() { return dealPrice; } public void setDealPrice(double dealPrice) { this.dealPrice = dealPrice; } public double getOldPrice() { return oldPrice; } public void setOldPrice(double oldPrice) { this.oldPrice = oldPrice; } public...
repos\tutorials-master\spring-cloud-modules\spring-cloud-kubernetes\kubernetes-guide\travel-agency-service\src\main\java\com\baeldung\spring\cloud\kubernetes\travelagency\model\TravelDeal.java
2
请完成以下Java代码
public void onSuccess(ValidateDeviceCredentialsResponse msg) { if (!StringUtils.isEmpty(msg.getCredentials())) { credentialsBodyHolder[0] = msg.getCredentials(); } latch.countDown(); ...
} catch (Exception e) { log.error(e.getMessage(), e); } } private boolean validateCertificateChain(X509Certificate[] chain) { try { if (chain.length > 1) { X509Certificate leafCert = chain[0]; for (int i = 1...
repos\thingsboard-master\common\transport\mqtt\src\main\java\org\thingsboard\server\transport\mqtt\MqttSslHandlerProvider.java
1
请在Spring Boot框架中完成以下Java代码
public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/resources/**/*") .addResourceLocations("/", "/resources/") .setCachePeriod(3600) .resourceChain(true) .addResolver(new PathResourceResolver()); } ...
/** * Configuration for async thread bean * * More: https://docs.spring.io/autorepo/docs/spring-framework/5.0.3.RELEASE/javadoc-api/org/springframework/scheduling/SchedulingTaskExecutor.html */ @Bean public Executor asyncExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTa...
repos\tutorials-master\ethereum\src\main\java\com\baeldung\web3j\config\AppConfig.java
2
请在Spring Boot框架中完成以下Java代码
public void setWatermarkFontsize(String watermarkFontsize) { setWatermarkFontsizeValue(watermarkFontsize); } public static String getWatermarkColor() { return WATERMARK_COLOR; } public static void setWatermarkColorValue(String watermarkColor) { WATERMARK_COLOR = watermarkColor;...
public static String getWatermarkHeight() { return WATERMARK_HEIGHT; } public static void setWatermarkHeightValue(String watermarkHeight) { WATERMARK_HEIGHT = watermarkHeight; } @Value("${watermark.height:80}") public void setWatermarkHeight(String watermarkHeight) { WATERM...
repos\kkFileView-master\server\src\main\java\cn\keking\config\WatermarkConfigConstants.java
2
请完成以下Java代码
public static int mod(int x) { if (x >= 0) { return (x % MOD); } else { return mod(MOD + x); } } public static int mod(long x) { if (x >= 0) { return (int) (x % (long) MOD); } else { return mod(MOD + x); } } ...
int b = base; while (exp > 0) { if ((exp & 1) == 1) { result = minSymmetricMod((long) minSymmetricMod(result) * (long) minSymmetricMod(b)); } b = minSymmetricMod((long) minSymmetricMod(b) * (long) minSymmetricMod(b)); exp >>= 1; } r...
repos\tutorials-master\core-java-modules\core-java-lang-math-4\src\main\java\com\baeldung\math\moduloarithmetic\ModularArithmetic.java
1
请完成以下Java代码
public void updateAllPayments(@NonNull final UnaryOperator<POSPayment> updater) { for (final ListIterator<POSPayment> it = payments.listIterator(); it.hasNext(); ) { final POSPayment payment = it.next(); final POSPayment paymentChanged = updater.apply(payment); if (paymentChanged == null) { payment...
for (int i = 0; i < payments.size(); i++) { if (POSPaymentId.equals(payments.get(i).getLocalId(), posPaymentId)) { return i; } } throw new AdempiereException("No payment found for " + posPaymentId + " in " + payments); } private OptionalInt getPaymentIndexByExternalId(final @NonNull POSPaymentExt...
repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java\de\metas\pos\POSOrder.java
1
请完成以下Java代码
public SqlAndParams buildJoinCondition( @NonNull final String targetTableNameOrAlias, @NonNull final String selectionTableAlias) { return SqlAndParams.builder() .append(selectionTableAlias).append(".").append(I_T_ES_FTS_Search_Result.COLUMNNAME_Search_UUID).append("=?", searchId) .append(" AND ")...
{ return ofColumnNameAndRecordIds(columnName, Arrays.asList(recordIds)); } @Nullable public static RecordsToAlwaysIncludeSql mergeOrNull(@Nullable final Collection<RecordsToAlwaysIncludeSql> collection) { if (collection == null || collection.isEmpty()) { return null; } else if (collection.si...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\sql\FilterSql.java
1
请完成以下Java代码
public static boolean isDeployable(String filename, String[] additionalResourceSuffixes) { return isDeployable(filename) || hasSuffix(filename, additionalResourceSuffixes); } public static boolean hasSuffix(String filename, String[] suffixes) { if (suffixes == null || suffixes.length == 0) { return f...
* @param diagramSuffixes suffixes of the diagram files. * @param modelSuffixes suffixes of model files. * @return true, if a file is a diagram for the model. */ protected static boolean checkDiagram(String fileName, String modelFileName, String[] diagramSuffixes, String[] modelSuffixes) { for (String mod...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\deployment\scanning\ProcessApplicationScanningUtil.java
1
请完成以下Java代码
public Stream<CityRecord> getCitiesStreamUsingSpliterator(Connection connection) throws SQLException { PreparedStatement preparedStatement = connection.prepareStatement(QUERY); connection.setAutoCommit(false); preparedStatement.setFetchSize(5000); ResultSet resultSet = prepa...
connection.setAutoCommit(false); preparedStatement.setFetchSize(5000); ResultSet resultSet = preparedStatement.executeQuery(); return DSL.using(connection) .fetchStream(resultSet) .map(r -> new CityRecord(r.get("NAME", String.class), r.get("COUNTRY", String.class...
repos\tutorials-master\persistence-modules\core-java-persistence-3\src\main\java\com\baeldung\resultset\streams\JDBCStreamAPIRepository.java
1
请完成以下Java代码
public <V, ET extends IExpression<V>, CT extends IExpressionCompiler<V, ET>> CT getCompiler(final Class<ET> expressionType) { // Look for the particular compiler final Object compilerObj = compilers.get(expressionType); // No compiler found => fail if (compilerObj == null) { throw new ExpressionCompileEx...
return compile(expressionStr, expressionType); } catch (final Exception e) { logger.warn(e.getLocalizedMessage(), e); return defaultExpr; } } @Override public <V, ET extends IExpression<V>> ET compile(final String expressionStr, final Class<ET> expressionType, final ExpressionContext context) { fi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\impl\ExpressionFactory.java
1
请完成以下Java代码
public ImmutableSet<String> getParameters(@Nullable final String contextTableName) { return predicates.stream() .flatMap(predicate -> predicate.getParameters(contextTableName).stream()) .collect(ImmutableSet.toImmutableSet()); } @Override public boolean accept(final IValidationContext evalCtx, f...
else if (collectedPredicates.size() == 1) { return collectedPredicates.iterator().next(); } else { return new ComposedNamePairPredicate(collectedPredicates); } } public Composer add(@Nullable final INamePairPredicate predicate) { if (predicate == null || predicate == ACCEPT_ALL) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\validationRule\NamePairPredicates.java
1
请完成以下Java代码
public static MRequestCategory get (Properties ctx, int R_Category_ID) { Integer key = new Integer (R_Category_ID); MRequestCategory retValue = (MRequestCategory) s_cache.get (key); if (retValue != null) return retValue; retValue = new MRequestCategory (ctx, R_Category_ID, null); if (retValue.get_ID () !=...
* @param R_Category_ID id * @param trxName trx */ public MRequestCategory (Properties ctx, int R_Category_ID, String trxName) { super (ctx, R_Category_ID, trxName); } // MCategory /** * Load Constructor * @param ctx context * @param rs result set * @param trxName trx */ public MRequestCategory (P...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MRequestCategory.java
1
请完成以下Java代码
public String toString() { return filterToStringCreator(RewriteResponseHeaderGatewayFilterFactory.this) .append("name", config.getName()) .append("regexp", config.getRegexp()) .append("replacement", config.getReplacement()) .toString(); } }; } protected void rewriteHeaders(ServerWebExcha...
public @Nullable String getRegexp() { return regexp; } public Config setRegexp(String regexp) { this.regexp = regexp; return this; } public @Nullable String getReplacement() { return replacement; } public Config setReplacement(String replacement) { this.replacement = replacement; return...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RewriteResponseHeaderGatewayFilterFactory.java
1
请完成以下Java代码
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { this.applicationContext = applicationContext; } @Override public void onApplicationEvent(ContextRefreshedEvent event) { if (event.getApplicationContext() == this.applicationContext) { ...
return containerFactoryBeanName; } public void setContainerFactoryBeanName(String containerFactoryBeanName) { this.containerFactoryBeanName = containerFactoryBeanName; } public RabbitListenerContainerFactory<?> getContainerFactory() { return containerFactory; } public void set...
repos\flowable-engine-main\modules\flowable-event-registry-spring\src\main\java\org\flowable\eventregistry\spring\rabbit\RabbitChannelDefinitionProcessor.java
1
请完成以下Java代码
public String getDisplay() { if (m_value instanceof String) return super.isSelected() ? "Y" : "N"; return Boolean.toString(super.isSelected()); } // getDisplay /** * Set Text * * @param mnemonicLabel * text */ @Override public void setText(String mnemonicLabel) { super.setText(create...
/** * Overrides the JCheckBox.setMnemonic() method, setting modifier keys to * CTRL+SHIFT. * * @param mnemonic * The mnemonic character code. */ @Override public void setMnemonic(int mnemonic) { super.setMnemonic(mnemonic); InputMap map = SwingUtilities.getUIInputMap(this, JComponent....
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CCheckBox.java
1
请完成以下Java代码
public class DefaultCounter { private final AtomicInteger aiCounter; private final Counter micrometerCounter; public DefaultCounter(AtomicInteger aiCounter, Counter micrometerCounter) { this.aiCounter = aiCounter; this.micrometerCounter = micrometerCounter; } public void increment(...
aiCounter.set(0); } public int get() { return aiCounter.get(); } public int getAndClear() { return aiCounter.getAndSet(0); } public void add(int delta){ aiCounter.addAndGet(delta); micrometerCounter.increment(delta); } }
repos\thingsboard-master\common\stats\src\main\java\org\thingsboard\server\common\stats\DefaultCounter.java
1
请完成以下Java代码
public class SpringAsyncTaskExecutor implements AsyncTaskExecutor { protected final org.springframework.core.task.AsyncTaskExecutor asyncTaskExecutor; protected final boolean isAsyncTaskExecutorAopProxied; public SpringAsyncTaskExecutor(org.springframework.core.task.AsyncTaskExecutor asyncTaskExecutor) {...
@Override public void shutdown() { // This uses spring resources passed in the constructor, therefore there is nothing to shutdown here } public org.springframework.core.task.AsyncTaskExecutor getAsyncTaskExecutor() { return asyncTaskExecutor; } @Override public int getRemainin...
repos\flowable-engine-main\modules\flowable-spring-common\src\main\java\org\flowable\common\spring\async\SpringAsyncTaskExecutor.java
1
请完成以下Java代码
protected void startInstance(ActivityExecution execution, VariableMap variables, String businessKey) { ExecutionEntity executionEntity = (ExecutionEntity) execution; ProcessDefinitionImpl definition = getProcessDefinitionToCall( executionEntity, executionEntity.getProcessDefinitionTenantId(), ...
public void onParseMigratingInstance(MigratingInstanceParseContext parseContext, MigratingActivityInstance migratingInstance) { ActivityImpl callActivity = (ActivityImpl) migratingInstance.getSourceScope(); // A call activity is typically scope and since we guarantee stability of scope executions during migrat...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\behavior\CallActivityBehavior.java
1
请完成以下Java代码
public int getC_BP_PrintFormat_ID() { return get_ValueAsInt(COLUMNNAME_C_BP_PrintFormat_ID); } @Override public void setC_DocType_ID (final int C_DocType_ID) { if (C_DocType_ID < 0) set_Value (COLUMNNAME_C_DocType_ID, null); else set_Value (COLUMNNAME_C_DocType_ID, C_DocType_ID); } @Override pu...
set_Value (COLUMNNAME_DocumentCopies_Override, DocumentCopies_Override); } @Override public int getDocumentCopies_Override() { return get_ValueAsInt(COLUMNNAME_DocumentCopies_Override); } @Override public void setSeqNo (final int SeqNo) { set_Value (COLUMNNAME_SeqNo, SeqNo); } @Override public int ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BP_PrintFormat.java
1
请在Spring Boot框架中完成以下Java代码
public void setSubScopeId(String subScopeId) { this.subScopeId = subScopeId; } public String getScopeDefinitionId() { return scopeDefinitionId; } @ApiParam("Only return jobs with the given scopeDefinitionId") public void setScopeDefinitionId(String scopeDefinitionId) { this...
} @ApiParam("Only return jobs without a tenantId") public void setWithoutTenantId(boolean withoutTenantId) { this.withoutTenantId = withoutTenantId; } public boolean isLocked() { return locked; } @ApiParam("Only return jobs that are locked") public void setLocked(boolean l...
repos\flowable-engine-main\modules\flowable-external-job-rest\src\main\java\org\flowable\external\job\rest\service\api\query\ExternalWorkerJobQueryRequest.java
2
请完成以下Java代码
public class Reviewable { protected String id; protected String reviewedBy; protected String title; public Reviewable(String reviewedBy) { this.reviewedBy = reviewedBy; } public Reviewable() { } public String getReviewedBy() { return reviewedBy; } public void ...
} public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } @Override public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } Reviewable that = (Reviewable)...
repos\tutorials-master\mapstruct-3\src\main\java\com\baeldung\setnullproperty\entity\Reviewable.java
1
请完成以下Java代码
public static DocStatus ofNullableCode(@Nullable final String code) { return index.ofNullableCode(code); } @NonNull public static DocStatus ofNullableCodeOrUnknown(@Nullable final String code) { final DocStatus docStatus = ofNullableCode(code); return docStatus != null ? docStatus : Unknown; } public sta...
|| this == Closed || this == Reversed || this == Voided; } public boolean isWaitingForPayment() { return this == WaitingPayment; } public boolean isInProgress() { return this == InProgress; } public boolean isInProgressCompletedOrClosed() { return this == InProgress || this == Completed ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\engine\DocStatus.java
1
请完成以下Java代码
public java.lang.String getInvoiceRecipient () { return (java.lang.String)get_Value(COLUMNNAME_InvoiceRecipient); } /** Set Erledigt. @param IsDone Erledigt */ @Override public void setIsDone (boolean IsDone) { set_Value (COLUMNNAME_IsDone, Boolean.valueOf(IsDone)); } /** Get Erledigt. @return Erle...
/** Set Sachbearbeiter. @param ResponsiblePerson Sachbearbeiter */ @Override public void setResponsiblePerson (java.lang.String ResponsiblePerson) { set_Value (COLUMNNAME_ResponsiblePerson, ResponsiblePerson); } /** Get Sachbearbeiter. @return Sachbearbeiter */ @Override public java.lang.String getRes...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Invoice_Rejection_Detail.java
1
请在Spring Boot框架中完成以下Java代码
public String getFormKey() { return formKey; } public void setFormKey(String formKey) { this.formKey = formKey; } @ApiModelProperty(example = "123") public String getPropagatedStageInstanceId() { return propagatedStageInstanceId; } public void setPropagatedStageIns...
} public void setProcessInstanceId(String processInstanceId) { this.processInstanceId = processInstanceId; } @ApiModelProperty(example = "123") public String getProcessDefinitionId() { return processDefinitionId; } public void setProcessDefinitionId(String processDefinitionId)...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\task\TaskResponse.java
2
请完成以下Java代码
private DocumentLayoutSingleRow.Builder getSingleRowLayout() { return singleRowLayout; } private ViewLayout.Builder getGridView() { return _gridView; } public Builder addDetail(@Nullable final DocumentLayoutDetailDescriptor detail) { if (detail == null) { return this; } if (detail...
private ViewLayout getSideList() { Preconditions.checkNotNull(_sideListView, "sideList"); return _sideListView; } public Builder putDebugProperty(final String name, final String value) { debugProperties.put(name, value); return this; } public Builder setStopwatch(final Stopwatch stopwatch) {...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentLayoutDescriptor.java
1
请完成以下Java代码
public boolean evaluate(String sequenceFlowId, DelegateExecution execution) { String conditionExpression = null; if (Context.getProcessEngineConfiguration().isEnableProcessDefinitionInfoCache()) { ObjectNode elementProperties = Context.getBpmnOverrideElementProperties(sequenceFlowId, executi...
protected String getActiveValue(String originalValue, String propertyName, ObjectNode elementProperties) { String activeValue = originalValue; if (elementProperties != null) { JsonNode overrideValueNode = elementProperties.get(propertyName); if (overrideValueNode != null) { ...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\scripting\ScriptCondition.java
1
请完成以下Java代码
public Campaign syncCampaignLocalToRemote(@NonNull final Campaign campaign) { final PlatformClient platformClient = platformClientService.createPlatformClient(campaign.getPlatformId()); final List<LocalToRemoteSyncResult> syncResults = platformClient.syncCampaignsLocalToRemote(ImmutableList.of(campaign)); final ...
{ final List<ContactPerson> contactsToSync = contactPersonService.getByCampaignId(campaignId); syncContacts(campaignId, contactsToSync, syncDirection); } public void syncContacts( @NonNull final CampaignId campaignId, @NonNull final List<ContactPerson> contactsToSync, @NonNull SyncDirection syncDirectio...
repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java\de\metas\marketing\base\CampaignSyncService.java
1
请完成以下Java代码
public String toString() { return "LoggerConfiguration [name=" + this.name + ", levelConfiguration=" + this.levelConfiguration + ", inheritedLevelConfiguration=" + this.inheritedLevelConfiguration + "]"; } /** * Supported logger configuration scopes. * * @since 2.7.13 */ public enum ConfigurationScope...
@Override public int hashCode() { return Objects.hash(this.logLevel, this.name); } @Override public String toString() { return "LevelConfiguration [name=" + this.name + ", logLevel=" + this.logLevel + "]"; } /** * Create a new {@link LevelConfiguration} instance of the given {@link LogLevel}. ...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\logging\LoggerConfiguration.java
1
请完成以下Java代码
private static OAuth2Error createOAuth2Error(String reason) { return new OAuth2Error(OAuth2ErrorCodes.INVALID_DPOP_PROOF, reason, null); } } private static final class OAuth2AccessTokenClaims implements OAuth2Token, ClaimAccessor { private final OAuth2Token accessToken; private final Map<String, Object> ...
} @Override public Instant getIssuedAt() { return this.accessToken.getIssuedAt(); } @Override public Instant getExpiresAt() { return this.accessToken.getExpiresAt(); } @Override public Map<String, Object> getClaims() { return this.claims; } } }
repos\spring-security-main\oauth2\oauth2-resource-server\src\main\java\org\springframework\security\oauth2\server\resource\authentication\DPoPAuthenticationProvider.java
1
请完成以下Java代码
public class RichTextEditorDialog extends CDialog { /** * */ private static final long serialVersionUID = -7306050007969338986L; private Component field = null; public RichTextEditorDialog(Component field, Frame owner, String title, String htmlText, boolean editable) { super(owner, "", true); init(owne...
m_isPressedOK = true; dispose(); } else if (e.getActionCommand().equals(ConfirmPanel.A_CANCEL)) { dispose(); } } public String getHtmlText() { String text = m_text; // us315: check if is plain rext if (field instanceof CTextPane) { if ("text/plain".equals(((CTextPane)field).getContentType()...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\RichTextEditorDialog.java
1
请完成以下Java代码
public class ActiveMQConsumer { public static void main(String[] args) throws JMSException { // 创建连接 Connection connection = ActiveMQProducer.getConnection(); // 创建会话 final Session session = ActiveMQProducer.getSession(connection); // 创建队列 Queue queue = ActiveMQPro...
} catch (JMSException e) { throw new RuntimeException(e); } } }); // 关闭 try { TimeUnit.HOURS.sleep(1); } catch (InterruptedException ignore) { } session.close(); connection.close(); } }
repos\SpringBoot-Labs-master\lab-32\lab-32-activemq-native\src\main\java\cn\iocoder\springboot\lab32\activemqdemo\ActiveMQConsumer.java
1
请完成以下Java代码
public void deleteMobileAppById(TenantId tenantId, MobileAppId mobileAppId) { log.trace("Executing deleteMobileAppById [{}]", mobileAppId.getId()); mobileAppDao.removeById(tenantId, mobileAppId.getId()); eventPublisher.publishEvent(DeleteEntityEvent.builder().tenantId(tenantId).entityId(mobileAp...
@Transactional public void deleteEntity(TenantId tenantId, EntityId id, boolean force) { deleteMobileAppById(tenantId, (MobileAppId) id); } @Override public MobileApp findByBundleIdAndPlatformType(TenantId tenantId, MobileAppBundleId mobileAppBundleId, PlatformType platformType) { log.t...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\mobile\MobileAppServiceImpl.java
1
请完成以下Java代码
public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } @Override public void setStackabilityFactor (final int StackabilityFactor) { set_Value (COLUMNNAME_StackabilityFactor, Sta...
{ return get_ValueAsInt(COLUMNNAME_StackabilityFactor); } @Override public void setWidth (final @Nullable BigDecimal Width) { set_Value (COLUMNNAME_Width, Width); } @Override public BigDecimal getWidth() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Width); return bd != null ? bd : BigDeci...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_PackingMaterial.java
1
请完成以下Java代码
private DocumentFilterDescriptorsProvider getFilterDescriptorsProvider() { return PackageableViewFilters.getDescriptors(); } @Override public PackageableView createView(final @NonNull CreateViewRequest request) { final ViewId viewId = request.getViewId(); viewId.assertWindowId(PickingConstantsV2.WINDOWID_Pa...
private RelatedProcessDescriptor createProcessDescriptor(@NonNull final Class<?> processClass) { final IADProcessDAO adProcessDAO = Services.get(IADProcessDAO.class); final AdProcessId processId = adProcessDAO.retrieveProcessIdByClass(processClass); if (processId == null) { throw new AdempiereException("No ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\packageable\PackageableViewFactoryV2.java
1
请完成以下Java代码
public OffsetDateTime getPeakVisibilityTime() { return peakVisibilityTime; } public void setPeakVisibilityTime(OffsetDateTime peakVisibilityTime) { this.peakVisibilityTime = peakVisibilityTime; } public Integer getPeakVisibilityTimeOffset() { return peakVisibilityTimeOffset; ...
return nextExpectedAppearance; } public void setNextExpectedAppearance(ZonedDateTime nextExpectedAppearance) { this.nextExpectedAppearance = nextExpectedAppearance; } public OffsetDateTime getLastRecordedSighting() { return lastRecordedSighting; } public void setLastRecordedSi...
repos\tutorials-master\persistence-modules\hibernate-annotations-2\src\main\java\com\baeldung\hibernate\timezonestorage\AstronomicalObservation.java
1
请在Spring Boot框架中完成以下Java代码
public void setPayWayName(String payWayName) { this.payWayName = payWayName == null ? null : payWayName.trim(); } public Date getPaySuccessTime() { return paySuccessTime; } public void setPaySuccessTime(Date paySuccessTime) { this.paySuccessTime = paySuccessTime; } public Date getCompleteTime() { retur...
return refundTimes; } public void setRefundTimes(Short refundTimes) { this.refundTimes = refundTimes; } public BigDecimal getSuccessRefundAmount() { return successRefundAmount; } public void setSuccessRefundAmount(BigDecimal successRefundAmount) { this.successRefundAmount = successRefundAmount; } }
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\entity\RpAccountCheckMistakeScratchPool.java
2
请完成以下Java代码
private String writeMap(Map<String, Object> data) { try { return writeValueAsString(data); } catch (Exception ex) { throw new IllegalArgumentException(ex.getMessage(), ex); } } abstract String writeValueAsString(Map<String, Object> data) throws Exception; } /** * Nested class to protect f...
} /** * Nested class used to get a common default instance of {@link JsonMapper}. It is in * a nested class to protect from getting {@link NoClassDefFoundError} when Jackson 3 * is not on the classpath. */ private static final class Jackson3 { private static JsonMapper createJsonMapper() { List<Jackson...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\client\JdbcRegisteredClientRepository.java
1
请完成以下Java代码
protected AutoDeploymentStrategy<CmmnEngine> getAutoDeploymentStrategy(final String mode) { AutoDeploymentStrategy<CmmnEngine> result = new DefaultAutoDeploymentStrategy(); for (final AutoDeploymentStrategy<CmmnEngine> strategy : deploymentStrategies) { if (strategy.handlesMode(mode)) { ...
autoDeployResources(cmmnEngine); }); running = true; } } } @Override public void stop() { synchronized (lifeCycleMonitor) { running = false; } } @Override public boolean isRunning() { return running; } ...
repos\flowable-engine-main\modules\flowable-cmmn-spring\src\main\java\org\flowable\cmmn\spring\SpringCmmnEngineConfiguration.java
1
请完成以下Java代码
public class OptimizedRandomKeyTrackingMap<K, V> { private final Map<K, V> delegate = new HashMap<>(); private final List<K> keys = new ArrayList<>(); private final Map<K, Integer> keyToIndex = new HashMap<>(); public void put(K key, V value) { V previousValue = delegate.put(key, value); ...
K lastKey = keys.get(lastIndex); keys.set(index, lastKey); keyToIndex.put(lastKey, index); keys.remove(lastIndex); } public V getRandomValue() { if (keys.isEmpty()) { return null; } int randomIndex = ThreadLocalRandom.current().nextInt(keys.size()); ...
repos\tutorials-master\core-java-modules\core-java-collections-maps-9\src\main\java\com\baeldung\map\randommapkey\OptimizedRandomKeyTrackingMap.java
1
请完成以下Java代码
public void afterPropertiesSet() throws Exception { if (this.taskScheduler != null) { this.taskScheduler.afterPropertiesSet(); } } @Override public void destroy() throws Exception { if (this.taskScheduler != null) { this.taskScheduler.shutdown(); } } /** * Sets the {@link Clock} used when generat...
@Override public List<SqlParameterValue> apply(OneTimeToken oneTimeToken) { List<SqlParameterValue> parameters = new ArrayList<>(); parameters.add(new SqlParameterValue(Types.VARCHAR, oneTimeToken.getTokenValue())); parameters.add(new SqlParameterValue(Types.VARCHAR, oneTimeToken.getUsername())); paramete...
repos\spring-security-main\core\src\main\java\org\springframework\security\authentication\ott\JdbcOneTimeTokenService.java
1
请完成以下Java代码
public Long getLongValue() { return longValue; } @Override public void setLongValue(Long longValue) { this.longValue = longValue; } @Override public Double getDoubleValue() { return doubleValue; } @Override public void setDoubleValue(Double doubleValue) { this.doubleValue = doubleVa...
typedValueField.setSerializerName(serializerName); } public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricDecisionInputInstanceEntity.java
1
请完成以下Java代码
public int getExportedRowCount() { return exportedRowCount.intValue(); } protected int incrementExportedRowCount() { return exportedRowCount.incrementAndGet(); } @Override public ExportStatus getExportStatus() { return exportStatus; } protected void setExportStatus(ExportStatus newStatus) { export...
catch (Exception e) { logger.error("Error while invoking monitor(finish): " + e.getLocalizedMessage(), e); } } logger.info("Exported " + getExportedRowCount() + " rows"); } protected abstract void appendRow(IExportDataDestination dataDestination, List<Object> values) throws IOException; protected ab...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\data\export\api\impl\AbstractExporter.java
1
请完成以下Java代码
private static final class FactAcctListener2ModelValidationEngineAdapter implements IFactAcctListener { public static final transient FactAcctListener2ModelValidationEngineAdapter instance = new FactAcctListener2ModelValidationEngineAdapter(); private FactAcctListener2ModelValidationEngineAdapter() { } pri...
} @Override public void onAfterPost(final Object document) { fireDocValidate(document, ModelValidator.TIMING_AFTER_POST); } // @Override // public void onAfterUnpost(final Object document) // { // fireDocValidate(document, ModelValidator.TIMING_AFTER_UNPOST); // } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\acct\api\impl\FactAcctListenersService.java
1
请在Spring Boot框架中完成以下Java代码
public class AuthController { private final ClientRegistration registration; private final AppProperties appProperties; public AuthController(ClientRegistrationRepository registrations, AppProperties appProperties) { this.registration = registrations.findByRegistrationId("oidc"); this.appP...
logoutUrlSb.append(this.registration.getProviderDetails().getConfigurationMetadata().get("end_session_endpoint").toString()); String originUrl = request.getHeader(HttpHeaders.ORIGIN); if (!StringUtils.hasText(originUrl)) { originUrl = appProperties.getWeb().getBaseUrl() + "?logout=true"; ...
repos\spring-boot-web-application-sample-master\main-app\main-webapp\src\main\java\gt\app\web\mvc\AuthController.java
2
请完成以下Java代码
public String getTopic() { return topic; } public void setTopic(String topic) { this.topic = topic; } public RecordKey getRecordKey() { return recordKey; } public void setRecordKey(RecordKey recordKey) { this.recordKey = recordKey; } public KafkaPartit...
protected String eventField; protected String delegateExpression; public String getFixedValue() { return fixedValue; } public void setFixedValue(String fixedValue) { this.fixedValue = fixedValue; } public String getEventField() { re...
repos\flowable-engine-main\modules\flowable-event-registry-model\src\main\java\org\flowable\eventregistry\model\KafkaOutboundChannelModel.java
1
请完成以下Java代码
public long getTaxJavaWay() { return grossIncome * taxInPercents / 100; } @Formula("grossIncome * taxInPercents / 100") private long tax; @OneToMany @JoinColumn(name = "employee_id") @Where(clause = "deleted = false") private Set<Phone> phones = new HashSet<>(0); public Employ...
return tax; } public void setId(Integer id) { this.id = id; } public void setGrossIncome(long grossIncome) { this.grossIncome = grossIncome; } public void setTaxInPercents(int taxInPercents) { this.taxInPercents = taxInPercents; } public boolean getDeleted() {...
repos\tutorials-master\persistence-modules\hibernate-mapping-2\src\main\java\com\baeldung\hibernate\pojo\Employee.java
1
请完成以下Java代码
public void markOccurrence(String name) { markOccurrence(name, 1); } public void markOccurrence(String name, long times) { markOccurrence(dbMeters, name, times); markOccurrence(diagnosticsMeters, name, times); } public void markDiagnosticsOccurrence(String name, long times) { markOccurrence(di...
Meter dbMeter = new Meter(name); dbMeters.put(name, dbMeter); Meter diagnosticsMeter = new Meter(name); diagnosticsMeters.put(name, diagnosticsMeter); } /** * Creates a meter only for database collection. */ public void createDbMeter(String name) { Meter dbMeter = new Meter(name); dbMe...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\metrics\MetricsRegistry.java
1
请完成以下Java代码
public List<HistoricProcessInstance> call() throws Exception { return new HistoricProcessInstanceQueryImpl().processInstanceIds(new HashSet<String>(processInstanceIds)).list(); } }); if (failIfNotExists) { if (processInstanceIds.size() == 1) { ensureNotEmpty(BadUserRequestException....
commandContext.getHistoricProcessInstanceManager().deleteHistoricProcessInstanceByIds(existingIds); } writeUserOperationLog(commandContext, existingIds.size()); return null; } protected void writeUserOperationLog(CommandContext commandContext, int numInstances) { List<PropertyChange> propertyChan...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\DeleteHistoricProcessInstancesCmd.java
1
请完成以下Java代码
private static final class PropertiesIterator implements Iterator<Entry> { private final Iterator<Map.Entry<Object, Object>> iterator; private PropertiesIterator(Properties properties) { this.iterator = properties.entrySet().iterator(); } @Override public boolean hasNext() { return this.iterator.hasN...
/** * Property entry. */ public static final class Entry { private final String key; private final String value; private Entry(String key, String value) { this.key = key; this.value = value; } public String getKey() { return this.key; } public String getValue() { return this.value; ...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\info\InfoProperties.java
1
请在Spring Boot框架中完成以下Java代码
public void fetchAuthorDtoReadWriteMode() { AuthorDto authorDto = authorRepository.findTopByGenre("Anthology"); System.out.println("Author DTO: " + authorDto.getName() + ", " + authorDto.getAge()); org.hibernate.engine.spi.PersistenceContext persistenceContext = getPersistenceContext(); ...
return sharedSession.getPersistenceContext(); } private void displayInformation(String phase, Author author) { System.out.println("\n-------------------------------------"); System.out.println("Phase:" + phase); System.out.println("Entity: " + author); System.out.println("-----...
repos\Hibernate-SpringBoot-master\HibernateSpringBootTransactionalReadOnlyMeaning\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
private String getSqlWithWhereClauseAndDocBaseTypeIfPresent(@NonNull final ExternalSystemScriptedExportConversionConfig config) { final String rootTableName = tableDAO.retrieveTableName(config.getAdTableId()); final String rootKeyColumnName = columnBL.getSingleKeyColumn(rootTableName); return Optional.ofNullabl...
.executeSync(); final Resource resource = Optional.ofNullable(processExecutor.getResult()) .map(ProcessExecutionResult::getReportDataResource) .orElse(null); if (resource == null || !resource.exists()) { throw new AdempiereException("Process did not return a valid Resource") .appendParametersToM...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\scriptedexportconversion\ExternalSystemScriptedExportConversionService.java
1
请完成以下Java代码
public boolean containsKey (final IValidationContext evalCtx, final Object key) { // linear search in p_data final int size = getSize(); for (int i = 0; i < size; i++) { final Object oo = getElementAt(i); if (oo != null && oo instanceof NamePair) { NamePair pp = (NamePair)oo; if (pp.getID().e...
Collections.sort (list, p); } else { ValueNamePair p = ValueNamePair.EMPTY; if (!mandatory) list.add (p); Collections.sort (list, p); } return list; } // getArray /** * Refresh Values (nop) * @return number of cache */ @Override public int refresh() { return getSize(); } // refres...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\XLookup.java
1
请完成以下Java代码
public void log(@NonNull final DpdClientLogEvent event) { try { createLogRecord(event); } catch (final Exception ex) { logger.warn("Failed creating Dpd log record: {}", event, ex); } normalLogging(event); } private void normalLogging(final DpdClientLogEvent event) { if (!logger.isTraceEnable...
private void createLogRecord(@NonNull final DpdClientLogEvent event) { final I_DPD_StoreOrder_Log logRecord = InterfaceWrapperHelper.newInstance(I_DPD_StoreOrder_Log.class); logRecord.setConfigSummary(event.getConfigSummary()); logRecord.setDurationMillis((int)event.getDurationMillis()); logRecord.setDPD_Stor...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java\de\metas\shipper\gateway\dpd\logger\DpdDatabaseClientLogger.java
1
请完成以下Java代码
public AdImage getById(@NonNull final AdImageId adImageId) { return cache.getOrLoad(adImageId, this::retrieveById); } private AdImage retrieveById(@NonNull final AdImageId adImageId) { final I_AD_Image record = InterfaceWrapperHelper.load(adImageId, I_AD_Image.class); if (record == null) { throw new Ade...
public static AdImage fromRecord(@NonNull I_AD_Image record) { final String filename = record.getName(); return AdImage.builder() .id(AdImageId.ofRepoId(record.getAD_Image_ID())) .lastModified(record.getUpdated().toInstant()) .filename(filename) .contentType(MimeType.getMimeType(filename)) .da...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\image\AdImageRepository.java
1
请完成以下Java代码
public class RuleChainDebugEvent extends Event { private static final long serialVersionUID = -386392236201116767L; @Builder private RuleChainDebugEvent(TenantId tenantId, UUID entityId, String serviceId, UUID id, long ts, String message, String error) { super(tenantId, entityId, serviceId, id, ts...
@Override public EventType getType() { return EventType.DEBUG_RULE_CHAIN; } @Override public EventInfo toInfo(EntityType entityType) { EventInfo eventInfo = super.toInfo(entityType); var json = (ObjectNode) eventInfo.getBody(); putNotNull(json, "message", message); ...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\event\RuleChainDebugEvent.java
1
请在Spring Boot框架中完成以下Java代码
public class SupportIDType { @JsonCreator public static SupportIDType of(final int valueAsInt) { return new SupportIDType(valueAsInt); } public static final int MAX_VALUE = 999999; private final int valueAsInt; private SupportIDType(final int valueAsInt) { if (valueAsInt < 1 || valueAsInt > MAX_VALUE) ...
} this.valueAsInt = valueAsInt; } @JsonValue public int toJson() { return valueAsInt; } public String getValueAsString() { return String.valueOf(getValueAsInt()); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.commons\src\main\java\de\metas\vertical\pharma\msv3\protocol\order\SupportIDType.java
2
请完成以下Java代码
protected String doIt() throws Exception { final ApiRequestIterator apiRequestIterator = getSelectedRequests(); apiRequestReplayService.replayApiRequests(apiRequestIterator); return MSG_OK; } @Override public ProcessPreconditionsResolution checkPreconditionsApplicable(final @NonNull IProcessPreconditionsCo...
if (isOnlyWithError) { selectedApiRequestsQueryBuilder.addEqualsFilter(I_API_Request_Audit.COLUMNNAME_Status, Status.ERROR.getCode()); } final IQueryOrderBy orderBy = queryBL.createQueryOrderByBuilder(I_API_Request_Audit.class) .addColumnAscending(I_API_Request_Audit.COLUMNNAME_Time) .createQueryOrder...
repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\util\web\audit\process\API_Audit_Repeat.java
1
请完成以下Java代码
public String toString() { return toStringSyntax(); } public String toStringSyntax() { if (list.isEmpty()) { return ""; } return list.stream() .map(DocumentQueryOrderBy::toStringSyntax) .collect(Collectors.joining(",")); } public ImmutableList<DocumentQueryOrderBy> toList() { return lis...
{ list.forEach(consumer); } public <T extends IViewRow> Comparator<T> toComparator( @NonNull final FieldValueExtractor<T> fieldValueExtractor, @NonNull final JSONOptions jsonOpts) { // used in case orderBys is empty or whatever else goes wrong final Comparator<T> noopComparator = (o1, o2) -> 0; retu...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentQueryOrderByList.java
1
请完成以下Java代码
protected HistoricBatchEntity loadBatchEntity(BatchEntity batch) { String batchId = batch.getId(); HistoricBatchEntity cachedEntity = findInCache(HistoricBatchEntity.class, batchId); if(cachedEntity != null) { return cachedEntity; } else { return newBatchEventEntity(batch); } } ...
.getDbEntityManager() .getCachedEntity(type, id); } @Override protected ProcessDefinitionEntity getProcessDefinitionEntity(String processDefinitionId) { CommandContext commandContext = Context.getCommandContext(); ProcessDefinitionEntity entity = null; if(commandContext != null) { entity ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\producer\CacheAwareHistoryEventProducer.java
1
请完成以下Java代码
private CloseStatus adaptCloseStatus(CloseStatus closeStatus) { int code = closeStatus.getCode(); if (code > 2999 && code < 5000) { return closeStatus; } switch (code) { case 1000: case 1001: case 1002: case 1003: case 1007: case 1008: case 1009: ...
.filter(__ -> proxySession.isOpen()) .map(this::adaptCloseStatus) .flatMap(proxySession::close); // Use retain() for Reactor Netty Mono<Void> proxySessionSend = proxySession .send(session.receive().doOnNext(WebSocketMessage::retain).doOnNext(webSocketMessage -> { if (log.isTraceEnable...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\WebsocketRoutingFilter.java
1
请完成以下Spring Boot application配置
spring: config: import: "optional:configserver:http://config-service:8088" activate: on-profile: docker --- spring: application: name: gateway-ser
vice config: import: "optional:configserver:http://localhost:8088"
repos\sample-spring-microservices-new-master\gateway-service\src\main\resources\application.yml
2
请完成以下Java代码
public String getSuperCaseInstanceId() { return superCaseInstanceId; } public String getSuperProcessInstanceId() { return superProcessInstanceId; } public String getTenantId() { return tenantId; } public Boolean getActive() { return active; } public Boolean getCompleted() { retur...
dto.id = historicCaseInstance.getId(); dto.businessKey = historicCaseInstance.getBusinessKey(); dto.caseDefinitionId = historicCaseInstance.getCaseDefinitionId(); dto.caseDefinitionKey = historicCaseInstance.getCaseDefinitionKey(); dto.caseDefinitionName = historicCaseInstance.getCaseDefinitionName(); ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricCaseInstanceDto.java
1
请完成以下Java代码
public de.metas.contracts.model.I_C_Flatrate_Term getC_Flatrate_Term() { return get_ValueAsPO(COLUMNNAME_C_Flatrate_Term_ID, de.metas.contracts.model.I_C_Flatrate_Term.class); } @Override public void setC_Flatrate_Term(final de.metas.contracts.model.I_C_Flatrate_Term C_Flatrate_Term) { set_ValueFromPO(COLUMNN...
public static final String DOCSTATUS_Drafted = "DR"; /** Completed = CO */ public static final String DOCSTATUS_Completed = "CO"; /** Approved = AP */ public static final String DOCSTATUS_Approved = "AP"; /** NotApproved = NA */ public static final String DOCSTATUS_NotApproved = "NA"; /** Voided = VO */ public ...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Contract_Term_Alloc.java
1
请完成以下Java代码
private static MailboxQuery mailboxQuery(final @NonNull UserNotificationsConfig notificationsConfig) { return MailboxQuery.builder() .clientId(notificationsConfig.getClientId()) .orgId(notificationsConfig.getOrgId()) .build(); } private String extractMailContent(final UserNotificationRequest request) ...
final TargetRecordAction targetRecordAction = TargetRecordAction.cast(targetAction); final TableRecordReference targetRecord = targetRecordAction.getRecord(); final String targetRecordDisplayText = targetRecordAction.getRecordDisplayText(); if (!Check.isEmpty(targetRecordDisplayText)) { formatter.record...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\notification\NotificationSenderTemplate.java
1
请完成以下Java代码
private void reportFailedMethodExecution(TenantId tenantId, String method, long startTime, Throwable t, ProceedingJoinPoint joinPoint) { if (t != null) { if (ExceptionUtils.indexOfThrowable(t, JDBCConnectionException.class) >= 0) { return; } if (StringUtils.co...
Object arg = args[i]; if (arg instanceof TenantId) { return (TenantId) arg; } else if (arg instanceof UUID) { if (signature.getParameterNames() != null && StringUtils.equals(signature.getParameterNames()[i], "tenantId")) { log.trace("Method {} ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\aspect\SqlDaoCallsAspect.java
1
请完成以下Java代码
public void setOrder(int order) { this.order = order; } public Map<String, Object> getMetadata() { return metadata; } public void setMetadata(Map<String, Object> metadata) { this.metadata = metadata; } public boolean isEnabled() { return enabled; } public void setEnabled(boolean enabled) { this.en...
if (o == null || getClass() != o.getClass()) { return false; } RouteDefinition that = (RouteDefinition) o; return this.order == that.order && Objects.equals(this.id, that.id) && Objects.equals(this.predicates, that.predicates) && Objects.equals(this.filters, that.filters) && Objects.equals(this.uri, th...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\route\RouteDefinition.java
1
请完成以下Java代码
public class User extends RepresentationModel<User> { private Integer id; private String name; private String email; private LocalDateTime createdAt; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { ...
public void setEmail(String email) { this.email = email; } public LocalDateTime getCreatedAt() { return createdAt; } public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; } public User(int id, String name, String email, LocalDateTime createdAt...
repos\tutorials-master\spring-web-modules\spring-boot-rest-2\src\main\java\com\baeldung\hateoasvsswagger\model\User.java
1
请完成以下Java代码
public class AWindowSaveStateModel { private static final String ACTION_Name = "org.compiere.apps.AWindowSaveStateModel.action"; private static final Logger logger = LogManager.getLogger(AWindowSaveStateModel.class); private static final CCache<UserId, Boolean> userId2enabled = new CCache<>(I_AD_Role.Table_Name, 5,...
date, rolePermissions -> rolePermissions.checkWindowPermission(windowId).hasWriteAccess()); } public void save(final GridTab gridTab) { Services.get(ITrxManager.class).runInNewTrx(() -> save0(gridTab)); } private void save0(final GridTab gridTab) { Check.assumeNotNull(gridTab, "gridTab not null"); f...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\apps\AWindowSaveStateModel.java
1
请完成以下Java代码
public void setWebParam5 (String WebParam5) { set_Value (COLUMNNAME_WebParam5, WebParam5); } /** Get Web Parameter 5. @return Web Site Parameter 5 (default footer center) */ public String getWebParam5 () { return (String)get_Value(COLUMNNAME_WebParam5); } /** Set Web Parameter 6. @param WebParam6 ...
/** Get Web Store. @return A Web Store of the Client */ public int getW_Store_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_W_Store_ID); if (ii == null) return 0; return ii.intValue(); } /** Set WebStore User. @param WStoreUser User ID of the Web Store EMail address */ public void set...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_Store.java
1
请完成以下Java代码
protected ProcessPreconditionsResolution checkPreconditionsApplicable() { final ExplainedOptional<CreateMatchInvoiceRequest> optionalRequest = createMatchInvoiceRequest(); if (!optionalRequest.isPresent()) { return ProcessPreconditionsResolution.rejectWithInternalReason(optionalRequest.getExplanation()); } ...
orderCostService.createMatchInvoice(request); invalidateView(); return MSG_OK; } private ExplainedOptional<CreateMatchInvoiceRequest> createMatchInvoiceRequest() { final ImmutableSet<InOutCostId> selectedInOutCostIds = getSelectedInOutCostIds(); if (selectedInOutCostIds.isEmpty()) { return ExplainedO...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\invoice\match_inout_costs\InOutCostsView_CreateMatchInv.java
1
请完成以下Java代码
public BigDecimal getIncome() { return income; } /** 平台账户入账金额 **/ public void setIncome(BigDecimal income) { this.income = income; } /** 平台账户出款金额 **/ public BigDecimal getOutcome() { return outcome; } /** 平台账户出款金额 **/ public void setOutcome(BigDecimal outcome) { this.outcome = outcome; } /** 商户订单...
public String getTradeNo() { return tradeNo; } /** 银行流水 **/ public void setTradeNo(String tradeNo) { this.tradeNo = tradeNo; } /** 交易类型 **/ public String getTransType() { return transType; } /** 交易类型 **/ public void setTransType(String transType) { this.transType = transType; } /** 交易时间 **/ publ...
repos\roncoo-pay-master\roncoo-pay-app-reconciliation\src\main\java\com\roncoo\pay\app\reconciliation\vo\AlipayAccountLogVO.java
1
请完成以下Java代码
public class BalancedBinaryTree { public static boolean isBalanced(Tree tree) { return isBalancedRecursive(tree, -1).isBalanced; } private static Result isBalancedRecursive(Tree tree, int depth) { if (tree == null) { return new Result(true, -1); } Result leftSu...
boolean subtreesAreBalanced = leftSubtreeResult.isBalanced && rightSubtreeResult.isBalanced; int height = Math.max(leftSubtreeResult.height, rightSubtreeResult.height) + 1; return new Result(isBalanced && subtreesAreBalanced, height); } private static final class Result { private final...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-5\src\main\java\com\baeldung\algorithms\balancedbinarytree\BalancedBinaryTree.java
1
请完成以下Java代码
public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), String.valueOf(getAD_Find_ID())); } /** AndOr AD_Reference_ID=204 */ public static final int ANDOR_AD_Reference_ID=204; /** And = A */ public static final String ANDOR_And = "A"; /** Or = O */ public static final String ANDOR...
{ set_Value (COLUMNNAME_Operation, Operation); } /** Get Operation. @return Compare Operation */ public String getOperation () { return (String)get_Value(COLUMNNAME_Operation); } /** Set Search Key. @param Value Search key for the record in the format required - must be unique */ public void...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Find.java
1
请完成以下Java代码
public List<Map<String, Object>> execute() { return decisionService.executeDecision(this); } @Override public List<Map<String, Object>> executeDecision() { return decisionService.executeDecision(this); } @Override public Map<String, List<Map<String, Object>>> executeDecisionSer...
public String getExecutionId() { return executionId; } public String getActivityId() { return activityId; } public String getScopeType() { return scopeType; } public String getTenantId() { return tenantId; } public boolean isFallbackToDefaultTenant...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\ExecuteDecisionBuilderImpl.java
1
请在Spring Boot框架中完成以下Java代码
public SpringBeanJobFactory springBeanJobFactory() { AutoWiringSpringBeanJobFactory jobFactory = new AutoWiringSpringBeanJobFactory(); logger.debug("Configuring Job factory"); jobFactory.setApplicationContext(applicationContext); return jobFactory; } @Bean public SchedulerF...
jobDetailFactory.setDescription("Invoke Sample Job service..."); jobDetailFactory.setDurability(true); return jobDetailFactory; } @Bean public SimpleTriggerFactoryBean trigger(JobDetail job) { SimpleTriggerFactoryBean trigger = new SimpleTriggerFactoryBean(); trigger.setJob...
repos\tutorials-master\spring-quartz\src\main\java\org\baeldung\springquartz\basics\scheduler\SpringQrtzScheduler.java
2
请完成以下Java代码
public void setTcToken(String value) { this.tcToken = value; } /** * Gets the value of the insuranceDemandDate property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGrego...
public String getInsuranceDemandId() { return insuranceDemandId; } /** * Sets the value of the insuranceDemandId property. * * @param value * allowed object is * {@link String } * */ public void setInsuranc...
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\ProcessingType.java
1
请完成以下Java代码
public class AmqpRejectAndDontRequeueException extends AmqpException { private final boolean rejectManual; /** * Construct an instance with the supplied argument. * @param message A message describing the problem. */ public AmqpRejectAndDontRequeueException(String message) { this(message, false, null); } ...
this(message, false, cause); } /** * Construct an instance with the supplied arguments. * @param message A message describing the problem. * @param rejectManual true to reject the message, even with Manual Acks if this is * the top-level exception (e.g. thrown by an error handler). * @param cause the cause...
repos\spring-amqp-main\spring-amqp\src\main\java\org\springframework\amqp\AmqpRejectAndDontRequeueException.java
1
请在Spring Boot框架中完成以下Java代码
public MobileSessionInfo getMobileSession(@RequestHeader(MOBILE_TOKEN_HEADER) String mobileToken, @AuthenticationPrincipal SecurityUser user) { return userService.findMobileSession(user.getTenantId(), user.getId(), mobileToken); } @PreAuthorize("hasAnyAutho...
List<UserId> userIds = new ArrayList<>(); for (UUID userUUID : userUUIDs) { userIds.add(new UserId(userUUID)); } List<User> users = userService.findUsersByTenantIdAndIds(tenantId, userIds); return filterUsersByReadPermission(users); } private List<User> filterUsersBy...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\controller\UserController.java
2
请完成以下Java代码
public void setRequestCache(RequestCache requestCache) { Assert.notNull(requestCache, "requestCache cannot be null"); this.requestCache = requestCache; } @Override public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ...
private AuthenticationSuccess(String redirectUrl) { this.redirectUrl = redirectUrl; } public String getRedirectUrl() { return this.redirectUrl; } public boolean isAuthenticated() { return true; } } }
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\HttpMessageConverterAuthenticationSuccessHandler.java
1
请在Spring Boot框架中完成以下Java代码
public void method01() { // 查询订单 OrderDO order = orderMapper.selectById(1); System.out.println(order); // 查询用户 UserDO user = userMapper.selectById(1); System.out.println(user); } @Transactional public void method02() { // 查询订单 OrderDO order = ...
@DS(DBConstants.DATASOURCE_USERS) public void method042() { UserDO user = userMapper.selectById(1); System.out.println(user); } @Transactional @DS(DBConstants.DATASOURCE_ORDERS) public void method05() { // 查询订单 OrderDO order = orderMapper.selectById(1); Syste...
repos\SpringBoot-Labs-master\lab-17\lab-17-dynamic-datasource-baomidou-01\src\main\java\cn\iocoder\springboot\lab17\dynamicdatasource\service\OrderService.java
2