instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public int add(MemberProductCollection productCollection) { int count = 0; if (productCollection.getProductId() == null) { return 0; } UmsMember member = memberService.getCurrentMember(); productCollection.setMemberId(member.getId()); productCollection.setMemb...
UmsMember member = memberService.getCurrentMember(); return productCollectionRepository.deleteByMemberIdAndProductId(member.getId(), productId); } @Override public Page<MemberProductCollection> list(Integer pageNum, Integer pageSize) { UmsMember member = memberService.getCurrentMember(); ...
repos\mall-master\mall-portal\src\main\java\com\macro\mall\portal\service\impl\MemberCollectionServiceImpl.java
2
请完成以下Java代码
private static void checkInput(int k, int[] list1, int[] list2) throws NoSuchElementException, IllegalArgumentException { if(list1 == null || list2 == null || k < 1) { throw new IllegalArgumentException(); } if(list1.length == 0 || list2.length == 0) { throw new Illegal...
while(i1 < list1.length && i2 < list2.length && (i1 + i2) < k) { if(list1[i1] < list2[i2]) { i1++; } else { i2++; } } if((i1 + i2) < k) { return i1 < list1.length ? list1[k - i2 - 1] : list2[k - i1 - 1]; } else if(i...
repos\tutorials-master\algorithms-modules\algorithms-searching\src\main\java\com\baeldung\algorithms\kthsmallest\KthSmallest.java
1
请完成以下Java代码
public boolean isPalindrome(String text) { String clean = text.replaceAll("\\s+", "") .toLowerCase(); int length = clean.length(); int forward = 0; int backward = length - 1; while (backward > forward) { char forwardChar = clean.charAt(forward++); ...
return recursivePalindrome(clean, 0, clean.length() - 1); } private boolean recursivePalindrome(String text, int forward, int backward) { if (forward == backward) return true; if ((text.charAt(forward)) != (text.charAt(backward))) return false; if (forward < back...
repos\tutorials-master\core-java-modules\core-java-string-algorithms-2\src\main\java\com\baeldung\palindrom\Palindrome.java
1
请在Spring Boot框架中完成以下Java代码
public void verification(Set<DeptDto> deptDtos) { Set<Long> deptIds = deptDtos.stream().map(DeptDto::getId).collect(Collectors.toSet()); if(userRepository.countByDepts(deptIds) > 0){ throw new BadRequestException("所选部门存在用户关联,请解除后再试!"); } if(roleRepository.countByDepts(deptIds...
} } if (flag){ deptDtos.add(deptDto); } } return deptDtos; } /** * 清理缓存 * @param id / */ public void delCaches(Long id){ List<User> users = userRepository.findByRoleDeptId(id); // 删除数据权限 redisUtils.de...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\service\impl\DeptServiceImpl.java
2
请完成以下Java代码
public IMigrationExecutorContext createInitialContext(final Properties ctx) { return new MigrationExecutorContext(ctx, this); } @Override public IMigrationExecutor newMigrationExecutor(final IMigrationExecutorContext migrationCtx, final int migrationId) { return new MigrationExecutor(migrationCtx, migrationId...
if (executorClass == null) { throw new AdempiereException("Step type not supported: " + stepType); } try { return executorClass .getConstructor(IMigrationExecutorContext.class, I_AD_MigrationStep.class) .newInstance(migrationCtx, step); } catch (Exception e) { throw new AdempiereExcept...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\executor\impl\MigrationExecutorProvider.java
1
请完成以下Java代码
private Container getContentPane() { final Window window = getWindow(); Check.assumeInstanceOf(window, RootPaneContainer.class, "RootPaneContainer (i.e JDialog, JFrame)"); final RootPaneContainer rootPaneContainer = (RootPaneContainer)window; return rootPaneContainer.getContentPane(); } protected String get...
pcs.addPropertyChangeListener(propertyName, listener); } public IInfoColumnController getInfoColumnController(final int index) { return p_layout[index].getColumnController(); } public boolean isLoading() { if (m_worker == null) { return false; } // Check for override. if (ignoreLoading) { r...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\Info.java
1
请完成以下Java代码
public class RootCauseFinder { public static Throwable findCauseUsingPlainJava(Throwable throwable) { Objects.requireNonNull(throwable); Throwable rootCause = throwable; while (rootCause.getCause() != null) { rootCause = rootCause.getCause(); } return rootCause; ...
super(ex); } } static class DateParseException extends Exception { DateParseException(String input) { super(input); } DateParseException(String input, Throwable thr) { super(input, thr); } } static class InvalidFormatException extends D...
repos\tutorials-master\core-java-modules\core-java-exceptions-2\src\main\java\com\baeldung\rootcausefinder\RootCauseFinder.java
1
请在Spring Boot框架中完成以下Java代码
private BigDecimal getPriceStd( @NonNull final ImportProductsRouteContext context, @NonNull final PriceListBasicInfo targetPriceListInfo) { final String productId = context.getJsonProduct().getId(); final List<JsonPrice> prices = context.getJsonProduct().getPrices(); if (prices == null || prices.isEmpty()...
{ processLogger.logMessage("No gross price info present for productId: " + productId, context.getPInstanceId()); return BigDecimal.ZERO; } return price.getGross(); } else { if (price.getNet() == null) { processLogger.logMessage("No net price info present for productId: " + productId, cont...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-shopware6\src\main\java\de\metas\camel\externalsystems\shopware6\product\processor\ProductPriceProcessor.java
2
请完成以下Java代码
public class JpaQueueDao extends JpaAbstractDao<QueueEntity, Queue> implements QueueDao, TenantEntityDao<Queue> { @Autowired private QueueRepository queueRepository; @Override protected Class<QueueEntity> getEntityClass() { return QueueEntity.class; } @Override protected JpaReposi...
return DaoUtil.convertDataList(entities); } @Override public List<Queue> findAllQueues() { List<QueueEntity> entities = Lists.newArrayList(queueRepository.findAll()); return DaoUtil.convertDataList(entities); } @Override public PageData<Queue> findQueuesByTenantId(TenantId tena...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\queue\JpaQueueDao.java
1
请完成以下Java代码
public String getName() { return name; } public void setName(String name) { this.name = name; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } NoticeTypeEnum(String name, String value) { th...
/** * 获取通知名称 * * @param value * @return */ public static String getNoticeNameByValue(String value){ value = value.replace("Notice",""); for (NoticeTypeEnum e : NoticeTypeEnum.values()) { if (e.getValue().equals(value)) { return e.getName(); ...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\constant\enums\NoticeTypeEnum.java
1
请完成以下Java代码
public class Book { @Id private String isbn; @Property("name") private String title; private Integer year; @Relationship(type = "WRITTEN_BY", direction = Relationship.Direction.OUTGOING) private Author author; public Book(String isbn, String title, Integer year) { this.isbn =...
public void setTitle(String title) { this.title = title; } public Integer getYear() { return year; } public void setYear(Integer year) { this.year = year; } public Author getAuthor() { return author; } public void setAuthor(Author author) { thi...
repos\tutorials-master\persistence-modules\spring-data-neo4j\src\main\java\com\baeldung\spring\data\neo4j\domain\Book.java
1
请完成以下Java代码
public String period (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) { String colName = mField.getColumnName(); if (value == null || isCalloutActive()) return ""; int AD_Client_ID = Env.getContextAsInt(ctx, WindowNo, "AD_Client_ID"); Timestamp DateAcct = null; if (colName.equ...
DB.close(rs, pstmt); } if (C_Period_ID != 0) mTab.setValue("C_Period_ID", new Integer(C_Period_ID)); } // When C_Period_ID is changed, check if in DateAcct range and set to end date if not else { String sql = "SELECT PeriodType, StartDate, EndDate " + "FROM C_Period WHERE C_Period_ID=?"; P...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\model\CalloutAsset.java
1
请完成以下Java代码
public void resolve() { if (this.rel == null) { throw new InvalidInitializrMetadataException("Invalid link " + this + ": rel attribute is mandatory"); } if (this.href == null) { throw new InvalidInitializrMetadataException("Invalid link " + this + ": href attribute is mandatory"); } Matcher matcher = VA...
} result.set(result.get().replace("{" + var + "}", value.toString())); }); try { return new URI(result.get()); } catch (URISyntaxException ex) { throw new IllegalStateException("Invalid URL", ex); } } public static Link create(String rel, String href) { return new Link(rel, href); } public st...
repos\initializr-main\initializr-metadata\src\main\java\io\spring\initializr\metadata\Link.java
1
请完成以下Java代码
public class King extends Person implements Serializable { /** * 名字 */ private String name; /** * 家系:家族关系 */ private String clan; /** * 年号:生活的时代 */ private String times; /** * 谥号:人死之后,后人给予评价 */ private String posthumousTitle; /** * 庙号:君主于...
} public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public King getSuccessor() { return successor; } public void setSuccessor(King successor) { this.successor = successor; } public List<Fat...
repos\springBoot-master\springboot-neo4j\src\main\java\cn\abel\neo4j\bean\King.java
1
请在Spring Boot框架中完成以下Java代码
public List<AuthorDtoNoSetters> fetchAuthorsNoSetters() { Query query = entityManager .createNativeQuery("SELECT name, age FROM author") .unwrap(org.hibernate.query.NativeQuery.class) .setResultTransformer( new AliasToBeanConstructorResultT...
public List<AuthorDtoWithSetters> fetchAuthorsWithSetters() { Query query = entityManager .createNativeQuery("SELECT name, age FROM author") .unwrap(org.hibernate.query.NativeQuery.class) .setResultTransformer( Transformers.aliasToBean(Auth...
repos\Hibernate-SpringBoot-master\HibernateSpringBootDtoResultTransformer\src\main\java\com\bookstore\dao\Dao.java
2
请完成以下Java代码
public DeviceCredentialsType getCredentialsType() { return credentialsType; } public void setCredentialsType(DeviceCredentialsType credentialsType) { this.credentialsType = credentialsType; } @Schema(requiredMode = Schema.RequiredMode.REQUIRED, description = "Unique Credentials Id per ...
} @Schema(description = "Value of the credentials. " + "Null in case of ACCESS_TOKEN credentials type. Base64 value in case of X509_CERTIFICATE. " + "Complex object in case of MQTT_BASIC and LWM2M_CREDENTIALS", example = "Null in case of ACCESS_TOKEN. See model definition.") public Stri...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\security\DeviceCredentials.java
1
请完成以下Java代码
public boolean isStandardHeaderFooter () { Object oo = get_Value(COLUMNNAME_IsStandardHeaderFooter); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Table Based. @param IsTableBased Table based List Rep...
{ Integer ii = (Integer)get_Value(COLUMNNAME_JasperProcess_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Name. @param Name Alphanumeric identifier of the entity */ @Override public void setName (java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PrintFormat.java
1
请在Spring Boot框架中完成以下Java代码
public BigInteger getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link BigInteger } * */ public void setValue(BigInteger value) { this.value = value; } /** * Defi...
* {@link CountryCodeType } * */ public CountryCodeType getBankCodeType() { return bankCodeType; } /** * Sets the value of the bankCodeType property. * * @param value * allowed object is * {@link CountryCodeType } * */ public vo...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\BankCodeCType.java
2
请在Spring Boot框架中完成以下Java代码
public class AuthenticationRestController { @Value("${2fa.enabled}") private boolean isTwoFaEnabled; @Autowired private UserService userService; @Autowired private TotpService totpService; @PostMapping("{login}/{password}") public AuthenticationStatus authenticate(@PathVariable String l...
@GetMapping("token/{login}/{password}/{token}") public AuthenticationStatus tokenCheck(@PathVariable String login, @PathVariable String password, @PathVariable String token) { Optional<User> user = userService.findUser(login, password); if (!user.isPresent()) { return AuthenticationStat...
repos\springboot-demo-master\MFA\src\main\java\com\et\mfa\controller\AuthenticationRestController.java
2
请完成以下Java代码
private static Dataset<Row> combineDataframes(Dataset<Row> df1, Dataset<Row> df2) { return df1.unionByName(df2); } private static Dataset<Row> normalizeCustomerDataFromEbay(Dataset<Row> rawDataset) { Dataset<Row> transformedDF = rawDataset.withColumn("id", concat(rawDataset.col("zoneId"), lit("...
Dataset<Row> aggDF = dataset.groupBy(column("year"), column("source"), column("gender")) .sum("transaction_amount") .withColumnRenamed("sum(transaction_amount)", "annual_spending") .orderBy(col("year").asc(), col("annual_spending").desc()); print(aggDF); return aggDF...
repos\tutorials-master\apache-spark\src\main\java\com\baeldung\dataframes\CustomerDataAggregationPipeline.java
1
请完成以下Java代码
private Function<JsonNode, DynamicMessage> callGRPCServer() { return jsonRequest -> { try { DynamicMessage.Builder builder = DynamicMessage.newBuilder(descriptor); JsonFormat.parser().merge(jsonRequest.toString(), builder); return ClientCalls.blockingUnaryCall(clientCall, builder.build()); } ...
} ResolvableType targetType = ResolvableType.forType(JsonNode.class); return new JacksonJsonDecoder().decode(dataBufferBody, targetType, null, null); }).cast(JsonNode.class); } private Function<Object, DataBuffer> wrapGRPCResponse() { return jsonResponse -> new NettyDataBufferFactory(new PooledByteBu...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\JsonToGrpcGatewayFilterFactory.java
1
请完成以下Java代码
public void run(final String localTrxName) throws Exception { // // Setup in-transaction context final IHUContext huContext = getHUContext(); final IMutableHUContext huContextLocal = huContext.copyAsMutable(); huContextLocal.setTrxName(localTrxName); setHUContext(huContextLocal); try ...
huNodeIterator.iterate(hu); } finally { // Restore HU's initial transaction InterfaceWrapperHelper.setTrxName(hu, huTrxName); } } } finally { // restore initial context setHUContext(huContext); } } }); // // If after running everything the s...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUIterator.java
1
请完成以下Java代码
private static class ValueConversionException extends AdempiereException { public static ValueConversionException wrapIfNeeded(final Throwable ex) { if (ex instanceof ValueConversionException) { return (ValueConversionException)ex; } final Throwable cause = extractCause(ex); if (cause instanceo...
public ValueConversionException setFieldName(@Nullable final String fieldName) { setParameter("fieldName", fieldName); return this; } public ValueConversionException setWidgetType(@Nullable final DocumentFieldWidgetType widgetType) { setParameter("widgetType", widgetType); return this; } publi...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\DataTypes.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonEnqueueForInvoicingRequest { @ApiModelProperty(position = 10, required = true, // value = "Specifies the invoice candidates to be invoiced.") List<JsonInvoiceCandidateReference> invoiceCandidates; @ApiModelProperty(position = 20, value = "Optional invoices' document date", example = "2019-10-30"...
@ApiModelProperty(position = 80, required = false,// value = "When this parameter is set on true, the newly generated invoices are directly completed.\n" + "Otherwise they are just prepared and left in the DocStatus IP (in progress). Default = `true`") Boolean completeInvoices; @JsonCreator @Builder(toBuild...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api\src\main\java\de\metas\rest_api\invoicecandidates\request\JsonEnqueueForInvoicingRequest.java
2
请完成以下Java代码
public Builder profile(String profile) { return claim(StandardClaimNames.PROFILE, profile); } /** * Use this subject in the resulting {@link OidcUserInfo} * @param subject The subject to use * @return the {@link Builder} for further configurations */ public Builder subject(String subject) { ret...
* Use this zoneinfo in the resulting {@link OidcUserInfo} * @param zoneinfo The zoneinfo to use * @return the {@link Builder} for further configurations */ public Builder zoneinfo(String zoneinfo) { return this.claim(StandardClaimNames.ZONEINFO, zoneinfo); } /** * Build the {@link OidcUserInfo} ...
repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\oidc\OidcUserInfo.java
1
请在Spring Boot框架中完成以下Java代码
public ResponseEntity<?> getPDF(HttpServletRequest request, HttpServletResponse response) throws IOException { /* Do Business Logic*/ Order order = OrderHelper.getOrder(); /* Create HTML using Thymeleaf template Engine */ WebContext context = new WebContext(request, response, servlet...
/* Call convert method */ HtmlConverter.convertToPdf(orderHtml, target, converterProperties); /* extract output as bytes */ byte[] bytes = target.toByteArray(); /* Send the response as downloadable PDF */ return ResponseEntity.ok() .header(HttpHeaders.CONTENT_...
repos\springboot-demo-master\itextpdf\src\main\java\com\et\itextpdf\controller\PDFController.java
2
请完成以下Java代码
private boolean isCallOrderContract(@NonNull final I_C_Flatrate_Term contract) { return TypeConditions.CALL_ORDER.getCode().equals(contract.getType_Conditions()); } private void validateSOTrx( @NonNull final I_C_Flatrate_Term contract, @NonNull final SOTrx documentSOTrx, final int documentLineSeqNo) { ...
{ return; } if (initiatingContractOrder.isSOTrx()) { throw new AdempiereException(MSG_SALES_CALL_ORDER_CONTRACT_TRX_NOT_MATCH, contract.getDocumentNo(), documentLineSeqNo) .markAsUserValidationError(); } throw new AdempiereException(MSG_PURCHASE_CALL_ORDER_CONTRACT_TRX_NOT_M...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\callorder\CallOrderContractService.java
1
请完成以下Java代码
public void setAttribute (String Attribute) { set_Value (COLUMNNAME_Attribute, Attribute); } /** Get Attribute. @return Attribute */ public String getAttribute () { return (String)get_Value(COLUMNNAME_Attribute); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public ...
Search key for the record in the format required - must be unique */ public void setValue (String Value) { set_Value (COLUMNNAME_Value, Value); } /** Get Search Key. @return Search key for the record in the format required - must be unique */ public String getValue () { return (String)get_Value(COLU...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Preference.java
1
请在Spring Boot框架中完成以下Java代码
static class GeodeGatewayReceiverConfiguration { @Bean GatewayReceiverFactoryBean gatewayReceiver(Cache cache) { GatewayReceiverFactoryBean gatewayReceiver = new GatewayReceiverFactoryBean(cache); gatewayReceiver.setHostnameForSenders(GATEWAY_RECEIVER_HOSTNAME_FOR_SENDERS); gatewayReceiver.setStartPort(...
return gatewaySender; } @Bean RegionConfigurer customersByNameConfigurer(GatewaySender gatewaySender) { return new RegionConfigurer() { @Override public void configure(String beanName, PeerRegionFactoryBean<?, ?> regionBean) { if (CUSTOMERS_BY_NAME_REGION.equals(beanName)) { regionBean.s...
repos\spring-boot-data-geode-main\spring-geode-samples\caching\multi-site\src\main\java\example\app\caching\multisite\server\BootGeodeMultiSiteCachingServerApplication.java
2
请完成以下Java代码
private boolean hasPrintFormatAssigned() { final int cnt = Services.get(IQueryBL.class) .createQueryBuilder(I_M_Product_PrintFormat.class) .addInArrayFilter(I_M_Product_PrintFormat.COLUMNNAME_M_Product_ID, retrieveSelectedProductIDs()) .create() .count(); return cnt > 0; } private Set<ProductId...
} private String buildFilename() { final String instance = String.valueOf(getPinstanceId().getRepoId()); final String title = getProcessInfo().getTitle(); return Joiner.on("_").skipNulls().join(instance, title) + ".pdf"; } private PrintFormat getPrintFormat() { return pfRepo.getById(PrintFormatId.ofRepo...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pporder\process\WEBUI_PP_Order_PrintLabel.java
1
请在Spring Boot框架中完成以下Java代码
public class BookServiceImpl implements BookService { @Autowired BookRepository bookRepository; @Override public List<Book> findAll() { return bookRepository.findAll(); } @Override public Book insertByBook(Book book) { return bookRepository.save(book); } @Override
public Book update(Book book) { return bookRepository.save(book); } @Override public Book delete(Long id) { Book book = bookRepository.findById(id).get(); bookRepository.delete(book); return book; } @Override public Book findById(Long id) { return bookRe...
repos\springboot-learning-example-master\chapter-5-spring-boot-data-jpa\src\main\java\demo\springboot\service\impl\BookServiceImpl.java
2
请完成以下Java代码
private static Supplier<CurrencyId> extractDefaultCurrencyIdSupplier(final PartialPriceChange changes) { if (changes.getDefaultCurrencyId() != null) { return changes::getDefaultCurrencyId; } else { final ICurrencyBL currenciesService = Services.get(ICurrencyBL.class); return () -> currenciesService....
final BigDecimal amountEffective = coalesce( amount, fallback != null ? fallback.toBigDecimal() : BigDecimal.ZERO); final CurrencyId currencyIdEffective = coalesceSuppliers( () -> currencyId, () -> fallback != null ? fallback.getCurrencyId() : null, defaultCurrencyIdSupplier); if (currencyIdEff...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\pricingconditions\view\PricingConditionsRowReducers.java
1
请完成以下Java代码
private ConfigurationPropertyName tryMap(String propertySourceName) { try { ConfigurationPropertyName convertedName = ConfigurationPropertyName.adapt(propertySourceName, '.'); if (!convertedName.isEmpty()) { return convertedName; } } catch (Exception ex) { // Ignore } return ConfigurationPrope...
LastMapping(T from, M mapping) { this.from = from; this.mapping = mapping; } boolean isFrom(T from) { return ObjectUtils.nullSafeEquals(from, this.from); } M getMapping() { return this.mapping; } } }
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\properties\source\DefaultPropertyMapper.java
1
请完成以下Java代码
public int getM_ProductPrice_ID() { return olCandRecord.getM_ProductPrice_ID(); } @Override public boolean isExplicitProductPriceAttribute() { return olCandRecord.isExplicitProductPriceAttribute(); } public int getFlatrateConditionsId() { return olCandRecord.getC_Flatrate_Conditions_ID(); } public in...
} public boolean isAssignToBatch(@NonNull final AsyncBatchId asyncBatchIdCandidate) { if (this.asyncBatchId == null) { return false; } return asyncBatchId.getRepoId() == asyncBatchIdCandidate.getRepoId(); } public void setHeaderAggregationKey(@NonNull final String headerAggregationKey) { olCandReco...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\api\OLCand.java
1
请完成以下Java代码
public class RequestAttributePrincipalResolver implements OAuth2ClientHttpRequestInterceptor.PrincipalResolver { private static final String PRINCIPAL_ATTR_NAME = RequestAttributePrincipalResolver.class.getName() .concat(".principal"); @Override public Authentication resolve(HttpRequest request) { return (Auth...
* {@link OAuth2AuthorizedClient}. * @param principalName the {@code principalName} to be used to look up the * {@link OAuth2AuthorizedClient} * @return the {@link Consumer} to populate the attributes */ public static Consumer<Map<String, Object>> principal(String principalName) { Assert.hasText(principalName...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\web\client\RequestAttributePrincipalResolver.java
1
请在Spring Boot框架中完成以下Java代码
public Boolean isArchived() { return archived; } public void setArchived(Boolean archived) { this.archived = archived; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ...
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AttachmentMetadata {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" therapyId: ").append(toIndentedString(therapyId)).append("\n"); sb.append(" therapyTyp...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-document-api\src\main\java\io\swagger\client\model\AttachmentMetadata.java
2
请完成以下Java代码
public String getTaskId() { return taskId; } @Override public void setTaskId(String taskId) { this.taskId = taskId; } @Override public String getCalledProcessInstanceId() { return calledProcessInstanceId; } @Override public void setCalledProcessInstanceId(S...
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("ActivityInstanceEntity[id=").append(id) .append(", activityId=").append(activityId); if (activityName != null) { sb.append(", activityName=").append(activityName); } ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\ActivityInstanceEntityImpl.java
1
请完成以下Java代码
public class PersonWithEquals { private String firstName; private String lastName; private LocalDate birthDate; public PersonWithEquals(String firstName, String lastName) { if (firstName == null || lastName == null) { throw new NullPointerException("Names can't be null"); } ...
return lastName; } public LocalDate getBirthDate() { return birthDate; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PersonWithEquals that = (PersonWithEquals) o; return f...
repos\tutorials-master\core-java-modules\core-java-lang\src\main\java\com\baeldung\comparing\PersonWithEquals.java
1
请完成以下Java代码
public org.compiere.model.I_EXP_Processor getEXP_Processor() throws RuntimeException { return (org.compiere.model.I_EXP_Processor)MTable.get(getCtx(), org.compiere.model.I_EXP_Processor.Table_Name) .getPO(getEXP_Processor_ID(), get_TrxName()); } /** Set Export Processor. @param EXP_Processor_ID Export Proc...
@param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ReplicationStrategy.java
1
请完成以下Java代码
public void setDueDate(Date dueDate) { this.dueDate = dueDate; } public Date getFollowUpDate() { return followUpDate; } public void setFollowUpDate(Date followUpDate) { this.followUpDate = followUpDate; } public int getPriority() { return priority; } public void setPriority(int prior...
} public String getTaskState() { return taskState; } public void setTaskState(String taskState) { this.taskState = taskState; } public String getRootProcessInstanceId() { return rootProcessInstanceId; } public void setRootProcessInstanceId(String rootProcessInstanceId) { this.rootProce...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricTaskInstanceEventEntity.java
1
请完成以下Java代码
public Void execute(CommandContext commandContext) { if (processDefinitionId == null) { throw new ActivitiIllegalArgumentException("Process definition id is null"); } ProcessDefinitionEntity processDefinition = commandContext .getProcessDefinitionEntityManager() ...
if (commandContext.getEventDispatcher().isEnabled()) { commandContext .getEventDispatcher() .dispatchEvent( ActivitiEventBuilder.createEntityEvent(ActivitiEventType.ENTITY_UPDATED, processDefinition) ); } } public String ge...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\SetProcessDefinitionCategoryCmd.java
1
请完成以下Java代码
public static FormService getFormService(AbstractEngineConfiguration engineConfiguration) { FormService formService = null; FormEngineConfigurationApi formEngineConfiguration = getFormEngineConfiguration(engineConfiguration); if (formEngineConfiguration != null) { formService = formE...
// CONTENT ENGINE public static ContentEngineConfigurationApi getContentEngineConfiguration(AbstractEngineConfiguration engineConfiguration) { return (ContentEngineConfigurationApi) engineConfiguration.getEngineConfigurations().get(EngineConfigurationConstants.KEY_CONTENT_ENGINE_CONFIG); } ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\util\EngineServiceUtil.java
1
请在Spring Boot框架中完成以下Java代码
public UUID getId() { return _id; } public void setId(UUID _id) { this._id = _id; } public DeviceMapping serialNumber(String serialNumber) { this.serialNumber = serialNumber; return this; } /** * eindeutige Seriennumer aus WaWi * @return serialNumber **/ @Schema(example = "2005...
DeviceMapping deviceMapping = (DeviceMapping) o; return Objects.equals(this._id, deviceMapping._id) && Objects.equals(this.serialNumber, deviceMapping.serialNumber) && Objects.equals(this.updated, deviceMapping.updated); } @Override public int hashCode() { return Objects.hash(_id, serialN...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\model\DeviceMapping.java
2
请在Spring Boot框架中完成以下Java代码
public abstract class AbstractFunctionExecutionAutoConfigurationExtension extends FunctionExecutionBeanDefinitionRegistrar implements BeanFactoryAware { private BeanFactory beanFactory; @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { this.beanFactory = beanFactory; } pr...
@Override protected AbstractFunctionExecutionConfigurationSource newAnnotationBasedFunctionExecutionConfigurationSource( AnnotationMetadata annotationMetadata) { AnnotationMetadata metadata = AnnotationMetadata.introspect(getConfiguration()); return new AnnotationFunctionExecutionConfigurationSource(metadata)...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\function\config\AbstractFunctionExecutionAutoConfigurationExtension.java
2
请完成以下Java代码
public boolean isAddressLinesReverse () { Object oo = get_Value(COLUMNNAME_IsAddressLinesReverse); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Media Size. @param MediaSize Java Media Size */ @Ov...
/** Get Name. @return Name */ @Override public java.lang.String getName () { return (java.lang.String)get_Value(COLUMNNAME_Name); } /** Set Region. @param RegionName Name of the Region */ @Override public void setRegionName (java.lang.String RegionName) { set_Value (COLUMNNAME_RegionName, Regi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Country.java
1
请完成以下Java代码
public void approveForInvoicingLinkedInvoiceCandidates(final I_M_InOut inOut) { Check.assumeNotNull(inOut, "InOut not null"); final IInvoiceCandDAO invoiceCandDAO = Services.get(IInvoiceCandDAO.class); final boolean isApprovedForInvoicing = inOut.isInOutApprovedForInvoicing(); if (!isApprovedForInvoicing) ...
continue; } final I_M_InOut inoutForCandidate = InterfaceWrapperHelper.create(inOutLineForCandidate.getM_InOut(), I_M_InOut.class); // in case the inout entry is active, completed or closed but it doesn't have the flag isInOutApprovedForInvoicing set on true // we shall not approve the...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inout\api\impl\InOutInvoiceCandidateBL.java
1
请在Spring Boot框架中完成以下Java代码
private static DeleteIndexRequest buildDeleteIndexRequest(String index) { return new DeleteIndexRequest(index); } /** * build IndexRequest * * @param index elasticsearch index name * @param id request object id * @param object request object * @return {@link org.elast...
DeleteRequest deleteRequest = new DeleteRequest(index, id); client.delete(deleteRequest, COMMON_OPTIONS); } catch (IOException e) { throw new ElasticsearchException("删除索引 {" + index + "} 数据id {" + id + "} 失败"); } } /** * search all * * @param index elastic...
repos\spring-boot-demo-master\demo-elasticsearch-rest-high-level-client\src\main\java\com\xkcoding\elasticsearch\service\base\BaseElasticsearchService.java
2
请完成以下Java代码
public static String getIp(HttpServletRequest request) { String ip = request.getHeader("x-forwarded-for"); if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) { ip = request.getHeader("Proxy-Client-IP"); } if (ip == null || ip.length() == 0 || UNKNOWN.equalsIg...
// http方法 GET POST PUT DELETE PATCH private String httpMethod; // 类方法 private String classMethod; // 请求参数 private Object requestParams; // 返回参数 private Object result; // 接口耗时 private Long timeCost; // 操作系统 private String os; ...
repos\spring-boot-demo-master\demo-log-aop\src\main\java\com\xkcoding\log\aop\aspectj\AopLog.java
1
请完成以下Java代码
public String getCaseDefinitionId() { return caseDefinitionId; } public String getCaseInstanceId() { return caseInstanceId; } public String getCaseExecutionId() { return caseExecutionId; } public String getTaskId() { return taskId; } public String getErrorMessage() { return error...
public static HistoricVariableInstanceDto fromHistoricVariableInstance(HistoricVariableInstance historicVariableInstance) { HistoricVariableInstanceDto dto = new HistoricVariableInstanceDto(); dto.id = historicVariableInstance.getId(); dto.name = historicVariableInstance.getName(); dto.processDefiniti...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricVariableInstanceDto.java
1
请完成以下Spring Boot application配置
# Custom properties to ease configuration overrides # on command-line or IDE launch configurations scheme: http hostname: localhost reverse-proxy-port: 7080 reverse-proxy-uri: ${scheme}://${hostname}:${reverse-proxy-port} authorization-server-prefix: /auth issuer: ${reverse-proxy-uri}${authorization-server-prefix}/real...
config: activate: on-profile: ssl server: ssl: enabled: true scheme: https --- spring: config: activate: on-profile: cognito issuer: https://cognito-idp.us-west-2.amazonaws.com/us-west-2_RzhmgLwjl client-id: 12olioff63qklfe9nio746es9f client-secret: change-me username-claim-json-path: usern...
repos\tutorials-master\spring-security-modules\spring-security-oauth2-bff\backend\bff\src\main\resources\application.yml
2
请完成以下Java代码
private static ManufacturingOrderExportAuditItem createExportedAuditItem(@NonNull final I_PP_Order order) { return ManufacturingOrderExportAuditItem.builder() .orderId(PPOrderId.ofRepoId(order.getPP_Order_ID())) .orgId(OrgId.ofRepoIdOrAny(order.getAD_Org_ID())) .exportStatus(APIExportStatus.Exported) ...
return _bomLinesByOrderId; } private Product getProductById(@NonNull final ProductId productId) { if (_productsById == null) { final HashSet<ProductId> allProductIds = new HashSet<>(); allProductIds.add(productId); getOrders().stream() .map(order -> ProductId.ofRepoId(order.getM_Product_ID())) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\rest_api\v1\ManufacturingOrdersExportCommand.java
1
请完成以下Java代码
private IExportDataSource createDataSource(@NonNull final DATEVExportFormat exportFormat, final int datevExportId) { Check.assume(datevExportId > 0, "datevExportId > 0"); final JdbcExporterBuilder builder = new JdbcExporterBuilder(I_DATEV_ExportLine.Table_Name) .addEqualsWhereClause(I_DATEV_ExportLine.COLUMNN...
private static String buildFilename(final I_DATEV_Export datevExport) { final DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyyMMdd"); final Timestamp dateAcctFrom = datevExport.getDateAcctFrom(); final Timestamp dateAcctTo = datevExport.getDateAcctTo(); return Joiner.on("_") .skipNulls...
repos\metasfresh-new_dawn_uat\backend\de.metas.datev\src\main\java\de\metas\datev\process\DATEV_ExportFile.java
1
请完成以下Java代码
private Stream<CacheInterface> streamCaches() { return caches.values().stream().filter(Objects::nonNull); } private long invalidateAllNoFail() { return streamCaches() .mapToLong(CachesGroup::invalidateNoFail) .sum(); } private long invalidateForRecordNoFail(final TableRecordReference recor...
return cacheInstance.reset(); } catch (final Exception ex) { // log but don't fail logger.warn("Error while resetting {}. Ignored.", cacheInstance, ex); return 0; } } private static long invalidateNoFail(final CacheInterface cacheInstance, final TableRecordReference recordRef) { try (f...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\CacheMgt.java
1
请在Spring Boot框架中完成以下Java代码
public String getDriverClassName() { return driverClassName; } public void setDriverClassName(String driverClassName) { this.driverClassName = driverClassName; } public int getInitialSize() { return initialSize; } public void setInitialSize(int initialSize) { t...
} public void setMinIdle(int minIdle) { this.minIdle = minIdle; } public int getMaxActive() { return maxActive; } public void setMaxActive(int maxActive) { this.maxActive = maxActive; } }
repos\spring-boot-leaning-master\2.x_42_courses\第 3-7 课: Spring Boot 集成 Druid 监控数据源\spring-boot-multi-Jpa-druid\src\main\java\com\neo\config\druid\DruidOneConfig.java
2
请完成以下Java代码
public List<Series> getSeries() { return series; } public RetryConfig setSeries(Series... series) { this.series = Arrays.asList(series); return this; } public List<HttpStatus> getStatuses() { return statuses; } public RetryConfig setStatuses(HttpStatus... statuses) { this.statuses = Arrays...
public void setFactor(int factor) { this.factor = factor; } public boolean isBasedOnPreviousValue() { return basedOnPreviousValue; } public void setBasedOnPreviousValue(boolean basedOnPreviousValue) { this.basedOnPreviousValue = basedOnPreviousValue; } @Override public String toString() { r...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RetryGatewayFilterFactory.java
1
请完成以下Java代码
private static class ConfigAndEvents { @Getter private final FTSConfig config; @Getter private final ImmutableSet<TableName> sourceTableNames; private final ArrayList<ModelToIndex> events = new ArrayList<>(); private ConfigAndEvents( @NonNull final FTSConfig config, @NonNull final ImmutableSet<T...
public void addEvent(final ModelToIndex event) { if (!events.contains(event)) { events.add(event); } } public ImmutableList<ModelToIndex> getEvents() { return ImmutableList.copyOf(events); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java\de\metas\fulltextsearch\indexer\queue\ModelToIndexEnqueueProcessor.java
1
请完成以下Java代码
void collect(@NonNull final IAttributeSet from) { from.getAttributes() .stream() .filter(AttributeSetAggregator::isAggregable) .forEach(attribute -> getAttributeAggregator(attribute).collect(from)); } @NonNull private AttributeAggregator getAttributeAggregator(@NonNull final I_M_Attribute attribute) ...
final Object value = attributeValueType.map(new AttributeValueType.CaseMapper<Object>() { @Nullable @Override public Object string() { return from.getValueAsString(attributeCode); } @Override public Object number() { return from.getValueAsBigDecimal(attributeCode); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\AttributeSetAggregator.java
1
请在Spring Boot框架中完成以下Java代码
public class ErrorController { @RequestMapping(value = "500Error", method = RequestMethod.GET) public void throwRuntimeException() { throw new NullPointerException("Throwing a null pointer exception"); } @RequestMapping(value = "errors", method = RequestMethod.GET) public ModelAndView rend...
errorMsg = "Http Error Code : 404. Resource not found"; break; } // Handle other 4xx error codes. case 500: { errorMsg = "Http Error Code : 500. Internal Server Error"; break; } // Handle other 5xx error codes. } errorPage.addOb...
repos\tutorials-master\spring-web-modules\spring-mvc-xml-2\src\main\java\com\baeldung\spring\controller\ErrorController.java
2
请在Spring Boot框架中完成以下Java代码
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http.cors(Customizer.withDefaults()).csrf(AbstractHttpConfigurer::disable) .sessionManagement(httpSecuritySessionManagementConfigurer -> httpSecuritySessionManagementConfigurer.sessionCreationPolicy(SessionCreationPolicy.ST...
public RequestHeaderAuthenticationFilter requestHeaderAuthenticationFilter() { RequestHeaderAuthenticationFilter filter = new RequestHeaderAuthenticationFilter(); filter.setPrincipalRequestHeader(apiAuthHeaderName); filter.setExceptionIfHeaderMissing(false); filter.setRequiresAuthenticat...
repos\tutorials-master\spring-security-modules\spring-security-web-boot-5\src\main\java\com\baeldung\customauth\configuration\SecurityConfig.java
2
请在Spring Boot框架中完成以下Java代码
public JwtSettings getJwtSettings() { log.trace("Executing getJwtSettings"); return getJwtSettings(false); } public JwtSettings getJwtSettings(boolean forceReload) { if (this.jwtSettings == null || forceReload) { synchronized (this) { if (this.jwtSettings == ...
adminJwtSettings.setTenantId(TenantId.SYS_TENANT_ID); adminJwtSettings.setKey(ADMIN_SETTINGS_JWT_KEY); adminJwtSettings.setJsonValue(JacksonUtil.valueToTree(jwtSettings)); return adminJwtSettings; } public static boolean isSigningKeyDefault(JwtSettings settings) { return TOKEN_S...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\security\auth\jwt\settings\DefaultJwtSettingsService.java
2
请完成以下Java代码
final class FixedConversionRateMap { public static final FixedConversionRateMap EMPTY = new FixedConversionRateMap(ImmutableMap.of()); private final ImmutableMap<FixedConversionRateKey, FixedConversionRate> rates; private FixedConversionRateMap(final Map<FixedConversionRateMap.FixedConversionRateKey, FixedConversi...
return getMultiplyRateOrNull(fromCurrencyId, toCurrencyId) != null; } @Nullable private BigDecimal getMultiplyRateOrNull( @NonNull final CurrencyId fromCurrencyId, @NonNull final CurrencyId toCurrencyId) { final FixedConversionRate rate = rates.get(FixedConversionRateKey.builder() .fromCurrencyId(fromC...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\currency\FixedConversionRateMap.java
1
请完成以下Java代码
private ClassicHttpResponse execute(HttpUriRequest request, URI url, String description) { try { HttpHost host = HttpHost.create(url); request.addHeader("User-Agent", "SpringBootCli/" + getClass().getPackage().getImplementationVersion()); return getHttp().executeOpen(host, request, null); } catch (IOExce...
} } return null; } private JSONObject getContentAsJson(HttpEntity entity) throws IOException, JSONException { return new JSONObject(getContent(entity)); } private String getContent(HttpEntity entity) throws IOException { ContentType contentType = ContentType.create(entity.getContentType()); Charset char...
repos\spring-boot-4.0.1\cli\spring-boot-cli\src\main\java\org\springframework\boot\cli\command\init\InitializrService.java
1
请完成以下Java代码
public void start() { // Technically, the resolveImportLifecycle().isLazy() check is not strictly required since if the cache data // import is "eager", then the regionsForImport Set will be empty anyway. if (resolveImportLifecycle().isLazy()) { getRegionsForImport().forEach(getCacheDataImporterExporter()::im...
public static @Nullable ImportLifecycle from(String name) { for (ImportLifecycle importCycle : values()) { if (importCycle.name().equalsIgnoreCase(name)) { return importCycle; } } return null; } public boolean isEager() { return EAGER.equals(this); } public boolean isLazy() { ret...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\data\support\LifecycleAwareCacheDataImporterExporter.java
1
请在Spring Boot框架中完成以下Java代码
public class ExchangeRatesContainer { private LocalDate date = LocalDate.now(); private Currency base; private Map<String, BigDecimal> rates; public LocalDate getDate() { return date; } public void setDate(LocalDate date) { this.date = date; } public Currency getBase() { return base; } public voi...
} public void setRates(Map<String, BigDecimal> rates) { this.rates = rates; } @Override public String toString() { return "RateList{" + "date=" + date + ", base=" + base + ", rates=" + rates + '}'; } }
repos\piggymetrics-master\statistics-service\src\main\java\com\piggymetrics\statistics\domain\ExchangeRatesContainer.java
2
请完成以下Java代码
protected org.compiere.model.POInfo initPO (Properties ctx) { org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo (ctx, Table_Name, get_TrxName()); return poi; } /** Set Beschreibung. @param Description Beschreibung */ @Override public void setDescription (java.lang.String De...
Generally used to give records a name that can be safely referenced from code. */ @Override public void setInternalName (java.lang.String InternalName) { set_ValueNoCheck (COLUMNNAME_InternalName, InternalName); } /** Get Interner Name. @return Generally used to give records a name that can be safely refer...
repos\metasfresh-new_dawn_uat\backend\de.metas.dimension\src\main\java-gen\de\metas\dimension\model\X_DIM_Dimension_Type.java
1
请完成以下Java代码
private static long gcd(long a, long b) { if (b == 0) { return a; } else { return gcd(b, a % b); } } public static String convertDecimalToFractionUsingGCD(double decimal) { String decimalStr = String.valueOf(decimal); int decimalPlaces = decimalSt...
} public static String convertDecimalToFractionUsingGCDRepeating(double decimal) { String decimalStr = String.valueOf(decimal); int indexOfDot = decimalStr.indexOf('.'); String afterDot = decimalStr.substring(indexOfDot + 1); String repeatingNumber = extractRepeatingDecimal(afterDot...
repos\tutorials-master\core-java-modules\core-java-numbers-8\src\main\java\com\baeldung\decimaltofraction\DecimalToFraction.java
1
请在Spring Boot框架中完成以下Java代码
public class BPartnerProductStatsEventListener implements IEventListener { private static final Logger logger = LogManager.getLogger(BPartnerProductStatsEventListener.class); /** * Introduce this lock to get rid of * <pre> * ERROR: duplicate key value violates unique constraint "c_bpartner_product_stats_uq...
@Override public void onEvent(final IEventBus eventBus, final Event event) { final String topicName = eventBus.getTopic().getName(); statsRepoAccessLock.lock(); try { if (BPartnerProductStatsEventSender.TOPIC_InOut.getName().equals(topicName)) { statsEventHandler.handleInOutChangedEvent(BPartnerProd...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\product\stats\BPartnerProductStatsEventListener.java
2
请完成以下Java代码
public class GlobalExceptionHandler { private Logger log = LoggerFactory.getLogger(this.getClass()); @ExceptionHandler(value = Exception.class) @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) public Response handleException(Exception e) { log.error("系统内部异常,异常信息:", e); return new Resp...
message = new StringBuilder(message.substring(0, message.length() - 1)); return new Response().message(message.toString()); } /** * 统一处理请求参数校验(普通传参) * * @param e ConstraintViolationException * @return FebsResponse */ @ExceptionHandler(value = ConstraintViolationException.c...
repos\SpringAll-master\62.Spring-Boot-Shiro-JWT\src\main\java\com\example\demo\handler\GlobalExceptionHandler.java
1
请完成以下Java代码
private boolean mayBeContainsProcessDefinitionResourceName(String resourceName) { return ( !deploymentSettings.containsKey(RESOURCE_NAMES) || Optional.of(deploymentSettings.get(RESOURCE_NAMES)) .filter(List.class::isInstance) .map(List.class::cast) ...
bpmnParse.setValidateProcess( (Boolean) deploymentSettings.get(DeploymentSettings.IS_PROCESS_VALIDATION_ENABLED) ); } } else { // On redeploy, we assume it is validated at the first deploy bpmnParse.setValidateSchema...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\deployer\ParsedDeploymentBuilder.java
1
请完成以下Java代码
public String getId() { return id; } public String getName() { return name; } public String getCorrelationKey() { return correlationKey; } public Map<String, Object> getVariables() { return variables; } @Override public int hashCode() { ret...
ReceiveMessagePayload other = (ReceiveMessagePayload) obj; return ( Objects.equals(correlationKey, other.correlationKey) && Objects.equals(id, other.id) && Objects.equals(name, other.name) && Objects.equals(variables, other.variables) ); } @Overri...
repos\Activiti-develop\activiti-api\activiti-api-process-model\src\main\java\org\activiti\api\process\model\payloads\ReceiveMessagePayload.java
1
请完成以下Java代码
public IHUContextProcessorExecutor createHUContextProcessorExecutor(final IHUContext huContext) { return new HUContextProcessorExecutor(huContext); } @Override public IHUContextProcessorExecutor createHUContextProcessorExecutor(final IContextAware context) { final IHUContext huContext = Services.get(IHUContex...
trx.getLocatorId(), trx.getProductId() == null ? -1 : trx.getProductId().getRepoId(), // trxCandidate.getQuantity(), trx.getReferencedModel() == null ? -1 : TableRecordReference.of(trx.getReferencedModel()), // trxCandidate.getVHU(), just delegates to VHU_Item trx.getVHU_Item() == null ? -1 : t...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\hutransaction\impl\HUTrxBL.java
1
请在Spring Boot框架中完成以下Java代码
public float getDiskUsageCriticalPercentage() { return this.diskUsageCriticalPercentage; } public void setDiskUsageCriticalPercentage(float diskUsageCriticalPercentage) { this.diskUsageCriticalPercentage = diskUsageCriticalPercentage; } public float getDiskUsageWarningPercentage() { return this.diskU...
return this.queueSize; } public void setQueueSize(int queueSize) { this.queueSize = queueSize; } public long getTimeInterval() { return this.timeInterval; } public void setTimeInterval(long timeInterval) { this.timeInterval = timeInterval; } public int getWriteBufferSize() { return this....
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\DiskStoreProperties.java
2
请在Spring Boot框架中完成以下Java代码
public abstract class OnEndpointElementCondition extends SpringBootCondition { private final String prefix; private final Class<? extends Annotation> annotationType; protected OnEndpointElementCondition(String prefix, Class<? extends Annotation> annotationType) { this.prefix = prefix; this.annotationType = an...
return new ConditionOutcome(match, ConditionMessage.forCondition(this.annotationType) .because(this.prefix + endpointName + ".enabled is " + match)); } return null; } /** * Return the default outcome that should be used if property is not set. By default * this method will use the {@code <prefix>.default...
repos\spring-boot-4.0.1\module\spring-boot-actuator-autoconfigure\src\main\java\org\springframework\boot\actuate\autoconfigure\OnEndpointElementCondition.java
2
请完成以下Java代码
public boolean isApplicable(@NonNull final Evaluatee context, @NonNull final DocumentSequenceInfo docSeqInfo) { final Date date = getDateOrNull(context, docSeqInfo); final boolean result = date != null; logger.debug("isApplicable - Given evaluatee-context contains {}={}; -> returning {}; context={}", docSeqInfo....
final int seqNoAsInt = Integer.parseInt(autoIncrementedSeqNumber); final String formattedSeqNumber = new DecimalFormat(decimalPattern).format(seqNoAsInt); logger.debug("provideSequenceNo - returning {};", result); return result + formattedSeqNumber; } } logger.debug("provideSequenceNo - returning {}...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\sequenceno\DateSequenceProvider.java
1
请完成以下Java代码
public Iterable<HierarchyNode> getUpStream(@NonNull final Beneficiary beneficiary) { final HierarchyNode node = beneficiary2Node.get(beneficiary); if (node == null) { throw new AdempiereException("Beneficiary with C_BPartner_ID=" + beneficiary.getBPartnerId().getRepoId() + " is not part of this hierarchy") ...
@Override public boolean hasNext() { return next != null; } @Override public HierarchyNode next() { final HierarchyNode result = next; if (result == null) { throw new NoSuchElementException("Previous HierarchyNode=" + previous + " had no parent"); } previous = next; next = child2Pa...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\businesslogic\hierarchy\Hierarchy.java
1
请完成以下Java代码
public void setC_Region_ID(final int regionId) { source.setC_Region_ID(regionId); } /** * Source of {@link CityVO}s. * * @author metas-dev <dev@metasfresh.com> * */ private final class CitiesSource implements ResultItemSource { private ArrayKey lastQueryKey = null; private List<CityVO> lastResult...
{ final PreparedStatement pstmt = DB.prepareStatement(sql.toString(), ITrx.TRXNAME_None); DB.setParameters(pstmt, sqlParams); return pstmt; } @Override protected CityVO fetch(ResultSet rs) throws SQLException { final CityVO vo = new CityVO(rs.getInt(1), rs.getString(2), rs.getInt(3)...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\CityAutoCompleter.java
1
请在Spring Boot框架中完成以下Java代码
public static Collector<I_AD_Preference, UserValuePreferencesBuilder, IUserValuePreferences> collector() { return Collector.of( UserValuePreferencesBuilder::new // supplier , UserValuePreferencesBuilder::add // accumulator , (l, r) -> l.addAll(r) // combiner , UserValuePreferencesBuilder::build...
{ final Optional<AdWindowId> currentWindowId = extractAdWindowId(adPreference); if (isEmpty()) { adWindowIdOptional = currentWindowId; } else if (!adWindowIdOptional.equals(currentWindowId)) { throw new IllegalArgumentException("Preference " + adPreference + "'s AD_Window_ID=" + currentWindow...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\service\impl\ValuePreferenceBL.java
2
请在Spring Boot框架中完成以下Java代码
protected boolean scheduleLongRunningWork(Runnable runnable) { final ManagedQueueExecutorService managedQueueExecutorService = managedQueueInjector.getValue(); boolean rejected = false; try { // wait for 2 seconds for the job to be accepted by the pool. managedQueueExecutorService.e...
if((now-lastWarningLogged) >= (60*1000)) { log.log(Level.WARNING, "Unexpected Exception while submitting job to executor pool.", e); } else { log.log(Level.FINE, "Unexpected Exception while submitting job to executor pool.", e); } } return !rejected; } public InjectedV...
repos\camunda-bpm-platform-master\distro\wildfly26\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\service\MscExecutorService.java
2
请完成以下Java代码
public Mono<GraphQlResponse> execute(GraphQlRequest request) { return this.rsocketRequester.route(this.route).data(request.toMap()) .retrieveMono(MAP_TYPE) .map(ResponseMapGraphQlResponse::new); } @Override public Flux<GraphQlResponse> executeSubscription(GraphQlRequest request) { return this.rsocketReq...
private Exception decodeErrors(GraphQlRequest request, RejectedException ex) { try { String errorMessage = (ex.getMessage() != null) ? ex.getMessage() : ""; byte[] errorData = errorMessage.getBytes(StandardCharsets.UTF_8); List<GraphQLError> errors = (List<GraphQLError>) this.jsonDecoder.decode( Default...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\client\RSocketGraphQlTransport.java
1
请完成以下Java代码
/* package */final class DefaultContextMenuActionContext implements IContextMenuActionContext { private final VEditor editor; private final VTable vtable; private final int viewRow; private final int viewColumn; public DefaultContextMenuActionContext(final VEditor editor, final VTable vtable, final int viewRow, f...
return editor; } @Override public VTable getVTable() { return vtable; } @Override public int getViewRow() { return viewRow; } @Override public int getViewColumn() { return viewColumn; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\ui\impl\DefaultContextMenuActionContext.java
1
请完成以下Java代码
public br setClear(String clear_type) { addAttribute("clear",clear_type); return this; } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribut...
addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public br addElement(Element element) { addElementToRegistry(element); return(this); } /** ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\br.java
1
请在Spring Boot框架中完成以下Java代码
public void setISOCode(String value) { this.isoCode = value; } /** * Gets the value of the netdate property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getNetdate() { return netdate; ...
/** * Sets the value of the singlevat property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setSinglevat(BigDecimal value) { this.singlevat = value; } /** * Gets the value of the taxfree property. * * @...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev1\de\metas\edi\esb\jaxb\metasfreshinhousev1\EDICctop120VType.java
2
请完成以下Java代码
void sendWebsocketViewChangedNotification( final ViewId viewId, final DocumentIdsSelection changedRowIds) { final ViewChanges viewChanges = new ViewChanges(viewId); viewChanges.addChangedRowIds(changedRowIds); JSONViewChanges jsonViewChanges = JSONViewChanges.of(viewChanges); final WebsocketTopicName en...
@GetMapping("/logging/events") public List<WebsocketEventLogRecord> getWebsocketLoggedEvents( @RequestParam(value = "destinationFilter", required = false) final String destinationFilter) { userSession.assertLoggedIn(); return websocketSender.getLoggedEvents(destinationFilter); } @GetMapping("/activeSubscri...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\debug\DebugWebsocketRestController.java
1
请完成以下Java代码
public CreditorReferenceType1Choice getCdOrPrtry() { return cdOrPrtry; } /** * Sets the value of the cdOrPrtry property. * * @param value * allowed object is * {@link CreditorReferenceType1Choice } * */ public void setCdOrPrtry(CreditorReferenceType1...
return issr; } /** * Sets the value of the issr property. * * @param value * allowed object is * {@link String } * */ public void setIssr(String value) { this.issr = value; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\CreditorReferenceType2.java
1
请完成以下Java代码
public class WrapperClassUserCache { private Map<CacheKey, User> cache = new HashMap<>(); public User getById(CacheKey key) { return cache.get(key); } public void storeById(CacheKey key, User user) { cache.put(key, user); } public static class CacheKey { private final ...
public CacheKey(Long value) { this.value = value; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CacheKey cacheKey = (CacheKey) o; return value.equal...
repos\tutorials-master\core-java-modules\core-java-collections-maps-5\src\main\java\com\baeldung\map\multikey\WrapperClassUserCache.java
1
请完成以下Java代码
public abstract class TrxItemProcessorAdapter<IT, RT> implements ITrxItemProcessor<IT, RT> { private ITrxItemProcessorContext processorCtx; @Override public final void setTrxItemProcessorCtx(ITrxItemProcessorContext processorCtx) { this.processorCtx = processorCtx; } protected final ITrxItemProcessorContext g...
protected final IParams getParams() { return getTrxItemProcessorCtx().getParams(); } @Override public abstract void process(IT item) throws Exception; @Override public RT getResult() { // nothing at this level return null; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\processor\spi\TrxItemProcessorAdapter.java
1
请完成以下Java代码
public Builder setSourceRoleDisplayName(final ITranslatableString sourceRoleDisplayName) { this.sourceRoleDisplayName = sourceRoleDisplayName; return this; } public Builder setTarget_Reference_AD(final int targetReferenceId) { this.targetReferenceId = ReferenceId.ofRepoIdOrNull(targetReferenceId); ...
public Builder setTargetRoleDisplayName(final ITranslatableString targetRoleDisplayName) { this.targetRoleDisplayName = targetRoleDisplayName; return this; } public ITranslatableString getTargetRoleDisplayName() { return targetRoleDisplayName; } public Builder setIsTableRecordIdTarget(final boole...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\references\related_documents\relation_type\SpecificRelationTypeRelatedDocumentsProvider.java
1
请完成以下Java代码
public InputDataItem getInputDataItem() { return inputDataItemChild.getChild(this); } public void setInputDataItem(InputDataItem inputDataItem) { inputDataItemChild.setChild(this, inputDataItem); } public OutputDataItem getOutputDataItem() { return outputDataItemChild.getChild(this); } public...
public EventDefinition getNoneBehaviorEventRef() { return noneBehaviorEventRefAttribute.getReferenceTargetElement(this); } public void setNoneBehaviorEventRef(EventDefinition noneBehaviorEventRef) { noneBehaviorEventRefAttribute.setReferenceTargetElement(this, noneBehaviorEventRef); } public boolean i...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\MultiInstanceLoopCharacteristicsImpl.java
1
请完成以下Java代码
public String mineBlock(int prefix) { String prefixString = new String(new char[prefix]).replace('\0', '0'); while (!hash.substring(0, prefix) .equals(prefixString)) { nonce++; hash = calculateBlockHash(); } return hash; } public String calcul...
for (byte b : bytes) { buffer.append(String.format("%02x", b)); } return buffer.toString(); } public String getHash() { return this.hash; } public String getPreviousHash() { return this.previousHash; } public void setData(String data) { this...
repos\tutorials-master\java-blockchain\src\main\java\com\baeldung\blockchain\Block.java
1
请完成以下Java代码
public Builder expiresAt(Instant expiresAt) { this.claim(JwtClaimNames.EXP, expiresAt); return this; } /** * Use this identifier in the resulting {@link Jwt} * @param jti The identifier to use * @return the {@link Builder} for further configurations */ public Builder jti(String jti) { this.c...
return this; } /** * Use this subject in the resulting {@link Jwt} * @param subject The subject to use * @return the {@link Builder} for further configurations */ public Builder subject(String subject) { this.claim(JwtClaimNames.SUB, subject); return this; } /** * Build the {@link Jwt} ...
repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\Jwt.java
1
请完成以下Java代码
private void verifyReferenceObjectTrxName(final I_M_HU_Trx_Attribute huTrxAttribute, final Object referencedObject) { // final String refObjTrxName = InterfaceWrapperHelper.getTrxName(referencedObject); // final String huTrxAttrTrxName = InterfaceWrapperHelper.getTrxName(huTrxAttribute); // Check.errorUnless(Ob...
{ final Object referencedModel = getReferencedObject(huTrxAttribute); final IHUTrxAttributeProcessor trxAttributeProcessor = getHUTrxAttributeProcessor(referencedModel); final HUTransactionAttributeOperation operation = HUTransactionAttributeOperation.ofCode(huTrxAttribute.getOperation()); if (HUTransactionAtt...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\impl\HUTransactionAttributeProcessor.java
1
请在Spring Boot框架中完成以下Java代码
public int getMaxConnections() { return this.maxConnections; } public void setMaxConnections(int maxConnections) { this.maxConnections = maxConnections; } public int getMaxSessionsPerConnection() { return this.maxSessionsPerConnection; } public void setMaxSessionsPerConnection(int maxSessionsPerConnectio...
public Duration getTimeBetweenExpirationCheck() { return this.timeBetweenExpirationCheck; } public void setTimeBetweenExpirationCheck(Duration timeBetweenExpirationCheck) { this.timeBetweenExpirationCheck = timeBetweenExpirationCheck; } public boolean isUseAnonymousProducers() { return this.useAnonymousProd...
repos\spring-boot-4.0.1\module\spring-boot-jms\src\main\java\org\springframework\boot\jms\autoconfigure\JmsPoolConnectionFactoryProperties.java
2
请完成以下Java代码
public int getOrder() { return this.order; } public void setOrder(int order) { this.order = order; } /** * Sets the convert to be used * @param authenticationConverter */ public void setAuthenticationConverter(PayloadExchangeAuthenticationConverter authenticationConverter) { Assert.notNull(authentica...
} @Override public Mono<Void> intercept(PayloadExchange exchange, PayloadInterceptorChain chain) { return this.authenticationConverter.convert(exchange) .switchIfEmpty(chain.next(exchange).then(Mono.empty())) .flatMap((a) -> this.authenticationManager.authenticate(a)) .flatMap((a) -> onAuthenticationSucce...
repos\spring-security-main\rsocket\src\main\java\org\springframework\security\rsocket\authentication\AuthenticationPayloadInterceptor.java
1
请在Spring Boot框架中完成以下Java代码
public class WEBUI_PickingSlotsClearingView_TakeOutMultiHUsAndAddToNewHU extends PickingSlotsClearingViewBasedProcess implements IProcessPrecondition { // services private final IHandlingUnitsBL handlingUnitsBL = Services.get(IHandlingUnitsBL.class); @Autowired private PickingCandidateService pickingCandidateServic...
.setAllowPartialUnloads(false) .setAllowPartialLoads(false) .unloadAllFromSource(); // If the source HU was destroyed, then "remove" it from picking slots final ImmutableSet<HuId> destroyedHUIds = fromHUs.stream() .filter(handlingUnitsBL::isDestroyedRefreshFirst) .map(I_M_HU::getM_HU_ID) .map(H...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingslotsClearing\process\WEBUI_PickingSlotsClearingView_TakeOutMultiHUsAndAddToNewHU.java
2
请完成以下Java代码
public class StringMaxLengthMain { public static void main(String[] args) { displayRuntimeMaxStringLength(); displayMaxStringLength(); simulateStringOverflow(); } public static void simulateStringOverflow() { try { int maxLength = Integer.MAX_VALUE; ...
} catch (OutOfMemoryError e) { System.err.println("Overflow error: Attempting to create a string longer than Integer.MAX_VALUE"); e.printStackTrace(); } } public static void displayRuntimeMaxStringLength() { long maxMemory = Runtime.getRuntime().maxMemory(); Syst...
repos\tutorials-master\core-java-modules\core-java-string-operations-7\src\main\java\com\baeldung\stringmaxlength\StringMaxLengthMain.java
1
请完成以下Java代码
public int getC_InvoiceLine_ID() { return get_ValueAsInt(COLUMNNAME_C_InvoiceLine_ID); } @Override public void setC_InvoiceLine_Tax_ID (final int C_InvoiceLine_Tax_ID) { if (C_InvoiceLine_Tax_ID < 1) set_Value (COLUMNNAME_C_InvoiceLine_Tax_ID, null); else set_Value (COLUMNNAME_C_InvoiceLine_Tax_ID,...
set_ValueNoCheck (COLUMNNAME_C_Invoice_Verification_Set_ID, C_Invoice_Verification_Set_ID); } @Override public int getC_Invoice_Verification_Set_ID() { return get_ValueAsInt(COLUMNNAME_C_Invoice_Verification_Set_ID); } @Override public void setC_Invoice_Verification_SetLine_ID (final int C_Invoice_Verificat...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Invoice_Verification_SetLine.java
1
请完成以下Java代码
public boolean releaseHU(final I_M_HU hu) { Check.assume(allowRequestReleaseIncludedHU, "Requesting/Releasing new HU shall be allowed for {}", this); final int count = getHUCount(); if (count <= 0) { return false; } decrementHUCount(); return true; } private void incrementHUCount() { final Bi...
} private I_C_UOM extractUOM(final I_M_HU_Item_Storage storage) { return Services.get(IUOMDAO.class).getById(storage.getC_UOM_ID()); } @Override public boolean isEmpty() { final List<I_M_HU_Item_Storage> storages = dao.retrieveItemStorages(item); for (final I_M_HU_Item_Storage storage : storages) { i...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\storage\impl\HUItemStorage.java
1
请完成以下Java代码
public Date getStartedAfter() { return startedAfter; } public void setStartedAfter(Date startedAfter) { this.startedAfter = startedAfter; } public String getStartedBy() { return startedBy; } public void setStartedBy(String startedBy) { this.startedBy = startedB...
return false; } } return hasOrderByForColumn(ProcessInstanceQueryProperty.PROCESS_DEFINITION_KEY.getName()); } public List<List<String>> getSafeProcessInstanceIds() { return safeProcessInstanceIds; } public void setSafeProcessInstanceIds(List<List<String>> safeProc...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\ProcessInstanceQueryImpl.java
1
请完成以下Java代码
public boolean setDefaultTenantProfile(TenantId tenantId, TenantProfileId tenantProfileId) { log.trace("Executing setDefaultTenantProfile [{}]", tenantProfileId); validateId(tenantId, id -> INCORRECT_TENANT_ID + id); validateId(tenantProfileId, id -> INCORRECT_TENANT_PROFILE_ID + id); Te...
public FluentFuture<Optional<HasId<?>>> findEntityAsync(TenantId tenantId, EntityId entityId) { return FluentFuture.from(tenantProfileDao.findByIdAsync(tenantId, entityId.getId())) .transform(Optional::ofNullable, directExecutor()); } @Override public EntityType getEntityType() { ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\tenant\TenantProfileServiceImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class Address { @Id private int id; private String street; private String city; private int zipode; @OneToOne @JoinColumn(name = "id") @MapsId private Person person; public int getId() { return id; } public void setId(int id) { this.id = id; ...
public void setStreet(String street) { this.street = street; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public Person getPerson() { return person; } public void setPerson(Person person) { t...
repos\tutorials-master\persistence-modules\hibernate-annotations-2\src\main\java\com\baeldung\hibernate\mapsid\Address.java
2