instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public class OrderCheckupDAO implements IOrderCheckupDAO { private final IQueryBL queryBL = Services.get(IQueryBL.class); @Override public List<I_C_Order_MFGWarehouse_Report> retrieveAllReports(final I_C_Order order) { return queryBL .createQueryBuilder(I_C_Order_MFGWarehouse_Report.class, order) // .add...
} @Override public List<I_C_Order_MFGWarehouse_ReportLine> retrieveAllReportLines(final I_C_Order_MFGWarehouse_Report report) { return queryBL .createQueryBuilder(I_C_Order_MFGWarehouse_ReportLine.class, report) // .addOnlyActiveRecordsFilter() // return all of them .addEqualsFilter(I_C_Order_MFGWareh...
repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\de\metas\fresh\ordercheckup\impl\OrderCheckupDAO.java
1
请完成以下Java代码
public String getTreeType() { return m_TreeType; } // getTreeType /** * Get Tree * @return tree */ public MTree getTree() { return m_tree; } // getTreeType /** * Get Where Clause * @param ID start node * @return ColumnName = 1 or ( ColumnName = 1 OR ColumnName = 2 OR ColumnName = 3) */ p...
{ MTreeNode nn = (MTreeNode)en.nextElement(); if (!nn.isSummary()) { list.add(new Integer(nn.getNode_ID())); log.trace("- " + nn); } else log.trace("- skipped parent (" + nn + ")"); } } else // not found or not summary list.add(new Integer(ID)); // Integer[] retValue = ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\report\MReportTree.java
1
请完成以下Java代码
public class Library { public static final int MAX_BOOKS = 10000; private static final Logger LOGGER = Logger.getLogger(Library.class.getName()); public static int totalBooks; public static List<String> lines; static { totalBooks = 0; } static { try { lines = Fi...
public static int getAverageBooks(Library[] libraries) { int total = 0; for (Library library : libraries) { total += library.books; } return libraries.length > 0 ? total / libraries.length : 0; } } public static class Book { privat...
repos\tutorials-master\core-java-modules\core-java-lang-oop-modifiers\src\main\java\com\baeldung\statickeyword\Library.java
1
请完成以下Java代码
public void setI_Pharma_BPartner_ID (int I_Pharma_BPartner_ID) { if (I_Pharma_BPartner_ID < 1) set_ValueNoCheck (COLUMNNAME_I_Pharma_BPartner_ID, null); else set_ValueNoCheck (COLUMNNAME_I_Pharma_BPartner_ID, Integer.valueOf(I_Pharma_BPartner_ID)); } /** Get Import Pharma BPartners. @return Import Pha...
} /** Get Verarbeitet. @return Checkbox sagt aus, ob der Beleg verarbeitet wurde. */ @Override public boolean isProcessed () { Object oo = get_Value(COLUMNNAME_Processed); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } retu...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma\src\main\java-gen\de\metas\vertical\pharma\model\X_I_Pharma_BPartner.java
1
请完成以下Java代码
public final class ALoginRes_vi extends ListResourceBundle { // TODO Run native2ascii to convert everything to plain ASCII !! /** Translation Content */ static final Object[][] contents = new String[][] { { "Connection", "K\u1EBFt n\u1ED1i" }, { "Defaults", "M\u1EB7c nhi�n" }, { "Login",...
{ "RoleNotFound", "Kh�ng t�m th\u1EA5y vai tr� n�y" }, { "Authorized", "\u0110� \u0111\u01B0\u1EE3c ph�p" }, { "Ok", "\u0110\u1ED3ng �" }, { "Cancel", "H\u1EE7y" }, { "VersionConflict", "X\u1EA3y ra tranh ch\u1EA5p phi�n b\u1EA3n:" }, { "VersionInfo", "Th�ng tin ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\apps\ALoginRes_vi.java
1
请完成以下Java代码
protected void onRefresh() { super.onRefresh(); ConfigurableListableBeanFactory currentBeanFactory = getBeanFactory(); if (this.beanFactory != null) { Arrays.stream(ArrayUtils.nullSafeArray(this.beanFactory.getSingletonNames(), String.class)) .filter(singletonBeanName -> !currentBeanFactory.containsSin...
protected void prepareRefresh() { this.beanFactory = (DefaultListableBeanFactory) SpringExtensions.safeGetValue(this::getBeanFactory); super.prepareRefresh(); } /** * @inheritDoc */ @Override public void register(Class<?>... componentClasses) { Arrays.stream(ArrayUtils.nullSafeArray(componentClasses, Cl...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\context\annotation\RefreshableAnnotationConfigApplicationContext.java
1
请在Spring Boot框架中完成以下Java代码
public class PersonDaoImpl implements PersonDao { @PersistenceContext private EntityManager em; @Override public Person save(final Person person) { em.persist(person); return person; } @Override public List<Person> findPersonsByFirstnameQueryDSL(final String firstname) { ...
return query.from(person).where(person.firstname.eq(firstname)).orderBy(person.surname.desc()).fetch(); } @Override public int findMaxAge() { final JPAQuery<Person> query = new JPAQuery<>(em); final QPerson person = QPerson.person; return query.from(person).select(person.age.max())...
repos\tutorials-master\persistence-modules\querydsl\src\main\java\com\baeldung\dao\PersonDaoImpl.java
2
请完成以下Java代码
public IfPart getIfPart() { return ifPartChild.getChild(this); } public void setIfPart(IfPart ifPart) { ifPartChild.setChild(this, ifPart); } public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Sentry.class, CMMN_ELEMENT_SENTRY...
nameAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_NAME) .build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); onPartCollection = sequenceBuilder.elementCollection(OnPart.class) .build(); ifPartChild = sequenceBuilder.element(IfPart.class) .build(); type...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\SentryImpl.java
1
请完成以下Java代码
public RequestId getRequestIdForMessageId(@NonNull final String messageId) { final List<Integer> requestIds = Services.get(IQueryBL.class).createQueryBuilder(I_C_Mail.class) .addEqualsFilter(I_C_Mail.COLUMN_InitialMessageID, messageId) .addNotNull(I_C_Mail.COLUMN_R_Request_ID) .orderBy(I_C_Mail.COLUMN_R_...
public String getName() { return attachment.getFilename(); } @Override public String getContentType() { return attachment.getContentType(); } @Override public InputStream getInputStream() throws IOException { return Files.newInputStream(attachment.getTempFile()); } @Override public O...
repos\metasfresh-new_dawn_uat\backend\de.metas.inbound.mail\src\main\java\de\metas\inbound\mail\InboundEMailRepository.java
1
请完成以下Java代码
public class SequenceflowValidator extends ProcessLevelValidator { @Override protected void executeValidation(BpmnModel bpmnModel, Process process, List<ValidationError> errors) { List<SequenceFlow> sequenceFlows = process.findFlowElementsOfType(SequenceFlow.class); for (SequenceFlow sequenceFl...
addError(errors, Problems.SEQ_FLOW_INVALID_TARGET, process, sequenceFlow); } if (sourceContainer != null && targetContainer != null && !sourceContainer.equals(targetContainer)) { addError(errors, Problems.SEQ_FLOW_INVALID_TARGET_DIFFERENT_SCOPE, process, sequenceFlow)...
repos\Activiti-develop\activiti-core\activiti-process-validation\src\main\java\org\activiti\validation\validator\impl\SequenceflowValidator.java
1
请完成以下Java代码
private Mono<Authentication> flatMapAuthentication(ServerWebExchange exchange) { return exchange.getPrincipal().cast(Authentication.class).defaultIfEmpty(this.anonymousAuthenticationToken); } private Mono<Void> logout(WebFilterExchange webFilterExchange, Authentication authentication) { logger.debug(LogMessage.f...
this.logoutSuccessHandler = logoutSuccessHandler; } /** * Sets the {@link ServerLogoutHandler}. The default is * {@link SecurityContextServerLogoutHandler}. * @param logoutHandler The handler to use */ public void setLogoutHandler(ServerLogoutHandler logoutHandler) { Assert.notNull(logoutHandler, "logoutH...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\authentication\logout\LogoutWebFilter.java
1
请在Spring Boot框架中完成以下Java代码
public class User { @Id @GeneratedValue private Long id; @Column(nullable = false, unique = true) private String userName; @Column(nullable = false) private String passWord; @Column(nullable = false, unique = true) private String email; @Column(nullable = true, unique = true) ...
} public void setPassWord(String passWord) { this.passWord = passWord; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getNickName() { return nickName; } public void setNickName...
repos\spring-boot-leaning-master\2.x_42_courses\第 3-4 课: Spring Data JPA 的基本使用\spring-boot-jpa\src\main\java\com\neo\model\User.java
2
请完成以下Java代码
public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public void setMedicalAidPositionNumber (final @Nullable String MedicalAidPositionNumber) { set_Value (COLUMNNAME_MedicalAidPositionNumber, MedicalAidPositionNumber); } @Override public String getMedicalAidPosition...
public static final String PURCHASERATING_F = "F"; /** G = G */ public static final String PURCHASERATING_G = "G"; @Override public void setPurchaseRating (final @Nullable String PurchaseRating) { set_Value (COLUMNNAME_PurchaseRating, PurchaseRating); } @Override public String getPurchaseRating() { return...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java-gen\de\metas\vertical\healthcare\alberta\model\X_M_Product_AlbertaArticle.java
1
请完成以下Java代码
public void setC_AcctSchema_ID (final int C_AcctSchema_ID) { if (C_AcctSchema_ID < 1) set_ValueNoCheck (COLUMNNAME_C_AcctSchema_ID, null); else set_ValueNoCheck (COLUMNNAME_C_AcctSchema_ID, C_AcctSchema_ID); } @Override public int getC_AcctSchema_ID() { return get_ValueAsInt(COLUMNNAME_C_AcctSchema...
@Override public void setC_Invoice(final org.compiere.model.I_C_Invoice C_Invoice) { set_ValueFromPO(COLUMNNAME_C_Invoice_ID, org.compiere.model.I_C_Invoice.class, C_Invoice); } @Override public void setC_Invoice_ID (final int C_Invoice_ID) { if (C_Invoice_ID < 1) set_ValueNoCheck (COLUMNNAME_C_Invoice_I...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Invoice_Acct.java
1
请完成以下Java代码
private @Nullable String extractMessage(@Nullable HttpEntity entity) { if (entity != null) { try { JSONObject error = getContentAsJson(entity); if (error.has("message")) { return error.getString("message"); } } catch (Exception ex) { // Ignore } } return null; } private JSONObj...
Charset charset = contentType.getCharset(); charset = (charset != null) ? charset : StandardCharsets.UTF_8; byte[] content = FileCopyUtils.copyToByteArray(entity.getContent()); return new String(content, charset); } private @Nullable String extractFileName(@Nullable Header header) { if (header != null) { ...
repos\spring-boot-4.0.1\cli\spring-boot-cli\src\main\java\org\springframework\boot\cli\command\init\InitializrService.java
1
请在Spring Boot框架中完成以下Java代码
public String getActivityId() { return activityId; } public void setActivityId(String activityId) { this.activityId = activityId; } public String getProcessInstanceId() { return processInstanceId; } public void setProcessInstanceId(String processInstanceId) { t...
return subScopeId; } public void setSubScopeId(String subScopeId) { this.subScopeId = subScopeId; } public String getScopeDefinitionId() { return scopeDefinitionId; } public void setScopeDefinitionId(String scopeDefinitionId) { this.scopeDefinitionId = scopeDefinitionI...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\process\EventSubscriptionResponse.java
2
请在Spring Boot框架中完成以下Java代码
public class AnnotationUtil { /** * 获取指定类上的指定注解 * @param clazz 目标类 * @param annotationClazz 注解类的Class对象 * @param <T> 注解的类型 * @return 注解对象 */ public static <T> T getAnnotationValueByClass(Class clazz, Class annotationClazz) { return (T) clazz.getAnnotation(annotationClazz);...
* @return 注解对象 */ public static <T> T getAnnotationValueByMethod(Method method, Class annotationClazz) { return (T) method.getAnnotation(annotationClazz); } /** * 获取指定Field上的指定注解 * @param field 目标 成员变量 * @param annotationClazz 注解类的Class对象 * @param <T> 注解类型 * @return 注解...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\utils\AnnotationUtil.java
2
请完成以下Java代码
public class WEBUI_ProductsProposal_SaveProductPriceToCurrentPriceListVersion extends ProductsProposalViewBasedProcess { private final IPriceListDAO pricesListsRepo = Services.get(IPriceListDAO.class); @Override public final ProcessPreconditionsResolution checkPreconditionsApplicable() { if (!hasChangedRows()) ...
pricesListsRepo.updateProductPrice(UpdateProductPriceRequest.builder() .productPriceId(productPriceId) .priceStd(userEnteredPriceValue) .build()); } // // Save a new product price which was copied from some other price list version else if (row.getCopiedFromProductPriceId() != null) { produc...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\products_proposal\process\WEBUI_ProductsProposal_SaveProductPriceToCurrentPriceListVersion.java
1
请完成以下Java代码
private Stream<IShipmentScheduleSegment> extractPickingBOMsStorageSegments(final OlAndSched olAndSched) { try (final MDCCloseable ignored = ShipmentSchedulesMDC.putShipmentScheduleId(olAndSched.getShipmentScheduleId())) { final PickingBOMsReversedIndex pickingBOMsReversedIndex = pickingBOMService.getPickingBOMs...
for (final ProductId pickingBOMProductId : pickingBOMProductIds) { final ImmutableShipmentScheduleSegment segment = ImmutableShipmentScheduleSegment.builder() .anyBPartner() .productId(pickingBOMProductId.getRepoId()) .locatorIds(locatorRepoIds) .build(); logger.debug("Add for ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\api\impl\ShipmentScheduleUpdater.java
1
请完成以下Java代码
public Criteria andUserAgentNotIn(List<String> values) { addCriterion("user_agent not in", values, "userAgent"); return (Criteria) this; } public Criteria andUserAgentBetween(String value1, String value2) { addCriterion("user_agent between", value1, value2, "userAgen...
public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); ...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsAdminLoginLogExample.java
1
请完成以下Java代码
protected PricingConditionsRowData createPricingConditionsRowData(final CreateViewRequest request) { final Set<ProductId> productIds = ProductId.ofRepoIds(request.getFilterOnlyIds()); Check.assumeNotEmpty(productIds, "productIds is not empty"); final IProductDAO productsRepo = Services.get(IProductDAO.class); ...
final IPricingBL pricingBL = Services.get(IPricingBL.class); final PricingConditionsBreak pricingConditionsBreak = request.getPricingConditionsBreak(); final IEditablePricingContext pricingCtx = pricingBL.createPricingContext(); final ProductId productId = pricingConditionsBreak.getMatchCriteria().getProductId(...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\pricingconditions\view\ProductPricingConditionsViewFactory.java
1
请完成以下Java代码
public class RecordMessagingMessageListenerAdapter<K, V> extends MessagingMessageListenerAdapter<K, V> implements AcknowledgingConsumerAwareMessageListener<K, V> { public RecordMessagingMessageListenerAdapter(@Nullable Object bean, @Nullable Method method) { this(bean, method, null); } public RecordMessagingMe...
Message<?> message; if (isConversionNeeded()) { message = toMessagingMessage(record, acknowledgment, consumer); } else { message = NULL_MESSAGE; } if (logger.isDebugEnabled()) { RecordMessageConverter messageConverter = getMessageConverter(); if (!(messageConverter instanceof JacksonProjectingMess...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\adapter\RecordMessagingMessageListenerAdapter.java
1
请完成以下Java代码
public class DeleteTaskPayload implements Payload { private String id; private String taskId; private String reason; public DeleteTaskPayload() { this.id = UUID.randomUUID().toString(); } public DeleteTaskPayload(String taskId, String reason) { this(); this.taskId = ta...
public void setTaskId(String taskId) { this.taskId = taskId; } public String getReason() { return reason; } public boolean hasReason() { return reason != null; } public void setReason(String reason) { this.reason = reason; } }
repos\Activiti-develop\activiti-api\activiti-api-task-model\src\main\java\org\activiti\api\task\model\payloads\DeleteTaskPayload.java
1
请完成以下Java代码
public void afterPropertiesSet() { checkIfValidList(this.providers); } @Override public Object decide(Authentication authentication, Object object, Collection<ConfigAttribute> config, Object returnedObject) throws AccessDeniedException { Object result = returnedObject; for (AfterInvocationProvider provider...
} /** * Iterates through all <code>AfterInvocationProvider</code>s and ensures each can * support the presented class. * <p> * If one or more providers cannot support the presented class, <code>false</code> is * returned. * @param clazz the secure object class being queries * @return if the <code>AfterI...
repos\spring-security-main\access\src\main\java\org\springframework\security\access\intercept\AfterInvocationProviderManager.java
1
请完成以下Java代码
public class PlanItemUtil { /** * Returns all parent plan items, ordered from direct parent plan item to outermost. */ public static List<PlanItem> getAllParentPlanItems(PlanItem planItem) { List<PlanItem> parentPlanItems = new ArrayList<>(); internalGetParentPlanItems(planItem, paren...
public static List<PlanItem> getAllChildPlanItems(PlanFragment planFragment) { List<PlanItem> planItems = new ArrayList<>(); internalGetAllChildPlanItems(planFragment, planItems); return planItems; } protected static void internalGetAllChildPlanItems(PlanFragment planFragment, List<Plan...
repos\flowable-engine-main\modules\flowable-cmmn-converter\src\main\java\org\flowable\cmmn\converter\util\PlanItemUtil.java
1
请在Spring Boot框架中完成以下Java代码
public @NonNull String getHandledTableName() { return I_C_Invoice.Table_Name; } @Override public StandardDocumentReportType getStandardDocumentReportType() { return StandardDocumentReportType.INVOICE; } @Override public @NonNull DocumentReportInfo getDocumentReportInfo( @NonNull final TableRecordRefere...
.bPartnerLocationId(BPartnerLocationId.ofRepoId(bpartnerId, invoice.getC_BPartner_Location_ID())) .docTypeId(docTypeId) .onlyCopiesGreaterZero(true) .build(); return DocumentReportInfo.builder() .recordRef(TableRecordReference.of(I_C_Invoice.Table_Name, invoiceId)) .reportProcessId(util.getReport...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\service\InvoiceDocumentReportAdvisor.java
2
请在Spring Boot框架中完成以下Java代码
public class CachingProviderAutoConfiguration { protected static final Set<String> SPRING_CACHE_TYPES = asSet("gemfire", "geode"); protected static final String SPRING_CACHE_TYPE_PROPERTY = "spring.cache.type"; private final CacheManagerCustomizers cacheManagerCustomizers; private final CacheProperties cachePro...
} Optional<CacheManagerCustomizers> getCacheManagerCustomizers() { return Optional.ofNullable(this.cacheManagerCustomizers); } Optional<CacheProperties> getCacheProperties() { return Optional.ofNullable(this.cacheProperties); } @PostConstruct public void onGeodeCachingInitialization() { getCacheManagerCu...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\CachingProviderAutoConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public void goodProcess(GoodListResponse goodListResponse){ for(GoodResponse goodResponse: goodListResponse.getGoodList()) { Retailer retailer = retailerRepository.findByInternalCode(goodResponse.getGoodId()).orElse(null); if(retailer == null) continue; ...
private void removeOutdatedGoodsFromBuckets(List<Good> outdatedGoods){ for(Good good: outdatedGoods) { for(User user: userRepository.findAll()) { orderRepository.findFirstByStatusAndUser(OrderStatus.NEW, user) .flatMap(orders -> orderDetai...
repos\SpringBoot-Projects-FullStack-master\Part-9.SpringBoot-React-Projects\Project-2.SpringBoot-React-ShoppingMall\fullstack\backend\src\main\java\com\urunov\service\GoodConsumeService.java
2
请完成以下Java代码
public BPartnerId getBPartnerId() { return bpartnerId; } public Builder setBPartnerId(final BPartnerId bpartnerId) { this.bpartnerId = bpartnerId; return this; } public @Nullable BankAccountId getBPartnerBankAccountId() { return bpBankAccountId; } public Builder setBPartnerBankAccountId...
public BigDecimal getPayAmt() { final BigDecimal openAmt = getOpenAmt(); final BigDecimal discountAmt = getDiscountAmt(); return openAmt.subtract(discountAmt); } public BigDecimal getDiscountAmt() { return CoalesceUtil.coalesceNotNull(_discountAmt, BigDecimal.ZERO); } public Builder setDiscoun...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\impl\PaySelectionLineCandidate.java
1
请完成以下Java代码
public final void selectRowsByInvoiceCandidateIds(final Collection<Integer> invoiceCandidateIds) { if (invoiceCandidateIds == null || invoiceCandidateIds.isEmpty()) { return; } final List<IInvoiceCandidateRow> rowsChanged = new ArrayList<>(); for (final IInvoiceCandidateRow row : getRowsInnerList()) { ...
/** * @return latest {@link IInvoiceCandidateRow#getDateAcct()} of selected rows */ public final Date getLatestDateAcctOfSelectedRows() { Date latestDateAcct = null; for (final IInvoiceCandidateRow row : getRowsSelected()) { final Date dateAcct = row.getDateAcct(); latestDateAcct = TimeUtil.max(lates...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.swingui\src\main\java\de\metas\banking\payment\paymentallocation\model\InvoiceCandidatesTableModel.java
1
请完成以下Java代码
public Id getOrderIdFromClientRequest(final Object soapRequestObj) { final BestellstatusAbfragen soapRequest = castToRequestFromClient(soapRequestObj); final Id orderId = Id.of(soapRequest.getBestellId()); return orderId; } @Override public ClientSoftwareId getClientSoftwareIdFromClientRequest(final Object s...
{ return toJAXB(response); } private JAXBElement<BestellstatusAbfragenResponse> toJAXB(final OrderStatusResponse response) { final BestellstatusAntwort soapResponseContent = jaxbObjectFactory.createBestellstatusAntwort(); soapResponseContent.setId(response.getOrderId().getValueAsString()); soapResponseConte...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.commons\src\main\java\de\metas\vertical\pharma\msv3\protocol\order\v1\OrderStatusJAXBConvertersV1.java
1
请在Spring Boot框架中完成以下Java代码
private static Map<String, Object> request(SortedMap<String, String> paramMap, String requestUrl) { logger.info("鉴权请求地址:[{}],请求参数:[{}]", requestUrl, paramMap); HttpClient httpClient = new HttpClient(); HttpConnectionManagerParams managerParams = httpClient.getHttpConnectionManager().getParams();...
/** * 签名 * * @param paramMap 签名参数 * @param paySecret 签名秘钥 * @return */ private static String getSign(SortedMap<String, String> paramMap, String paySecret) { StringBuilder signBuilder = new StringBuilder(); for (Map.Entry<String, String> entry : paramMap.entrySet()) { ...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\utils\auth\AuthUtil.java
2
请完成以下Java代码
public void submitFormProperties(Map<String, String> properties, ExecutionEntity execution) { Map<String, String> propertiesCopy = new HashMap<>(properties); for (FormPropertyHandler formPropertyHandler : formPropertyHandlers) { // submitFormProperty will remove all the keys which it takes c...
public String getDeploymentId() { return deploymentId; } public void setDeploymentId(String deploymentId) { this.deploymentId = deploymentId; } public List<FormPropertyHandler> getFormPropertyHandlers() { return formPropertyHandlers; } public void setFormPropertyHandle...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\form\DefaultFormHandler.java
1
请在Spring Boot框架中完成以下Java代码
public void setTokenUri(@Nullable String tokenUri) { this.tokenUri = tokenUri; } public @Nullable String getUserInfoUri() { return this.userInfoUri; } public void setUserInfoUri(@Nullable String userInfoUri) { this.userInfoUri = userInfoUri; } public @Nullable String getUserInfoAuthenticationMet...
public void setUserNameAttribute(@Nullable String userNameAttribute) { this.userNameAttribute = userNameAttribute; } public @Nullable String getJwkSetUri() { return this.jwkSetUri; } public void setJwkSetUri(@Nullable String jwkSetUri) { this.jwkSetUri = jwkSetUri; } public @Nullable String getI...
repos\spring-boot-4.0.1\module\spring-boot-security-oauth2-client\src\main\java\org\springframework\boot\security\oauth2\client\autoconfigure\OAuth2ClientProperties.java
2
请完成以下Java代码
public int read() throws IOException { int read = (this.headerStream != null) ? this.headerStream.read() : -1; if (read != -1) { this.position++; if (this.position >= this.headerLength) { this.headerStream = null; } return read; } return super.read(); } @Override public int read(byte[] b) th...
} } if (this.position >= this.headerLength) { this.headerStream = null; } return read; } boolean hasZipHeader() { return Arrays.equals(this.header, ZIP_HEADER); } private int readRemainder(byte[] b, int off, int len) throws IOException { int read = super.read(b, off, len); if (read > 0) { this...
repos\spring-boot-4.0.1\loader\spring-boot-loader-tools\src\main\java\org\springframework\boot\loader\tools\ZipHeaderPeekInputStream.java
1
请在Spring Boot框架中完成以下Java代码
public String updateEmployee(@PathVariable("id") int id, @RequestParam(value = "lastName", required = true) String lastName, @RequestParam(value = "email", required = true) String email , @RequestParam(value = "gender", required = true) int gender , @RequestParam(value = "dId", required ...
@PostMapping(value = "") public String postEmployee(@RequestParam(value = "lastName", required = true) String lastName, @RequestParam(value = "email", required = true) String email , @RequestParam(value = "gender", required = true) int gender , @RequestParam(value = "dId", required = ...
repos\SpringBootLearning-master (1)\springboot-cache\src\main\java\com\gf\controller\EmployeeController.java
2
请在Spring Boot框架中完成以下Java代码
private void cloneWFNodeProductsForWFNode(@NonNull final I_AD_WF_Node toWFNode, @NonNull final I_AD_WF_Node fromWFNode) { getWFNodeProductsByWorkflowIdAndWFNodeId(WorkflowId.ofRepoId(fromWFNode.getAD_Workflow_ID()), WFNodeId.ofRepoId(fromWFNode.getAD_WF_Node_ID())) .forEach(wfNodeProduct -> cloneWFNodeProductAnd...
.collect(ImmutableList.toImmutableList()); } private void cloneWFNodeProductAndSetNewWorkflowAndWFNode( final @NonNull I_PP_WF_Node_Product wfNodeProduct, final @NonNull WFNodeId toWFNodeId, final @NonNull WorkflowId toWorkflowId) { final I_PP_WF_Node_Product newWFNodeProduct = InterfaceWrapperHelper.new...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\workflow\service\impl\AD_WF_Node_CopyRecordSupport.java
2
请完成以下Java代码
public String toString() { return MoreObjects.toStringHelper(this) .omitNullValues() .add("elements", elements.isEmpty() ? null : elements) .toString(); } public List<DocumentLayoutElementDescriptor> getElements() { return elements; } public static final class Builder { private final List<Doc...
@Override public String toString() { return MoreObjects.toStringHelper(this) .add("elements-count", elementBuilders.size()) .toString(); } public Builder addElement(final DocumentLayoutElementDescriptor.Builder elementBuilder) { Check.assumeNotNull(elementBuilder, "Parameter elementBuilder is...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\address\AddressLayout.java
1
请在Spring Boot框架中完成以下Java代码
public Map<String, CaseDefinitionDto> getDeployedCaseDefinitions() { return deployedCaseDefinitions; } public Map<String, DecisionDefinitionDto> getDeployedDecisionDefinitions() { return deployedDecisionDefinitions; } public Map<String, DecisionRequirementsDefinitionDto> getDeployedDecisionRequirement...
for (CaseDefinition caseDefinition : deployedCaseDefinitions) { dto.deployedCaseDefinitions .put(caseDefinition.getId(), CaseDefinitionDto.fromCaseDefinition(caseDefinition)); } } List<DecisionDefinition> deployedDecisionDefinitions = deployment.getDeployedDecisionDefinitions(); if ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\repository\DeploymentWithDefinitionsDto.java
2
请完成以下Java代码
public static EAN13 ofNullableString(@Nullable final String barcode) { final String barcodeNorm = StringUtils.trimBlankToNull(barcode); return barcodeNorm != null ? EAN13Parser.parse(barcodeNorm).orElseThrow() : null; } @Override @Deprecated public String toString() {return getAsString();} @JsonValu...
* @return true if internal or variable measure EAN13 (i.e. starts with prefix 29) */ public boolean isInternalUseOrVariableMeasure() {return prefix.isInternalUseOrVariableMeasure();} public Optional<BigDecimal> getWeightInKg() {return Optional.ofNullable(weightInKg);} public GTIN toGTIN() {return GTIN.ofEAN13(th...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\gs1\ean13\EAN13.java
1
请完成以下Java代码
public class ProcessInstanceDto extends LinkableDto { private String id; private String definitionId; private String businessKey; private String caseInstanceId; private boolean ended; private boolean suspended; private String tenantId; private String definitionKey; public ProcessInstanceDto() { } ...
public String getBusinessKey() { return businessKey; } public String getCaseInstanceId() { return caseInstanceId; } public boolean isEnded() { return ended; } public boolean isSuspended() { return suspended; } public String getTenantId() { return tenantId; } public static Pr...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\ProcessInstanceDto.java
1
请完成以下Java代码
public Collection<I_M_ProductScalePrice> retrieveScalePrices(final int productPriceId, final String trxName) { return new Query(Env.getCtx(), I_M_ProductScalePrice.Table_Name, WHERE_PRODUCT_SCALE_PRICE, trxName) .setParameters(productPriceId) .setClient_ID() .setOnlyActiveRecords(true) .list(I_M_Prod...
if (createNew) { logger.debug("Returning new instance for M_ProductPrice " + productPriceId + " and quantity " + qty); final I_M_ProductScalePrice newInstance = createScalePrice(trxName); newInstance.setM_ProductPrice_ID(productPriceId); newInstance.setQty(qty); return newInstance; } retur...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\product\impl\ProductPA.java
1
请完成以下Java代码
public boolean isNullFieldValue () { Object oo = get_Value(COLUMNNAME_IsNullFieldValue); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Operation AD_Reference_ID=205 */ public static final int OPERATION_AD_Ref...
} /** Get Arbeitsvorgang . @return Compare Operation */ public String getOperation () { return (String)get_Value(COLUMNNAME_Operation); } /** Type AD_Reference_ID=540202 */ public static final int TYPE_AD_Reference_ID=540202; /** Field Value = FV */ public static final String TYPE_FieldValue = "FV"; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\adempiere\model\X_AD_TriggerUI_Criteria.java
1
请在Spring Boot框架中完成以下Java代码
public R<List<RoleVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> role, BladeUser bladeUser) { QueryWrapper<Role> queryWrapper = Condition.getQueryWrapper(role, Role.class); List<Role> list = roleService.list((!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambd...
return R.status(roleService.saveOrUpdate(role)); } /** * 删除 */ @PostMapping("/remove") @ApiOperationSupport(order = 6) @Operation(summary = "删除", description = "传入ids") public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { CacheUtil.clear(SYS_CACHE); return R.statu...
repos\SpringBlade-master\blade-service\blade-system\src\main\java\org\springblade\system\controller\RoleController.java
2
请完成以下Java代码
public class RateLimitUtil { public static List<RateLimitEntry> parseConfig(String config) { if (config == null || config.isEmpty()) { return Collections.emptyList(); } return Arrays.stream(config.split(",")) .map(RateLimitEntry::parse) .toList();...
.map(e -> e.getValue() + ":" + e.getKey()) .collect(Collectors.joining(",")); } public static boolean isValid(String configStr) { List<RateLimitEntry> limitedApiEntries = parseConfig(configStr); Set<Long> distinctDurations = new HashSet<>(); for (RateLimitEntry entry : l...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\limit\RateLimitUtil.java
1
请完成以下Java代码
public static InOutAndLineId ofRepoId(@NonNull final InOutId inOutId, final int inOutLineRepoId) { return new InOutAndLineId(inOutId, InOutLineId.ofRepoId(inOutLineRepoId)); } @Nullable public static InOutAndLineId ofRepoIdOrNull(final int inOutRepoId, final int inOutLineRepoId) { final InOutId inoutId = InOu...
} @JsonProperty("inOutId") InOutId inOutId; @JsonProperty("inOutLineId") InOutLineId inOutLineId; @JsonCreator private InOutAndLineId( @JsonProperty("inOutId") @NonNull final InOutId inOutId, @JsonProperty("inOutLineId") @NonNull final InOutLineId inOutLineId) { this.inOutId = inOutId; this.inOutLin...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\inout\InOutAndLineId.java
1
请完成以下Java代码
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { logger.info("[doGet][uri: {}]", req.getRequestURI()); } }); servletRegistrationBean.setUrlMappings(Collections.singleton("/test/01")); return servletRegistra...
return new ServletListenerRegistrationBean<>(new ServletContextListener() { @Override public void contextInitialized(ServletContextEvent sce) { logger.info("[contextInitialized]"); } @Override public void contextDestroyed(ServletContextEvent ...
repos\SpringBoot-Labs-master\lab-27\lab-27-webflux-03\src\main\java\cn\iocoder\springboot\lab27\springwebflux\Application.java
1
请完成以下Java代码
public class ServletApplicationFactory extends DefaultApplicationFactory { private final ServletContext servletContext; private final ServerProperties server; private final ManagementServerProperties management; private final InstanceProperties instance; private final DispatcherServletPath dispatcherServletPa...
} if (isManagementPortEqual()) { return UriComponentsBuilder.fromUriString(getServiceUrl()) .path("/") .path(getDispatcherServletPrefix()) .path(getManagementContextPath()) .toUriString(); } Ssl ssl = (management.getSsl() != null) ? management.getSsl() : server.getSsl(); return UriComponent...
repos\spring-boot-admin-master\spring-boot-admin-client\src\main\java\de\codecentric\boot\admin\client\registration\ServletApplicationFactory.java
1
请完成以下Java代码
static public <T> IterableDecorator<T, T> filter(Iterable<T> source, Predicate<T> filter) { return new IterableDecorator<>(source, Function.identity(), filter); } public static class IterableDecorator<U, T> implements Iterable<T> { private final Function<U, T> transform; private final P...
if (next == null) { throw new NoSuchElementException(); } T val = next; next = null; return val; } private void maybeFetchNext() { if (next == null) { if (source.hasNext()) { U val = source.n...
repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\util\Iterables.java
1
请完成以下Java代码
public class MainClass { public static final long MINUTES = 1000 * 60; public static void main(String[] args) throws IOException { SlackClientRuntimeConfig runtimeConfig = SlackClientRuntimeConfig.builder() .setTokenSupplier(() -> "<Your API Token>") .build(); SlackClie...
Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { diskSpaceErrorChecker10pct.check(); } }, 0, 5 * MINUTES); timer.scheduleAtFixedRate(new TimerTask() { @Override public ...
repos\tutorials-master\saas-modules\slack\src\main\java\com\baeldung\examples\slack\MainClass.java
1
请完成以下Java代码
public Mono<RSocket> accept(ConnectionSetupPayload setup, RSocket sendingSocket) { MimeType dataMimeType = parseMimeType(setup.dataMimeType(), this.defaultDataMimeType); Assert.notNull(dataMimeType, "No `dataMimeType` in ConnectionSetupPayload and no default value"); MimeType metadataMimeType = parseMimeType(setu...
private @Nullable MimeType parseMimeType(String str, @Nullable MimeType defaultMimeType) { return StringUtils.hasText(str) ? MimeTypeUtils.parseMimeType(str) : defaultMimeType; } void setDefaultDataMimeType(@Nullable MimeType defaultDataMimeType) { this.defaultDataMimeType = defaultDataMimeType; } void setDef...
repos\spring-security-main\rsocket\src\main\java\org\springframework\security\rsocket\core\PayloadSocketAcceptor.java
1
请完成以下Java代码
public static ShipmentAllocationBestBeforePolicy ofCode(@NonNull final String code) { final ShipmentAllocationBestBeforePolicy type = typesByCode.get(code); if (type == null) { throw new AdempiereException("No " + ShipmentAllocationBestBeforePolicy.class + " found for code: " + code); } return type; } ...
{ final LocalDate bestBefore1Effective = CoalesceUtil.coalesceNotNull(bestBefore1, LocalDate.MAX); final LocalDate bestBefore2Effective = CoalesceUtil.coalesceNotNull(bestBefore2, LocalDate.MAX); return bestBefore1Effective.compareTo(bestBefore2Effective); } else if (this == Newest_First) { final Loca...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\ShipmentAllocationBestBeforePolicy.java
1
请在Spring Boot框架中完成以下Java代码
public class EdqsExecutors { private final EdqsConfig edqsConfig; private ExecutorService consumersExecutor; private ExecutorService consumerTaskExecutor; private ScheduledExecutorService scheduler; private ListeningExecutorService requestExecutor; @PostConstruct private void init() { ...
private void destroy() { if (consumersExecutor != null) { consumersExecutor.shutdownNow(); } if (consumerTaskExecutor != null) { consumerTaskExecutor.shutdownNow(); } if (scheduler != null) { scheduler.shutdownNow(); } if (reque...
repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\edqs\EdqsExecutors.java
2
请完成以下Java代码
public void addAttributeStorageListener(final IAttributeStorageListener listener) { Check.assumeNotNull(listener, "listener not null"); if (attributeStorageListeners.contains(listener)) { // already added return; } attributeStorageListeners.add(listener); // // Update factory(the delegate) if is ...
@Override public void setHUAttributesDAO(final IHUAttributesDAO huAttributesDAO) { this.huAttributesDAO = huAttributesDAO; // // Update factory if is instantiated if (factory != null) { factory.setHUAttributesDAO(huAttributesDAO); } } @Override public IHUStorageDAO getHUStorageDAO() { return ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\ClassAttributeStorageFactory.java
1
请完成以下Java代码
void createBinaryTree() { int[] point = new int[VocabWord.MAX_CODE_LENGTH]; char[] code = new char[VocabWord.MAX_CODE_LENGTH]; int[] count = new int[vocabSize * 2 + 1]; char[] binary = new char[vocabSize * 2 + 1]; int[] parentNode = new int[vocabSize * 2 + 1]; for (i...
parentNode[min2i] = vocabSize + i; binary[min2i] = 1; } // Now assign binary code to each vocabulary word for (int j = 0; j < vocabSize; j++) { int k = j; int i = 0; while (true) { code[i] = binary[k]; ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\Corpus.java
1
请在Spring Boot框架中完成以下Java代码
public class HistoricTaskLogEntryBaseResource { private static Map<String, QueryProperty> allowedSortProperties = new HashMap<>(); static { allowedSortProperties.put("logNumber", HistoricTaskLogEntryQueryProperty.LOG_NUMBER); allowedSortProperties.put("timeStamp", HistoricTaskLogEntryQueryProp...
if (request.getFrom() != null) { query.from(RequestUtil.getDate(allRequestParams, "from")); } if (request.getTo() != null) { query.to(RequestUtil.getDate(allRequestParams, "to")); } if (request.getTenantId() != null) { query.tenantId(allRequestParams...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricTaskLogEntryBaseResource.java
2
请完成以下Java代码
public List<Quote> getQuotes(String baseCurrency, LocalDate date) { List<String> currencyQuery = new ArrayList<>(); Currency.getAvailableCurrencies().forEach(currency -> { if (!baseCurrency.equals(currency.getCurrencyCode())) { currencyQuery.add(String.format(URL_PROVIDER, b...
} private static Quote constructQuote(Map summaryDetail) { final String currency = (String) summaryDetail.get("currency"); final Map ask = (Map) summaryDetail.get("ask"); final Map bid = (Map) summaryDetail.get("bid"); final BigDecimal askPrice = (BigDecimal) ask.get("raw"); ...
repos\tutorials-master\core-java-modules\java-spi\exchange-rate-impl\src\main\java\com\baeldung\rate\impl\YahooQuoteManagerImpl.java
1
请完成以下Java代码
public static PickingJobScheduleCollection ofCollection(@NonNull final Collection<PickingJobSchedule> list) { return list.isEmpty() ? EMPTY : new PickingJobScheduleCollection(ImmutableList.copyOf(list)); } public static Collector<PickingJobSchedule, ?, PickingJobScheduleCollection> collect() {return GuavaCollecto...
.map(PickingJobSchedule::getShipmentScheduleAndJobScheduleId) .collect(ShipmentScheduleAndJobScheduleIdSet.collect()); } public boolean isAllProcessed() { return list.stream().allMatch(PickingJobSchedule::isProcessed); } public Optional<Quantity> getQtyToPick() { return list.stream() .map(PickingJob...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\picking\job_schedule\model\PickingJobScheduleCollection.java
1
请完成以下Java代码
public void setM_HU(final de.metas.handlingunits.model.I_M_HU M_HU) { set_ValueFromPO(COLUMNNAME_M_HU_ID, de.metas.handlingunits.model.I_M_HU.class, M_HU); } @Override public void setM_HU_ID (final int M_HU_ID) { if (M_HU_ID < 1) set_ValueNoCheck (COLUMNNAME_M_HU_ID, null); else set_ValueNoCheck (CO...
set_Value (COLUMNNAME_M_Product_ID, null); else set_Value (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public void setQty (final BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } @Override publ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Storage_Snapshot.java
1
请在Spring Boot框架中完成以下Java代码
public I_DD_Order getDDOrderById(final DDOrderId ddOrderId) { return ddOrderService.getById(ddOrderId); } public Map<DDOrderId, List<I_DD_OrderLine>> getLinesByDDOrderIds(final Set<DDOrderId> ddOrderIds) { return ddOrderService.streamLinesByDDOrderIds(ddOrderIds) .collect(Collectors.groupingBy(ddOrderLine ...
} public HUInfo getHUInfo(final HuId huId) {return huService.getHUInfoById(huId);} @Nullable public SalesOrderRef getSalesOderRef(@NonNull final I_DD_Order ddOrder) { final OrderId salesOrderId = OrderId.ofRepoIdOrNull(ddOrder.getC_Order_ID()); return salesOrderId != null ? sourceDocService.getSalesOderRef(sa...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\job\service\DistributionJobLoaderSupportingServices.java
2
请完成以下Java代码
public class SmsAuthenticationToken extends AbstractAuthenticationToken { private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID; private final Object principal; public SmsAuthenticationToken(String mobile) { super(null); this.principal = mobile; ...
return null; } public Object getPrincipal() { return this.principal; } public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException { if (isAuthenticated) { throw new IllegalArgumentException( "Cannot set this token to trusted - ...
repos\SpringAll-master\38.Spring-Security-SmsCode\src\main\java\cc\mrbird\validate\smscode\SmsAuthenticationToken.java
1
请完成以下Java代码
public class MutableDocumentFieldChangedEvent implements IDocumentFieldChangedEvent { public static final MutableDocumentFieldChangedEvent of(final DocumentPath documentPath, final String fieldName, DocumentFieldWidgetType widgetType) { return new MutableDocumentFieldChangedEvent(documentPath, fieldName, widgetType...
public String getFieldName() { return fieldName; } @Override public DocumentFieldWidgetType getWidgetType() { return widgetType; } @Override public boolean isValueSet() { return valueSet; } @Override public Object getValue() { return value; } public MutableDocumentFieldChangedEvent setValue(f...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\MutableDocumentFieldChangedEvent.java
1
请完成以下Java代码
public User getAuthor() { return author; } public void setAuthor(User author) { this.author = author; } public Date getCreatedAt() { return createdAt; } public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; } public Date getUpdatedAt()...
return updatedAt; } public void setUpdatedAt(Date updatedAt) { this.updatedAt = updatedAt; } @Override public String toString() { return "title: " + this.title + "\npost: " + this.post + "\nauthor: " + this.author +"\ncreatetdAt: " + ...
repos\tutorials-master\web-modules\vraptor\src\main\java\com\baeldung\models\Post.java
1
请完成以下Java代码
protected void paintContentBorderTopEdge( Graphics g, int x, int y, int w, int h, boolean drawBroken, Rectangle selRect, boolean isContentBorderPainted) { int right = x + w - 1; int top = y; g.setColor(selectHighlight); if (drawBroken && selRect.x >= x && selRect.x <= x + ...
g.fillRect(selRect.x + selRect.width + 2, top, right - 2 - selRect.x - selRect.width, 1); } else { g.fillRect(x + w - 2, top, 1, 1); } } else { g.fillRect(x, top, w - 1, 1); } } @Override protected int getTabsOverlay() { return 6; } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\plaf\AdempiereTabbedPaneUI.java
1
请完成以下Spring Boot application配置
server: port: 8080 servlet: context-path: /demo spring: rabbitmq: host: localhost port: 5672 username: guest password: guest virtual-host: / # 手动提交消息 listener:
simple: acknowledge-mode: manual direct: acknowledge-mode: manual
repos\spring-boot-demo-master\demo-mq-rabbitmq\src\main\resources\application.yml
2
请完成以下Java代码
public PageData<Tenant> findTenants(TenantId tenantId, PageLink pageLink) { return DaoUtil.toPageData(tenantRepository .findTenantsNextPage( pageLink.getTextSearch(), DaoUtil.toPageable(pageLink))); } @Override public PageData<TenantIn...
public List<TenantId> findTenantIdsByTenantProfileId(TenantProfileId tenantProfileId) { return tenantRepository.findTenantIdsByTenantProfileId(tenantProfileId.getId()).stream() .map(TenantId::fromUUID) .collect(Collectors.toList()); } @Override public Tenant findTena...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\tenant\JpaTenantDao.java
1
请完成以下Java代码
private void destroy() { if (queue != null) { queue.destroy(); } } @Override public ListenableFuture<Void> saveAsync(EdgeEvent edgeEvent) { log.debug("Saving EdgeEvent [{}] ", edgeEvent); if (edgeEvent.getId() == null) { UUID timeBased = Uuids.timeBas...
private ListenableFuture<Void> addToQueue(EdgeEventEntity entity) { return queue.add(entity); } @Override public PageData<EdgeEvent> findEdgeEvents(UUID tenantId, EdgeId edgeId, Long seqIdStart, Long seqIdEnd, TimePageLink pageLink) { return DaoUtil.toPageData( edgeEventRep...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\edge\JpaBaseEdgeEventDao.java
1
请完成以下Java代码
public boolean isDoNotIncludeVariables() { return doNotIncludeVariables; } public void setDoNotIncludeVariables(boolean doNotIncludeVariables) { this.doNotIncludeVariables = doNotIncludeVariables; } @Override public List<IOParameter> getInParameters() { return inParameters;...
setScriptFormat(otherElement.getScriptFormat()); setScript(otherElement.getScript()); setResultVariable(otherElement.getResultVariable()); setSkipExpression(otherElement.getSkipExpression()); setAutoStoreVariables(otherElement.isAutoStoreVariables()); setDoNotIncludeVariables(oth...
repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\ScriptTask.java
1
请完成以下Java代码
public CaseSentryPartQueryImpl standardEvent(String standardEvent) { ensureNotNull(NotValidException.class, "standardEvent", standardEvent); this.standardEvent = standardEvent; return this; } public CaseSentryPartQueryImpl variableEvent(String variableEvent) { ensureNotNull(NotValidException.class,...
} public List<CaseSentryPartEntity> executeList(CommandContext commandContext, Page page) { checkQueryOk(); List<CaseSentryPartEntity> result = commandContext .getCaseSentryPartManager() .findCaseSentryPartByQueryCriteria(this, page); return result; } // getters ////////////////////////...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\entity\runtime\CaseSentryPartQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public List < Employee > findAll() { return jdbcTemplate.query("select * from employees", new EmployeeRowMapper()); } public Optional < Employee > findById(long id) { return Optional.of(jdbcTemplate.queryForObject("select * from employees where id=?", new Object[] { id ...
public int insert(Employee employee) { return jdbcTemplate.update("insert into employees (id, first_name, last_name, email_address) " + "values(?, ?, ?, ?)", new Object[] { employee.getId(), employee.getFirstName(), employee.getLastName(), employee.getEmailId() }); } ...
repos\Spring-Boot-Advanced-Projects-main\springboot2-jdbc-crud-mysql-example\src\main\java\net\alanbinu\springboot2\jdbc\repository\EmployeeJDBCRepository.java
2
请在Spring Boot框架中完成以下Java代码
public class RecordAccessRevokeRequest { TableRecordReference recordRef; Principal principal; PermissionIssuer issuer; boolean revokeAllPermissions; ImmutableSet<Access> permissions; final UserId requestedBy; @Builder private RecordAccessRevokeRequest( @NonNull final TableRecordReference recordRef, @Non...
{ this.recordRef = recordRef; this.principal = principal; this.issuer = issuer; if (revokeAllPermissions) { this.revokeAllPermissions = true; this.permissions = ImmutableSet.of(); } else { Check.assumeNotEmpty(permissions, "permissions is not empty"); this.revokeAllPermissions = false; t...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\record_access\RecordAccessRevokeRequest.java
2
请完成以下Java代码
private boolean isMSV3ServerProduct(final MSV3ServerConfig serverConfig, final I_M_Product product) { if (!serverConfig.hasProducts()) { return false; } if (!product.isActive()) { return false; } final ProductCategoryId productCategoryId = ProductCategoryId.ofRepoId(product.getM_Product_Category_...
return false; } return true; } private MSV3ServerConfigService getServerConfigService() { return Adempiere.getBean(MSV3ServerConfigService.class); } private MSV3StockAvailabilityService getStockAvailabilityService() { return Adempiere.getBean(MSV3StockAvailabilityService.class); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server-peer-metasfresh\src\main\java\de\metas\vertical\pharma\msv3\server\peer\metasfresh\interceptor\M_Product.java
1
请完成以下Java代码
public boolean isSnapshotsEnabled() { return this.snapshotsEnabled; } public void setSnapshotsEnabled(boolean snapshotsEnabled) { this.snapshotsEnabled = snapshotsEnabled; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (...
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((this.name == null) ? 0 : this.name.hashCode()); result = prime * result + (this.releasesEnabled ? 1231 : 1237); result = prime * result + (this.snapshotsEnabled ? 1231 : 1237); result = prime * result + ((this.url == n...
repos\initializr-main\initializr-metadata\src\main\java\io\spring\initializr\metadata\Repository.java
1
请完成以下Java代码
public byte[] decodeUsingBigInteger(String hexString) { byte[] byteArray = new BigInteger(hexString, 16).toByteArray(); if (byteArray[0] == 0) { byte[] output = new byte[byteArray.length - 1]; System.arraycopy(byteArray, 1, output, 0, output.length); return output; ...
public byte[] decodeUsingGuava(String hexString) { return BaseEncoding.base16() .decode(hexString.toUpperCase()); } public String encodeUsingHexFormat(byte[] bytes) { HexFormat hexFormat = HexFormat.of(); return hexFormat.formatHex(bytes); } public byte[] decodeUsin...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-1\src\main\java\com\baeldung\algorithms\conversion\HexStringConverter.java
1
请完成以下Java代码
public boolean isDate() { return type == CellValueType.Date; } public java.util.Date dateValue() { return TimeUtil.asDate(valueObj); } public boolean isNumber() { return type == CellValueType.Number; } public double doubleValue() {
return ((Number)valueObj).doubleValue(); } public boolean isBoolean() { return type == CellValueType.Boolean; } public boolean booleanValue() { return (boolean)valueObj; } public String stringValue() { return valueObj.toString(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\spreadsheet\excel\CellValue.java
1
请在Spring Boot框架中完成以下Java代码
public List<CommentAssembly> findAllAssemblyByArticleId(Long userId, long articleId) { return assemblyRepository.findAllByArticleId(articleId, userId).stream() .map(commentMapper::toDomain) .toList(); } @Override public Comment save(Comment comment) { var ent...
interface CommentMapper { Comment toDomain(CommentJdbcEntity source); CommentJdbcEntity fromDomain(Comment source); @Mapping(target = "author", source = "source") CommentAssembly toDomain(CommentAssemblyJdbcEntity source); default Profile profile(CommentAssemblyJdbcEntity sou...
repos\realworld-backend-spring-master\service\src\main\java\com\github\al\realworld\infrastructure\db\jdbc\CommentJdbcRepositoryAdapter.java
2
请完成以下Java代码
private void updateHeaderInNewTrx(final Collection<OrderId> orderIds) { final ITrxManager trxManager = get_TrxManager(); trxManager.runInNewTrx(() -> updateHeaderNow(ImmutableSet.copyOf(orderIds))); } private static void updateHeaderNow(final Set<OrderId> orderIds) { // shall not happen if (orderIds.isEmpt...
new AdempiereException("Updating TotalLines failed for C_Order_IDs=" + orderIds); } } // Update Order Header: GrandTotal { final ArrayList<Object> sqlParams = new ArrayList<>(); final String sql = "UPDATE C_Order o " + " SET GrandTotal=TotalLines+" // SUM up C_OrderTax.TaxAmt only for those lin...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MOrderLine.java
1
请完成以下Java代码
public void setPostAuthenticationChecks(UserDetailsChecker postAuthenticationChecks) { Assert.notNull(this.postAuthenticationChecks, "postAuthenticationChecks cannot be null"); this.postAuthenticationChecks = postAuthenticationChecks; } /** * @since 5.5 */ @Override public void setMessageSource(MessageSour...
* @since 6.3 */ public void setCompromisedPasswordChecker(ReactiveCompromisedPasswordChecker compromisedPasswordChecker) { this.compromisedPasswordChecker = compromisedPasswordChecker; } /** * Allows subclasses to retrieve the <code>UserDetails</code> from an * implementation-specific location. * @param u...
repos\spring-security-main\core\src\main\java\org\springframework\security\authentication\AbstractUserDetailsReactiveAuthenticationManager.java
1
请在Spring Boot框架中完成以下Java代码
public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } public String getMessage() { return message; ...
this.message = message; } public String getType() { return type; } public void setType(String type) { this.type = type; } public boolean isSaveProcessInstanceId() { return saveProcessInstanceId; } public void setSaveProcessInstanceId(boolean saveProcessInstanc...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\engine\CommentRequest.java
2
请完成以下Java代码
public void notTakingTranistion(PvmTransition outgoingTransition) { logDebug( "001", "Not taking transition '{}', outgoing execution has ended.", outgoingTransition); } public void debugExecutesActivity(PvmExecutionImpl execution, ActivityImpl activity, String name) { logDebug( "002", "{} e...
public void interruptingExecution(String reason, boolean skipCustomListeners) { logDebug( "007", "Interrupting execution execution {}, {}", reason, skipCustomListeners); } public void debugEnterActivityInstance(PvmExecutionImpl pvmExecutionImpl, String parentActivityInstanceId) { logDebug( ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\PvmLogger.java
1
请完成以下Spring Boot application配置
# # Copyright 2015-2023 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
iases-package=sample.mybatis.freemarker.domain mybatis.scripting-language-driver.freemarker.template-file.base-dir=mappers/ mybatis.scripting-language-driver.freemarker.template-file.path-provider.includes-package-path=false mybatis.scripting-language-driver.freemarker.template-file.path-provider.separate-directory-pe...
repos\spring-boot-starter-master\mybatis-spring-boot-samples\mybatis-spring-boot-sample-freemarker\src\main\resources\application.properties
2
请完成以下Java代码
public Deque<?> parse(String searchParam) { Deque<Object> output = new LinkedList<>(); Deque<String> stack = new LinkedList<>(); Arrays.stream(searchParam.split("\\s+")).forEach(token -> { if (ops.containsKey(token)) { while (!stack.isEmpty() && isHigerPrecedenceOpe...
Matcher matcher = SpecCriteraRegex.matcher(token); while (matcher.find()) { output.push(new SpecSearchCriteria(matcher.group(1), matcher.group(2), matcher.group(3), matcher.group(4), matcher.group(5))); } } }); while (!stack.isEmpty()) ...
repos\tutorials-master\spring-web-modules\spring-rest-query-language\src\main\java\com\baeldung\web\util\CriteriaParser.java
1
请完成以下Java代码
public String getCategory() { return category; } public void setCategory(String category) { this.category = category; } @Override public String getJobType() { return jobType; } public void setJobType(String jobType) { this.jobType = jobType; } ...
} public void setJobHandlerConfiguration(String jobHandlerConfiguration) { this.jobHandlerConfiguration = jobHandlerConfiguration; } public String getRepeat() { return repeat; } public void setRepeat(String repeat) { this.repeat = repeat; } public Date getEndDate(...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\AbstractJobEntity.java
1
请完成以下Java代码
public String toString() { StringBuffer sb = new StringBuffer ("X_M_PromotionGroupLine[") .append(get_ID()).append("]"); return sb.toString(); } public I_M_Product getM_Product() throws RuntimeException { return (I_M_Product)MTable.get(getCtx(), I_M_Product.Table_Name) .getPO(getM...
@param M_PromotionGroup_ID Promotion Group */ public void setM_PromotionGroup_ID (int M_PromotionGroup_ID) { if (M_PromotionGroup_ID < 1) set_ValueNoCheck (COLUMNNAME_M_PromotionGroup_ID, null); else set_ValueNoCheck (COLUMNNAME_M_PromotionGroup_ID, Integer.valueOf(M_PromotionGroup_ID)); } /** Get Pr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PromotionGroupLine.java
1
请完成以下Java代码
public Boolean getIncludeEventSubscriptionsWithoutTenantId() { return includeEventSubscriptionsWithoutTenantId; } @CamundaQueryParam(value = "includeEventSubscriptionsWithoutTenantId", converter = BooleanConverter.class) public void setIncludeEventSubscriptionsWithoutTenantId(Boolean includeEventSubscription...
if (tenantIdIn != null && !tenantIdIn.isEmpty()) { query.tenantIdIn(tenantIdIn.toArray(new String[tenantIdIn.size()])); } if (TRUE.equals(withoutTenantId)) { query.withoutTenantId(); } if (TRUE.equals(includeEventSubscriptionsWithoutTenantId)) { query.includeEventSubscriptionsWithoutTe...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\EventSubscriptionQueryDto.java
1
请完成以下Java代码
public Attribute getByCode(final AttributeCode attributeCode) { final Attribute attribute = getByCodeOrNull(attributeCode); if (attribute == null) { throw new AdempiereException("No active attribute found for `" + attributeCode + "`"); } return attribute; } public Attribute getByCodeOrNull(final Attrib...
public Set<Attribute> getByCodes(final Set<AttributeCode> attributeCodes) { if (attributeCodes.isEmpty()) {return ImmutableSet.of();} return attributeCodes.stream() .distinct() .map(this::getByCode) .collect(ImmutableSet.toImmutableSet()); } @NonNull public ImmutableList<AttributeCode> getOrderedA...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\api\impl\AttributesMap.java
1
请完成以下Java代码
public String getPermissionsPolicy() { return permissionsPolicy; } public void setPermissionsPolicy(String permissionsPolicy) { this.permissionsPolicy = permissionsPolicy; } /** * @return the default/opt-out header names to disable */ public List<String> getDisable() { return disabledHeaders.stream().t...
/** * @return the default/opt-out header names to disable */ public Set<String> getDisabledHeaders() { return disabledHeaders; } /** * @return the default/opt-out header names to apply */ public Set<String> getDefaultHeaders() { return defaultHeaders; } @Override public String toString() { return...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\SecureHeadersProperties.java
1
请在Spring Boot框架中完成以下Java代码
public void setDefaultRedisSerializer(RedisSerializer<Object> defaultRedisSerializer) { this.defaultRedisSerializer = defaultRedisSerializer; } @Autowired(required = false) public void setSessionRepositoryCustomizer( ObjectProvider<ReactiveSessionRepositoryCustomizer<T>> sessionRepositoryCustomizers) { this....
.<String, Object>newSerializationContext(defaultSerializer) .key(keySerializer) .hashKey(keySerializer) .build(); return new ReactiveRedisTemplate<>(this.redisConnectionFactory, serializationContext); } public ReactiveRedisConnectionFactory getRedisConnectionFactory() { return this.redisConnectionFactor...
repos\spring-session-main\spring-session-data-redis\src\main\java\org\springframework\session\data\redis\config\annotation\web\server\AbstractRedisWebSessionConfiguration.java
2
请完成以下Java代码
public org.compiere.model.I_GL_JournalBatch getReversal() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_Reversal_ID, org.compiere.model.I_GL_JournalBatch.class); } @Override public void setReversal(org.compiere.model.I_GL_JournalBatch Reversal) { set_ValueFromPO(COLUMNNAME_Reversal_ID, org.compier...
/** Get Total Credit. @return Total Credit in document currency */ @Override public java.math.BigDecimal getTotalCr () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalCr); if (bd == null) return Env.ZERO; return bd; } /** Set Total Debit. @param TotalDr Total debit in document currenc...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_GL_JournalBatch.java
1
请完成以下Java代码
private Collection<EventLogId> getEventLogIdsUsingCacheOutOfTrx(@NonNull final Collection<UUID> uuids) { return uuid2eventLogId.getAllOrLoad(uuids, this::retrieveAllRecordIdOutOfTrx); } private ImmutableMap<UUID, EventLogId> retrieveAllRecordIdOutOfTrx(@NonNull final Collection<UUID> uuids) { if (uuids.isEmpty...
{ if (eventLogsWithError.isEmpty()) { return; } Services.get(IQueryBL.class) .createQueryBuilderOutOfTrx(I_AD_EventLog.class) .addInArrayFilter(I_AD_EventLog.COLUMNNAME_AD_EventLog_ID, eventLogsWithError) .create() .updateDirectly() .addSetColumnValue(I_AD_EventLog.COLUMNNAME_IsError, tr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\log\EventLogsRepository.java
1
请完成以下Java代码
public void save(final I_M_HU_Storage storage) { final SaveDecoupledHUStorageDAO delegate = getDelegate(storage); delegate.save(storage); } @Override public List<I_M_HU_Storage> retrieveStorages(final I_M_HU hu) { final SaveDecoupledHUStorageDAO delegate = getDelegate(hu); return delegate.retrieveStorages...
final SaveDecoupledHUStorageDAO delegate = getDelegate(item); delegate.save(item); } @Override public I_C_UOM getC_UOMOrNull(final I_M_HU hu) { final SaveDecoupledHUStorageDAO delegate = getDelegate(hu); return delegate.getC_UOMOrNull(hu); } @Override public UOMType getC_UOMTypeOrNull(final I_M_HU hu) {...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\storage\impl\SaveOnCommitHUStorageDAO.java
1
请完成以下Java代码
private ITranslatableString retrieveManufacturingOrderDocumentNo(final PPOrderId manufacturingOrderId) { return TranslatableStrings.anyLanguage(sourceDocService.getDocumentNoById(manufacturingOrderId)); } private ITranslatableString getProductName(final ProductId productId) { return productNames.computeIfAbsen...
pendingCollectProductsFromDDOrderIds.clear(); } if (!pendingCollectQuantitiesFromDDOrderIds.isEmpty()) { ddOrderService.streamLinesByDDOrderIds(pendingCollectQuantitiesFromDDOrderIds) .forEach(this::collectQuantity); pendingCollectQuantitiesFromDDOrderIds.clear(); } } private ITranslatableString ...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\launchers\facets\DistributionFacetsCollector.java
1
请完成以下Java代码
public boolean canRead(ResolvableType type, @Nullable MediaType mediaType) { Class<?> clazz = type.resolve(); return (clazz != null) ? canRead(clazz, mediaType) : canRead(mediaType); } @Override public boolean canRead(Class<?> clazz, @Nullable MediaType mediaType) { return this.delegate.canRead(clazz, m...
} @Override protected void writeInternal(T t, ResolvableType type, HttpOutputMessage outputMessage, @Nullable Map<String, Object> hints) throws IOException, HttpMessageNotWritableException { this.delegate.write(t, null, outputMessage); } @Override public T read(ResolvableType type, HttpInputMessage i...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\authentication\WebAuthnAuthenticationFilter.java
1
请在Spring Boot框架中完成以下Java代码
public void create(Database resources) { resources.setId(IdUtil.simpleUUID()); databaseRepository.save(resources); } @Override @Transactional(rollbackFor = Exception.class) public void update(Database resources) { Database database = databaseRepository.findById(resources.getId()...
@Override public void download(List<DatabaseDto> queryAll, HttpServletResponse response) throws IOException { List<Map<String, Object>> list = new ArrayList<>(); for (DatabaseDto databaseDto : queryAll) { Map<String,Object> map = new LinkedHashMap<>(); map.put("数据库名称", databa...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\maint\service\impl\DatabaseServiceImpl.java
2
请完成以下Java代码
public static DbSqlSession getDbSqlSession() { return getDbSqlSession(getCommandContext()); } public static DbSqlSession getDbSqlSession(CommandContext commandContext) { return commandContext.getSession(DbSqlSession.class); } public static EventResourceEntityManager getResource...
return getEventRegistryConfiguration(commandContext).getChannelDefinitionEntityManager(); } public static TableDataManager getTableDataManager() { return getTableDataManager(getCommandContext()); } public static TableDataManager getTableDataManager(CommandContext commandContext) { ...
repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\util\CommandContextUtil.java
1
请完成以下Java代码
public class HistoricCaseInstanceQueryProperty implements QueryProperty { private static final long serialVersionUID = 1L; private static final Map<String, HistoricCaseInstanceQueryProperty> properties = new HashMap<>(); public static final HistoricCaseInstanceQueryProperty CASE_INSTANCE_ID = new Histori...
public HistoricCaseInstanceQueryProperty(String name) { this.name = name; properties.put(name, this); } @Override public String getName() { return name; } public static HistoricCaseInstanceQueryProperty findByName(String propertyName) { return properties.get(propert...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\history\HistoricCaseInstanceQueryProperty.java
1
请完成以下Java代码
public EventModelBuilder resourceName(String resourceName) { this.resourceName = resourceName; return this; } @Override public EventModelBuilder category(String category) { this.category = category; return this; } @Override public EventModelBuilder paren...
@Override public EventDeployment deploy() { if (resourceName == null) { throw new FlowableIllegalArgumentException("A resource name is mandatory"); } EventModel eventModel = buildEventModel(); return eventRepository.createDeployment() .name(deploymen...
repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\model\EventModelBuilderImpl.java
1
请在Spring Boot框架中完成以下Java代码
PasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); } @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { // The memory user is not configured, but the UserService just created is configured into the AuthenticationManagerBuilder. a...
return object; } }) .and() .formLogin() .loginProcessingUrl("/login").permitAll() .and() .csrf().disable(); } @Bean CustomFilterInvocationSecurityMetadataSource cfisms() { return n...
repos\springboot-demo-master\security\src\main\java\com\et\security\config\WebSecurityConfig.java
2
请完成以下Java代码
public class IntroductionInline { public static void main(String[] args) { KnowledgeService service = new KnowledgeService(); Knowledge knowledge = service .newKnowledge() .newRule("Clear total sales") .forEach("$c", Customer.class) .execute(ctx -> { ...
Invoice invoice = new Invoice(randomCustomer, 100 * random.nextDouble()); sessionData.add(invoice); } knowledge .newStatelessSession() .insert(sessionData) .fire(); for (Customer c : customers) { System.out.printf("%s:\t$%,.2f%n", c.g...
repos\tutorials-master\rule-engines-modules\evrete\src\main\java\com\baeldung\evrete\introduction\IntroductionInline.java
1
请完成以下Java代码
public applet setName (String name) { addAttribute ("name", name); return (this); } /** * Serialized applet file. * * @param object * Serialized applet file. */ // someone give me a better description of what this does. public applet setObject (String object) { addAttri...
} /** * Add an element to the element * * @param element * a string representation of the element */ public applet addElement (String element) { addElementToRegistry (element); return (this); } /** * Add an element to the element * * @param element * ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\applet.java
1