instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public class Employee { @Id private Long id; private String name; @ManyToOne @JoinColumn(name = "department_id") private Department department; public Long getId() { return id; } public void setId(Long id) { this.id = id;
} public String getName() { return name; } public void setName(String name) { this.name = name; } public Department getDepartment() { return department; } public void setDepartment(Department department) { this.department = department; } }
repos\tutorials-master\persistence-modules\hibernate-mapping\src\main\java\com\baeldung\associations\biredirectional\Employee.java
2
请完成以下Java代码
public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } @Override public org.compiere.model.I_C_ElementValue getParent() { return get_ValueAsPO(COLUMNNAME_Parent_ID, org.compiere...
return get_ValueAsBoolean(COLUMNNAME_PostEncumbrance); } @Override public void setPostStatistical (final boolean PostStatistical) { set_Value (COLUMNNAME_PostStatistical, PostStatistical); } @Override public boolean isPostStatistical() { return get_ValueAsBoolean(COLUMNNAME_PostStatistical); } @Overri...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ElementValue.java
1
请在Spring Boot框架中完成以下Java代码
public void setConsume(List<PropagationType> consume) { this.consume = consume; } public @Nullable List<PropagationType> getType() { return this.type; } public List<PropagationType> getProduce() { return this.produce; } public List<PropagationType> getConsume() { return this.consume; } /...
/** * <a href="https://www.w3.org/TR/trace-context/">W3C</a> propagation. */ W3C, /** * <a href="https://github.com/openzipkin/b3-propagation#single-header">B3 * single header</a> propagation. */ B3, /** * <a href="https://github.com/openzipkin/b3-propagation#multiple-headers">B3 ...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-tracing\src\main\java\org\springframework\boot\micrometer\tracing\autoconfigure\TracingProperties.java
2
请完成以下Spring Boot application配置
management: endpoint: # Info 端点配置项 info: enabled: true # 是否开启。默认为 true 开启。 info: # EnvironmentInfoContributor 的配置项 env: enabled: true # BuildInfoContributor 的配置属性 build: enabled: true # GitInfoContributor 的配置属性 git: enabled: true mode: SIMPLE # Git 信息展示模...
打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 exclude: # 在 include 的基础上,需要排除的端点。通过设置 * ,可以排除所有端点。 # info 配置项 info: app: java: source: @java.version@ target: @java.version@ encoding: UTF-8 version: @project.version@
repos\SpringBoot-Labs-master\lab-34\lab-34-actuator-demo-info\src\main\resources\application.yaml
2
请完成以下Java代码
public String getCaseDefinitionId() { return caseDefinitionId; } public String getCaseInstanceId() { return caseInstanceId; } public String getCaseExecutionId() { return caseExecutionId; } public String getTaskId() { return taskId; } public String getTenantId() { return tenantId;...
fromHistoricDetail(historicDetail, dto); return dto; } protected static void fromHistoricDetail(HistoricDetail historicDetail, HistoricDetailDto dto) { dto.id = historicDetail.getId(); dto.processDefinitionKey = historicDetail.getProcessDefinitionKey(); dto.processDefinitionId = historicDetail.getP...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricDetailDto.java
1
请完成以下Spring Boot application配置
spring.ai.vectorstore.chroma.initialize-schema=true spring.ai.vectorstore.chroma.collection-name=poetries spring.ai.ollama.init.chat.include=false spring.ai.ollama.init.pull-model-s
trategy=WHEN_MISSING spring.ai.ollama.embedding.options.model=nomic-embed-text
repos\tutorials-master\spring-ai-modules\spring-ai-2\src\main\resources\application-chromadb.properties
2
请在Spring Boot框架中完成以下Java代码
protected KeyStore createKeyStore() { try { KeyStore store = ssl.getKeyStoreProvider() != null ? KeyStore.getInstance(ssl.getKeyStoreType(), ssl.getKeyStoreProvider()) : KeyStore.getInstance(ssl.getKeyStoreType()); try { URL url = ResourceUtils.getURL(ssl.getKeyStore()); store.load(url.openSt...
} catch (KeyStoreException | NoSuchProviderException e) { throw new RuntimeException("Could not load KeyStore for given type and provider", e); } } protected void setTrustManager(SslContextBuilder sslContextBuilder, X509Certificate... trustedX509Certificates) { sslContextBuilder.trustManager(trustedX509Cert...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\config\AbstractSslConfigurer.java
2
请在Spring Boot框架中完成以下Java代码
public void deleteIdentityLink(@ApiParam(name = "processInstanceId") @PathVariable("processInstanceId") String processInstanceId, @ApiParam(name = "identityId") @PathVariable("identityId") String identityId, @ApiParam(name = "type") @PathVariable("type") String type) { ProcessInstance processInstan...
} } protected IdentityLink getIdentityLink(String identityId, String type, String processInstanceId) { // Perhaps it would be better to offer getting a single identity link // from the API List<IdentityLink> allLinks = runtimeService.getIdentityLinksForProcessInstance(processInstanceId)...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\process\ProcessInstanceIdentityLinkResource.java
2
请完成以下Java代码
public String getBatchId() { return batchId; } public void setBatchId(String batchId) { this.batchId = batchId; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getResult() ...
public void setTargetProcessDefinitionId(String targetProcessDefinitionId) { this.targetProcessDefinitionId = targetProcessDefinitionId; } public String getMigrationMessage() { return migrationMessage; } public void setMigrationMessage(String migrationMessage) { this.migrationM...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\migration\ProcessInstanceBatchMigrationPartResult.java
1
请在Spring Boot框架中完成以下Java代码
public TaskExecutionProperties taskExecutionProperties() { return new TaskExecutionProperties(); } @Bean(name = EXECUTOR_TWO_BEAN_NAME) public ThreadPoolTaskExecutor threadPoolTaskExecutor() { // 创建 TaskExecutorBuilder 对象 TaskExecutorBuilder builder = createT...
TaskExecutorBuilder builder = new TaskExecutorBuilder(); builder = builder.queueCapacity(pool.getQueueCapacity()); builder = builder.corePoolSize(pool.getCoreSize()); builder = builder.maxPoolSize(pool.getMaxSize()); builder = builder.allowCoreThreadTimeOut(pool.isAllowCoreThreadTimeout(...
repos\SpringBoot-Labs-master\lab-29\lab-29-async-two\src\main\java\cn\iocoder\springboot\lab29\asynctask\config\AsyncConfig.java
2
请在Spring Boot框架中完成以下Java代码
public String getTaskNameLikeIgnoreCase() { return taskNameLikeIgnoreCase; } public String getTaskDescriptionLikeIgnoreCase() { return taskDescriptionLikeIgnoreCase; } public String getTaskOwnerLikeIgnoreCase() { return taskOwnerLikeIgnoreCase; } public String getTaskA...
public List<HistoricTaskInstanceQueryImpl> getOrQueryObjects() { return orQueryObjects; } public List<List<String>> getSafeCandidateGroups() { return safeCandidateGroups; } public void setSafeCandidateGroups(List<List<String>> safeCandidateGroups) { this.safeCandidateGroups = s...
repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\HistoricTaskInstanceQueryImpl.java
2
请完成以下Java代码
class ServletWebServerApplicationContextLocalTestWebServerProvider implements LocalTestWebServer.Provider { private final @Nullable ServletWebServerApplicationContext context; ServletWebServerApplicationContextLocalTestWebServerProvider(ApplicationContext context) { this.context = getWebServerApplicationContextIf...
} return LocalTestWebServer.of((isSslEnabled(this.context)) ? Scheme.HTTPS : Scheme.HTTP, () -> { int port = this.context.getEnvironment().getProperty("local.server.port", Integer.class, 8080); String path = this.context.getEnvironment().getProperty("server.servlet.context-path", ""); return new BaseUriDetai...
repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\servlet\context\ServletWebServerApplicationContextLocalTestWebServerProvider.java
1
请完成以下Java代码
private boolean huEditorWasNotOpenedFromADDOrderLine() { final ViewId parentViewId = getView().getParentViewId(); if (parentViewId == null || getView().getParentRowId() == null) { return true; } final String parentViewTableName = viewsRepository.getView(parentViewId).getTableNameOrNull(); return !I_D...
} else if (PARAM_LOCATOR_TO_ID.equals(parameterName)) { return ddOrderLine.getM_LocatorTo_ID(); } else { return IProcessDefaultParametersProvider.DEFAULT_VALUE_NOTAVAILABLE; } } private I_DD_OrderLine getViewSelectedDDOrderLine() { final DDOrderLineId ddOrderLineId = getViewSelectedDDOrderLineId...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\ddorder\process\WEBUI_DD_OrderLine_MoveSelected_HU.java
1
请完成以下Java代码
private void closeAllGroupsExcept(@Nullable final GroupType exceptGroup) { final Iterator<GroupType> groups = _itemHashKey2group.values().iterator(); while (groups.hasNext()) { final GroupType group = groups.next(); if (group == null) { continue; } // Skip the excepted group if (group == e...
/** * @return how many groups were created */ public final int getGroupsCount() { return _countGroups; } /** * @return how many items were added */ public final int getItemsCount() { return _countItems; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\collections\MapReduceAggregator.java
1
请在Spring Boot框架中完成以下Java代码
public Result<?> uploadMinio(HttpServletRequest request) throws Exception { Result<?> result = new Result<>(); // 获取业务路径 String bizPath = request.getParameter("biz"); // 获取上传文件对象 MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; Multipa...
String orgName = file.getOriginalFilename(); orgName = CommonUtils.getFileName(orgName); String fileUrl = MinioUtil.upload(file,bizPath); if(oConvertUtils.isEmpty(fileUrl)){ return Result.error("上传失败,请检查配置信息是否正确!"); } //保存文件信息 OssFile minioFile = new OssFile(...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\controller\SysUploadController.java
2
请完成以下Java代码
public void updateOrderLineRecordAndDoNotSave(@NonNull final I_C_OrderLine orderLineRecord) { // we use the date at which the order needs to be ready for shipping final ZonedDateTime preparationDate = TimeUtil.asZonedDateTime(orderLineRecord.getC_Order().getPreparationDate()); final OrderLineKey orderLineKey = ...
{ int productId; AttributesKey attributesKey; BPartnerClassifier bpartner; private static OrderLineKey forResultGroup(@NonNull final AvailableToPromiseResultGroup resultGroup) { return new OrderLineKey( resultGroup.getProductId().getRepoId(), resultGroup.getStorageAttributesKey(), resultGro...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\interceptor\OrderAvailableToPromiseTool.java
1
请完成以下Spring Boot application配置
spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/spring-security-jwt?useUnicode=true&characte
rEncoding=utf-8&useSSL=false username: root password: root
repos\SpringBootLearning-master (1)\springboot-jwt\src\main\resources\application.yml
2
请完成以下Java代码
public int getC_DocLine_Sort_Item_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_DocLine_Sort_Item_ID); if (ii == null) return 0; return ii.intValue(); } @Override public org.compiere.model.I_M_Product getM_Product() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_M_Product_ID, org.co...
} /** Set Reihenfolge. @param SeqNo Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst */ @Override public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Reihenfolge. @return Zur Bestimmung der Reihenfolge der Einträge; die kleins...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_DocLine_Sort_Item.java
1
请完成以下Java代码
public class ArrayConcatUtil { private ArrayConcatUtil() {} static <T> T[] concatWithCollection(T[] array1, T[] array2) { List<T> resultList = new ArrayList<>(array1.length + array2.length); Collections.addAll(resultList, array1); Collections.addAll(resultList, array2); @Suppre...
//the cast is safe due to the previous checks T result = (T) Array.newInstance(compType1, len1 + len2); System.arraycopy(array1, 0, result, 0, len1); System.arraycopy(array2, 0, result, len1, len2); return result; } @SuppressWarnings("unchecked") static <T> T[] concatWithS...
repos\tutorials-master\core-java-modules\core-java-arrays-operations-advanced-2\src\main\java\com\baeldung\arrayconcat\ArrayConcatUtil.java
1
请完成以下Java代码
public static Set<String> getInvolvedCaseInstanceIds(CommandContext commandContext) { Object obj = commandContext.getAttribute(ATTRIBUTE_INVOLVED_CASE_INSTANCE_IDS); if (obj != null) { return (Set<String>) obj; } return null; } public static CaseInstanceHelper g...
public static DmnDecisionService getDmnRuleService(CommandContext commandContext) { DmnEngineConfigurationApi dmnEngineConfiguration = getDmnEngineConfiguration(commandContext); if (dmnEngineConfiguration == null) { throw new FlowableException("Dmn engine is not configured"); } ...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\util\CommandContextUtil.java
1
请完成以下Java代码
protected static class DefaultJacksonCodecs { private static final JsonMapper JSON_MAPPER = JsonMapper.builder() .addModule(new GraphQlJacksonModule()).build(); static Encoder<?> encoder() { return new JacksonJsonEncoder(JSON_MAPPER, MediaType.APPLICATION_JSON); } static Decoder<?> decoder() { retu...
protected static class DefaultJackson2Codecs { private static final com.fasterxml.jackson.databind.ObjectMapper JSON_MAPPER = Jackson2ObjectMapperBuilder.json().modulesToInstall(new GraphQlJackson2Module()).build(); static Encoder<?> encoder() { return new Jackson2JsonEncoder(JSON_MAPPER, MediaType.APPLICA...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\client\AbstractGraphQlClientBuilder.java
1
请完成以下Java代码
public void setCity (final @Nullable java.lang.String City) { set_Value (COLUMNNAME_City, City); } @Override public java.lang.String getCity() { return get_ValueAsString(COLUMNNAME_City); } @Override public void setES_DocumentId (final java.lang.String ES_DocumentId) { set_ValueNoCheck (COLUMNNAME_ES_...
@Override public java.lang.String getLastname() { return get_ValueAsString(COLUMNNAME_Lastname); } @Override public void setName (final @Nullable java.lang.String Name) { set_ValueNoCheck (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Nam...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_Adv_Search.java
1
请在Spring Boot框架中完成以下Java代码
public class InMemoryBookService implements BookService { static Map<Long, Book> booksDB = new HashMap<>(); @Override public List<Book> findAll() { return new ArrayList<>(booksDB.values()); } @Override public void saveAll(List<Book> books) { long nextId = getNextId(); ...
Map<Long, Book> bookMap = books.stream() .collect(Collectors.toMap(Book::getId, Function.identity())); booksDB.putAll(bookMap); } private Long getNextId() { return booksDB.keySet() .stream() .mapToLong(value -> value) .max() .orElse(0...
repos\tutorials-master\spring-web-modules\spring-mvc-forms-thymeleaf\src\main\java\com\baeldung\listbindingexample\InMemoryBookService.java
2
请完成以下Java代码
public static Optional<Integer> getCpuCount() { try { return Optional.of(HARDWARE.getProcessor().getLogicalProcessorCount()); } catch (Throwable e) { log.debug("Failed to get total cpu count!!!", e); } return Optional.empty(); } public static Optional<Int...
public static Optional<Long> getTotalDiscSpace() { try { FileStore store = Files.getFileStore(Paths.get("/")); return Optional.of(store.getTotalSpace()); } catch (Throwable e) { log.debug("Failed to get total disc space!!!", e); } return Optional.empty...
repos\thingsboard-master\common\util\src\main\java\org\thingsboard\common\util\SystemUtil.java
1
请完成以下Java代码
private static <T> JAXBElement<T> unmarshal( @NonNull final JAXBContext jaxbContext, @NonNull final InputStream xmlInput) throws JAXBException { final Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); @SuppressWarnings("unchecked") final JAXBElement<T> jaxbElement = (JAXBElement<T>)unmarshalle...
final Marshaller marshaller = jaxbContext.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_ENCODING, StandardCharsets.UTF_8.name()); marshaller.setProperty(Marshaller.JAXB_SCHEMA_LOCATION, xsdName); // important; for us, finding the correct converter depends on the schema location if (prettyPrint) ...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_xversion\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_xversion\JaxbUtil.java
1
请完成以下Spring Boot application配置
spring.task.execution.pool.core-size=2 spring.task.execution.pool.max-size=5 spring.task.execution.pool.queue-capacity=10 spring.task.execution.pool.keep-alive=60s spring.task.execution.pool.allow-core-thread-timeout=true spring.task.execution.thread-name-prefix=task-
spring.task.execution.shutdown.await-termination=false spring.task.execution.shutdown.await-termination-period=30s
repos\SpringBoot-Learning-master\2.x\chapter7-6\src\main\resources\application.properties
2
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setAD_Org_Mapping_ID (final int AD_Org_Mapping_ID) { if (AD_Org_Mapping_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_Org_Mapping_ID, null); else set_ValueNoCh...
if (AD_Table_ID < 1) set_Value (COLUMNNAME_AD_Table_ID, null); else set_Value (COLUMNNAME_AD_Table_ID, AD_Table_ID); } @Override public int getAD_Table_ID() { return get_ValueAsInt(COLUMNNAME_AD_Table_ID); } @Override public void setValue (final @Nullable java.lang.String Value) { set_Value (CO...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Org_Mapping.java
1
请在Spring Boot框架中完成以下Java代码
public void setDDATE1(DDATE1 value) { this.ddate1 = value; } /** * Gets the value of the damou1 property. * * @return * possible object is * {@link DAMOU1 } * */ public DAMOU1 getDAMOU1() { return damou1; } /** * Sets the value ...
* Objects of the following type(s) are allowed in the list * {@link DPRIC1 } * * */ public List<DPRIC1> getDPRIC1() { if (dpric1 == null) { dpric1 = new ArrayList<DPRIC1>(); } return this.dpric1; } /** * Gets the value of the drefe1 property. ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_orders\de\metas\edi\esb\jaxb\stepcom\orders\DETAILXbest.java
2
请完成以下Java代码
public String getDepartNameAbbr() { return departNameAbbr; } public void setDepartNameAbbr(String departNameAbbr) { this.departNameAbbr = departNameAbbr; } public Integer getDepartOrder() { return departOrder; } public void setDepartOrder(Integer departOrder) { ...
public String getFax() { return fax; } public void setFax(String fax) { this.fax = fax; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getMemo() { return memo; ...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\system\vo\SysDepartModel.java
1
请完成以下Spring Boot application配置
com.auth0.domain: dev-example.auth0.com com.auth0.clientId: exampleClientId com.auth0.clientSecret: exampleClientSecret com.auth0.managementApi.clientId: exampleManagementApiClientId com.auth0.managementApi.clientS
ecret: exampleManagementApiClientSecret com.auth0.managementApi.grantType: client_credentials
repos\tutorials-master\spring-security-modules\spring-security-auth0\src\main\resources\application.properties
2
请在Spring Boot框架中完成以下Java代码
public XMLGregorianCalendar getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {...
public String getDateFormatCode() { return dateFormatCode; } /** * Sets the value of the dateFormatCode property. * * @param value * allowed object is ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\ListLineItemExtensionType.java
2
请完成以下Java代码
public static CurrencyId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? ofRepoId(repoId) : null; } public static Optional<CurrencyId> optionalOfRepoId(final int repoId) { return Optional.ofNullable(ofRepoIdOrNull(repoId)); } public static int toRepoId(@Nullable final CurrencyId currencyId) { retu...
} return commonCurrencyId; } } @SafeVarargs public static <T> void assertCurrencyMatching( @NonNull final Function<T, CurrencyId> getCurrencyId, @NonNull final String name, @Nullable final T... objects) { if (objects == null || objects.length <= 1) { return; } CurrencyId expectedCurrency...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\money\CurrencyId.java
1
请在Spring Boot框架中完成以下Java代码
public class BlogPost { @Id @GeneratedValue private Long id; private String title; private String body; @ManyToOne private User user; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getTitle() { ...
return body; } public void setBody(String body) { this.body = body; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } }
repos\tutorials-master\persistence-modules\querydsl\src\main\java\com\baeldung\querydsl\intro\entities\BlogPost.java
2
请完成以下Java代码
private ListMultimap<GroupTemplate, OrderLineId> extractOrderLineIdsByGroupTemplate(final List<I_C_OrderLine> orderLines) { final List<I_C_OrderLine> orderLinesSorted = orderLines.stream() .sorted(Comparator.comparing(I_C_OrderLine::getLine)) .collect(ImmutableList.toImmutableList()); final ListMultimap<G...
final I_M_Product_Category productCategory = productsRepo.getProductCategoryById(productCategoryId, I_M_Product_Category.class); final GroupTemplateId groupTemplateId = GroupTemplateId.ofRepoIdOrNull(productCategory.getC_CompensationGroup_Schema_ID()); if (groupTemplateId == null) { return null; } return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\process\C_Order_CreateCompensationMultiGroups.java
1
请在Spring Boot框架中完成以下Java代码
public void createExecutionVariableAsync(@ApiParam(name = "processInstanceId") @PathVariable String processInstanceId, HttpServletRequest request, HttpServletResponse response) { Execution execution = getExecutionFromRequestWithoutAccessCheck(processInstanceId); createExecutionVariable(execution, false,...
// no global variables } // For process instance there's only one scope. Using the local variables // method for that @Override protected void addLocalVariables(Execution execution, Map<String, RestVariable> variableMap) { Map<String, Object> rawVariables = runtimeService.getVariables(execu...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\process\ProcessInstanceVariableCollectionResource.java
2
请完成以下Java代码
public void setC_AcctSchema(final org.compiere.model.I_C_AcctSchema C_AcctSchema) { set_ValueFromPO(COLUMNNAME_C_AcctSchema_ID, org.compiere.model.I_C_AcctSchema.class, C_AcctSchema); } @Override public void setC_AcctSchema_ID (final int C_AcctSchema_ID) { if (C_AcctSchema_ID < 1) set_ValueNoCheck (COLUMN...
} @Override public void setM_CostElement_ID (final int M_CostElement_ID) { if (M_CostElement_ID < 1) set_ValueNoCheck (COLUMNNAME_M_CostElement_ID, null); else set_ValueNoCheck (COLUMNNAME_M_CostElement_ID, M_CostElement_ID); } @Override public int getM_CostElement_ID() { return get_ValueAsInt(C...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_CostElement_Acct.java
1
请完成以下Java代码
private void formatDeviceProfileCertificate(DeviceProfile deviceProfile, X509CertificateChainProvisionConfiguration x509Configuration) { String formattedCertificateValue = formatCertificateValue(x509Configuration.getProvisionDeviceSecret()); String cert = fetchLeafCertificateFromChain(formattedCertifica...
return value; } private String formatCertificateValue(String certificateValue) { try { CertificateFactory cf = CertificateFactory.getInstance("X.509"); ByteArrayInputStream inputStream = new ByteArrayInputStream(certificateValue.getBytes()); Certificate[] certificate...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\device\DeviceProfileServiceImpl.java
1
请完成以下Java代码
protected List<URL> getDeploymentDescriptorUrls(final Module module, String[] deploymentDescriptors) throws DeploymentUnitProcessingException { List<URL> deploymentDescriptorURLs = new ArrayList<URL>(); for (String deploymentDescriptor : deploymentDescriptors) { Enumeration<URL> resources = null; tr...
protected VirtualFile getFile(URL processesXmlResource) throws DeploymentUnitProcessingException { try { return VFS.getChild(processesXmlResource.toURI()); } catch(Exception e) { throw new DeploymentUnitProcessingException(e); } } protected boolean isEmptyFile(URL url) { InputStream in...
repos\camunda-bpm-platform-master\distro\wildfly\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\deployment\processor\ProcessesXmlProcessor.java
1
请在Spring Boot框架中完成以下Java代码
public LegacyEndpointConverter beansLegacyEndpointConverter() { return LegacyEndpointConverters.beans(); } @Bean @ConditionalOnMissingBean(name = "configpropsLegacyEndpointConverter") public LegacyEndpointConverter configpropsLegacyEndpointConverter() { return LegacyEndpointConverters.configprops(); } ...
public PerInstanceCookieStore cookieStore() { return new JdkPerInstanceCookieStore(CookiePolicy.ACCEPT_ORIGINAL_SERVER); } /** * Creates a default trigger to cleanup the cookie store on deregistering of an * {@link de.codecentric.boot.admin.server.domain.entities.Instance}. * @param publisher publisher...
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\config\AdminServerInstanceWebClientConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public void changeCurrentRefundConfig(@NonNull final RefundConfig refundConfig) { assertCorrectRefundBase(refundConfig); this.formerRefundConfig = this.currentRefundConfig; this.currentRefundConfig = refundConfig; } private void assertCorrectRefundBase(final RefundConfig refundConfig) { Check.errorUnless(...
* @return the refund config that was the current config before {@link #currentRefundConfig(RefundConfig)} was called. */ public RefundConfig getFormerRefundConfig() { return Check.assumeNotNull(formerRefundConfig, "formerRefundConfig may not be null; invoke the currentRefundConfig() method first; this={}", this);...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\refund\allqties\refundconfigchange\RefundConfigChangeHandler.java
2
请在Spring Boot框架中完成以下Java代码
public class ProductPrice { @NonNull OrgId orgId; @NonNull ProductId productId; @NonNull ProductPriceId productPriceId; @NonNull PriceListVersionId priceListVersionId; @NonNull BigDecimal priceStd; @NonNull @Builder.Default BigDecimal priceList = BigDecimal.ZERO; @NonNull
@Builder.Default BigDecimal priceLimit = BigDecimal.ZERO; @NonNull TaxCategoryId taxCategoryId; @Nullable String internalName; @NonNull Boolean isActive; @NonNull UomId uomId; @NonNull Integer seqNo; }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\productprice\ProductPrice.java
2
请完成以下Java代码
public void onLocationChanged(@NonNull final I_C_BPartner_Location_QuickInput record) { final LocationId id = LocationId.ofRepoIdOrNull(record.getC_Location_ID()); if (id == null) { return; } final I_C_Location locationRecord = locationDAO.getById(id); if (locationRecord == null) { // location not...
.existingNames(repo.getOtherLocationNames(record.getC_BPartner_QuickInput_ID(), record.getC_BPartner_Location_QuickInput_ID())) .maxLength(poInfo.getFieldLength(I_C_BPartner_Location_QuickInput.COLUMNNAME_Name)) .build() .execute(); record.setName(name); } @Nullable private String getCompanyNameOrNul...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\quick_input\callout\C_BPartner_Location_QuickInput.java
1
请完成以下Java代码
public String getActivityName() { return activityName; } public void setActivityName(String activityName) { this.activityName = activityName; } @Override public String[] getIncidentIds() { return incidentIds; } public void setIncidentIds(String[] incidentIds) { this.incidentIds = incide...
return this.getClass().getSimpleName() + "[executionId=" + executionId + ", targetActivityId=" + activityId + ", activityName=" + activityName + ", activityType=" + activityType + ", id=" + id + ", parentActivityInstanceId=" + parentActivityInstanceId ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\TransitionInstanceImpl.java
1
请完成以下Java代码
public Object mapDecisionResult(DmnDecisionResult decisionResult) { if (decisionResult.isEmpty()) { return Collections.emptyList(); } else { Set<String> outputNames = collectOutputNames(decisionResult); if (outputNames.size() > 1) { throw LOG.decisionResultCollectMappingException(out...
protected Set<String> collectOutputNames(DmnDecisionResult decisionResult) { Set<String> outputNames = new HashSet<String>(); for (Map<String, Object> entryMap : decisionResult.getResultList()) { outputNames.addAll(entryMap.keySet()); } return outputNames; } @Override public String toStri...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\dmn\result\CollectEntriesDecisionResultMapper.java
1
请完成以下Java代码
public class SuspendProcessDefinitionCmd extends AbstractSetProcessDefinitionStateCmd { public SuspendProcessDefinitionCmd( ProcessDefinitionEntity processDefinitionEntity, boolean includeProcessInstances, Date executionDate, String tenantId ) { super(processDefinitionEn...
) { super(processDefinitionId, processDefinitionKey, suspendProcessInstances, suspensionDate, tenantId); } protected SuspensionState getProcessDefinitionSuspensionState() { return SuspensionState.SUSPENDED; } protected String getDelayedExecutionJobHandlerType() { return TimerSu...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\SuspendProcessDefinitionCmd.java
1
请在Spring Boot框架中完成以下Java代码
public int hashCode() { return Objects.hash(_id, label, parent, timestamp); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Region {\n"); sb.append(" _id: ").append(toIndentedString(_id)).append("\n"); sb.append(" label: ").append(to...
return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-patient-api\src\main\java\io\swagger\client\model\Region.java
2
请完成以下Java代码
public AuthorRecord values(Integer value1, String value2, String value3, Integer value4) { value1(value1); value2(value2); value3(value3); value4(value4); return this; } // ------------------------------------------------------------------------- // Constructors ...
public AuthorRecord() { super(Author.AUTHOR); } /** * Create a detached, initialised AuthorRecord */ public AuthorRecord(Integer id, String firstName, String lastName, Integer age) { super(Author.AUTHOR); set(0, id); set(1, firstName); set(2, lastName); ...
repos\tutorials-master\persistence-modules\jooq\src\main\java\com\baeldung\jooq\model\tables\records\AuthorRecord.java
1
请在Spring Boot框架中完成以下Java代码
public static BPartnerCreditLimitId ofRepoIdOrNull( @Nullable final BPartnerId bpartnerId, @Nullable final Integer bPartnerCreditLimitId) { return bpartnerId != null && bPartnerCreditLimitId != null && bPartnerCreditLimitId > 0 ? ofRepoId(bpartnerId, bPartnerCreditLimitId) : null; } @Jacksonized @Builder ...
{ return bPartnerCreditLimitId != null ? bPartnerCreditLimitId.getRepoId() : -1; } public static boolean equals(final @Nullable BPartnerCreditLimitId id1, final @Nullable BPartnerCreditLimitId id2) { return Objects.equals(id1, id2); } @JsonValue public int toJson() { return getRepoId(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\service\BPartnerCreditLimitId.java
2
请在Spring Boot框架中完成以下Java代码
public boolean getDefaultAllowLoggingByColumnName(@NonNull final String columnName) { if (columnName.equalsIgnoreCase(I_AD_Column.COLUMNNAME_Created) || columnName.equalsIgnoreCase(I_AD_Column.COLUMNNAME_CreatedBy) || columnName.equalsIgnoreCase(I_AD_Column.COLUMNNAME_Updated) || columnName.equalsIgnore...
{ return columnName.equalsIgnoreCase("Value") || columnName.equalsIgnoreCase("DocumentNo") || columnName.equalsIgnoreCase("DocStatus") || columnName.equalsIgnoreCase("Docaction") || columnName.equalsIgnoreCase("Processed") || columnName.equalsIgnoreCase("Processing") || StringUtils.containsIgn...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\adempiere\service\impl\ColumnBL.java
2
请在Spring Boot框架中完成以下Java代码
public Optional<Authentication> retrieve(@Nullable final Object token) { if (token == null) { return Optional.empty(); } return Optional.ofNullable(restApiAuthToken.get(String.valueOf(token))); } public void expiryToken(@NonNull final Object token) { restApiAuthToken.remove(String.valueOf(token)); }...
@PostConstruct private void registerPreAuthenticatedIdentities() { for (final PreAuthenticatedIdentity preAuthenticatedIdentity : preAuthenticatedIdentities) { final Optional<PreAuthenticatedAuthenticationToken> preAuthenticatedAuthenticationToken = preAuthenticatedIdentity.getPreAuthenticatedToken(); if (...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\core\src\main\java\de\metas\camel\externalsystems\core\restapi\auth\TokenBasedAuthService.java
2
请完成以下Java代码
public class BookListener { @PrePersist void onPrePersist(Book book) { System.out.println("BookListener.onPrePersist(): " + book); } @PostPersist void onPostPersist(Book book) { System.out.println("BookListener.onPostPersist(): " + book); } @PostLoad void onPostLoad(Bo...
void onPreUpdate(Book book) { System.out.println("BookListener.onPreUpdate(): " + book); } @PostUpdate void onPostUpdate(Book book) { System.out.println("BookListener.onPostUpdate(): " + book); } @PreRemove void onPreRemove(Book book) { System.out.println("BookListener....
repos\Hibernate-SpringBoot-master\HibernateSpringBootEntityListener\src\main\java\com\bookstore\listener\BookListener.java
1
请完成以下Java代码
public Integer getLastReceiptInDays() { return calculateDaysFrom(getLastReceiptDate()); } public Integer getLastShipmentInDays() { return calculateDaysFrom(getLastShipmentDate()); } private static Integer calculateDaysFrom(final ZonedDateTime date) { if (date != null) { return (int)Duration.between(...
@NonNull private LocalDate invoiceDate; @NonNull private Money price; public boolean isAfter(@Nullable LastInvoiceInfo other) { if (other == null) { return true; } else if (this.invoiceDate.compareTo(other.invoiceDate) > 0) { return true; } else if (this.invoiceDate.compareTo(ot...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\product\stats\BPartnerProductStats.java
1
请完成以下Java代码
public MigrationInstruction findSingleMigrationInstruction(String sourceScopeId) { List<MigrationInstruction> instructions = instructionsBySourceScope.get(sourceScopeId); if (instructions != null && !instructions.isEmpty()) { return instructions.get(0); } else { return null; } } p...
public void handleTransitionInstance(TransitionInstance transitionInstance) { parser.getTransitionInstanceHandler().handle(this, transitionInstance); } public void validateNoEntitiesLeft(MigratingProcessInstanceValidationReportImpl processInstanceReport) { processInstanceReport.setProcessInstanceId(migrati...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\parser\MigratingInstanceParseContext.java
1
请完成以下Java代码
private ESRStatement importCamt54v02(final MultiVersionStreamReaderDelegate mxsr) { final BankToCustomerDebitCreditNotificationV02 bkToCstmrDbtCdtNtfctn = ESRDataImporterCamt54v02.loadXML(mxsr); if (bkToCstmrDbtCdtNtfctn.getGrpHdr() != null && bkToCstmrDbtCdtNtfctn.getGrpHdr().getAddtlInf() != null) { Loggabl...
{ try { if (xsr != null) { xsr.close(); } input.close(); } catch (XMLStreamException | IOException e) { throw AdempiereException.wrapIfNeeded(e); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java\de\metas\payment\esr\dataimporter\impl\camt54\ESRDataImporterCamt54.java
1
请完成以下Java代码
public void setQty (java.math.BigDecimal Qty) { set_ValueNoCheck (COLUMNNAME_Qty, Qty); } /** Get Menge. @return Quantity */ @Override public java.math.BigDecimal getQty () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty); if (bd == null) return BigDecimal.ZERO; return bd; } /** Set S...
{ return (java.lang.String)get_Value(COLUMNNAME_UOMSymbol); } /** Set UPC/EAN. @param UPC Bar Code (Universal Product Code or its superset European Article Number) */ @Override public void setUPC (java.lang.String UPC) { set_ValueNoCheck (COLUMNNAME_UPC, UPC); } /** Get UPC/EAN. @return Bar Code ...
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java-gen\de\metas\rfq\model\X_C_RfQResponseLine_v.java
1
请完成以下Java代码
public WorkflowLaunchersFacetGroupList getFacets(@NonNull final WorkflowLaunchersFacetQuery query) { return getFacets( newDDOrderReferenceQuery(query.getUserId()) .activeFacetIds(DistributionFacetIdsCollection.ofWorkflowLaunchersFacetIds(query.getActiveFacetIds())) .build() ) .toWorkflowLaunche...
if (hasInTransitSchedules(jobReferences, userId)) { actions.add(ACTION_DROP_ALL); if (warehouseService.getTrolleyByUserId(userId).isPresent()) { actions.add(ACTION_PRINT_IN_TRANSIT_REPORT); } } return actions.build(); } private boolean hasInTransitSchedules( @NonNull final List<DDOrderRefe...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\launchers\DistributionWorkflowLaunchersProvider.java
1
请在Spring Boot框架中完成以下Java代码
public void setExceptionByteArrayRef(ByteArrayRef exceptionByteArrayRef) { this.exceptionByteArrayRef = exceptionByteArrayRef; } @Override public ByteArrayRef getExceptionByteArrayRef() { return exceptionByteArrayRef; } @Override public String getExceptionStacktrace() { ...
@Override public Date getLockExpirationTime() { return lockExpirationTime; } @Override public void setLockExpirationTime(Date claimedUntil) { this.lockExpirationTime = claimedUntil; } @Override public String getScopeType() { return scopeType; } @Override ...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\persistence\entity\HistoryJobEntityImpl.java
2
请完成以下Java代码
public String getId() { return id; } public String getDecisionInstanceId() { return decisionInstanceId; } public String getClauseId() { return clauseId; } public String getClauseName() { return clauseName; } public String getRuleId() { return ruleId; } public Integer getRule...
return removalTime; } public String getRootProcessInstanceId() { return rootProcessInstanceId; } public static HistoricDecisionOutputInstanceDto fromHistoricDecisionOutputInstance(HistoricDecisionOutputInstance historicDecisionOutputInstance) { HistoricDecisionOutputInstanceDto dto = new HistoricDeci...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricDecisionOutputInstanceDto.java
1
请完成以下Java代码
public class DBRes_vi extends ListResourceBundle { /** Data */ static final Object[][] contents = new String[][] { { "CConnectionDialog", "K\u1EBFt n\u1ED1i" }, { "Name", "T�n" }, { "AppsHost", "M�y ch\u1EE7 \u1EE9ng d\u1EE5ng" }, { "AppsPort", "C\u1ED5ng \u1EE9ng d\u1EE...
{ "TerminalServer", "Terminal Server" }, { "VPN", "VPN" }, { "WAN", "WAN" }, { "ConnectionError", "L\u1ED7i k\u1EBFt n\u1ED1i" }, { "ServerNotActive", "M�y ch\u1EE7 hi\u1EC7n kh�ng ho\u1EA1t \u0111\u1ED9ng" } }; /** * Get Contsnts * @return contents */ public Object[][] getContents() { r...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\db\connectiondialog\i18n\DBRes_vi.java
1
请完成以下Java代码
public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException { if (evt.getPropertyName().equals(I_C_OrderLine.COLUMNNAME_M_Product_ID)) { reset(false); fProduct.setValue(evt.getNewValue()); updateData(true, fProduct); } } private void reset(boolean clearPrimaryField) { fQtyOrder...
// reset(true); changed = true; refreshIncludedTabs(); setInfo(Msg.parseTranslation(Env.getCtx(), "@RecordSaved@ - @M_Product_ID@:" + productStr + ", @QtyOrdered@:" + qty), false, null); } public void showCenter() { AEnv.showCenterWindow(getOwner(), this); } public boolean isChanged() { retu...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\form\swing\OrderLineCreate.java
1
请完成以下Java代码
public String getProcessInstanceId() { return processInstanceId; } public String getCaseInstanceId() { return caseInstanceId; } public String[] getActivityInstanceIds() { return activityInstanceIds; } public String[] getProcessInstanceIds() { return processInstanceIds; } public Strin...
public Boolean getVariableValuesIgnoreCase() { return variableValuesIgnoreCase; } @Override public HistoricVariableInstanceQuery includeDeleted() { includeDeleted = true; return this; } public String getProcessDefinitionId() { return processDefinitionId; } public String getProcessDefini...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricVariableInstanceQueryImpl.java
1
请完成以下Java代码
public void applicationPackagePointcut() { // Method is empty as this is just a Pointcut, the implementations are in the advices. } /** * Advice that logs methods throwing exceptions. * * @param joinPoint join point for advice * @param e exception */ @AfterThrowing(pointcut...
} try { Object result = joinPoint.proceed(); if (log.isDebugEnabled()) { log.debug("Exit: {}.{}() with result = {}", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), result); } return result; ...
repos\Spring-Boot-Advanced-Projects-main\springboot2-springaop-example\src\main\java\net\alanbinu\springboot2\springboot2jpacrudexample\aspect\LoggingAspect.java
1
请完成以下Java代码
public Void execute(CommandContext commandContext) { ExecutionEntityManager executionManager = commandContext.getExecutionEntityManager(); ExecutionEntity processInstance = executionManager.findById(processInstanceId); if (processInstance == null) { throw new ActivitiObjectNotFoundEx...
" with a root execution id." ); } executeInternal(commandContext, executionManager, processInstance); return null; } protected void executeInternal( CommandContext commandContext, ExecutionEntityManager executionManager, ExecutionEntity processInstan...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\SetProcessInstanceBusinessKeyCmd.java
1
请在Spring Boot框架中完成以下Java代码
public class StoreAttachmentService { private static final Logger logger = LogManager.getLogger(StoreAttachmentService.class); private final List<StoreAttachmentServiceImpl> storeAttachmentServices; private final List<AttachmentStoredListener> attachmentStoredListeners; public StoreAttachmentService( @NonNull ...
final StoreAttachmentServiceImpl service = extractFor(attachmentEntry); if (service == null) { loggable.addLog("StoreAttachmentService - no StoreAttachmentServiceImpl found for attachment={}", attachmentEntry); return false; } final URI storageIdentifier = service.storeAttachment(attachmentEntry); logg...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\attachments\storeattachment\StoreAttachmentService.java
2
请完成以下Java代码
class UserActor extends AbstractActor { private UserService userService = new UserService(); static Props props() { return Props.create(UserActor.class); } @Override public Receive createReceive() { return receiveBuilder() .match(CreateUserMessage.class, handleCreateUser()) ...
private FI.UnitApply<CreateUserMessage> handleCreateUser() { return createUserMessageMessage -> { userService.createUser(createUserMessageMessage.getUser()); sender().tell(new ActionPerformed(String.format("User %s created.", createUserMessageMessage.getUser() .getName())), getSelf()); ...
repos\tutorials-master\akka-modules\akka-http\src\main\java\com\baeldung\akkahttp\UserActor.java
1
请在Spring Boot框架中完成以下Java代码
public DeleteProcessDefinitionsBuilderImpl withoutTenantId() { isTenantIdSet = true; return this; } @Override public DeleteProcessDefinitionsBuilderImpl withTenantId(String tenantId) { ensureNotNull("tenantId", tenantId); isTenantIdSet = true; this.tenantId = tenantId; return this; } ...
ensureOnlyOneNotNull(NullValueException.class, "'processDefinitionKey' or 'processDefinitionIds' cannot be null", processDefinitionKey, processDefinitionIds); Command<Void> command; if (processDefinitionKey != null) { command = new DeleteProcessDefinitionsByKeyCmd(processDefinitionKey, cascade, skipCusto...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\repository\DeleteProcessDefinitionsBuilderImpl.java
2
请在Spring Boot框架中完成以下Java代码
public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http.authorizeHttpRequests(auth -> auth .requestMatchers("/protected-process*") .authenticated() .anyRequest() .permitAll()) ...
.logout(logout -> logout.logoutSuccessUrl("/login")); return http.build(); } @Bean public UserDetailsService userDetailsService() { User.UserBuilder users = User.withDefaultPasswordEncoder(); UserDetails user = users.username("user") .password("{noop}pass") ....
repos\tutorials-master\spring-activiti\src\main\java\com\baeldung\activiti\security\withspring\SecurityConfig.java
2
请在Spring Boot框架中完成以下Java代码
public PatientHospital hospitalId(String hospitalId) { this.hospitalId = hospitalId; return this; } /** * Id der entlassenden Klinik (Voraussetzung, Alberta-Id ist bereits durch initialen Abgleich in WaWi vorhanden) * @return hospitalId **/ @Schema(example = "5ab2379c9d69c74b68cee819", descripti...
if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PatientHospital patientHospital = (PatientHospital) o; return Objects.equals(this.hospitalId, patientHospital.hospitalId) && Objects.equals(this.dischargeDate, patientHospital.discharge...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-patient-api\src\main\java\io\swagger\client\model\PatientHospital.java
2
请完成以下Java代码
public class CycleDetectionBruteForce { public static <T> CycleDetectionResult<T> detectCycle(Node<T> head) { if (head == null) { return new CycleDetectionResult<>(false, null); } Node<T> it1 = head; int nodesTraversedByOuter = 0; while (it1 != null && it1.next ...
if (it2 == it1) { noOfTimesCurrentNodeVisited++; } if (noOfTimesCurrentNodeVisited == 2) { return new CycleDetectionResult<>(true, it1); } x--; } } return new CycleDetectionResult<>(fal...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-2\src\main\java\com\baeldung\algorithms\linkedlist\CycleDetectionBruteForce.java
1
请完成以下Java代码
private final UserNotificationRequest createUserNotification(@NonNull final ModelType document, final UserId recipientUserId) { Check.assumeNotNull(document, "document not null"); // // Get the recipient final UserId recipientUserIdToUse; if (recipientUserId != null) { recipientUserIdToUse = recipientU...
private List<Object> extractEventMessageParams(final ModelType document) { List<Object> params = eventAD_MessageParamsExtractor.apply(document); return params != null ? params : ImmutableList.of(); } private UserId extractRecipientUser(final ModelType document) { final Integer createdBy = InterfaceWrapperHel...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\DocumentUserNotificationsProducer.java
1
请完成以下Java代码
public void setM_TargetDistribution_ID (int M_TargetDistribution_ID) { if (M_TargetDistribution_ID < 1) set_Value (COLUMNNAME_M_TargetDistribution_ID, null); else set_Value (COLUMNNAME_M_TargetDistribution_ID, Integer.valueOf(M_TargetDistribution_ID)); } /** Get Target distribution. @return Get produc...
public static final int REWARDTYPE_AD_Reference_ID=53298; /** Percentage = P */ public static final String REWARDTYPE_Percentage = "P"; /** Flat Discount = F */ public static final String REWARDTYPE_FlatDiscount = "F"; /** Absolute Amount = A */ public static final String REWARDTYPE_AbsoluteAmount = "A"; /** Set...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PromotionReward.java
1
请完成以下Java代码
static boolean load(String path) { trie = new DoubleArrayTrie<String>(); if (loadDat(path + ".bi" + Predefine.BIN_EXT)) return true; TreeMap<String, String> map = new TreeMap<String, String>(); for (String line : IOUtil.readLineListWithLessMemory(path)) { String[]...
{ Predefine.logger.warning("保存失败" + e); return false; } return true; } public static String get(String key) { return trie.get(key); } /** * 获取一个词和另一个词最可能的依存关系 * @param fromWord * @param fromPos * @param toWord * @param toPos ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\bigram\BigramDependencyModel.java
1
请完成以下Java代码
public long executeCount(CommandContext commandContext) { checkQueryOk(); ensureVariablesInitialized(); return commandContext .getExecutionManager() .findExecutionCountByQueryCriteria(this); } @Override @SuppressWarnings("unchecked") public List<Execution> executeList(CommandContext com...
public List<EventSubscriptionQueryValue> getEventSubscriptions() { return eventSubscriptions; } public void setEventSubscriptions(List<EventSubscriptionQueryValue> eventSubscriptions) { this.eventSubscriptions = eventSubscriptions; } public String getIncidentId() { return incidentId; } public...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ExecutionQueryImpl.java
1
请完成以下Java代码
public static class XxlJobAdminProps { /** * 调度中心地址 */ private String address; } @Data public static class XxlJobExecutorProps { /** * 执行器名称 */ private String appName; /** * 执行器 IP */ private String ip;
/** * 执行器端口 */ private int port; /** * 执行器日志 */ private String logPath; /** * 执行器日志保留天数,-1 */ private int logRetentionDays; } }
repos\spring-boot-demo-master\demo-task-xxl-job\src\main\java\com\xkcoding\task\xxl\job\config\props\XxlJobProps.java
1
请完成以下Java代码
public static AttachmentEntryCreateRequest.AttachmentEntryCreateRequestBuilder builderFromByteArray( @NonNull final String fileName, final byte[] data) { return AttachmentEntryCreateRequest.builder() .type(AttachmentEntryType.Data) .filename(fileName) .contentType(MimeType.getMimeType(fileName)) ...
catch (final IOException e) { throw new AdempiereException("Failed reading data from " + resource); } return builder() .type(AttachmentEntryType.Data) .filename(filename) .contentType(contentType) .data(data) .build(); } public static Collection<AttachmentEntryCreateRequest> fromFiles(@...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\attachments\AttachmentEntryCreateRequest.java
1
请完成以下Java代码
void append() { if ((_size % UNIT_SIZE) == 0) { _units.add(0); } ++_size; } /** * 构建 */ void build() { _ranks = new int[_units.size()]; _numOnes = 0; for (int i = 0; i < _units.size(); ++i) { _ranks[i...
/** * 1的数量 * @param unit * @return */ private static int popCount(int unit) { unit = ((unit & 0xAAAAAAAA) >>> 1) + (unit & 0x55555555); unit = ((unit & 0xCCCCCCCC) >>> 2) + (unit & 0x33333333); unit = ((unit >>> 4) + unit) & 0x0F0F0F0F; unit += unit >>> 8; ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\dartsclone\details\BitVector.java
1
请完成以下Java代码
public int getCreatedLUsCount() { return _createdLUs.size(); } @Override public Quantity calculateTotalQtyCU() { final Capacity tuCapacity = getSingleCUPerTU(); return calculateTotalQtyCU(tuCapacity); } private Quantity calculateTotalQtyCU(final Capacity tuCapacity) { Check.assumeNotNull(tuCapacity, "...
return Quantity.infinite(cuUOM); } final BigDecimal qtyLUs = BigDecimal.valueOf(getMaxLUs()); Check.assume(qtyLUs.signum() >= 0, "Valid QtyLUs: {}", qtyLUs); final BigDecimal qtyTUsPerLU = BigDecimal.valueOf(getMaxTUsPerLU_Effective()); Check.assume(qtyTUsPerLU.signum() >= 0, "Valid QtyTUsPerLU: {}", q...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\transfer\impl\LUTUProducerDestination.java
1
请完成以下Java代码
public class Http2ServerResponseHandler extends ChannelDuplexHandler { static final ByteBuf RESPONSE_BYTES = Unpooled.unreleasableBuffer(Unpooled.copiedBuffer("Hello World", CharsetUtil.UTF_8)); @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { su...
Http2Headers headers = new DefaultHttp2Headers().status(HttpResponseStatus.OK.codeAsText()); ctx.write(new DefaultHttp2HeadersFrame(headers).stream(msgHeader.stream())); ctx.write(new DefaultHttp2DataFrame(content, true).stream(msgHeader.stream())); } } else { ...
repos\tutorials-master\server-modules\netty\src\main\java\com\baeldung\netty\http2\server\Http2ServerResponseHandler.java
1
请在Spring Boot框架中完成以下Java代码
class ConnectionFactoryBeanCreationFailureAnalyzer extends AbstractFailureAnalyzer<ConnectionFactoryBeanCreationException> { private final Environment environment; ConnectionFactoryBeanCreationFailureAnalyzer(Environment environment) { this.environment = environment; } @Override protected FailureAnalysis an...
} else { action.append(String.format("\tReview the configuration of %s%n.", cause.getEmbeddedDatabaseConnection())); } action .append("\tIf you have database settings to be loaded from a particular " + "profile you may need to activate it") .append(getActiveProfiles()); return action.toString(); ...
repos\spring-boot-4.0.1\module\spring-boot-r2dbc\src\main\java\org\springframework\boot\r2dbc\autoconfigure\ConnectionFactoryBeanCreationFailureAnalyzer.java
2
请完成以下Java代码
public void setDescription (final @Nullable java.lang.String Description) { set_Value (COLUMNNAME_Description, Description); } @Override public java.lang.String getDescription() { return get_ValueAsString(COLUMNNAME_Description); } @Override public void setIsAccommodationBooking (final boolean IsAccommod...
} @Override public void setR_Status(final org.compiere.model.I_R_Status R_Status) { set_ValueFromPO(COLUMNNAME_R_Status_ID, org.compiere.model.I_R_Status.class, R_Status); } @Override public void setR_Status_ID (final int R_Status_ID) { if (R_Status_ID < 1) set_Value (COLUMNNAME_R_Status_ID, null); e...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Project_User.java
1
请在Spring Boot框架中完成以下Java代码
public class InventoryJobWFActivityHandler implements WFActivityHandler { public static final WFActivityType HANDLED_ACTIVITY_TYPE = WFActivityType.ofString("inventory.inventory"); public static final UIComponentType COMPONENT_TYPE = UIComponentType.ofString("inventory/inventory"); @NonNull private final Mappers ma...
.build()) .build(); } @Override public WFActivityStatus computeActivityState(final WFProcess wfProcess, final WFActivity wfActivity) { return computeActivityState(getInventory(wfProcess)); } public static WFActivityStatus computeActivityState(final Inventory inventory) { return inventory.getDocStatus()...
repos\metasfresh-new_dawn_uat\backend\de.metas.inventory.mobileui\src\main\java\de\metas\inventory\mobileui\rest_api\InventoryJobWFActivityHandler.java
2
请完成以下Java代码
public ResponseEntity<ModelApiResponse> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws RestClientException { Object postBody = null; // verify the required parameter 'petId' is set if (petId == null) { throw new HttpClientErrorException(HttpStatus.BA...
final String[] accepts = { "application/json" }; final List<MediaType> accept = apiClient.selectHeaderAccept(accepts); final String[] contentTypes = { "multipart/form-data" }; final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); ...
repos\tutorials-master\spring-swagger-codegen-modules\spring-openapi-generator-api-client\src\main\java\com\baeldung\petstore\client\api\PetApi.java
1
请在Spring Boot框架中完成以下Java代码
static BigDecimal computeRequiredQty( @NonNull final BigDecimal availableQuantityAfterDemandWasApplied, @NonNull final MinMaxDescriptor minMaxDescriptor) { if (availableQuantityAfterDemandWasApplied.compareTo(minMaxDescriptor.getMin()) >= 0) { return ZERO; } return minMaxDescriptor.getMax().subtract(a...
.type(CandidateType.SUPPLY) .businessCase(null) .businessCaseDetail(null) .materialDescriptor(demandCandidateWithId.getMaterialDescriptor().withQuantity(requiredQty)) //.groupId() // don't assign the new supply candidate to the demand candidate's groupId! it needs to "found" its own group .minMaxDes...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\candidatechange\handler\DemandCandiateHandler.java
2
请完成以下Java代码
public static <TERM> Map<TERM, Double> idfFromTfs(Iterable<Map<TERM, Double>> tfs, boolean smooth, boolean addOne) { return idf(new KeySetIterable<TERM, Double>(tfs), smooth, addOne); } /** * 从词频集合建立倒排频率(默认平滑词频,且加一平滑tf-idf) * * @param tfs 次品集合 * @param <TERM> 词语类型 * @ret...
@Override public Iterator<Iterable<KEY>> iterator() { return new Iterator<Iterable<KEY>>() { @Override public boolean hasNext() { return maps.hasNext(); } @Override ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word\TfIdf.java
1
请在Spring Boot框架中完成以下Java代码
private void setResponsible() { final UserId previousResponsibleId = ManufacturingJobLoaderAndSaver.extractResponsibleId(ppOrder); if (UserId.equals(previousResponsibleId, responsibleId)) { //noinspection UnnecessaryReturnStatement return; } else if (previousResponsibleId != null) { throw new Adem...
final PPOrderBOMLineId orderBOMLineId = planStep.getOrderBOMLineId(); final ArrayList<PPOrderIssueSchedule> bomLineExistingSchedules = new ArrayList<>(allExistingSchedules.removeAll(orderBOMLineId)); bomLineExistingSchedules.sort(Comparator.comparing(PPOrderIssueSchedule::getSeqNo)); for (final PPOrderIssueSc...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\service\commands\create_job\ManufacturingJobCreateCommand.java
2
请完成以下Java代码
public void completed(ActivityExecution execution) throws Exception { // only control flow. no sub instance data available leave(execution); } public CallableElement getCallableElement() { return callableElement; } public void setCallableElement(CallableElement callableElement) { this.callable...
protected CallableElementBinding getBinding() { return getCallableElement().getBinding(); } protected boolean isLatestBinding() { return getCallableElement().isLatestBinding(); } protected boolean isDeploymentBinding() { return getCallableElement().isDeploymentBinding(); } protected boolean i...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\behavior\CallableElementActivityBehavior.java
1
请完成以下Java代码
public void setShipperId(@NonNull final I_C_Order order) { order.setM_Shipper_ID(ShipperId.toRepoId(findShipperId(order))); } private ShipperId findShipperId(@NonNull final I_C_Order orderRecord) { final Optional<ShipperId> dropShipShipperId = getDropShipAddressShipperId(orderRecord); return dropShipShipperI...
final BigDecimal grandTotal = order.getGrandTotal(); return Money.of(grandTotal, CurrencyId.ofRepoId(order.getC_Currency_ID())); } @Override public void save(final I_C_Order order) { orderDAO.save(order); } @Override public void syncDatesFromTransportOrder(@NonNull final OrderId orderId, @NonNull final I_M...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\impl\OrderBL.java
1
请完成以下Java代码
public String get() { return "get.html"; } @PostRoute("/route-example") public String post() { return "post.html"; } @PutRoute("/route-example") public String put() { return "put.html"; } @DeleteRoute("/route-example") public String delete() { retur...
@Route(value = "/triggerBaeldungException") public void triggerBaeldungException() throws BaeldungException { throw new BaeldungException("Foobar Exception to threat differently"); } @Route(value = "/user/foo") public void urlCoveredByNarrowedWebhook(Response response) { response.text("...
repos\tutorials-master\web-modules\blade\src\main\java\com\baeldung\blade\sample\RouteExampleController.java
1
请完成以下Java代码
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((symbol == null) ? 0 : symbol.hashCode()); result = prime * result + ((ts == null) ? 0 : ts.hashCode()); long temp; temp = Double.doubleToLongBits(value); result = prime * res...
return false; } else if (!symbol.equals(other.symbol)) return false; if (ts == null) { if (other.ts != null) return false; } else if (!ts.equals(other.ts)) return false; if (Double.doubleToLongBits(value) != Double.doubleToLongBits(othe...
repos\tutorials-master\web-modules\ratpack\src\main\java\com\baeldung\model\Quote.java
1
请完成以下Java代码
public static long getSerialversionuid() { return serialVersionUID; } public String getId() { return id; } public String getProcessDefinitionId() { return processDefinitionId; } public boolean isOnlyTimers() { return onlyTimers; } public boolean isOnly...
return duedateHigherThanOrEqual; } public Date getDuedateLowerThanOrEqual() { return duedateLowerThanOrEqual; } public boolean isNoRetriesLeft() { return noRetriesLeft; } public boolean isOnlyLocked() { return onlyLocked; } public boolean isOnlyUnlocked() { ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\JobQueryImpl.java
1
请完成以下Java代码
public void process(Record<K, V> record) { Headers headers = record.headers(); Container<K, V> container = new Container<>(context(), record.key(), record.value(), record); this.headerExpressions.forEach((name, expression) -> { Object headerValue = expression.getValue(container); if (headerValue instanceof ...
this.record = record; } public ProcessorContext<K, V> getContext() { return this.context; } public K getKey() { return this.key; } public V getValue() { return this.value; } public Record<K, V> getRecord() { return this.record; } } }
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\streams\HeaderEnricherProcessor.java
1
请完成以下Java代码
public int getQtyTU() { return qtyTU; } @Override public String getTUName() { return tuName; } @Override public IHandlingUnitsInfo add(@Nullable final IHandlingUnitsInfo infoToAdd) { if (infoToAdd == null) { return this; // shall not happen
} final String tuName = getTUName(); if (!tuName.equals(infoToAdd.getTUName())) { throw new AdempiereException("TU Names are not matching." + "\n This: " + this + "\n Other: " + infoToAdd); } final int qtyTU = getQtyTU(); final int qtyTU_ToAdd = infoToAdd.getQtyTU(); final int qtyTU_New = q...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\impl\PlainHandlingUnitsInfo.java
1
请完成以下Java代码
protected final String formatObject(final Object obj) { final ITableRecordReference modelRef = extractTableRecordReferenceOrNull(obj); if (modelRef != null) { try { return formatTableRecordReference(modelRef); } catch (final Exception e) { logger.warn("Failed formatting: {}", modelRef, e);...
// Extract the TableRecordReference from Map. // Usually that's the case when the parameters were deserialized and the the TableRecordRefererence was deserialized as Map. if(obj instanceof Map) { final Map<?, ?> map = (Map<?, ?>)obj; return TableRecordReference.ofMapOrNull(map); } return null; } pro...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\EventMessageFormatTemplate.java
1
请在Spring Boot框架中完成以下Java代码
public class LiquibaseConfiguration { private final Logger log = LoggerFactory.getLogger(LiquibaseConfiguration.class); private final Environment env; private final CacheManager cacheManager; public LiquibaseConfiguration(Environment env, CacheManager cacheManager) { this.env = env; ...
SpringLiquibase liquibase = new AsyncSpringLiquibase(taskExecutor, env); liquibase.setDataSource(dataSource); liquibase.setChangeLog("classpath:config/liquibase/master.xml"); liquibase.setContexts(liquibaseProperties.getContexts()); liquibase.setDefaultSchema(liquibaseProperties.getDefau...
repos\tutorials-master\jhipster-modules\jhipster-uaa\gateway\src\main\java\com\baeldung\jhipster\gateway\config\LiquibaseConfiguration.java
2
请完成以下Java代码
public void setDescription(final java.lang.String Description) { set_Value(COLUMNNAME_Description, Description); } /** * Get Beschreibung. * * @return Beschreibung */ @Override public java.lang.String getDescription() { return (java.lang.String)get_Value(COLUMNNAME_Description); } /** * Set DLM...
* Default value */ @Override public void setIsDefault(final boolean IsDefault) { set_Value(COLUMNNAME_IsDefault, Boolean.valueOf(IsDefault)); } /** * Get Standard. * * @return Default value */ @Override public boolean isDefault() { final Object oo = get_Value(COLUMNNAME_IsDefault); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java-gen\de\metas\dlm\model\X_DLM_Partition_Config.java
1
请完成以下Java代码
class MariaDbR2dbcDockerComposeConnectionDetailsFactory extends DockerComposeConnectionDetailsFactory<R2dbcConnectionDetails> { MariaDbR2dbcDockerComposeConnectionDetailsFactory() { super("mariadb", "io.r2dbc.spi.ConnectionFactoryOptions"); } @Override protected R2dbcConnectionDetails getDockerComposeConnecti...
"mariadb", 3306); private final ConnectionFactoryOptions connectionFactoryOptions; MariaDbR2dbcDockerComposeConnectionDetails(RunningService service) { super(service); MariaDbEnvironment environment = new MariaDbEnvironment(service.env()); this.connectionFactoryOptions = connectionFactoryOptionsBuilder.b...
repos\spring-boot-4.0.1\module\spring-boot-r2dbc\src\main\java\org\springframework\boot\r2dbc\docker\compose\MariaDbR2dbcDockerComposeConnectionDetailsFactory.java
1
请在Spring Boot框架中完成以下Java代码
public final class AuthenticatedPrincipalServerOAuth2AuthorizedClientRepository implements ServerOAuth2AuthorizedClientRepository { private final AuthenticationTrustResolver authenticationTrustResolver = new AuthenticationTrustResolverImpl(); private final ReactiveOAuth2AuthorizedClientService authorizedClientSer...
Authentication principal, ServerWebExchange exchange) { if (this.isPrincipalAuthenticated(principal)) { return this.authorizedClientService.loadAuthorizedClient(clientRegistrationId, principal.getName()); } return this.anonymousAuthorizedClientRepository.loadAuthorizedClient(clientRegistrationId, principal, ex...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\web\server\AuthenticatedPrincipalServerOAuth2AuthorizedClientRepository.java
2
请完成以下Java代码
public static BigDecimal zeroToNull(@Nullable final BigDecimal value) { return value != null && value.signum() != 0 ? value : null; } public static boolean equalsByCompareTo(@Nullable final BigDecimal value1, @Nullable final BigDecimal value2) { //noinspection NumberEquality return (value1 == value2) || (val...
{ return value; } } return 0; } @NonNull public static BigDecimal roundTo5Cent(@NonNull final BigDecimal initialValue) { final BigDecimal multiplyBy20 = initialValue.multiply(TWENTY); final BigDecimal intPart = multiplyBy20.setScale(0, RoundingMode.HALF_UP); return intPart.divide(TWENTY); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\NumberUtils.java
1
请完成以下Java代码
public int getTimerJobCount() { return timerJobCount; } public void setTimerJobCount(int timerJobCount) { this.timerJobCount = timerJobCount; } public int getSuspendedJobCount() { return suspendedJobCount; } public void setSuspendedJobCount(int suspendedJobCount) { ...
//toString ///////////////////////////////////////////////////////////////// public String toString() { if (isProcessInstanceType()) { return "ProcessInstance[" + getId() + "]"; } else { StringBuilder strb = new StringBuilder(); if (isScope) { str...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ExecutionEntityImpl.java
1
请在Spring Boot框架中完成以下Java代码
static class CommonsDbcp2PoolDataSourceMetadataProviderConfiguration { @Bean DataSourcePoolMetadataProvider commonsDbcp2PoolDataSourceMetadataProvider() { return (dataSource) -> { BasicDataSource dbcpDataSource = DataSourceUnwrapper.unwrap(dataSource, BasicDataSourceMXBean.class, BasicDataSource.class...
return (dataSource) -> { PoolDataSource ucpDataSource = DataSourceUnwrapper.unwrap(dataSource, PoolDataSource.class); if (ucpDataSource != null) { return new OracleUcpDataSourcePoolMetadata(ucpDataSource); } return null; }; } } static class HikariDataSourcePoolMetadataRuntimeHints implemen...
repos\spring-boot-4.0.1\module\spring-boot-jdbc\src\main\java\org\springframework\boot\jdbc\autoconfigure\DataSourcePoolMetadataProvidersConfiguration.java
2