instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public Map<String, String> getHeaders(Config config, Long tokensLeft) { Map<String, String> headers = new HashMap<>(); if (isIncludeHeaders()) { headers.put(this.remainingHeader, tokensLeft.toString()); headers.put(this.replenishRateHeader, String.valueOf(config.getReplenishRate())); headers.put(this.burst...
+ ") must be greater than or equal than replenishRate(" + this.replenishRate + ")"); Assert.isTrue(burstCapacity <= REDIS_LUA_MAX_SAFE_INTEGER, "BurstCapacity(" + burstCapacity + ") must not exceed the maximum allowed value of " + REDIS_LUA_MAX_SAFE_INTEGER); this.burstCapacity = burstCapacity; return thi...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\ratelimit\RedisRateLimiter.java
1
请完成以下Java代码
public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Sequence. @return Method of ordering records; lowest number comes first */ public int getSeqNo () { Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); if (ii == null) return 0; return ii.intValue()...
/** Set Min. Value. @param ValueMin Minimum Value for a field */ public void setValueMin (String ValueMin) { set_Value (COLUMNNAME_ValueMin, ValueMin); } /** Get Min. Value. @return Minimum Value for a field */ public String getValueMin () { return (String)get_Value(COLUMNNAME_ValueMin); } /...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Attribute.java
1
请在Spring Boot框架中完成以下Java代码
public Date getDueDate() { return dueDate; } public void setDueDate(Date dueDate) { this.dueDate = dueDate; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public void se...
} public String getLockOwner() { return lockOwner; } public void setLockOwner(String lockOwner) { this.lockOwner = lockOwner; } public Date getLockExpirationTime() { return lockExpirationTime; } public void setLockExpirationTime(Date lockExpirationTime) { ...
repos\flowable-engine-main\modules\flowable-external-job-rest\src\main\java\org\flowable\external\job\rest\service\api\query\ExternalWorkerJobResponse.java
2
请完成以下Java代码
boolean isResponseCacheable(ServerHttpResponse response) { return isStatusCodeToCache(response) && isCacheControlAllowed(response) && !isVaryWildcard(response); } boolean isNoCacheRequestWithoutUpdate(ServerHttpRequest request) { return LocalResponseCacheUtils.isNoCacheRequest(request) && ignoreNoCacheUpdate; }...
return cacheControlHeader.stream().noneMatch(forbiddenCacheControlValues::contains); } private static boolean hasRequestBody(ServerHttpRequest request) { return request.getHeaders().getContentLength() > 0; } private void saveInCache(String cacheKey, CachedResponse cachedResponse) { try { cache.put(cacheKey...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\cache\ResponseCacheManager.java
1
请在Spring Boot框架中完成以下Java代码
public void deleteAlarmComment(@Parameter(description = ALARM_ID_PARAM_DESCRIPTION) @PathVariable(ALARM_ID) String strAlarmId, @Parameter(description = ALARM_COMMENT_ID_PARAM_DESCRIPTION) @PathVariable(ALARM_COMMENT_ID) String strCommentId) throws ThingsboardException { checkParameter(ALARM_ID, strAlarmId); ...
@RequestParam int pageSize, @Parameter(description = PAGE_NUMBER_DESCRIPTION, required = true) @RequestParam int page, @Parameter(description = SORT_PROPERTY_DESCRIPTION, schema = @Schema(allowableValues = {"createdTime", "id"})) @RequestParam(required = false) String sor...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\controller\AlarmCommentController.java
2
请完成以下Java代码
public boolean getRetriesLeft() { return retriesLeft; } public boolean getExecutable() { return executable; } public Date getNow() { return Context.getProcessEngineConfiguration().getClock().getCurrentTime(); } public boolean isWithException() { return withExce...
public Date getDuedateHigherThan() { return duedateHigherThan; } public Date getDuedateLowerThan() { return duedateLowerThan; } public Date getDuedateHigherThanOrEqual() { return duedateHigherThanOrEqual; } public Date getDuedateLowerThanOrEqual() { return dued...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\JobQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class GithubClient { private final RestService restService; public GithubClient(final RestService restService) { this.restService = restService; } public ImmutableList<Issue> fetchIssues(@NonNull final RetrieveIssuesRequest retrieveIssuesRequest) { final ImmutableList<Issue> issueList; final List<...
return issueList.stream() .filter(issue -> !issue.isPullRequest()) .collect(ImmutableList.toImmutableList()); } public Issue fetchIssueById(@NonNull final FetchIssueByIdRequest fetchIssueByIdRequest) { final List<String> pathVariables = Arrays.asList( REPOS.getValue(), fetchIssueByIdRequest.getRep...
repos\metasfresh-new_dawn_uat\backend\de.metas.issue.tracking.github\src\main\java\de\metas\issue\tracking\github\api\v3\service\GithubClient.java
2
请完成以下Java代码
public applet setObject (String object) { addAttribute ("object", object); return (this); } /** * Breif description, alternate text for the applet. * * @param alt * alternat text. */ public applet setAlt (String alt) { addAttribute ("alt", alt); return (this); } /**...
* * @param hashcode * name of element for hash table * @param element * Adds an Element to the element. */ public applet addElement (String hashcode, String element) { addElementToRegistry (hashcode, element); return (this); } /** * Add an element to the ele...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\applet.java
1
请完成以下Java代码
public OAuth2AuthorizationConsent mapRow(ResultSet rs, int rowNum) throws SQLException { String registeredClientId = rs.getString("registered_client_id"); RegisteredClient registeredClient = this.registeredClientRepository.findById(registeredClientId); if (registeredClient == null) { throw new DataRetrieva...
parameters .add(new SqlParameterValue(Types.VARCHAR, StringUtils.collectionToDelimitedString(authorities, ","))); return parameters; } } static class JdbcOAuth2AuthorizationConsentServiceRuntimeHintsRegistrar implements RuntimeHintsRegistrar { @Override public void registerHints(RuntimeHints hints, Cl...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\JdbcOAuth2AuthorizationConsentService.java
1
请完成以下Java代码
public class X_M_Product_Allergen extends org.compiere.model.PO implements I_M_Product_Allergen, org.compiere.model.I_Persistent { private static final long serialVersionUID = -2016580125L; /** Standard Constructor */ public X_M_Product_Allergen (final Properties ctx, final int M_Product_Allergen_ID, @Nulla...
set_Value (COLUMNNAME_M_Allergen_ID, M_Allergen_ID); } @Override public int getM_Allergen_ID() { return get_ValueAsInt(COLUMNNAME_M_Allergen_ID); } @Override public void setM_Product_Allergen_ID (final int M_Product_Allergen_ID) { if (M_Product_Allergen_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Product_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_Allergen.java
1
请完成以下Java代码
public boolean isCreditAdvice() { if (creditAdvice == null) { return false; } else { return creditAdvice; } } /** * Sets the value of the creditAdvice property. * * @param value * allowed object is * {@link Boolean } * ...
public BigInteger getResponseTimestamp() { return responseTimestamp; } /** * Sets the value of the responseTimestamp property. * * @param value * allowed object is * {@link BigInteger } * */ public void setResponseTimestamp(BigInteger value) { ...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_response\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\response\PayloadType.java
1
请在Spring Boot框架中完成以下Java代码
public void save(final Object po, final String trxName) { InterfaceWrapperHelper.save(po, trxName); } /** * If the table of the given PO has a column with the given name, the PO's value is returned. * * This method can be used to access non-standard columns that are not present in every ADempiere database....
*/ @Override public void setValue(final Object po, final String columnName, final Object value) { if (columnName == null) { throw new NullPointerException("columnName"); } if (MiscUtils.asPO(po).get_ColumnIndex(columnName) != -1) { MiscUtils.asPO(po).set_ValueOfColumn(columnName, value); } el...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\adempiere\misc\service\impl\POService.java
2
请在Spring Boot框架中完成以下Java代码
protected void configure(AuthenticationManagerBuilder auth) throws Exception { // The memory user is not configured, but the UserService just created is configured into the AuthenticationManagerBuilder. auth.userDetailsService(userService); } @Order @Override protected void configure(HttpSec...
.loginProcessingUrl("/login").permitAll() .and() .csrf().disable(); } @Bean CustomFilterInvocationSecurityMetadataSource cfisms() { return new CustomFilterInvocationSecurityMetadataSource(); } @Bean CustomAccessDecisionManager cadm() { return n...
repos\springboot-demo-master\security\src\main\java\com\et\security\config\WebSecurityConfig.java
2
请完成以下Java代码
public static class ImmutableShipmentScheduleSegmentBuilder { public ImmutableShipmentScheduleSegmentBuilder anyBPartner() { if (bpartnerIds != null) { bpartnerIds.clear(); } bpartnerId(ANY); return this; } public ImmutableShipmentScheduleSegmentBuilder anyProduct() { if (productIds !=...
} productId(ANY); return this; } public ImmutableShipmentScheduleSegmentBuilder anyLocator() { if (locatorIds != null) { locatorIds.clear(); } locatorId(ANY); return this; } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\invalidation\segments\ImmutableShipmentScheduleSegment.java
1
请完成以下Java代码
public I_M_Product getM_ProductMember() throws RuntimeException { return (I_M_Product)MTable.get(getCtx(), I_M_Product.Table_Name) .getPO(getM_ProductMember_ID(), get_TrxName()); } /** Set Membership. @param M_ProductMember_ID Product used to deternine the price of the membership for the topic type *...
/** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName(...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_B_TopicType.java
1
请完成以下Java代码
protected BaseElement convertXMLToElement(XMLStreamReader xtr, BpmnModel model) throws Exception { BoundaryEvent boundaryEvent = new BoundaryEvent(); BpmnXMLUtil.addXMLLocation(boundaryEvent, xtr); if (StringUtils.isNotEmpty(xtr.getAttributeValue(null, ATTRIBUTE_BOUNDARY_CANCELACTIVITY))) { ...
if (eventDef instanceof ErrorEventDefinition == false) { writeDefaultAttribute( ATTRIBUTE_BOUNDARY_CANCELACTIVITY, String.valueOf(boundaryEvent.isCancelActivity()).toLowerCase(), xtw ); } } } @Overri...
repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\BoundaryEventXMLConverter.java
1
请完成以下Java代码
public Set<ChangedFiles> getChangeSet() { return this.changeSet; } /** * Return if an application restart is required due to the change. * @return if an application restart is required */ public boolean isRestartRequired() { return this.restartRequired; } @Override public String toString() { return ...
else if (type == Type.MODIFY) { modified++; } } } int size = added + deleted + modified; return String.format("%s (%s, %s, %s)", quantityOfUnit(size, "class path change"), quantityOfUnit(added, "addition"), quantityOfUnit(deleted, "deletion"), quantityOfUnit(modified, "modification")); } pr...
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\classpath\ClassPathChangedEvent.java
1
请完成以下Java代码
public class DefaultOAuth2User implements OAuth2User, Serializable { private static final long serialVersionUID = 620L; private final Set<GrantedAuthority> authorities; private final Map<String, Object> attributes; private final String nameAttributeKey; /** * Constructs a {@code DefaultOAuth2User} using the...
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || this.getClass() != obj.getClass()) { return false; } DefaultOAuth2User that = (DefaultOAuth2User) obj; if (!this.getName().equals(that.getName())) { return false; } if (!this.getAuthorities().equals(that.ge...
repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\user\DefaultOAuth2User.java
1
请完成以下Java代码
private static BucketValueExtractor createBucketValueExtractor(@NonNull final List<String> path, @NonNull final KPIFieldValueType valueType) { if (path.size() == 1) { final String fieldName = path.get(0); if ("doc_count".equals(fieldName)) { return (containingAggName, bucket) -> KPIDataValue.ofValueAn...
} else if (aggregation instanceof InternalAggregation) { final InternalAggregation internalAggregation = (InternalAggregation)aggregation; return internalAggregation.getProperty(path.subList(1, path.size())); } else if (aggregation instanceof NumericMetricsAggregation.SingleValue) { final NumericMetr...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\kpi\descriptor\elasticsearch\ElasticsearchDatasourceFieldDescriptor.java
1
请完成以下Java代码
public void onIsMatured(final I_PP_Product_Planning productPlanningRecord) { if (productPlanningRecord.isMatured()) { final List<MaturingConfigLine> configLines = maturingConfigRepo.getByMaturedProductId(ProductId.ofRepoIdOrNull(productPlanningRecord.getM_Product_ID())); if (configLines.isEmpty() || configLi...
} @CalloutMethod(columnNames = I_PP_Product_Planning.COLUMNNAME_PP_Product_BOMVersions_ID) public void onBOMVersionsChanged(@NonNull final I_PP_Product_Planning productPlanningRecord) { final ProductBOMVersionsId bomVersionsId = ProductBOMVersionsId.ofRepoIdOrNull(productPlanningRecord.getPP_Product_BOMVersions_I...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\callout\PP_Product_Planning.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonResponseContactPosition { public static final String METASFRESH_ID = "metasfreshId"; public static final String NAME = "name"; public static final String ACTIVE = "active"; @ApiModelProperty( // required = true, // dataType = "java.lang.Integer", // value = "This translates to `C_Job.C_Jo...
@ApiModelProperty(required = false, value = "This translates to `C_Job.IsActive`.") @JsonProperty(ACTIVE) boolean active; @JsonCreator @Builder(toBuilder = true) private JsonResponseContactPosition( @JsonProperty(METASFRESH_ID) @NonNull final JsonMetasfreshId metasfreshId, @JsonProperty(NAME) @NonNull final...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-bpartner\src\main\java\de\metas\common\bpartner\v2\response\JsonResponseContactPosition.java
2
请完成以下Java代码
public String asString() { return "messaging.rabbitmq.destination.routing_key"; } } } /** * Default {@link RabbitTemplateObservationConvention} for Rabbit template key values. */ public static class DefaultRabbitTemplateObservationConvention implements RabbitTemplateObservationConvention { /** ...
return KeyValues.of( TemplateLowCardinalityTags.BEAN_NAME.asString(), context.getBeanName(), TemplateLowCardinalityTags.EXCHANGE.asString(), context.getExchange(), TemplateLowCardinalityTags.ROUTING_KEY.asString(), context.getRoutingKey() ); } @Override public String getContextualName(RabbitMes...
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\support\micrometer\RabbitTemplateObservation.java
1
请在Spring Boot框架中完成以下Java代码
private void processStats(List<TbProtoQueueMsg<JobStatsMsg>> msgs, TbQueueConsumer<TbProtoQueueMsg<JobStatsMsg>> consumer) { Map<JobId, JobStats> stats = new HashMap<>(); for (TbProtoQueueMsg<JobStatsMsg> msg : msgs) { JobStatsMsg statsMsg = msg.getValue(); TenantId tenantId = T...
try { log.debug("[{}][{}] Processing job stats: {}", tenantId, jobId, stats); jobService.processStats(tenantId, jobId, jobStats); } catch (Exception e) { log.error("[{}][{}] Failed to process job stats: {}", tenantId, jobId, jobStats, e); } ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\job\JobStatsProcessor.java
2
请在Spring Boot框架中完成以下Java代码
public ProductInfo getProductInfo(@NonNull final ProductId productId) { return ProductInfo.builder() .productId(productId) .caption(productBL.getProductNameTrl(productId)) .build(); } public String getProductValueAndName(@NonNull ProductId productId) { return productBL.getProductValueAndName(produc...
public ProductId getProductIdByScannedProductCode(@NonNull final ScannedCode scannedProductCode) { ProductId productId = null; final GTIN gtin = GTIN.ofScannedCode(scannedProductCode).orElse(null); if (gtin != null) { productId = productBL.getProductIdByGTIN(gtin).orElse(null); } if (productId == null)...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\external_services\product\DistributionProductService.java
2
请完成以下Java代码
public class X_C_MembershipMonth extends org.compiere.model.PO implements I_C_MembershipMonth, org.compiere.model.I_Persistent { private static final long serialVersionUID = -1145810915L; /** Standard Constructor */ public X_C_MembershipMonth (final Properties ctx, final int C_MembershipMonth_ID, @Nullable ...
set_ValueFromPO(COLUMNNAME_C_Year_ID, org.compiere.model.I_C_Year.class, C_Year); } @Override public void setC_Year_ID (final int C_Year_ID) { if (C_Year_ID < 1) set_Value (COLUMNNAME_C_Year_ID, null); else set_Value (COLUMNNAME_C_Year_ID, C_Year_ID); } @Override public int getC_Year_ID() { ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_MembershipMonth.java
1
请完成以下Java代码
public void setIsNewsletter (final boolean IsNewsletter) { set_Value (COLUMNNAME_IsNewsletter, IsNewsletter); } @Override public boolean isNewsletter() { return get_ValueAsBoolean(COLUMNNAME_IsNewsletter); } @Override public void setLastname (final @Nullable java.lang.String Lastname) { set_Value (COL...
{ set_Value (COLUMNNAME_Phone2, Phone2); } @Override public java.lang.String getPhone2() { return get_ValueAsString(COLUMNNAME_Phone2); } @Override public void setTitle (final @Nullable java.lang.String Title) { set_Value (COLUMNNAME_Title, Title); } @Override public java.lang.String getTitle() {...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_Contact_QuickInput.java
1
请完成以下Java代码
public String getGenre() { return genre; } public void setGenre(String genre) { this.genre = genre; } public int getAge() { return age; } public void setAge(int age) { this.age = age; }
public int getRating() { return rating; } public void setRating(int rating) { this.rating = rating; } @Override public String toString() { return "Author{" + "id=" + id + ", age=" + age + ", name=" + name + ", genre=" + genre + ", rating=" + rating + '}'; ...
repos\Hibernate-SpringBoot-master\HibernateSpringBootSearchViaSpecifications\src\main\java\com\bookstore\entity\Author.java
1
请完成以下Java代码
public String getPhone() { return phone; } /** * 设置 联系电话. * * @param phone 联系电话. */ public void setPhone(String phone) { this.phone = phone; } /** * 获取 备注. * * @return 备注. */ public String getTips() { return tips; } /** ...
*/ public Date getCreatedTime() { return createdTime; } /** * 设置 创建时间. * * @param createdTime 创建时间. */ public void setCreatedTime(Date createdTime) { this.createdTime = createdTime; } /** * 获取 更新时间. * * @return 更新时间. */ public Date ge...
repos\SpringBootBucket-master\springboot-jwt\src\main\java\com\xncoding\jwt\dao\domain\Manager.java
1
请完成以下Java代码
public boolean isAmount () { Object oo = get_Value(COLUMNNAME_IsAmount); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Standard. @param IsDefault Default value */ @Override public void setIsDefau...
return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Name. @param Name Alphanumeric identifier of the entity */ @Override public void setName (java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_InvoiceSchedule.java
1
请完成以下Java代码
public void addListener(final IHUTrxListener listener) { Check.assumeNotNull(listener, "listener not null"); if (hasListener(listener)) { return; } listeners.add(listener); } public void addListeners(final Collection<IHUTrxListener> listeners) { Check.assumeNotNull(listeners, "listeners not null");...
listener.trxLineProcessed(huContext, trxLine); } } @Override public void huParentChanged(final I_M_HU hu, final I_M_HU_Item parentHUItemOld) { for (final IHUTrxListener listener : listeners) { listener.huParentChanged(hu, parentHUItemOld); } } @Override public void afterTrxProcessed(final IReference...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\CompositeHUTrxListener.java
1
请完成以下Java代码
public class PaymentView_Launcher_FromPayment extends ViewBasedProcessTemplate implements IProcessPrecondition { private final IViewsRepository viewsFactory = SpringContextHolder.instance.getBean(IViewsRepository.class); @Override protected ProcessPreconditionsResolution checkPreconditionsApplicable() { final Im...
.viewId(viewId.getViewId()) .target(ViewOpenTarget.ModalOverlay) .build()); return MSG_OK; } private ImmutableSet<PaymentId> getSelectedPaymentIds() { return getSelectedRowIds() .stream() .map(rowId -> PaymentId.ofRepoId(rowId.toInt())) .collect(ImmutableSet.toImmutableSet()); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\payment_allocation\process\PaymentView_Launcher_FromPayment.java
1
请完成以下Java代码
public MenuNode filter(final String nameQuery, final boolean includeLeafsIfGroupAccepted) { if (Check.isEmpty(nameQuery, true)) { throw new IllegalArgumentException("Invalid name query '" + nameQuery + "'"); } final String nameQueryLC = nameQuery.toLowerCase(); logger.trace("Filtering using nameQueryLC={...
}); } private static boolean matchesNameQuery(final MenuNode node, final String nameQueryLC) { final String captionNorm = stripDiacritics(node.getCaption().toLowerCase()); final String queryNorm = stripDiacritics(nameQueryLC); return captionNorm.contains(queryNorm); } private static String stripDiacritics(...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\menu\MenuTree.java
1
请完成以下Java代码
public void beforeAll(ExtensionContext context) { Store store = context.getStore(Namespace.create(getClass(), context)); LogLevels logLevels = store.get(STORE_ANNOTATION_KEY, LogLevels.class); if (logLevels != null) { store.put(STORE_CONTAINER_KEY, JUnitUtils.adjustLogLevels(context.getDisplayName(), Arra...
store.remove(STORE_CONTAINER_KEY); } } } @Override public void afterAll(ExtensionContext context) { Store store = context.getStore(Namespace.create(getClass(), context)); LogLevels logLevels = store.remove(STORE_ANNOTATION_KEY, LogLevels.class); if (logLevels != null) { LevelsContainer container = sto...
repos\spring-amqp-main\spring-rabbit-junit\src\main\java\org\springframework\amqp\rabbit\junit\LogLevelsCondition.java
1
请完成以下Java代码
public ProductId getProductId() { return getProduct().getIdAs(ProductId::ofRepoId); } public String getProductName() { return getProduct().getDisplayName(); } public boolean isQtySet() { final BigDecimal qty = getQty(); return qty != null && qty.signum() != 0; } public ProductsProposalRow withLastSh...
public ProductsProposalRow withExistingOrderLine(@Nullable final OrderLine existingOrderLine) { if(existingOrderLine == null) { return this; } final Amount existingPrice = Amount.of(existingOrderLine.getPriceEntered(), existingOrderLine.getCurrency().getCurrencyCode()); return toBuilder() .qty(existi...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\products_proposal\model\ProductsProposalRow.java
1
请在Spring Boot框架中完成以下Java代码
KotlinMavenBuildCustomizer kotlinBuildCustomizer(KotlinProjectSettings kotlinProjectSettings) { return new KotlinMavenBuildCustomizer(kotlinProjectSettings); } @Bean MainCompilationUnitCustomizer<KotlinTypeDeclaration, KotlinCompilationUnit> mainFunctionContributor( ProjectDescription description) { re...
ServletInitializerCustomizer<KotlinTypeDeclaration> javaServletInitializerCustomizer( ProjectDescription description) { return (typeDeclaration) -> { KotlinFunctionDeclaration configure = KotlinFunctionDeclaration.function("configure") .modifiers(KotlinModifier.OVERRIDE) .returning("org.springframe...
repos\initializr-main\initializr-generator-spring\src\main\java\io\spring\initializr\generator\spring\code\kotlin\KotlinProjectGenerationDefaultContributorsConfiguration.java
2
请完成以下Java代码
public void setTp(String value) { this.tp = value; } /** * Gets the value of the dt property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDt() { return dt; } /** * Sets th...
public ActiveOrHistoricCurrencyAndAmount getAmt() { return amt; } /** * Sets the value of the amt property. * * @param value * allowed object is * {@link ActiveOrHistoricCurrencyAndAmount } * */ public void setAmt(ActiveOrHistoricCurrencyAndAmount va...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_001_01_03_ch_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_001_001_03_ch_02\StructuredRegulatoryReporting3.java
1
请完成以下Java代码
public void setTenantId(String tenantId) { this.tenantId = tenantId; } @Override public String getParentDeploymentId() { return parentDeploymentId; } @Override public void setParentDeploymentId(String parentDeploymentId) { this.parentDeploymentId = parentDeploymentId; ...
@Override public boolean isNew() { return isNew; } @Override public void setNew(boolean isNew) { this.isNew = isNew; } // common methods ////////////////////////////////////////////////////////// @Override public String toString() { return "EventDeploymentEntit...
repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\persistence\entity\EventDeploymentEntityImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class UserController { private final Logger logger = LoggerFactory.getLogger(this.getClass()); @Autowired private UserRepository userRepository; @RequestMapping("/list") @Cacheable(value="user_list") public String list(Model model,@RequestParam(value = "page", defaultValue = "0") Integer...
model.addAttribute("user", user); return "user/userEdit"; } @RequestMapping("/edit") public String edit(@Valid UserParam userParam, BindingResult result,ModelMap model) { String errorMsg=""; if(result.hasErrors()) { List<ObjectError> list = result.getAllErrors(); ...
repos\spring-boot-leaning-master\1.x\第16课:综合实战用户管理系统\user-manage\src\main\java\com\neo\web\UserController.java
2
请完成以下Java代码
public String getCountry() { return this.country; } @Override public String toString() { return new StringJoiner(", ", "{", "}").add("id='" + this.id + "'") .add("version='" + this.version + "'") .add("ip='" + this.ip + "'") .add("country='" + this.country + "'") .toString(); } } /** ...
public void setMessage(String message) { this.message = message; } @Override public String toString() { return new StringJoiner(", ", "{", "}").add("invalid=" + this.invalid) .add("javaVersion=" + this.javaVersion) .add("language=" + this.language) .add("configurationFileFormat=" + this.configu...
repos\initializr-main\initializr-actuator\src\main\java\io\spring\initializr\actuate\stat\ProjectRequestDocument.java
1
请完成以下Java代码
class DelegatingEvaluationContext implements EvaluationContext { private final EvaluationContext delegate; DelegatingEvaluationContext(EvaluationContext delegate) { this.delegate = delegate; } @Override public TypedValue getRootObject() { return this.delegate.getRootObject(); } @Override public List<Con...
@Override public TypeConverter getTypeConverter() { return this.delegate.getTypeConverter(); } @Override public TypeComparator getTypeComparator() { return this.delegate.getTypeComparator(); } @Override public OperatorOverloader getOperatorOverloader() { return this.delegate.getOperatorOverloader(); } ...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\access\expression\DelegatingEvaluationContext.java
1
请完成以下Java代码
public String getJobDefinitionId() { return jobDefinitionId; } public Boolean isOpen() { return open; } public Boolean isDeleted() { return deleted; } public Boolean isResolved() { return resolved; } public String getAnnotation() { return annotation; } public static Historic...
dto.createTime = historicIncident.getCreateTime(); dto.endTime = historicIncident.getEndTime(); dto.incidentType = historicIncident.getIncidentType(); dto.failedActivityId = historicIncident.getFailedActivityId(); dto.activityId = historicIncident.getActivityId(); dto.causeIncidentId = historicIncid...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricIncidentDto.java
1
请完成以下Java代码
public class ArticleDTO extends ReviewableDTO { private String title; public ArticleDTO(String title) { this.title = title; } public ArticleDTO() { } public String getTitle() { return title; } public void setTitle(String title) { this.title = title;
} @Override public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } ArticleDTO that = (ArticleDTO) o; return Objects.equals(title, that.title); } @Override public int hashCode() { return Objects.hashCode(t...
repos\tutorials-master\mapstruct-3\src\main\java\com\baeldung\setnullproperty\dto\ArticleDTO.java
1
请完成以下Java代码
public boolean addHUIds(final Collection<HuId> huIdsToAdd) { return rowsBuffer.addHUIds(huIdsToAdd); } public void removeHUsAndInvalidate(final Collection<I_M_HU> husToRemove) { final Set<HuId> huIdsToRemove = extractHUIds(husToRemove); removeHUIdsAndInvalidate(huIdsToRemove); } public void removeHUIdsAnd...
/** * @return top level rows and included rows recursive stream which are matching the given filter */ public Stream<HUEditorRow> streamAllRecursive(final HUEditorRowFilter filter) { return rowsBuffer.streamAllRecursive(filter); } /** * @return true if there is any top level or included row which is matchi...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorView.java
1
请完成以下Java代码
public int getExportBy_ID() { return get_ValueAsInt(COLUMNNAME_ExportBy_ID); } @Override public void setExportDate (final @Nullable java.sql.Timestamp ExportDate) { set_ValueNoCheck (COLUMNNAME_ExportDate, ExportDate); } @Override public java.sql.Timestamp getExportDate() { return get_ValueAsTimestam...
set_Value (COLUMNNAME_ExportType, ExportType); } @Override public java.lang.String getExportType() { return get_ValueAsString(COLUMNNAME_ExportType); } @Override public void setProcessed (final boolean Processed) { set_Value (COLUMNNAME_Processed, Processed); } @Override public boolean isProcessed() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_DatevAcctExport.java
1
请完成以下Java代码
public void copy() { final IModelInternalAccessor from = getFromAccessor(); final IModelInternalAccessor to = getToAccessor(); for (final String columnName : to.getColumnNames()) { // Skip this column if it does not exist in our "from" model if (!from.hasColumnName(columnName)) { continue; } ...
return _fromModel; } @Override public IModelCopyHelper setTo(final Object toModel) { this._toModel = toModel; this._toModelAccessor = null; return this; } private final IModelInternalAccessor getToAccessor() { if (_toModelAccessor == null) { Check.assumeNotNull(_toModel, "_toModel not null"); _...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\model\util\ModelCopyHelper.java
1
请完成以下Java代码
public ComponentDescriptor findByClazz(TenantId tenantId, String clazz) { Validator.validateString(clazz, "Incorrect clazz for search request."); return componentDescriptorDao.findByClazz(tenantId, clazz); } @Override public PageData<ComponentDescriptor> findByTypeAndPageLink(TenantId tenan...
@Override public boolean validate(TenantId tenantId, ComponentDescriptor component, JsonNode configuration) { try { if (!component.getConfigurationDescriptor().has("schema")) { throw new DataValidationException("Configuration descriptor doesn't contain schema property!"); ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\component\BaseComponentDescriptorService.java
1
请完成以下Java代码
protected PartitionedRegion computeStatistics(PartitionedRegion region) { float totalHitRatio = 0.0f; int totalCount = 0; long totalHitCount = 0L; long maxLastAccessedTime = 0L; long maxLastModifiedTime = 0L; long totalMissCount = 0L; Set<BucketRegion> bucketRegions = Optional.of(region) .m...
public long getHitCount() throws StatisticsDisabledException { return this.hitCount; } @Override public float getHitRatio() throws StatisticsDisabledException { return this.hitRatio; } @Override public long getLastAccessedTime() throws StatisticsDisabledException { return this.lastAccessedTime; ...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-actuator\src\main\java\org\springframework\geode\boot\actuate\health\support\RegionStatisticsResolver.java
1
请在Spring Boot框架中完成以下Java代码
protected ItemDeprecation resolveItemDeprecation(MetadataGenerationEnvironment environment) { return resolveItemDeprecation(environment, getGetter(), this.setter, this.field, this.factoryMethod); } @Override public boolean isProperty(MetadataGenerationEnvironment env) { if (!hasLombokPublicAccessor(env, true)) ...
* @param env the {@link MetadataGenerationEnvironment} * @param getter {@code true} to look for the read accessor, {@code false} for the * write accessor * @return {@code true} if this field has a public accessor of the specified type */ private boolean hasLombokPublicAccessor(MetadataGenerationEnvironment env...
repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\LombokPropertyDescriptor.java
2
请在Spring Boot框架中完成以下Java代码
public Rfq getRfqById(final long rfq_id) { return rfqRepo.getOne(rfq_id); } @Override @Nullable public Rfq getRfqByUUID(@NonNull final String rfq_uuid) { return rfqRepo.findByUuid(rfq_uuid); } private void saveRecursivelyAndPush(@NonNull final Rfq rfq) { saveRecursively(rfq); pushToMetasfresh(rfq); ...
} saveRecursively(rfq); return rfq; } @Override public long getCountUnconfirmed(@NonNull final User user) { return rfqRepo.countUnconfirmed(user.getBpartner()); } @Override @Transactional public void confirmUserEntries(@NonNull final User user) { final BPartner bpartner = user.getBpartner(); fina...
repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\service\impl\RfQService.java
2
请完成以下Java代码
public static BPartnerLocationAndCaptureId ofRepoIdOrNull( final int bpartnerRepoId, final int bpartnerLocationRepoId) { return ofRepoIdOrNull(bpartnerRepoId, bpartnerLocationRepoId, -1); } @Nullable public static BPartnerLocationAndCaptureId ofRepoIdOrNull( @Nullable final BPartnerId bpartnerId, fin...
public static BPartnerLocationAndCaptureId ofNullableLocationWithUnknownCapture(@Nullable final BPartnerLocationId bpartnerLocationId) { return bpartnerLocationId != null ? new BPartnerLocationAndCaptureId(bpartnerLocationId, null) : null; } public static boolean equals(@Nullable BPartnerLocationAndCaptur...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\BPartnerLocationAndCaptureId.java
1
请完成以下Java代码
private final String toQtyTUString(final BigDecimal qtyTU) { if (qtyTU == null) { return "?"; } return qtyTU .setScale(0, RoundingMode.UP) // it's general integer, just making sure we don't end up with 3.0000000 .toString(); } @Override public IHUPIItemProductDisplayNameBuilder setM_HU_PI_Item_...
_qtyTUMoved = qtyTUMoved; return this; } @Override public IHUPIItemProductDisplayNameBuilder setQtyTUMoved(final int qtyTUMoved) { setQtyTUMoved(BigDecimal.valueOf(qtyTUMoved)); return this; } @Override public HUPIItemProductDisplayNameBuilder setQtyCapacity(final BigDecimal qtyCapacity) { _qtyCapacit...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUPIItemProductDisplayNameBuilder.java
1
请完成以下Java代码
public void setC_Invoice_Cand_ToClear(de.metas.invoicecandidate.model.I_C_Invoice_Candidate C_Invoice_Cand_ToClear) { set_ValueFromPO(COLUMNNAME_C_Invoice_Cand_ToClear_ID, de.metas.invoicecandidate.model.I_C_Invoice_Candidate.class, C_Invoice_Cand_ToClear); } /** Set Zu verrechnender Rechn-Kand.. @param C_Invoi...
@param C_Invoice_Clearing_Alloc_ID Rechnungskanditad - Verrechnung */ @Override public void setC_Invoice_Clearing_Alloc_ID (int C_Invoice_Clearing_Alloc_ID) { if (C_Invoice_Clearing_Alloc_ID < 1) set_ValueNoCheck (COLUMNNAME_C_Invoice_Clearing_Alloc_ID, null); else set_ValueNoCheck (COLUMNNAME_C_Invoic...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Invoice_Clearing_Alloc.java
1
请完成以下Java代码
public class MReplicationRun extends X_AD_Replication_Run { /** * */ private static final long serialVersionUID = 2619966943083677072L; /** * Create new Run * @param ctx context * @param AD_Replication_ID id * @param dateRun date */ public MReplicationRun (Properties ctx, int AD_Replication_ID, Tim...
super(ctx, 0, trxName); setAD_Replication_ID (AD_Replication_ID); setName (dateRun.toString()); super.setIsReplicated (false); } // MReplicationRun /** * Set Replication Flag * @param IsReplicated replicated */ public void setIsReplicated (boolean IsReplicated) { super.setIsReplicated(IsReplicated)...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MReplicationRun.java
1
请在Spring Boot框架中完成以下Java代码
public class Author implements Serializable { private static final long serialVersionUID = 1L; @Id private Long id; private String name; private String genre; private int age; @OneToMany(cascade = CascadeType.ALL, mappedBy = "author", orphanRemoval = true) private List<Bo...
} public String getGenre() { return genre; } public void setGenre(String genre) { this.genre = genre; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public List<Book> getBooks() { return books; } ...
repos\Hibernate-SpringBoot-master\HibernateSpringBootDtoEntityViaProjection\src\main\java\com\bookstore\entity\Author.java
2
请完成以下Java代码
void shutDownGracefully(GracefulShutdownCallback callback) { logger.info("Commencing graceful shutdown. Waiting for active requests to complete"); new Thread(() -> awaitShutdown(callback), "jetty-shutdown").start(); boolean jetty10 = isJetty10(); for (Connector connector : this.server.getConnectors()) { shut...
callback.shutdownComplete(GracefulShutdownResult.REQUESTS_ACTIVE); } else { logger.info("Graceful shutdown complete"); callback.shutdownComplete(GracefulShutdownResult.IDLE); } } private void sleep(long millis) { try { Thread.sleep(millis); } catch (InterruptedException ex) { Thread.currentTh...
repos\spring-boot-4.0.1\module\spring-boot-jetty\src\main\java\org\springframework\boot\jetty\GracefulShutdown.java
1
请在Spring Boot框架中完成以下Java代码
public void displayAuthorsAndBooks() { List<Author> authors = authorRepository.findAll(); for (Author author : authors) { System.out.println("Author: " + author); System.out.println("No of books: " + author.getBooks().size() + ", " + author.getBooks()); ...
public void displayAuthorsAndBooksFetchAllAgeBetween20And40() { List<Author> authors = authorRepository.fetchAllAgeBetween20And40(); for (Author author : authors) { System.out.println("Author: " + author); System.out.println("No of books: " + author.getBooks...
repos\Hibernate-SpringBoot-master\HibernateSpringBootEntityGraphAttributePaths\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
public ILockCommand split() { LockAlreadyClosedException.throwIfClosed(this); assertHasRealOwner(); return new LockCommand(this); } @Override public void unlockAll() { assertHasRealOwner(); try (final CloseableReentrantLock ignore = mutex.open()) { // Mark it as closed. // If it was already cl...
try { lock.unlockAll(); } catch (Exception ex) { logger.warn("Failed to unlock {}. Ignored", lock, ex); } } } @Override public boolean isClosed() { return closed.get(); } @Override public void close() { // If it was already closed, do nothing (method contract). if (isClosed()) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\lock\api\impl\Lock.java
1
请在Spring Boot框架中完成以下Java代码
public void method02() { // 查询订单 OrderDO order = orderMapper.selectById(1); System.out.println(order); // 查询用户 UserDO user = userMapper.selectById(1); System.out.println(user); } public void method03() { // 查询订单 self().method031(); // 查询用户...
System.out.println(user); } @Transactional(transactionManager = DBConstants.TX_MANAGER_ORDERS) public void method05() { // 查询订单 OrderDO order = orderMapper.selectById(1); System.out.println(order); // 查询用户 self().method052(); } @Transactional(transactionMana...
repos\SpringBoot-Labs-master\lab-17\lab-17-dynamic-datasource-mybatis\src\main\java\cn\iocoder\springboot\lab17\dynamicdatasource\service\OrderService.java
2
请完成以下Java代码
public void streamClosed(Status status) { if (streamClosedUpdater.getAndSet(this, 1) != 0) { return; } long callLatencyNanos = stopwatch.elapsed(TimeUnit.NANOSECONDS); Tags serverMetricTags = Tags.of("grpc.method", this.fullMethodName,...
MetricsServerTracerFactory(MeterRegistry registry) { this(MetricsServerInstruments.newServerMetricsMeters(registry)); } MetricsServerTracerFactory(MetricsServerMeters metricsServerMeters) { this.metricsServerMeters = metricsServerMeters; } @Override publ...
repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\metrics\MetricsServerStreamTracers.java
1
请完成以下Java代码
public boolean isMatching( @NonNull final ClientId clientId, @NonNull final OrgId orgId, @NonNull final Instant date) { return (this.clientId.isSystem() || ClientId.equals(this.clientId, clientId)) && (this.orgId.isAny() || OrgId.equals(this.orgId, orgId)) && this.validFrom.compareTo(date) <= 0; } ...
public boolean isMoreSpecificThan(@NonNull final CurrencyConversionTypeRouting other) { if (!ClientId.equals(this.getClientId(), other.getClientId())) { return this.getClientId().isRegular(); } if (!OrgId.equals(this.getOrgId(), other.getOrgId())) { return this.getOrgId().isRegular(); } return th...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\currency\impl\CurrencyConversionTypeRouting.java
1
请完成以下Java代码
public Map<String, ActivitiCacheProperties> getCaches() { return caches; } public CaffeineCacheProviderProperties getCaffeine() { return caffeine; } public SimpleCacheProviderProperties getSimple() { return simple; } public void setCaffeine(CaffeineCacheProviderPropert...
private String defaultSpec = ""; public boolean isAllowNullValues() { return allowNullValues; } public String getDefaultSpec() { return defaultSpec; } public void setAllowNullValues(boolean allowNullValues) { this.allowNullValues = allowNull...
repos\Activiti-develop\activiti-core-common\activiti-spring-cache-manager\src\main\java\org\activiti\spring\cache\ActivitiSpringCacheManagerProperties.java
1
请在Spring Boot框架中完成以下Java代码
public void setTransientVariablesLocal(Map<String, Object> transientVariables) { throw new UnsupportedOperationException("No execution active, no variables can be set"); } @Override public void setTransientVariableLocal(String variableName, Object variableValue) { throw new UnsupportedOpera...
} @Override public Map<String, Object> getTransientVariables() { return null; } @Override public void removeTransientVariableLocal(String variableName) { throw new UnsupportedOperationException("No execution active, no variables can be removed"); } @Override public voi...
repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\el\NoExecutionVariableScope.java
2
请完成以下Java代码
public java.lang.String getPIN () { return (java.lang.String)get_Value(COLUMNNAME_PIN); } /** Set Proxy address. @param ProxyAddress Address of your proxy server */ @Override public void setProxyAddress (java.lang.String ProxyAddress) { set_Value (COLUMNNAME_ProxyAddress, ProxyAddress); } /** Ge...
Integer ii = (Integer)get_Value(COLUMNNAME_ProxyPort); if (ii == null) return 0; return ii.intValue(); } /** Set Statement Loader Class. @param StmtLoaderClass Class name of the bank statement loader */ @Override public void setStmtLoaderClass (java.lang.String StmtLoaderClass) { set_Value (COLU...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java-gen\org\compiere\model\X_C_BankStatementLoader.java
1
请完成以下Java代码
public Boolean autoStartDltHandler() { return this.autoStartDltHandler; } public Set<Class<? extends Throwable>> usedForExceptions() { return this.usedForExceptions; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) ...
", suffix='" + this.suffix + '\'' + ", type=" + this.type + ", maxAttempts=" + this.maxAttempts + ", numPartitions=" + this.numPartitions + ", dltStrategy=" + this.dltStrategy + ", kafkaOperations=" + this.kafkaOperations + ", shouldRetryOn=" + this.shouldRetryOn + ", timeout=" + this...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\retrytopic\DestinationTopic.java
1
请完成以下Spring Boot application配置
ms.db.driverClassName=com.mysql.jdbc.Driver ms.db.url=jdbc:mysql://localhost:3306/cache?characterEncoding=utf-8&useSSL=false ms.db.username=root ms.db.password=admin ms.db.maxA
ctive=500 server.port=8081 logging.level.org.springframework.security= INFO
repos\springBoot-master\springboot-SpringSecurity1\src\main\resources\application.properties
2
请完成以下Java代码
public List<User> getUserList() { List<User> r = new ArrayList<>(users.values()); return r; } @PostMapping("/") public String postUser(@RequestBody User user) { users.put(user.getId(), user); return "success"; } @GetMapping("/{id}") public User getUser(@PathVari...
@PutMapping("/{id}") public String putUser(@PathVariable Long id, @RequestBody User user) { User u = users.get(id); u.setName(user.getName()); u.setAge(user.getAge()); users.put(id, u); return "success"; } @DeleteMapping("/{id}") public String deleteUser(@PathVar...
repos\SpringBoot-Learning-master\2.x\chapter2-6\src\main\java\com\didispace\chapter26\UserController.java
1
请完成以下Java代码
public ManyToOneMapping withNewAssignee(String newAssigneeId) { this.withNewAssignee = newAssigneeId; return this; } @Override public String getWithNewAssignee() { return withNewAssignee; } @Override public ManyToOneMapping withNewOwn...
withLocalVariables.put(variableName, variableValue); return this; } @Override public ManyToOneMapping withLocalVariables(Map<String, Object> variables) { withLocalVariables.putAll(variables); return this; } @Override public Map<String...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\migration\ActivityMigrationMapping.java
1
请完成以下Java代码
public class DynamicRouteService implements ApplicationEventPublisherAware { @Autowired private MyInMemoryRouteDefinitionRepository repository; /** * 发布事件 */ private ApplicationEventPublisher publisher; @Override public void setApplicationEventPublisher(ApplicationEventPublisher ap...
public synchronized String update(RouteDefinition definition) { try { log.info("gateway update route {}", definition); } catch (Exception e) { return "update fail,not find route routeId: " + definition.getId(); } try { repository.save(Mono.just(defini...
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-cloud-gateway\src\main\java\org\jeecg\loader\repository\DynamicRouteService.java
1
请完成以下Java代码
public DbOperation addRemovalTimeToByteArraysByRootProcessInstanceId(String rootProcessInstanceId, Date removalTime, Integer batchSize) { Map<String, Object> parameters = new HashMap<>(); parameters.put("rootProcessInstanceId", rootProcessInstanceId); parameters.put("removalTime", removalTime); paramete...
.updatePreserveOrder(ByteArrayEntity.class, "updateExternalTaskLogByteArraysByProcessInstanceId", parameters)); operations.add(getDbEntityManager() .updatePreserveOrder(ByteArrayEntity.class, "updateAttachmentByteArraysByProcessInstanceId", parameters)); return operations; } public DbOperation delete...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\ByteArrayManager.java
1
请完成以下Java代码
public int size() { return calculateBindingMap().size(); } public Collection<Object> values() { return calculateBindingMap().values(); } public void putAll(Map< ? extends String, ? extends Object> toMerge) { for (java.util.Map.Entry<? extends String, ? extends Object> entry : toMerge.entrySet()) {...
protected Map<String, Object> calculateBindingMap() { Map<String, Object> bindingMap = new HashMap<String, Object>(); for (Resolver resolver : scriptResolvers) { for (String key : resolver.keySet()) { bindingMap.put(key, resolver.get(key)); } } Set<java.util.Map.Entry<String, Obje...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\scripting\engine\ScriptBindings.java
1
请在Spring Boot框架中完成以下Java代码
public class X509AuthenticationServer { public static void main(String[] args) { SpringApplication.run(X509AuthenticationServer.class, args); } @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http.authorizeRequests() .anyRequest() ...
} @Bean public UserDetailsService userDetailsService() { return new UserDetailsService() { @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { if (username.equals("Bob")) { return new User(userna...
repos\tutorials-master\spring-security-modules\spring-security-web-x509\spring-security-web-x509-client-auth\src\main\java\com\baeldung\spring\security\x509\X509AuthenticationServer.java
2
请在Spring Boot框架中完成以下Java代码
public void assertFieldExistsAndIsMandatory(final String fieldName) { final Field field = fieldsByFieldName.get(fieldName); if (field == null) { throw new AdempiereException("Field `" + fieldName + "` is missing from layout config"); } if (!field.isMandatory()) { throw new AdempiereException("Field `...
{ @NonNull String fieldName; boolean mandatory; public void assertFieldNamesEligible(@NonNull final Set<String> eligibleFieldNames) { // shall not happen if (eligibleFieldNames.isEmpty()) { throw new AdempiereException("Cannot validate when eligible field names list is empty"); } if (!eligi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\quickinput\config\QuickInputConfigLayout.java
2
请完成以下Java代码
public void setInitialVariables(boolean initialVariables) { this.initialVariables = initialVariables; } public boolean isSkipCustomListeners() { return skipCustomListeners; } public void setSkipCustomListeners(boolean skipCustomListeners) { this.skipCustomListeners = skipCustomListeners; } pu...
public boolean isWithoutBusinessKey() { return withoutBusinessKey; } public void setWithoutBusinessKey(boolean withoutBusinessKey) { this.withoutBusinessKey = withoutBusinessKey; } public void applyTo(RestartProcessInstanceBuilder builder, ProcessEngine processEngine, ObjectMapper objectMapper) { ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\RestartProcessInstanceDto.java
1
请完成以下Java代码
public String getSummary() { return handler.getSummary(model); } @Override public String getDocumentInfo() { return handler.getDocumentInfo(model); } @Override public LocalDate getDocumentDate() { return handler.getDocumentDate(model); } @Override public String getDocumentNo() { return model.get...
{ return InterfaceWrapperHelper.getId(model); } @Override public int get_Table_ID() { return InterfaceWrapperHelper.getModelTableId(model); } @Override public String get_TrxName() { return InterfaceWrapperHelper.getTrxName(model); } @Override public void set_TrxName(final String trxName) { Interf...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\engine\DocumentWrapper.java
1
请完成以下Java代码
private final void assertNotBuilt() { Check.assume(!_built, "Info window menu items not already built"); } private final void markAsBuilt() { assertNotBuilt(); _built = true; } /** Open generic info window */ private final void openGenericInfoWindow(final I_AD_InfoWindow infoWindow) { InfoBuilder.newB...
if (parentWindowNo < 0 || parentWindowNo == Env.WINDOW_None) { return Env.getWindow(Env.WINDOW_MAIN); } // Use particular window final JFrame frame = Env.getWindow(parentWindowNo); if (frame != null) { return frame; } // Fallback to main window (shall not happen) return Env.getWindow(Env.WINDO...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\InfoWindowMenuBuilder.java
1
请完成以下Java代码
public ILoggable addLog(@Nullable final String msg, final Object... msgParameters) { if (msg == null) { logger.warn("Called with msg=null; msgParameters={}; -> ignoring;", msgParameters); return this; } final ApiRequestAuditLog logEntry = createLogEntry(msg, msgParameters); addToBuffer(logEntry); ...
final LoggableWithThrowableUtil.FormattedMsgWithAdIssueId msgAndAdIssueId = LoggableWithThrowableUtil.extractMsgAndAdIssue(msg, msgParameters); return ApiRequestAuditLog.builder() .message(msgAndAdIssueId.getFormattedMessage()) .adIssueId(msgAndAdIssueId.getAdIsueId().orElse(null)) .timestamp(SystemTime....
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\audit\apirequest\ApiAuditLoggable.java
1
请完成以下Java代码
public class NameCountryEntity { private String country_id; private Float probability; public NameCountryEntity() { super(); } public String getCountry_id() { return country_id; } public void setCountry_id(String country_id) { this.country_id = country_id; } ...
return false; NameCountryEntity other = (NameCountryEntity) obj; if (country_id == null) { if (other.country_id != null) return false; } else if (!country_id.equals(other.country_id)) return false; if (probability == null) { if (other.p...
repos\tutorials-master\spring-web-modules\spring-thymeleaf-attributes\accessing-session-attributes\src\main\java\com\baeldung\accesing_session_attributes\business\entities\NameCountryEntity.java
1
请在Spring Boot框架中完成以下Java代码
public DataSourceProperties eventsDataSourceProperties() { return new DataSourceProperties(); } @ConfigurationProperties(prefix = "spring.datasource.events.hikari") @Bean(EVENTS_DATA_SOURCE) public DataSource eventsDataSource(@Qualifier("eventsDataSourceProperties") DataSourceProperties eventsD...
} @Bean(EVENTS_TRANSACTION_MANAGER) public JpaTransactionManager eventsTransactionManager(@Qualifier("eventsEntityManagerFactory") LocalContainerEntityManagerFactoryBean eventsEntityManagerFactory) { return new JpaTransactionManager(Objects.requireNonNull(eventsEntityManagerFactory.getObject())); }...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\config\DedicatedEventsJpaDaoConfig.java
2
请在Spring Boot框架中完成以下Java代码
public class X_Carrier_ShipmentOrder_Service extends org.compiere.model.PO implements I_Carrier_ShipmentOrder_Service, org.compiere.model.I_Persistent { private static final long serialVersionUID = 728679928L; /** Standard Constructor */ public X_Carrier_ShipmentOrder_Service (final Properties ctx, final in...
} @Override public int getCarrier_ShipmentOrder_ID() { return get_ValueAsInt(COLUMNNAME_Carrier_ShipmentOrder_ID); } @Override public void setCarrier_ShipmentOrder_Service_ID (final int Carrier_ShipmentOrder_Service_ID) { if (Carrier_ShipmentOrder_Service_ID < 1) set_ValueNoCheck (COLUMNNAME_Carrier_S...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Carrier_ShipmentOrder_Service.java
2
请完成以下Java代码
public ProcessDefinitionEntity findProcessDefinitionByDeploymentAndKey(String deploymentId, String processDefinitionKey) { Map<String, Object> parameters = new HashMap<>(); parameters.put("deploymentId", deploymentId); parameters.put("processDefinitionKey", processDefinitionKey); return ...
return getDbSqlSession().selectListWithRawParameter("selectProcessDefinitionByNativeQuery", parameterMap, firstResult, maxResults); } public long findProcessDefinitionCountByNativeQuery(Map<String, Object> parameterMap) { return (Long) getDbSqlSession().selectOne("selectProcessDefinitionCountByNativeQu...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ProcessDefinitionEntityManager.java
1
请完成以下Java代码
public List<JmxOperationParameter> getParameters() { return this.parameters; } @Override protected void appendFields(ToStringCreator creator) { creator.append("name", this.name) .append("outputType", this.outputType) .append("description", this.description) .append("parameters", this.parameters); } ...
return this.description; } @Override public String toString() { StringBuilder result = new StringBuilder(this.name); if (this.description != null) { result.append(" (").append(this.description).append(")"); } result.append(":").append(this.type); return result.toString(); } } /** * Uti...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\jmx\annotation\DiscoveredJmxOperation.java
1
请完成以下Java代码
public Object put (Object constraint, Object component) { if (!(component instanceof Component)) throw new IllegalArgumentException ("ALayoutCollection can only add Component values"); if (constraint != null && !containsKey(constraint) && constraint instanceof ALayoutConstraint) { // Log.trace(this...
return maxRow; } // getMaxRow /** * Get Maximum Column Number * @return max col no - or -1 if no column */ public int getMaxCol () { int maxCol = -1; // Iterator i = keySet().iterator(); while (i.hasNext()) { ALayoutConstraint c = (ALayoutConstraint)i.next(); maxCol = Math.max(maxCol, c....
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\ALayoutCollection.java
1
请完成以下Java代码
public class AiragMcp implements Serializable { private static final long serialVersionUID = 1L; /** * id */ @TableId(type = IdType.ASSIGN_ID) @Schema(description = "id") private java.lang.String id; /** * 应用图标 */ @Excel(name = "应用图标", width = 15) @Schema(description...
private java.lang.String metadata; /** * 创建人 */ @Schema(description = "创建人") private java.lang.String createBy; /** * 创建日期 */ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @Schema(description = "创建日期") ...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-module\jeecg-boot-module-airag\src\main\java\org\jeecg\modules\airag\llm\entity\AiragMcp.java
1
请完成以下Java代码
public class Article { private String title; private String body; private String author; private String publishDate; public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getBody() { return body;...
} public void setAuthor(String author) { this.author = author; } public String getPublishDate() { return publishDate; } public void setPublishDate(String publishDate) { this.publishDate = publishDate; } }
repos\tutorials-master\mustache\src\main\java\com\baeldung\springmustache\model\Article.java
1
请完成以下Java代码
private <T extends Event> void truncateField(T event, Function<T, String> getter, BiConsumer<T, String> setter) { var str = getter.apply(event); str = StringUtils.truncate(str, maxDebugEventSymbols); setter.accept(event, str); } @Override public PageData<EventInfo> findEvents(Tenant...
eventDao.cleanupEvents(regularEventExpTs, debugEventExpTs, cleanupDb); } private PageData<EventInfo> convert(EntityType entityType, PageData<? extends Event> pd) { return new PageData<>(pd.getData() == null ? null : pd.getData().stream().map(e -> e.toInfo(entityType)).collect(Collectors...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\event\BaseEventService.java
1
请完成以下Java代码
public static String getActivityIdFromConfiguration(String jobHandlerConfiguration) { try { JsonNode cfgJson = readJsonValue(jobHandlerConfiguration); JsonNode activityIdNode = cfgJson.get(PROPERTYNAME_TIMER_ACTIVITY_ID); if (activityIdNode != null) { return a...
} return cfgJson.toString(); } public static String getEndDateFromConfiguration(String jobHandlerConfiguration) { try { JsonNode cfgJson = readJsonValue(jobHandlerConfiguration); JsonNode endDateNode = cfgJson.get(PROPERTYNAME_END_DATE_EXPRESSION); if (endDa...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\jobexecutor\TimerEventHandler.java
1
请完成以下Java代码
private void doWrite(String msg) { //发送消息 byte[] bytes = msg.getBytes(); // 创建缓冲区 ByteBuffer writeBuffer = ByteBuffer.allocate(bytes.length); writeBuffer.put(bytes); // 将缓存字节数组的指针设置为数组的开始序列即数组下标0。这样就可以从buffer开头,对该buffer进行遍历(读取)了。 // 如果不调用该方法,那么就将从文件最后开始读取的,然后读出来的数...
} @Override public void failed(Throwable exc, ByteBuffer attachment) { try { channel.close(); } catch (IOException e) { e.printStackTrace(); } ...
repos\spring-boot-student-master\spring-boot-student-netty\src\main\java\com\xiaolyuh\aio\server\AioReadHandler.java
1
请完成以下Java代码
public EntityType getEntityType() { return EntityType.DASHBOARD; } private class CustomerDashboardsRemover extends PaginatedRemover<Customer, DashboardInfo> { private final Customer customer; CustomerDashboardsRemover(Customer customer) { this.customer = customer; ...
} @Override protected PageData<DashboardInfo> findEntities(TenantId tenantId, Customer customer, PageLink pageLink) { return dashboardInfoDao.findDashboardsByTenantIdAndCustomerId(customer.getTenantId().getId(), customer.getId().getId(), pageLink); } @Override prote...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\dashboard\DashboardServiceImpl.java
1
请完成以下Java代码
public String toString() { final StringBuilder sb = new StringBuilder(key); ArrayList<Map.Entry<String, Integer>> entries = new ArrayList<Map.Entry<String, Integer>>(labelMap.entrySet()); Collections.sort(entries, new Comparator<Map.Entry<String, Integer>>() { @Override ...
* @param param 类似 “希望 v 7685 vn 616” 的字串 * @return */ public static Item create(String param) { if (param == null) return null; String mark = "\\s"; // 分隔符,历史格式用空格,但是现在觉得用制表符比较好 if (param.indexOf('\t') > 0) mark = "\t"; String[] array = param.split(mark); ret...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dictionary\item\Item.java
1
请完成以下Java代码
private static @Nullable ArgumentResolver getArgumentResolver(@Nullable ConfigurableApplicationContext context) { if (context == null) { return null; } ArgumentResolver argumentResolver = ArgumentResolver.of(BeanFactory.class, context.getBeanFactory()); argumentResolver = argumentResolver.and(Environment.cla...
catch (Throwable ex) { logger.trace(LogMessage.format("FailureAnalyzer %s failed", analyzer), ex); } } return null; } private boolean report(@Nullable FailureAnalysis analysis) { List<FailureAnalysisReporter> reporters = this.springFactoriesLoader.load(FailureAnalysisReporter.class); if (analysis == n...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\diagnostics\FailureAnalyzers.java
1
请在Spring Boot框架中完成以下Java代码
public ProcessEngine getValue() throws IllegalStateException, IllegalArgumentException { return processEngine; } @Override public void start(StartContext context) throws StartException { MscRuntimeContainerDelegate runtimeContainerDelegate = runtimeContainerDelegateSupplier.get(); runtimeContainerDel...
// log info message LOGG.info("jndi binding for process engine " + processEngine.getName() + " is " + jndiName); } protected void removeProcessEngineJndiBinding() { bindingService.setMode(Mode.REMOVE); } @Override public void stop(StopContext context) { MscRuntimeContainerDelegate runtimeContain...
repos\camunda-bpm-platform-master\distro\wildfly\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\service\MscManagedProcessEngine.java
2
请在Spring Boot框架中完成以下Java代码
final class HUAttributeChange { @NonNull final HuId huId; @NonNull final AttributeId attributeId; @NonNull final AttributeValueType attributeValueType; final Object valueNew; final Object valueOld; @NonNull private Instant date; public HUAttributeChange mergeWithNextChange(final HUAttributeChange nextChan...
return BigDecimal.ZERO.equals(valueBD) ? null : AttributesKeyPart.ofNumberAttribute(attributeId, valueBD); } else if (AttributeValueType.DATE.equals(attributeValueType)) { final LocalDate valueDate = TimeUtil.asLocalDate(value); return AttributesKeyPart.ofDateAttribute(attributeId, valueDate); }...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\material\interceptor\HUAttributeChange.java
2
请在Spring Boot框架中完成以下Java代码
public BigDecimal getQuantity() { return quantity; } public void setQuantity(BigDecimal quantity) { this.quantity = quantity; } public InsuranceContractQuantity unit(String unit) { this.unit = unit; return this; } /** * Mengeneinheit (mögliche Werte &#x27;Stk&#x27; oder &#x27;Ktn&#x27...
Objects.equals(this.archived, insuranceContractQuantity.archived); } @Override public int hashCode() { return Objects.hash(pcn, quantity, unit, archived); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class InsuranceContractQuantity {\n"); ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\model\InsuranceContractQuantity.java
2
请完成以下Java代码
public void deleteById(Integer id) { mapper.deleteByPrimaryKey(id); } public void deleteByIds(String ids) { mapper.deleteByIds(ids); } public void update(T model) { mapper.updateByPrimaryKeySelective(model); } public T findById(Integer id) { return mapper.selec...
field.setAccessible(true); field.set(model, value); return mapper.selectOne(model); } catch (ReflectiveOperationException e) { throw new ServiceException(e.getMessage(), e); } } public List<T> findByIds(String ids) { return mapper.selectByIds(ids); ...
repos\spring-boot-api-project-seed-master\src\main\java\com\company\project\core\AbstractService.java
1
请完成以下Java代码
public UIComponent getUIComponent( final @NonNull WFProcess wfProcess, final @NonNull WFActivity wfActivity, final @NonNull JsonOpts jsonOpts) { return SetScannedBarcodeSupportHelper.uiComponent() .alwaysAvailableToUser(wfActivity.getAlwaysAvailableToUser()) .currentValue(getCurrentScaleDevice(wfPro...
.build(); } @Override public WFActivityStatus computeActivityState(final WFProcess wfProcess, final WFActivity wfActivity) { return getCurrentScaleDevice(wfProcess).isPresent() ? WFActivityStatus.COMPLETED : WFActivityStatus.NOT_STARTED; } @Override public WFProcess setScannedBarcode(final @NonNull S...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\workflows_api\activity_handlers\scanScaleDevice\ScanScaleDeviceActivityHandler.java
1
请完成以下Java代码
public class TbAlarmResult { boolean isCreated; boolean isUpdated; boolean isSeverityUpdated; boolean isCleared; Alarm alarm; Long conditionRepeats; Long conditionDuration; public TbAlarmResult(boolean isCreated, boolean isUpdated, boolean isCleared, Alarm alarm) { this.isCrea...
this.alarm = alarm; } public static TbAlarmResult fromAlarmResult(AlarmApiCallResult result) { boolean isSeverityChanged = result.isSeverityChanged(); return TbAlarmResult.builder() .isCreated(result.isCreated()) .isUpdated(result.isModified() && !isSeverityChang...
repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\action\TbAlarmResult.java
1
请在Spring Boot框架中完成以下Java代码
private List<String> asUniqueItemList(Collection<String> profiles) { return asUniqueItemList(profiles, null); } private List<String> asUniqueItemList(Collection<String> profiles, @Nullable Collection<String> additional) { LinkedHashSet<String> uniqueItems = new LinkedHashSet<>(); if (!CollectionUtils.isEmpty(a...
@Override public String toString() { ToStringCreator creator = new ToStringCreator(this); creator.append("active", getActive().toString()); creator.append("default", getDefault().toString()); creator.append("accepted", getAccepted().toString()); return creator.toString(); } /** * A profiles type that ca...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\Profiles.java
2
请完成以下Java代码
public String toString() { StringBuffer sb = new StringBuffer("MInOutLine[").append(get_ID()) .append(",M_Product_ID=").append(getM_Product_ID()) .append(",QtyEntered=").append(getQtyEntered()) .append(",MovementQty=").append(getMovementQty()) .append(",M_AttributeSetInstance_ID=").append(getM_Attrib...
if (product == null) { log.error("No Product"); return BigDecimal.ZERO; } return getMovementQty().multiply(product.getWeight()); } // log.error("Invalid Criteria: " + CostDistribution); return BigDecimal.ZERO; } // getBase public boolean sameOrderLineUOM() { if (getC_OrderLine_ID() <= 0) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MInOutLine.java
1
请完成以下Java代码
private Stream<AttributeCode> streamAllAttributeCodes() { final IQueryBuilder<I_M_Attribute> queryBuilder = queryBL .createQueryBuilder(I_M_Attribute.class) .addOnlyActiveRecordsFilter() .addOnlyContextClientOrSystem() .orderBy(I_M_Attribute.COLUMN_M_Attribute_ID); if (p_M_Attribute_ID > 0) { ...
countDevicesChecked++; final Stopwatch stopwatch = Stopwatch.createStarted(); try { logger.debug("Getting response from {}", deviceAccessor); final Object value = deviceAccessor.acquireValue(); logger.debug("Got respose from {}: {}", deviceAccessor, value); addLog("OK(" + time + "): accessed " + ...
repos\metasfresh-new_dawn_uat\backend\de.metas.device.adempiere\src\main\java\de\metas\device\adempiere\process\CheckAttributeAttachedDevices.java
1
请完成以下Java代码
public void setProcessed (boolean Processed) { set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); } /** Get Verarbeitet. @return Checkbox sagt aus, ob der Beleg verarbeitet wurde. */ @Override public boolean isProcessed () { Object oo = get_Value(COLUMNNAME_Processed); if (oo != null) ...
@Override public java.math.BigDecimal getQtyRequiered () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyRequiered); if (bd == null) return BigDecimal.ZERO; return bd; } /** Set Use line quantity. @param UseLineQty Use line quantity */ @Override public void setUseLineQty (boolean UseLineQty)...
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java-gen\de\metas\rfq\model\X_C_RfQResponseLine.java
1