instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
private static Optional<FreightCostId> extractDefaultFreightCost(final Collection<FreightCost> freightCosts) { if (freightCosts.isEmpty()) { return Optional.empty(); } final ImmutableList<FreightCost> defaults = freightCosts.stream() .filter(FreightCost::isDefaultFreightCost) .sorted(Compar...
} public boolean isFreightCostProduct(@NonNull final ProductId productId) { return freightCostProductIds.contains(productId); } public FreightCost getById(@NonNull final FreightCostId id) { final FreightCost freightCost = freightCosts.get(id); if (freightCost == null) { throw new AdempiereEx...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\freighcost\FreightCostRepository.java
1
请完成以下Java代码
private void insertSubscriptionProgressEvent(@NonNull final I_C_Flatrate_Term term, @NonNull final String eventType, @Nullable final Object eventValue) { final Timestamp today = SystemTime.asDayTimestamp(); final List<I_C_SubscriptionProgress> subscriptionProgressList = subscriptionDAO.retrieveSubscriptionPr...
if (Objects.equals(eventType, X_C_SubscriptionProgress.EVENTTYPE_Quantity) && eventValue != null) { changeEvent.setQty((BigDecimal)eventValue); } } private void incrementSeqNoAndSave(final I_C_SubscriptionProgress subscriptionProgress) { subscriptionProgress.setSeqNo(subscriptionProgress.getSeqNo() + 1); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\subscription\impl\SubscriptionBL.java
1
请完成以下Java代码
public String getSectionMajor() { return sectionMajor; } /** * Sets the value of the sectionMajor property. * * @param value * allowed object is * {@link String } * */ public void setSectionMajor(String value) { this.sectionMajor = value; ...
* {@link Boolean } * */ public void setHasExpenseLoading(Boolean value) { this.hasExpenseLoading = value; } /** * Gets the value of the doCostAssessment property. * * @return * possible object is * {@link Boolean } * */ public ...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\XtraStationaryType.java
1
请完成以下Java代码
public List<HistoricDetailEntity> findHistoricDetailsByTaskId(String taskId) { return getDbSqlSession().selectList("selectHistoricDetailByTaskId", taskId); } @Override public long findHistoricDetailCountByQueryCriteria(HistoricDetailQueryImpl historicVariableUpdateQuery) { return (Long) get...
int firstResult, int maxResults ) { return getDbSqlSession().selectListWithRawParameter( "selectHistoricDetailByNativeQuery", parameterMap, firstResult, maxResults ); } @Override public long findHistoricDetailCountByNativeQuery(Map...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\data\impl\MybatisHistoricDetailDataManager.java
1
请完成以下Java代码
public void onOrderLineDeleted(final I_C_OrderLine orderLine) { if (!isEligible(orderLine)) { return; } final boolean groupCompensationLine = orderLine.isGroupCompensationLine(); if (groupCompensationLine) { onCompensationLineDeleted(orderLine); } } private void onCompensationLineDeleted(final ...
group.updateAllCompensationLines(); final OrderLinesStorage orderLinesStorage = groupsRepo.createNotSaveableSingleOrderLineStorage(orderLine); groupsRepo.saveGroup(group, orderLinesStorage); } @Nullable public GroupTemplateId getGroupTemplateId(@NonNull final GroupId groupId) { return groupsRepo.getGroupTe...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\compensationGroup\OrderGroupCompensationChangesHandler.java
1
请在Spring Boot框架中完成以下Java代码
public String pay(String orderId, String userId) { // 构造受理上下文 OrderProcessContext<String> context = buildContext(orderId, userId,null, ProcessReqEnum.Pay); // 受理下单请求 processEngine.process(context); // 获取结果 return context.getOrderProcessRsp(); } @Override pu...
} /** * 请求参数校验 * @param req 请求参数 * @param expCodeEnum 异常枚举 * @param <T> 请求参数类型 */ private <T> void checkParam(T req, ExpCodeEnum expCodeEnum) { if (req == null) { throw new CommonBizException(expCodeEnum); } } private <T> OrderProcessContext<Strin...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Order\src\main\java\com\gaoxi\order\service\OrderServiceImpl.java
2
请完成以下Java代码
private I_GO_DeliveryOrder retrieveGODeliveryOrderPOById(@NonNull final OrderId orderId) { return Services.get(IQueryBL.class) .createQueryBuilder(I_GO_DeliveryOrder.class) .addEqualsFilter(I_GO_DeliveryOrder.COLUMN_GO_AX4Number, orderId.getOrderIdAsString()) .create() .firstOnly(I_GO_DeliveryOrder.c...
final List<Integer> mpackageIds = Services.get(IQueryBL.class) .createQueryBuilder(I_GO_DeliveryOrder_Package.class) .addEqualsFilter(I_GO_DeliveryOrder_Package.COLUMN_GO_DeliveryOrder_ID, deliveryOrderRepoId) .create() .listDistinct(I_GO_DeliveryOrder_Package.COLUMNNAME_M_Package_ID, Integer.class); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.go\src\main\java\de\metas\shipper\gateway\go\GODeliveryOrderRepository.java
1
请完成以下Java代码
public String getTimeCycle() { return timeCycle; } public void setTimeCycle(String timeCycle) { this.timeCycle = timeCycle; } public void setEndDate(String endDate) { this.endDate = endDate; } public String getEndDate() { return endDate; } public Strin...
} public TimerEventDefinition clone() { TimerEventDefinition clone = new TimerEventDefinition(); clone.setValues(this); return clone; } public void setValues(TimerEventDefinition otherDefinition) { super.setValues(otherDefinition); setTimeDate(otherDefinition.getTim...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\TimerEventDefinition.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable UiService getUiService() { return this.uiService; } public void setUiService(@Nullable UiService uiService) { this.uiService = uiService; } public @Nullable Boolean getAnalyticsEnabled() { return this.analyticsEnabled; } public void setAnalyticsEnabled(@Nullable Boolean analyticsEnabled)...
*/ LOG, /** * Output the summary to the console. */ CONSOLE, /** * Log the summary and output it to the console. */ ALL } /** * Enumeration of types of UIService. Values are the same as those on * {@link UIServiceEnum}. To maximize backwards compatibility, the Liquibase enum is * not u...
repos\spring-boot-4.0.1\module\spring-boot-liquibase\src\main\java\org\springframework\boot\liquibase\autoconfigure\LiquibaseProperties.java
2
请完成以下Java代码
private static EAN13 parseInternalUseOrVariableMeasure(@NonNull final String barcode, @NonNull final EAN13Prefix prefix, final int checksum) { // 4 digits for article code (IIII), // The digit at index 6 does not belong to the product code. It can be used for other purposes. For the time being it's ignored. // s...
.build(); } private static EAN13 parseStandardProduct(@NonNull final String barcode, @NonNull final EAN13Prefix prefix, final int checksum) { final String manufacturerAndProductCode = barcode.substring(3, 12); final EAN13ProductCode productNo = EAN13ProductCode.ofString(manufacturerAndProductCode); return EAN...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\gs1\ean13\EAN13Parser.java
1
请完成以下Java代码
public void invalidate() { super.invalidate(); SessionRepositoryRequestWrapper.this.requestedSessionInvalidated = true; setCurrentSession(null); clearRequestedSessionCache(); SessionRepositoryFilter.this.sessionRepository.deleteById(getId()); } } /** * Ensures session is committed before...
public void forward(ServletRequest request, ServletResponse response) throws ServletException, IOException { this.delegate.forward(request, response); } @Override public void include(ServletRequest request, ServletResponse response) throws ServletException, IOException { if (!SessionRepositoryRequestW...
repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\web\http\SessionRepositoryFilter.java
1
请完成以下Spring Boot application配置
spring: cloud: config: server: native: search-locations: classpath:/shared profiles: active: native security: use
r: password: ${CONFIG_SERVICE_PASSWORD} server: port: 8888
repos\piggymetrics-master\config\src\main\resources\application.yml
2
请完成以下Java代码
public boolean process(Sentence sentence) { sequenceList.add(convertToSequence(sentence)); return false; } }); TagSet tagSet = getTagSet(); List<int[][]> sampleList = new ArrayList<int[][]>(sequenceList.size()); for (List<String[]...
sample[0][i] = vocabulary.idOf(os[0]); assert sample[0][i] != -1; sample[1][i] = tagSet.add(os[1]); assert sample[1][i] != -1; ++i; } sampleList.add(sample); } model.train(sampleList); vocabulary.mutable = f...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\hmm\HMMTrainer.java
1
请完成以下Java代码
public static ExternalSystemMap ofList(final List<ExternalSystem> list) { return list.isEmpty() ? EMPTY : new ExternalSystemMap(list); } public static Collector<ExternalSystem, ?, ExternalSystemMap> collect() { return GuavaCollectors.collectUsingListAccumulator(ExternalSystemMap::ofList); } @Nullable publi...
@NonNull public ExternalSystem getByType(@NonNull final ExternalSystemType type) { return getOptionalByType(type) .orElseThrow(() -> new AdempiereException("Unknown external system type: " + type)); } public @NonNull ExternalSystem getById(final @NonNull ExternalSystemId id) { final ExternalSystem externa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\externalsystem\ExternalSystemMap.java
1
请在Spring Boot框架中完成以下Java代码
public static class RateLimitConfig { Function<RateLimitConfig, BucketConfiguration> configurationBuilder = DEFAULT_CONFIGURATION_BUILDER; long capacity; @org.jspecify.annotations.Nullable Duration period; @org.jspecify.annotations.Nullable Function<ServerRequest, String> keyResolver; HttpStatusCode ...
this.keyResolver = keyResolver; return this; } public HttpStatusCode getStatusCode() { return statusCode; } public RateLimitConfig setStatusCode(HttpStatusCode statusCode) { this.statusCode = statusCode; return this; } public @Nullable Duration getTimeout() { return timeout; } public ...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\filter\Bucket4jFilterFunctions.java
2
请在Spring Boot框架中完成以下Java代码
public class JsonSetClearanceStatusRequest { @NonNull @JsonProperty("huIdentifier") JsonHUIdentifier huIdentifier; @NonNull @JsonProperty("clearanceStatus") JsonClearanceStatus clearanceStatus; @Nullable @JsonProperty("clearanceNote") String clearanceNote; @Builder public JsonSetClearanceStatusRequest( ...
@Builder public JsonHUIdentifier( @JsonProperty("metasfreshId") @Nullable final JsonMetasfreshId metasfreshId, @JsonProperty("qrCode") @Nullable final String qrCode) { Check.assume(qrCode == null || metasfreshId == null, "metasfreshId and qrCode cannot be set at the same time!"); Check.assume(qrCode !...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-manufacturing\src\main\java\de\metas\common\handlingunits\JsonSetClearanceStatusRequest.java
2
请完成以下Java代码
public boolean isAcknowledged() { return get_ValueAsBoolean(COLUMNNAME_IsAcknowledged); } @Override public void setMsgText (final java.lang.String MsgText) { set_Value (COLUMNNAME_MsgText, MsgText); } @Override public java.lang.String getMsgText() { return get_ValueAsString(COLUMNNAME_MsgText); } ...
@Override public int getRoot_Record_ID() { return get_ValueAsInt(COLUMNNAME_Root_Record_ID); } /** * Severity AD_Reference_ID=541949 * Reference name: Severity */ public static final int SEVERITY_AD_Reference_ID=541949; /** Notice = N */ public static final String SEVERITY_Notice = "N"; /** Error = E...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Record_Warning.java
1
请在Spring Boot框架中完成以下Java代码
public class RuntimeParametersProcessor implements Processor { @Override public void process(final Exchange exchange) throws Exception { final ImportCustomersRouteContext context = ProcessorHelper.getPropertyOrThrowError(exchange, ROUTE_PROPERTY_IMPORT_CUSTOMERS_CONTEXT, ImportCustomersRouteContext.class); ...
.orElse(Instant.now()); final JsonRuntimeParameterUpsertItem runtimeParameterUpsertItem = JsonRuntimeParameterUpsertItem.builder() .externalSystemParentConfigId(context.getExternalSystemRequest().getExternalSystemConfigId()) .name(PARAM_UPDATED_AFTER) .request(context.getExternalSystemRequest().getComman...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-shopware6\src\main\java\de\metas\camel\externalsystems\shopware6\customer\processor\RuntimeParametersProcessor.java
2
请完成以下Java代码
public boolean isEmbedded() { return this.embedded; } public FindPanelBuilder setHideStatusBar(boolean hideStatusBar) { this.hideStatusBar = hideStatusBar; return this; } public boolean isHideStatusBar() { return hideStatusBar; } public FindPanelBuilder setSearchPanelCollapsed(final boolean searchPa...
public int getMaxQueryRecordsPerTab() { if (maxQueryRecordsPerTab != null) { return maxQueryRecordsPerTab; } else if (gridTab != null) { return gridTab.getMaxQueryRecords(); } return 0; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\apps\search\FindPanelBuilder.java
1
请完成以下Java代码
class SpringBootMetadataReader { private static final Comparator<DefaultMetadataElement> VERSION_METADATA_ELEMENT_COMPARATOR = new VersionMetadataElementComparator(); private final JsonNode content; /** * Parse the content of the metadata at the specified url. * @param objectMapper the object mapper * @para...
if (id.equals("RELEASE")) { return ""; } StringBuilder sb = new StringBuilder(" ("); if (id.contains("SNAPSHOT")) { sb.append("SNAPSHOT"); } else { sb.append(id); if (qualifier.getVersion() != null) { sb.append(qualifier.getVersion()); } } sb.append(")"); return sb.toString(); } pr...
repos\initializr-main\initializr-web\src\main\java\io\spring\initializr\web\support\SpringBootMetadataReader.java
1
请完成以下Java代码
public static Topic local(final String name) { return builder().name(name).type(Type.LOCAL).build(); } public static Topic localAndAsync(final String name) { final Topic topic = local(name); EventBusConfig.alwaysConsiderAsync(topic); return topic; } public static Topic of(final String name, final Type t...
else { this.type = type; } this.name = Check.assumeNotEmpty(name, "name not empty"); this.fullName = type + "." + name; } public Topic toLocal() { if (type == Type.LOCAL) { return this; } return toBuilder().type(Type.LOCAL).build(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\Topic.java
1
请完成以下Java代码
public class GetFormKeyCmd implements Command<String> { protected String taskDefinitionKey; protected String processDefinitionId; /** * Retrieves a start form key. */ public GetFormKeyCmd(String processDefinitionId) { setProcessDefinitionId(processDefinitionId); } /** * Retrieves a task form...
ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration(); DeploymentCache deploymentCache = processEngineConfiguration.getDeploymentCache(); ProcessDefinitionEntity processDefinition = deploymentCache.findDeployedProcessDefinitionById(processDefinitionId); for(Com...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\GetFormKeyCmd.java
1
请完成以下Java代码
public void setQty (final BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } @Override public BigDecimal getQty() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setUPC (final @Nullable java.lang.String UPC) { set_Val...
public void setValidFrom (final java.sql.Timestamp ValidFrom) { set_Value (COLUMNNAME_ValidFrom, ValidFrom); } @Override public java.sql.Timestamp getValidFrom() { return get_ValueAsTimestamp(COLUMNNAME_ValidFrom); } @Override public void setValidTo (final @Nullable java.sql.Timestamp ValidTo) { set_V...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_PI_Item_Product.java
1
请完成以下Java代码
public static Map<String, Map<String, String>> parseIniFile(File fileToParse) throws IOException, ConfigurationException { Map<String, Map<String, String>> iniFileContents = new HashMap<>(); INIConfiguration iniConfiguration = new INIConfiguration(); try (FileReader fileReader = new FileReader(...
subSectionMap.put(key, value); } iniFileContents.put(section, subSectionMap); } return iniFileContents; } public static String readIniFileValue(File fileToParse, String section, String value) throws IOException, ConfigurationException { INIConfiguration iniConfig...
repos\tutorials-master\libraries-files\src\main\java\com\baeldung\ini\CommonsParser.java
1
请完成以下Java代码
public int getM_AttributeValue_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeValue_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 (COLU...
{ return (java.lang.String)get_Value(COLUMNNAME_Name); } /** Set Suchschlüssel. @param Value Search key for the record in the format required - must be unique */ @Override public void setValue (java.lang.String Value) { set_ValueNoCheck (COLUMNNAME_Value, Value); } /** Get Suchschlüssel. @return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_AttributeValue.java
1
请完成以下Java代码
public class SmsFlashPromotion implements Serializable { private Long id; @ApiModelProperty(value = "秒杀时间段名称") private String title; @ApiModelProperty(value = "开始日期") private Date startDate; @ApiModelProperty(value = "结束日期") private Date endDate; @ApiModelProperty(value = "上下线状态") ...
} public Date getEndDate() { return endDate; } public void setEndDate(Date endDate) { this.endDate = endDate; } public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } public Date getCreateTime...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\SmsFlashPromotion.java
1
请完成以下Java代码
public String toString() { return MoreObjects.toStringHelper(this) .omitNullValues() .add("adLanguageParamName", adLanguageParamName) .add("stringBaseLang", stringBaseLang) .add("stringTrl", stringTrl) .toString(); } @Override public String getAD_LanguageParamName() { return ad...
.add("adLanguageParamName", adLanguageParamName) .add("string", string) .toString(); } @Override public String getAD_LanguageParamName() { return adLanguageParamName; } @Override public String getStringBaseLanguage() { return string; } @Override public String getStringTrlPattern...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\TranslatableParameterizedString.java
1
请完成以下Java代码
private Collection<TbTransportService> getTransportServices() { return applicationContext.getBeansOfType(TbTransportService.class).values(); } @Override public ServiceInfo getServiceInfo() { return serviceInfo; } @Override public boolean isMonolith() { return serviceTyp...
public boolean setReady(boolean ready) { boolean changed = this.ready != ready; this.ready = ready; return changed; } private TransportProtos.SystemInfoProto getCurrentSystemInfoProto() { TransportProtos.SystemInfoProto.Builder builder = TransportProtos.SystemInfoProto.newBuilde...
repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\discovery\DefaultTbServiceInfoProvider.java
1
请完成以下Java代码
public boolean isAutoActivate() { return isAutoActivate; } public void setProcessEngines(List<ProcessEngineImpl> processEngines) { this.processEngines = processEngines; } public void setAutoActivate(boolean isAutoActivate) { this.isAutoActivate = isAutoActivate; } public int getMaxJobsPerAcqu...
public RejectedJobsHandler getRejectedJobsHandler() { return rejectedJobsHandler; } public void setRejectedJobsHandler(RejectedJobsHandler rejectedJobsHandler) { this.rejectedJobsHandler = rejectedJobsHandler; } protected void startJobAcquisitionThread() { if (jobAcquisitionThread == null) { jobA...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\JobExecutor.java
1
请完成以下Java代码
protected void addListenerEntry(final int workpackageId, final ListenerEntry entry) { listenersLock.lock(); try { _listeners.add(workpackageId, entry); } finally { listenersLock.unlock(); } } protected boolean removeListenerEntry(final int workpackageId) { List<ListenerEntry> entries; list...
try { listener.onWorkpackageProcessed(workpackage, workpackageProcessor); } catch (final Exception e) { logger.error("Error while executing " + listener + " for " + workpackage + " [SKIP]", e); // NOTE: we are not throwing the error because there is not much to handle it, everything was consumed...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\processor\impl\DefaultQueueProcessorEventDispatcher.java
1
请完成以下Java代码
public AccessorBuilder<?> withBody(CodeBlock code) { this.code = code; return this; } /** * Builds the accessor. * @return the parent getter / setter */ public T buildAccessor() { this.accessorFunction.accept(new Accessor(this)); return this.parent; } } static final class Accessor impl...
this.annotations = builder.annotations.deepCopy(); this.code = builder.code; } CodeBlock getCode() { return this.code; } @Override public AnnotationContainer annotations() { return this.annotations; } } }
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\kotlin\KotlinPropertyDeclaration.java
1
请完成以下Java代码
public class ReportingSource1Choice { @XmlElement(name = "Cd") protected String cd; @XmlElement(name = "Prtry") protected String prtry; /** * Gets the value of the cd property. * * @return * possible object is * {@link String } * */ public Strin...
* */ public String getPrtry() { return prtry; } /** * Sets the value of the prtry property. * * @param value * allowed object is * {@link String } * */ public void setPrtry(String value) { this.prtry = 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\ReportingSource1Choice.java
1
请在Spring Boot框架中完成以下Java代码
public class AuthenticationImpl implements Authentication { private final String name; private final Collection<GrantedAuthorityImpl> grantedAuthorities; private boolean isAuthenticated; public AuthenticationImpl(String name, List<String> roles) { this.name = name; List<GrantedAuthori...
@Override public Object getPrincipal() { return name; } @Override public boolean isAuthenticated() { return isAuthenticated; } @Override public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException { this.isAuthenticated = isAuthenticated; ...
repos\spring-examples-java-17\spring-jcasbin\src\main\java\itx\examples\springboot\security\config\AuthenticationImpl.java
2
请完成以下Java代码
public static void setCurrentProcessApplication(ProcessApplicationReference reference) { Deque<ProcessApplicationReference> stack = getStack(processApplicationContext); stack.push(reference); } public static void removeCurrentProcessApplication() { Deque<ProcessApplicationReference> stack = getStack(pr...
// unwrap exception if(e.getCause() != null && e.getCause() instanceof RuntimeException) { throw (RuntimeException) e.getCause(); }else { throw new ProcessEngineException("Unexpected exeption while executing within process application ", e); } } finally { remov...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\context\Context.java
1
请在Spring Boot框架中完成以下Java代码
public class ImpFormatRepository { private final ImportTableDescriptorRepository importTableDescriptorRepo; public ImpFormatRepository(@NonNull final ImportTableDescriptorRepository importTableDescriptorRepo) { this.importTableDescriptorRepo = importTableDescriptorRepo; } public ImpFormat getById(@NonNull fina...
.addOnlyActiveRecordsFilter() .orderBy(I_AD_ImpFormat_Row.COLUMNNAME_SeqNo) .create() .stream(I_AD_ImpFormat_Row.class) .map(this::toImpFormatRowOrNull) .filter(Objects::nonNull) .collect(ImmutableList.toImmutableList()); } private ImpFormatColumn toImpFormatRowOrNull(final I_AD_ImpFormat_Row...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\format\ImpFormatRepository.java
2
请完成以下Java代码
public String getDunningExportProviderId() { return ForumDatenaustauschChConstants.DUNNING_EXPORT_PROVIDER_ID; } @Override public Optional<DunningExportClient> newClientForDunning(@NonNull final DunningToExport dunning) { final String requiredAttachmentTagName = InvoiceExportClientFactory.ATTACHMENT_TAGNAME_E...
.build(); final ExportConfig config = configRepository.getForQueryOrNull(query); if (config == null) { Loggables.addLog("forum_datenaustausch_ch - There is no export config for the recipiend-id={} of the invoice with id={}", recipientId, dunning.getId()); return Optional.empty(); } final DunningExportCl...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_base\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\base\export\dunning\DunningExportClientFactoryImpl.java
1
请完成以下Java代码
public WarehouseId getWarehouseId() { return Services.get(IShipmentScheduleEffectiveBL.class).getWarehouseId(shipmentSchedule); } public I_C_UOM getOrderPriceUOM() { final int priceUomId = getSalesOrderLine().getPrice_UOM_ID(); return Services.get(IUOMDAO.class).getById(priceUomId); } public BigDecimal ge...
} public BigDecimal getInitialSchedQtyDelivered() { return initialSchedQtyDelivered; } public void setShipmentScheduleLineNetAmt(final BigDecimal lineNetAmt) { shipmentSchedule.setLineNetAmt(lineNetAmt); } @Nullable public String getSalesOrderPORef() { return salesOrder.map(I_C_Order::getPOReference)....
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\api\OlAndSched.java
1
请完成以下Java代码
public void setM_Product_ID (int M_Product_ID) { if (M_Product_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Product_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); } /** Get Produkt. @return Produkt, Leistung, Artikel */ @Override public int getM_Product_ID ()...
@Override public int getM_Product_Nutrition_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_Nutrition_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Nutrition Quanitity. @param NutritionQty Nutrition Quanitity */ @Override public void setNutritionQty (java.lang.String ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_Nutrition.java
1
请在Spring Boot框架中完成以下Java代码
public class RedisConn { private String host; private int port; private int timeout; public String getHost() { return host; } public void setHost(String host) { this.host = host; } public int getPort() { return port; }
public void setPort(int port) { this.port = port; } public int getTimeout() { return timeout; } public void setTimeout(int timeout) { this.timeout = timeout; } @Override public String toString() { return "Redis [localhost=" + host + ", port=" + port + ", ti...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Order\src\main\java\com\gaoxi\order\redis\RedisConn.java
2
请完成以下Java代码
public class Book { private long id; private String name; public Book() { } public Book(long id, String name) { this.id = id; this.name = name; } @XmlAttribute public void setId(Long id) { this.id = id;
} @XmlElement(name = "title") public void setName(String name) { this.name = name; } public String getName() { return name; } public Long getId() { return id; } }
repos\tutorials-master\core-java-modules\core-java-9\src\main\java\com\baeldung\java9\prejpms\Book.java
1
请完成以下Java代码
private String getValueFrom(String field, String duedateDescription) { int fieldIndex = duedateDescription.indexOf(field + ":"); if (fieldIndex > -1) { int nextWhiteSpace = duedateDescription.indexOf(" ", fieldIndex); fieldIndex += field.length() + 1; if (nextWhite...
private String removeValueFrom(String field, String duedateDescription) { int fieldIndex = duedateDescription.indexOf(field + ":"); if (fieldIndex > -1) { int nextWhiteSpace = duedateDescription.indexOf(" ", fieldIndex); if (nextWhiteSpace > -1) { return duedate...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\calendar\AdvancedCycleBusinessCalendar.java
1
请完成以下Java代码
public AttributeListValue getCreateAttributeValue(final IContextAware context, final ICountryAware countryAware) { final Properties ctx = context.getCtx(); final String trxName = context.getTrxName(); final I_C_Country country = countryAware.getC_Country(); final SOTrx soTrx = SOTrx.ofBoolean(countryAware.isSO...
} return attributeValue; } else { if (!attributeValue.isMatchingSOTrx(soTrx)) { if (attributeAction == AttributeAction.Error) { throw new AttributeRestrictedException(ctx, soTrx, attributeValue, country.getCountryCode()); } // We have an attribute value, but it is marked for a diff...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\adempiere\mm\attributes\countryattribute\impl\Country2CountryAwareAttributeService.java
1
请完成以下Java代码
public class Article implements Serializable { //主键 private Integer id; //文章标题 private String articleTitle; //文章内容 private String articleContent; //添加人 private String addName; //添加时间 @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date createTime; //最新更新时间...
public String getArticleContent() { return articleContent; } public void setAddName(String addName) { this.addName = addName; } public String getAddName() { return addName; } public Date getCreateTime() { return createTime; } public void setCreateTime(...
repos\spring-boot-projects-main\SpringBoot前后端分离实战项目源码\spring-boot-project-front-end&back-end\src\main\java\cn\lanqiao\springboot3\entity\Article.java
1
请完成以下Java代码
public ViewRowIdsOrderedSelections withOrderBysSelectionIfAbsent( @NonNull final DocumentQueryOrderByList orderBys, @NonNull final ViewRowIdsOrderedSelectionFactory factory) { final ViewRowIdsOrderedSelection selection = getSelectionOrNull(orderBys); if (selection != null) { return this; } final Im...
if (DocumentQueryOrderByList.equals(defaultSelection.getOrderBys(), orderBys)) { return defaultSelection; } return selectionsByOrderBys.get(orderBys); } public ImmutableSet<String> getSelectionIds() { final ImmutableSet.Builder<String> selectionIds = ImmutableSet.builder(); selectionIds.add(defaultSel...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ViewRowIdsOrderedSelections.java
1
请完成以下Java代码
final class Regex implements CharSequence { static final Pattern DOMAIN; static { Regex component = Regex.oneOf("[a-zA-Z0-9]", "[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]"); Regex dotComponent = Regex.group("[.]", component); Regex colonPort = Regex.of("[:][0-9]+"); Regex dottedDomain = Regex.group(component, dotCo...
return this.value.charAt(index); } @Override public CharSequence subSequence(int start, int end) { return this.value.subSequence(start, end); } @Override public String toString() { return this.value; } private static Regex of(CharSequence... expressions) { return new Regex(String.join("", expressions))...
repos\spring-boot-4.0.1\core\spring-boot-docker-compose\src\main\java\org\springframework\boot\docker\compose\core\Regex.java
1
请完成以下Java代码
public String getEngineName() { return NAME; } public String getEngineVersion() { return VERSION; } public List<String> getExtensions() { return extensions; } public List<String> getMimeTypes() { return mimeTypes; } public List<String> getNames() { return names; } public Str...
public String getOutputStatement(String toDisplay) { return toDisplay; } public String getProgram(String... statements) { return joinStrings("\n", statements); } protected String joinStrings(String delimiter, String[] values) { if (values == null) { return null; } else { return...
repos\camunda-bpm-platform-master\freemarker-template-engine\src\main\java\org\camunda\templateengines\FreeMarkerScriptEngineFactory.java
1
请完成以下Spring Boot application配置
## tomcat\u914D\u7F6E server.port=9666 #server.tomcat.maxHttpHeaderSize=8192 server.tomcat.uri-encoding=UTF-8 spring.http.encoding.charset=UTF-8 spring.http.encoding.enabled=true spring.http.encoding.force=true spring.messages.encoding=UTF-8 # tomcat\u6700\u5927\u7EBF\u7A0B\u6570\uFF0C\u9ED8\u8BA4\u4E3A200 server.tomca...
FF08\u9ED8\u8BA4\u4E3A\u7A7A\uFF09 spring.redis.password= # \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 spring.redis.lettuce.pool.max-active=100 # \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C...
repos\springBoot-master\springboot-redis-queue\src\main\resources\local\application.properties
2
请完成以下Java代码
public boolean match(Class<C> callbackType, C callbackInstance, A argument, Object[] additionalArguments) { ResolvableType type = ResolvableType.forClass(callbackType, callbackInstance.getClass()); if (type.getGenerics().length == 1 && type.resolveGeneric() != null) { return type.resolveGeneric().isInstance(a...
} /** * Return the result of the invocation or the given fallback if the callback * wasn't suitable. * @param fallback the fallback to use when there is no result * @return the result of the invocation or the fallback */ public R get(R fallback) { return (this != NONE) ? this.value : fallback; ...
repos\initializr-main\initializr-generator-spring\src\main\java\io\spring\initializr\generator\spring\util\LambdaSafe.java
1
请完成以下Java代码
public class TimerDemoExample { private void scheduleOnce() { TimerTask task = new TimerTask() { public void run() { System.out.println("Task performed on: " + new Date() + "\n" + "Thread's name: " + Thread.currentThread() .getName()); } }...
public void run() { System.out.println("Recurrent Task performed on: " + new Date() + "\n" + "Thread's name: " + Thread.currentThread() .getName()); } }; Timer timer = new Timer("Timer"); long delay = 1000L; final long period = 1000L; ...
repos\tutorials-master\core-java-modules\core-java-concurrency-simple\src\main\java\com\baeldung\concurrent\startathread\TimerDemoExample.java
1
请在Spring Boot框架中完成以下Java代码
static class MongoCommandMetricsConfiguration { @Bean @ConditionalOnMissingBean MongoMetricsCommandListener mongoMetricsCommandListener(MeterRegistry meterRegistry, MongoCommandTagsProvider mongoCommandTagsProvider) { return new MongoMetricsCommandListener(meterRegistry, mongoCommandTagsProvider); } ...
@Bean @ConditionalOnMissingBean MongoMetricsConnectionPoolListener mongoMetricsConnectionPoolListener(MeterRegistry meterRegistry, MongoConnectionPoolTagsProvider mongoConnectionPoolTagsProvider) { return new MongoMetricsConnectionPoolListener(meterRegistry, mongoConnectionPoolTagsProvider); } @Bean @...
repos\spring-boot-4.0.1\module\spring-boot-mongodb\src\main\java\org\springframework\boot\mongodb\autoconfigure\metrics\MongoMetricsAutoConfiguration.java
2
请完成以下Java代码
public long getPZN() { return pzn; } /** * Sets the value of the pzn property. * */ public void setPZN(long value) { this.pzn = value; } /** * Gets the value of the retourenMenge property. * */ public int getRetourenMenge() { return retou...
* allowed object is * {@link String } * */ public void setCharge(String value) { this.charge = value; } /** * Gets the value of the verfalldatum property. * * @return * possible object is * {@link XMLGregorianCalendar } * ...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v2\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v2\RetourePositionType.java
1
请完成以下Java代码
public boolean isConstant() { return true; } @Override public boolean constantValue() { return value; } @Override public ILogicExpression toConstantExpression(final boolean constantValue) { if (constantValue != value) { throw new ExpressionCompileException("Cannot convert a constant expression to ...
{ return value; } @Override public Boolean evaluate(final Evaluatee ctx, final OnVariableNotFound onVariableNotFound) { return value; } @Override public LogicExpressionResult evaluateToResult(final Evaluatee ctx, final OnVariableNotFound onVariableNotFound) throws ExpressionEvaluationException { return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\ConstantLogicExpression.java
1
请完成以下Java代码
public void handleTextMessage(WebSocketSession session, TextMessage message) throws Exception { logger.info("handleTextMessage start"); // 将消息进行转化,因为是消息是json数据,可能里面包含了发送给某个人的信息,所以需要用json相关的工具类处理之后再封装成TextMessage, // 我这儿并没有做处理,消息的封装格式一般有{from:xxxx,to:xxxxx,msg:xxxxx},来自哪里,发送给谁,什么消息等等 Stri...
// isOpen()在线就发送 if (user.isOpen()) { user.sendMessage(message); } } catch (IOException e) { e.printStackTrace(); } } } /** * 发送消息给指定的用户 */ private void sendMessageToUser(WebSocketSession user, Tex...
repos\SpringBootBucket-master\springboot-websocket\src\main\java\com\xncoding\jwt\handler\SocketHandler.java
1
请完成以下Java代码
public List<String> shortcutFieldOrder() { return Arrays.asList(STATUS_KEY); } @Override public GatewayFilter apply(Config config) { String status = Objects.requireNonNull(config.status, "status must not be null"); HttpStatusHolder statusHolder = HttpStatusHolder.parse(status); return new GatewayFilter() {...
public @Nullable String getOriginalStatusHeaderName() { return originalStatusHeaderName; } public void setOriginalStatusHeaderName(String originalStatusHeaderName) { this.originalStatusHeaderName = originalStatusHeaderName; } public static class Config { // TODO: relaxed HttpStatus converter private @Nul...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\SetStatusGatewayFilterFactory.java
1
请完成以下Java代码
public static KvEntry toKvEntry(Row row, String key) { KvEntry kvEntry = null; String strV = row.get(ModelConstants.STRING_VALUE_COLUMN, String.class); if (strV != null) { kvEntry = new StringDataEntry(key, strV); } else { Long longV = row.get(ModelConstants.LONG_...
protected Optional<TsKvEntry> convertResultToTsKvEntryOpt(String key, Row row) { if (row != null) { return Optional.of(getBasicTsKvEntry(key, row)); } else { return Optional.empty(); } } private BasicTsKvEntry getBasicTsKvEntry(String key, Row row) { Opti...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\timeseries\AbstractCassandraBaseTimeseriesDao.java
1
请完成以下Java代码
public Boolean checkPassword(String userId, String password, PasswordEncoder passwordEncoder, PasswordSalt salt) { User user = null; if (userId != null) { user = findById(userId); } return (user != null) && (password != null) && passwordEncoder.isMatches(password, user.getP...
public void setUserPicture(User user, Picture picture) { UserEntity userEntity = (UserEntity) user; userEntity.setPicture(picture); dataManager.update(userEntity); } @Override public List<User> findUsersByPrivilegeId(String name) { return dataManager.findUsersByPrivilegeId(n...
repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\persistence\entity\UserEntityManagerImpl.java
1
请在Spring Boot框架中完成以下Java代码
public List<String> listResourcesOfApp(String app) { List<String> results = new ArrayList<>(); if (StringUtil.isBlank(app)) { return results; } // resource -> timestamp -> metric Map<String, LinkedHashMap<Long, MetricEntity>> resourceMap = allMetrics.get(app); ...
oldEntity.addCount(1); } else { resourceCount.put(resourceMetrics.getKey(), MetricEntity.copyOf(newEntity)); } } } // Order by last minute b_qps DESC. return resourceCount.entrySet() ....
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\repository\metric\InMemoryMetricsRepository.java
2
请完成以下Java代码
public Amount add(@NonNull final Amount amtToAdd) { assertSameCurrency(this, amtToAdd); if (amtToAdd.isZero()) { return this; } else if (isZero()) { return amtToAdd; } else { return new Amount(value.add(amtToAdd.value), currencyCode); } } public Amount subtract(@NonNull final Amount am...
: this; } public Amount abs() { return value.signum() < 0 ? new Amount(value.abs(), currencyCode) : this; } public Money toMoney(@NonNull final Function<CurrencyCode, CurrencyId> currencyIdMapper) { return Money.of(value, currencyIdMapper.apply(currencyCode)); } public static boolean equals(@Null...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\currency\Amount.java
1
请在Spring Boot框架中完成以下Java代码
protected boolean preHandle(ServletRequest request, ServletResponse response) throws Exception { HttpServletRequest httpServletRequest = (HttpServletRequest) request; HttpServletResponse httpServletResponse = (HttpServletResponse) response; if(allowOrigin){ httpServletResponse.setHea...
/** * JwtFilter中ThreadLocal需要及时清除 #3634 * * @param request * @param response * @param exception * @throws Exception */ @Override public void afterCompletion(ServletRequest request, ServletResponse response, Exception exception) throws Exception { //log.info("------清空线程...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\config\shiro\filters\JwtFilter.java
2
请完成以下Java代码
public class RemoveExecutionVariablesCmd extends NeedsActiveExecutionCmd<Void> { private static final long serialVersionUID = 1L; private Collection<String> variableNames; private boolean isLocal; public RemoveExecutionVariablesCmd(String executionId, Collection<String> variableNames, boolean isLocal...
if (isLocal) { execution.removeVariablesLocal(variableNames); } else { execution.removeVariables(variableNames); } return null; } @Override protected String getSuspendedExceptionMessage() { return "Cannot remove variables because execution '" + execu...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\cmd\RemoveExecutionVariablesCmd.java
1
请完成以下Java代码
public String getBusinessKey() { return businessKey; } public boolean isOpen() { return unfinished; } public String getProcessDefinitionId() { return processDefinitionId; } public String getProcessDefinitionKey() { return processDefinitionKey; } public...
public Date getFinishedBefore() { return finishedBefore; } public String getInvolvedUser() { return involvedUser; } public String getName() { return name; } public String getNameLike() { return nameLike; } public static long getSerialversionuid() { ...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\HistoricProcessInstanceQueryImpl.java
1
请完成以下Spring Boot application配置
server.port=9097 #management.security.enabled=false management.endpoint.restart.enabled=true management.endpoint.refresh.enabled=true management.endpoints.web.exposure.include=env,restart,refresh # =============================== # = DATA SOURCE # =============================== # Set here configurations for the data...
a.hibernate.ddl-auto=create-drop # Naming strategy spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy # Allows Hibernate to generate SQL op...
repos\SpringBootVulExploit-master\repository\springboot-mysql-jdbc-rce\src\main\resources\application.properties
2
请完成以下Java代码
public ChangePlanItemStateBuilder childInstanceTaskVariables(String planItemDefinitionId, Map<String, Object> variables) { if (!this.childInstanceTaskVariables.containsKey(planItemDefinitionId)) { this.childInstanceTaskVariables.put(planItemDefinitionId, new HashMap<>()); } this.chil...
} public Set<ChangePlanItemIdMapping> getChangePlanItemIds() { return changePlanItemIds; } public Set<ChangePlanItemIdWithDefinitionIdMapping> getChangePlanItemIdsWithDefinitionId() { return changePlanItemIdsWithDefinitionId; } public Set<ChangePlanItemDefinitionWithNewTar...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\ChangePlanItemStateBuilderImpl.java
1
请完成以下Java代码
public String getNameLike() { return nameLike; } public void setName(String name) { this.name = name; } public void setNameLike(String nameLike) { this.nameLike = nameLike; } public String getNameLikeIgnoreCase() { return nameLikeIgnoreCase; } public v...
} public String getLocale() { return locale; } public boolean isWithLocalizationFallback() { return withLocalizationFallback; } public String getCallbackId() { return callbackId; } public Set<String> getCallBackIds() { return callbackIds; } publi...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\ExecutionQueryImpl.java
1
请完成以下Java代码
public class X_AD_User_Occupation_AdditionalSpecialization extends org.compiere.model.PO implements I_AD_User_Occupation_AdditionalSpecialization, org.compiere.model.I_Persistent { private static final long serialVersionUID = -499859448L; /** Standard Constructor */ public X_AD_User_Occupation_AdditionalSpe...
@Override public org.compiere.model.I_CRM_Occupation getCRM_Occupation() { return get_ValueAsPO(COLUMNNAME_CRM_Occupation_ID, org.compiere.model.I_CRM_Occupation.class); } @Override public void setCRM_Occupation(final org.compiere.model.I_CRM_Occupation CRM_Occupation) { set_ValueFromPO(COLUMNNAME_CRM_Occupa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User_Occupation_AdditionalSpecialization.java
1
请完成以下Java代码
public List<Flower> copyListByAddAllMethod(List<Flower> source) { List<Flower> flowers = new ArrayList<>(); flowers.addAll(source); return flowers; } public List<Flower> copyListByAddAllMethodAndEditOneFlowerInTheNewList(List<Flower> source) { List<Flower> flowers = new ArrayLis...
} public List<Flower> copyListByStreamWithFilter(List<Flower> source, Integer moreThanPetals) { return source.stream().filter(f -> f.getPetals() > moreThanPetals).collect(Collectors.toList()); } public List<Flower> copyListByStreamWithOptional(List<Flower> source) { return Optional.ofNulla...
repos\tutorials-master\core-java-modules\core-java-collections-list-3\src\main\java\com\baeldung\java\list\CopyListService.java
1
请完成以下Java代码
private void setLastLineCommentPrefixCharacter(int lastLineCommentPrefixCharacter) { this.lastLineCommentPrefixCharacter = lastLineCommentPrefixCharacter; } private void skipComment() throws IOException { while (this.character != '\n' && this.character != -1) { this.character = this.reader.read(); } ...
boolean isListDelimiter() { return !this.escaped && this.character == ','; } boolean isPropertyDelimiter() { return !this.escaped && (this.character == '=' || this.character == ':'); } char getCharacter() { return (char) this.character; } Location getLocation() { return new Location(this.read...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\env\OriginTrackedPropertiesLoader.java
1
请在Spring Boot框架中完成以下Java代码
public long findDecisionRequirementsDefinitionCountByQueryCriteria(DecisionRequirementsDefinitionQueryImpl query) { configureDecisionRequirementsDefinitionQuery(query); return (Long) getDbEntityManager().selectOne("selectDecisionRequirementsDefinitionCountByQueryCriteria", query); } protected void createDe...
return null; } @Override public DecisionRequirementsDefinitionEntity findDefinitionByKeyVersionTagAndTenantId(String definitionKey, String definitionVersionTag, String tenantId) { return null; } @Override public DecisionRequirementsDefinitionEntity findDefinitionByDeploymentAndKey(String deploymentId,...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\dmn\entity\repository\DecisionRequirementsDefinitionManager.java
2
请完成以下Java代码
public abstract class AbstractDLMCustomizer implements IConnectionCustomizer { private final transient Logger logger = LogManager.getLogger(getClass()); public abstract int getDlmLevel(); public abstract int getDlmCoalesceLevel(); /** * Used to secure ourselves against a {@link StackOverflowError}. */ priv...
} try { inMethod.set(true); DLMConnectionUtils.setSearchPathForDLM(c); DLMConnectionUtils.changeDLMLevel(c, getDlmLevel()); DLMConnectionUtils.changeDLMCoalesceLevel(c, getDlmCoalesceLevel()); } catch (final SQLException e) { throw DBException.wrapIfNeeded(e); } finally { inMethod.s...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\connection\AbstractDLMCustomizer.java
1
请在Spring Boot框架中完成以下Java代码
private Stream<AssignmentToRefundCandidate> streamAssignmentsToExtend( @NonNull final RefundInvoiceCandidate refundInvoiceCandidate, @NonNull final RefundConfig refundConfig, @NonNull final RefundConfig additionalRefundConfig) { Check.assumeNotNull(refundInvoiceCandidate.getId(), "The given refundInvoic...
I_C_Invoice_Candidate.class) .addOnlyActiveRecordsFilter() .create(); return queryBL .createQueryBuilder(I_C_Invoice_Candidate_Assignment.class) .addOnlyActiveRecordsFilter() .addEqualsFilter( I_C_Invoice_Candidate_Assignment.COLUMN_C_Invoice_Candidate_Term_ID, refundInvoiceCandidate....
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\refund\allqties\refundconfigchange\RefundConfigChangeService.java
2
请完成以下Java代码
public boolean isTenantIdSet() { return isTenantIdSet; } public String getVariableName() { return variableName; } public String getVariableNameLike() { return variableNameLike; } public QueryVariableValue getQueryVariableValue() { return queryVariableValue; } public Boolean getVariab...
} public String getProcessDefinitionId() { return processDefinitionId; } public String getProcessDefinitionKey() { return processDefinitionKey; } public List<String> getVariableNameIn() { return variableNameIn; } public Date getCreatedAfter() { return createdAfter; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricVariableInstanceQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class AmountRefundConfigChangeHandler extends RefundConfigChangeHandler { public static AmountRefundConfigChangeHandler newInstance( @NonNull final RefundConfig currentRefundConfig) { return new AmountRefundConfigChangeHandler(currentRefundConfig); } private AmountRefundConfigChangeHandler( @NonNull...
final Money moneyToAssign = amountToApply.multiply(quantityAssigendToRefundCandidate.toBigDecimal()); return AssignmentToRefundCandidate.builder() .refundConfigId(getCurrentRefundConfig().getId()) .assignableInvoiceCandidateId(existingAssignment.getAssignableInvoiceCandidateId()) .refundInvoiceCandidate(...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\refund\allqties\refundconfigchange\AmountRefundConfigChangeHandler.java
2
请完成以下Java代码
public <T extends ThreadPoolTaskExecutor> T build(Class<T> taskExecutorClass) { return configure(BeanUtils.instantiateClass(taskExecutorClass)); } /** * Configure the provided {@link ThreadPoolTaskExecutor} instance using this builder. * @param <T> the type of task executor * @param taskExecutor the {@link T...
map.from(this.threadNamePrefix).whenHasText().to(taskExecutor::setThreadNamePrefix); map.from(this.taskDecorator).to(taskExecutor::setTaskDecorator); if (!CollectionUtils.isEmpty(this.customizers)) { this.customizers.forEach((customizer) -> customizer.customize(taskExecutor)); } return taskExecutor; } pri...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\task\ThreadPoolTaskExecutorBuilder.java
1
请完成以下Java代码
public BigDecimal getP_Number() { return m_P_Number; } public String getP_Msg() { return m_P_Msg; } public List<String> getWarningMessages() { return warningMessages; } public void markAsSavedInDB() { savedInDB = true; } @Nullable public ITableRecordReference getTableRecordReference() {
return m_Table_Record_Ref; } @Nullable public AdIssueId getAdIssueId() { return m_Ad_Issue_ID; } @Nullable public String getTrxName() { return trxName; } public boolean isSavedInDB() { return savedInDB; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ProcessInfoLog.java
1
请完成以下Java代码
private static DocumentId createDocumentId( @NonNull final ProductId productId, @NonNull final ShipmentScheduleId shipmentScheduleId, @Nullable final HuId pickFromHUId, @Nullable PPOrderId pickFromPickingOrderId, @Nullable final PPOrderBOMLineId issueToOrderBOMLineId) { final StringBuilder sb = new St...
sb.append("_").append("MO").append(pickFromPickingOrderId.getRepoId()); } if (issueToOrderBOMLineId != null) { sb.append("_").append("BOML").append(issueToOrderBOMLineId.getRepoId()); } return DocumentId.ofString(sb.toString()); } public DocumentId toDocumentId() { return documentId; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\productsToPick\rows\ProductsToPickRowId.java
1
请完成以下Java代码
private void updateDueTimeAndScheduleTask() { final boolean taskWasAlreadyScheduled = dueTime > 0; final int delayInMillisEffective = bufferMaxSize > 0 && buffer.size() >= bufferMaxSize ? 0 // ASAP : delayInMillis; // we don't use SystemTime because in our usual tests it's rigged to return a fixed value...
{ synchronized (lock) { buffer.clear(); } } public void shutdown() { executor.shutdown(); } /* public static void main(String[] args) throws InterruptedException { final Debouncer<Integer> debouncer = Debouncer.<Integer>builder() .name("test-debouncer") .delayInMillis(500) .bufferMaxSi...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\async\Debouncer.java
1
请完成以下Java代码
public void setIsRequireScanningProductCode (final boolean IsRequireScanningProductCode) { set_Value (COLUMNNAME_IsRequireScanningProductCode, IsRequireScanningProductCode); } @Override public boolean isRequireScanningProductCode() { return get_ValueAsBoolean(COLUMNNAME_IsRequireScanningProductCode); } @O...
@Override public void setMaxStartedLaunchers (final int MaxStartedLaunchers) { set_Value (COLUMNNAME_MaxStartedLaunchers, MaxStartedLaunchers); } @Override public int getMaxStartedLaunchers() { return get_ValueAsInt(COLUMNNAME_MaxStartedLaunchers); } @Override public void setMobileUI_UserProfile_DD_ID (...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_MobileUI_UserProfile_DD.java
1
请完成以下Java代码
public String getName() { return name; } @Override public ProcessEngineConfigurationImpl getProcessEngineConfiguration() { return processEngineConfiguration; } @Override public IdentityService getIdentityService() { return identityService; } @Override public ManagementService getManagem...
@Override public CaseService getCaseService() { return caseService; } @Override public FilterService getFilterService() { return filterService; } @Override public ExternalTaskService getExternalTaskService() { return externalTaskService; } @Override public DecisionService getDecisionS...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ProcessEngineImpl.java
1
请完成以下Java代码
public VendorProductInfo getVendorProductInfo( @NonNull final BPartnerId vendorId, @NonNull final ProductId productId, @NonNull final OrgId orgId) { final ProductAndCategoryAndManufacturerId product = productsRepo.retrieveProductAndCategoryAndManufacturerByProductId(productId); final int discountSchemaId...
() -> productBL.getProductName(productId)); final boolean defaultVendor = bpartnerProductRecord != null ? bpartnerProductRecord.isCurrentVendor() : false; return VendorProductInfo.builder() .vendorId(vendorId) .defaultVendor(defaultVendor) .product(product) .attributeSetInstanceId(AttributeSetInst...
repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\VendorProductInfoService.java
1
请完成以下Java代码
public void setM_AttributeSearch_ID (final int M_AttributeSearch_ID) { if (M_AttributeSearch_ID < 1) set_Value (COLUMNNAME_M_AttributeSearch_ID, null); else set_Value (COLUMNNAME_M_AttributeSearch_ID, M_AttributeSearch_ID); } @Override public int getM_AttributeSearch_ID() { return get_ValueAsInt(CO...
public java.lang.String getValue() { return get_ValueAsString(COLUMNNAME_Value); } @Override public void setValueMax (final @Nullable BigDecimal ValueMax) { set_Value (COLUMNNAME_ValueMax, ValueMax); } @Override public BigDecimal getValueMax() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Attribute.java
1
请在Spring Boot框架中完成以下Java代码
static class RemoteRestartClientConfiguration { private final DevToolsProperties properties; RemoteRestartClientConfiguration(DevToolsProperties properties) { this.properties = properties; } @Bean ClassPathFileSystemWatcher classPathFileSystemWatcher(FileSystemWatcherFactory fileSystemWatcherFactory, ...
if (StringUtils.hasLength(triggerFile)) { watcher.setTriggerFilter(new TriggerFileFilter(triggerFile)); } return watcher; } @Bean ClassPathRestartStrategy classPathRestartStrategy() { return new PatternClassPathRestartStrategy(this.properties.getRestart().getAllExclude()); } @Bean ClassPathCh...
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\remote\client\RemoteClientConfiguration.java
2
请完成以下Java代码
public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDepartment() {
return department; } public void setDepartment(String department) { this.department = department; } public long getSalary() { return salary; } public void setSalary(long salary) { this.salary = salary; } }
repos\tutorials-master\web-modules\jakarta-servlets-2\src\main\java\com\baeldung\jsonresponse\Employee.java
1
请在Spring Boot框架中完成以下Java代码
public String getAccountingArea() { return accountingArea; } /** * Sets the value of the accountingArea property. * * @param value * allowed object is * {@link String } * */ public void setAccountingArea(String value) { this.accountingArea = ...
this.subOrganizationID = value; } /** * Gets the value of the customerExtension property. * * @return * possible object is * {@link CustomerExtensionType } * */ public CustomerExtensionType getCustomerExtension() { return customerExtension; } ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\CustomerType.java
2
请完成以下Java代码
private static String buildProviderUrl(List<String> urls, String baseDn) { Assert.notNull(baseDn, "The Base DN for the LDAP server must not be null."); Assert.notEmpty(urls, "At least one LDAP server URL must be provided."); String encodedBaseDn = encodeUrl(baseDn.trim()); StringBuilder providerUrl = new String...
providerUrl.append(" "); } return providerUrl.toString(); } private static String encodeUrl(String url) { return URLEncoder.encode(url, StandardCharsets.UTF_8); } private String decodeUrl(String url) { return URLDecoder.decode(url, StandardCharsets.UTF_8); } }
repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\DefaultSpringSecurityContextSource.java
1
请完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; ...
public String getPassWord() { return passWord; } public void setPassWord(String passWord) { this.passWord = passWord; } @Override public String toString() { return ToStringBuilder.reflectionToString(this); } }
repos\spring-boot-leaning-master\1.x\第12课:MongoDB 实战\spring-boot-multi-mongodb\src\main\java\com\neo\entity\UserEntity.java
1
请完成以下Java代码
public class BatchStatisticsEntity extends BatchEntity implements BatchStatistics { protected int remainingJobs; protected int failedJobs; public int getRemainingJobs() { return remainingJobs + getJobsToCreate(); } public void setRemainingJobs(int remainingJobs) { this.remainingJobs = remainingJobs...
public String toString() { return "BatchStatisticsEntity{" + "batchHandler=" + batchJobHandler + ", id='" + id + '\'' + ", type='" + type + '\'' + ", size=" + totalJobs + ", jobCreated=" + jobsCreated + ", remainingJobs=" + remainingJobs + ", failedJobs=" + failedJobs + ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\BatchStatisticsEntity.java
1
请完成以下Java代码
private void updateIfFeasible( @NonNull final ContactPerson contactPerson, @NonNull final User user, @Nullable final String oldUserEmail, @Nullable final Language oldUserLanguage) { final boolean updateContactMail = isFitForUpdate(contactPerson.getEmailAddressStringOrNull(), oldUserEmail); final boolea...
} userRepo.save(updatedUser.build()); } private boolean isFitForUpdate( @Nullable final Object currentContactValue, @Nullable final Object oldUserValue) { if (Check.isEmpty(currentContactValue)) { return true; // contact has no value, so let's give him/her one } // if user and contact were in sy...
repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java\de\metas\marketing\base\ContactPersonService.java
1
请在Spring Boot框架中完成以下Java代码
public AppDto findById(Long id) { App app = appRepository.findById(id).orElseGet(App::new); ValidationUtil.isNull(app.getId(),"App","id",id); return appMapper.toDto(app); } @Override @Transactional(rollbackFor = Exception.class) public void create(App resources) { // 验证应...
@Transactional(rollbackFor = Exception.class) public void delete(Set<Long> ids) { for (Long id : ids) { appRepository.deleteById(id); } } @Override public void download(List<AppDto> queryAll, HttpServletResponse response) throws IOException { List<Map<String, Object>...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\maint\service\impl\AppServiceImpl.java
2
请完成以下Java代码
public void beforeSave(final I_PP_Product_BOMLine bomLine) { validate(bomLine); // // Update Line# if (bomLine.getLine() <= 0) { final IProductBOMDAO productBOMsRepo = Services.get(IProductBOMDAO.class); final int lastLineNo = productBOMsRepo.retrieveLastLineNo(bomLine.getPP_Product_BOM_ID()); bomL...
} } } } private boolean noAccordinglyVariantGroup(final I_PP_Product_BOMLine bomLine) { final IProductBOMDAO bomDAO = Services.get(IProductBOMDAO.class); final List<I_PP_Product_BOMLine> bomLines = bomDAO.retrieveLines(bomLine.getPP_Product_BOM()); for (I_PP_Product_BOMLine bl : bomLines) { final BO...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\model\validator\PP_Product_BOMLine.java
1
请完成以下Java代码
private static I_C_DocType getEmptiesDocType(final String docBaseType, final int adClientId, final int adOrgId, final boolean isSOTrx) { // // Search for specific empties shipment/receipt document sub-type (task 07694) // 07694: using the empties-subtype for receipts. final String docSubType = isSOTrx ? X_C_Do...
} @Override protected int getReturnsDocTypeId(final String docBaseType, final boolean isSOTrx, final int adClientId, final int adOrgId) { final I_C_DocType docType = getEmptiesDocType(docBaseType, adClientId, adOrgId, isSOTrx); DocTypeId docTypeId = docType == null ? null : DocTypeId.ofRepoId(docType.getC_DocT...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\empties\impl\EmptiesInOutProducer.java
1
请在Spring Boot框架中完成以下Java代码
public class UserController { @Autowired private UserDetailsService userDetailsService; @PreAuthorize("hasRole('ROLE_ADMIN')") @GetMapping("/user/{id}") public String getUser(@PathVariable("id") String id) { return "user"; } @PreAuthorize("hasAnyRole('ROLE_ADMIN','ROLE_MANAGER')")...
if (details != null && details.getAuthorities().stream() .anyMatch(a -> a.getAuthority().equals("ADMIN"))) { return "users"; } throw new UnauthorizedException(); } @GetMapping("v3/users") public String getUsers(HttpServletRequest request) { if (request.i...
repos\tutorials-master\spring-security-modules\spring-security-core\src\main\java\com\baeldung\checkrolejava\UserController.java
2
请完成以下Java代码
public final class Pair<F, S> implements IPair<F, S> { private final F first; private final S second; public Pair(final F first, final S second) { super(); this.first = first; this.second = second; } public F getFirst() { return first; } public S getSecond() { return second; } @Override publ...
return false; } final Pair<?, ?> other = (Pair<?, ?>)obj; if (!Check.equals(this.first, other.first)) { return false; } if (!Check.equals(this.second, other.second)) { return false; } return true; } @Override public String toString() { final StringBuilder builder = new StringBuilder();...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\Pair.java
1
请完成以下Java代码
public void setM_Product_ID (final int M_Product_ID) { if (M_Product_ID < 1) set_Value (COLUMNNAME_M_Product_ID, null); else set_Value (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public void setN...
{ return get_ValueAsInt(COLUMNNAME_StackabilityFactor); } @Override public void setWidth (final @Nullable BigDecimal Width) { set_Value (COLUMNNAME_Width, Width); } @Override public BigDecimal getWidth() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Width); return bd != null ? bd : BigDeci...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_PackingMaterial.java
1
请完成以下Java代码
public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } public String getTaskState() { return taskState; } public void setTaskState(String taskState) { this.taskState = taskState; } public static TaskDto fromEntity(Task t...
try { dto.formKey = task.getFormKey(); dto.camundaFormRef = task.getCamundaFormRef(); } catch (BadUserRequestException e) { // ignore (initializeFormKeys was not called) } return dto; } public void updateTask(Task task) { task.setName(getName()); task.setDescription(getDes...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\task\TaskDto.java
1
请在Spring Boot框架中完成以下Java代码
public void discardChanges( @PathVariable("windowId") final String windowIdStr, @PathVariable("documentId") final String documentIdStr, @PathVariable("tabId") @SuppressWarnings("unused") final String tabIdStr_NOT_USED, @PathVariable("rowId") @SuppressWarnings("unused") final String rowIdStr_NOT_USED) { u...
final DetailId tabId = DetailId.fromJson(tabIdStr); final DocumentId rowId = DocumentId.of(rowIdStr); final DocumentPath documentPath = DocumentPath.singleWindowDocumentPath(windowId, documentId, tabId, rowId); return documentChangeLogService.getJSONDocumentChangeLog(documentPath); } @GetMapping("/health") p...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\controller\WindowRestController.java
2
请完成以下Java代码
public ResourceEntity findResourceByDeploymentIdAndResourceName(String deploymentId, String resourceName) { Map<String, Object> params = new HashMap<String, Object>(); params.put("deploymentId", deploymentId); params.put("resourceName", resourceName); return (ResourceEntity) getDbEntityManager().selectO...
params.put("source", source); params.put("tenantId", tenantId); List<ResourceEntity> resources = getDbEntityManager().selectList("selectLatestResourcesByDeploymentName", params); Map<String, ResourceEntity> existingResourcesByName = new HashMap<String, ResourceEntity>(); for (ResourceEntity existingRe...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\ResourceManager.java
1
请完成以下Java代码
boolean matches(boolean directory, int size, int compressionMethod, InputStreamSupplier streamSupplier) throws IOException { if (this.entry.isDirectory() != directory) { fail("directory"); } if (this.entry.getMethod() != compressionMethod) { fail("compression method"); } if (this.entry.isDirectory())...
} catch (EOFException ex) { // Continue and throw exception due to mismatched content length. } fail("content"); } if (expected.read() != -1) { fail("content"); } } private void fail(String check) { throw new IllegalStateException("Content mismatch when reading security info for entry '%s' (%...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\jar\JarEntriesStream.java
1
请完成以下Java代码
public boolean isLast() { return tokens.length == 1; } public String currentToken() { return tokens[0]; } public JsonPathProcessingTask next(JsonNode next) { return new JsonPathProcessingTask( Arrays.copyOfRange(tokens, 1, tokens....
next); } @Override public String toString() { return "JsonPathProcessingTask{" + "tokens=" + Arrays.toString(tokens) + ", variables=" + variables + ", node=" + node.toString().substring(0, 20) + '}'; ...
repos\thingsboard-master\common\util\src\main\java\org\thingsboard\common\util\JacksonUtil.java
1
请完成以下Java代码
public class HistoricFormPropertyEntity extends HistoricDetailEntity implements HistoricFormProperty { private static final long serialVersionUID = 1L; protected String propertyId; protected String propertyValue; public HistoricFormPropertyEntity() { this.detailType = "FormProperty"; } ...
@Override public String getPropertyId() { return propertyId; } public void setPropertyId(String propertyId) { this.propertyId = propertyId; } @Override public String getPropertyValue() { return propertyValue; } public void setPropertyValue(String propertyValue)...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\HistoricFormPropertyEntity.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable String group() { return get(v1(V1::getGroup), DynatraceConfig.super::group); } @Override public DynatraceApiVersion apiVersion() { return obtain((properties) -> (properties.getV1().getDeviceId() != null) ? DynatraceApiVersion.V1 : DynatraceApiVersion.V2, DynatraceConfig.super::apiVersion); ...
public boolean useDynatraceSummaryInstruments() { return obtain(v2(V2::isUseDynatraceSummaryInstruments), DynatraceConfig.super::useDynatraceSummaryInstruments); } @Override public boolean exportMeterMetadata() { return obtain(v2(V2::isExportMeterMetadata), DynatraceConfig.super::exportMeterMetadata); } priv...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\dynatrace\DynatracePropertiesConfigAdapter.java
2