instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public void onMessage(String message, @PathParam(value = "userId") String userId) { if(!"ping".equals(message) && !WebsocketConst.CMD_CHECK.equals(message)){ log.debug("【系统 WebSocket】收到客户端消息:" + message); }else{ log.debug("【系统 WebSocket】收到客户端消息:" + message); // 代码逻辑说明...
jeecgRedisClient.sendMessage(WebSocket.REDIS_TOPIC_NAME, baseMap); } /** * 此为单点消息 redis * * @param userId * @param message */ public void sendMessage(String userId, String message) { BaseMap baseMap = new BaseMap(); baseMap.put("userId", userId); baseMap.put...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\message\websocket\WebSocket.java
1
请完成以下Java代码
public void onC_DocType_ID(final I_SAP_GLJournal glJournal) { final IDocumentNoInfo documentNoInfo = documentNoBuilderFactory .createPreliminaryDocumentNoBuilder() .setNewDocType(DocTypeId.optionalOfRepoId(glJournal.getC_DocType_ID()) .map(docTypeBL::getById) .orElse(null)) .setOldDocumentNo(...
@Nullable private BigDecimal computeCurrencyRate(final I_SAP_GLJournal glJournal) { // // Extract data from source Journal final CurrencyId currencyId = CurrencyId.ofRepoIdOrNull(glJournal.getC_Currency_ID()); if (currencyId == null) { // not set yet return null; } final CurrencyId acctCurrencyId...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\gljournal_sap\callout\SAP_GLJournal.java
1
请完成以下Java代码
public String getDerivedFrom() { return derivedFrom; } @Override public void setDerivedFrom(String derivedFrom) { this.derivedFrom = derivedFrom; } @Override public String getDerivedFromRoot() { return derivedFromRoot; } @Override public void setDerivedFrom...
public String getParentDeploymentId() { return parentDeploymentId; } @Override public void setParentDeploymentId(String parentDeploymentId) { this.parentDeploymentId = parentDeploymentId; } // common methods ////////////////////////////////////////////////////////// @Override ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\DeploymentEntityImpl.java
1
请在Spring Boot框架中完成以下Java代码
public static BPRelationId ofRepoId(final int repoId) { return new BPRelationId(repoId); } @Nullable public static BPRelationId ofRepoIdOrNull(@Nullable final Integer repoId) { return repoId != null && repoId > 0 ? new BPRelationId(repoId) : null; } @Nullable public static BPRelationId ofRepoIdOrNull(fina...
public static int toRepoIdOr(@Nullable final BPRelationId bpartnerId, final int defaultValue) { return bpartnerId != null ? bpartnerId.getRepoId() : defaultValue; } private BPRelationId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "C_BP_Relation_ID"); } @JsonValue public int toJson...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\service\BPRelationId.java
2
请在Spring Boot框架中完成以下Java代码
public List<JobEntity> findExpiredJobs(List<String> enabledCategories, Page page) { Map<String, Object> params = new HashMap<>(); params.put("jobExecutionScope", jobServiceConfiguration.getJobExecutionScope()); Date now = jobServiceConfiguration.getClock().getCurrentTime(); params.put("n...
params.put("lockExpirationTime", lockExpirationTime); bulkUpdateEntities("updateJobLocks", params, "jobs", jobEntities); } @Override public void resetExpiredJob(String jobId) { Map<String, Object> params = new HashMap<>(2); params.put("id", jobId); params.put("now", jobServ...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\persistence\entity\data\impl\MybatisJobDataManager.java
2
请完成以下Spring Boot application配置
#datasource spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver # //------------- MYSQL DB -------------------- spring.datasource.url = jdbc:mysql://localhost:3306/employeecrud?useSSL=false&serverTimezone=UTC&AllowPublicKeyRetrieval=True spring.datasource.username=root spring.datasource.password=posilka2020 #...
alect = org.hibernate.dialect.MySQL5InnoDBDialect spring.jpa.hibernate.ddl-auto=update logging.level.org.hibernate.sql = DEBUG logging.level.org.hibernate.type = TRACE server.port=8080
repos\SpringBoot-Projects-FullStack-master\Part-9.SpringBoot-React-Projects\Project-1.SpringBoot-React-CRUD\fullstack\backend\src\main\resources\application.properties
2
请完成以下Java代码
class HeaderWriterResponse extends OnCommittedResponseWrapper { private final HttpServletRequest request; HeaderWriterResponse(HttpServletRequest request, HttpServletResponse response) { super(response); this.request = request; } @Override protected void onResponseCommitted() { writeHeaders(); ...
static class HeaderWriterRequestDispatcher implements RequestDispatcher { private final RequestDispatcher delegate; private final HeaderWriterResponse response; HeaderWriterRequestDispatcher(RequestDispatcher delegate, HeaderWriterResponse response) { this.delegate = delegate; this.response = response; ...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\header\HeaderWriterFilter.java
1
请完成以下Java代码
public Set<Map.Entry<String, PairFrequency>> getBiGram() { return triePair.entrySet(); } /** * 获取三阶共现 * @return */ public Set<Map.Entry<String, TriaFrequency>> getTriGram() { return trieTria.entrySet(); } // public static void main(String[] args) // { // ...
// "语言要求:英语要求是熟练,基本上能阅读国外专业书刊;\n" + // "必须掌握计算机相关知识,熟练使用仿真工具MATLAB等,必须会一门编程语言。\n" + // "\n" + // "2研究方向\n" + // "视频算法工程师、图像处理算法工程师、音频算法工程师 通信基带算法工程师\n" + /...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\occurrence\Occurrence.java
1
请在Spring Boot框架中完成以下Java代码
public String sum(float number1, float number2) { HttpRequest<String> req = HttpRequest.GET("/math/sum/" + number1 + "/" + number2); return Single.fromPublisher(httpClient.retrieve(req)) .blockingGet(); } public String subtract(float number1, float number2) { HttpRequest<Str...
.blockingGet(); } public String divide(float number1, float number2) { HttpRequest<String> req = HttpRequest.GET("/math/divide/" + number1 + "/" + number2); return Single.fromPublisher(httpClient.retrieve(req)) .blockingGet(); } public String memory() { HttpRequ...
repos\tutorials-master\microservices-modules\micronaut\src\main\java\com\baeldung\micronaut\vs\springboot\client\ArithmeticClientImpl.java
2
请完成以下Java代码
public void completeSetup() { userDetailsService = applicationContext.getBean(CustomUserDetailsService.class); } @Bean public UserDetailsManager users(HttpSecurity http) throws Exception { AuthenticationManagerBuilder authenticationManagerBuilder = http.getSharedObject(AuthenticationManager...
return http.build(); } @Bean public DaoAuthenticationProvider authenticationProvider() { final DaoAuthenticationProvider authProvider = new DaoAuthenticationProvider(); authProvider.setUserDetailsService(userDetailsService); authProvider.setPasswordEncoder(encoder()); return...
repos\tutorials-master\spring-security-modules\spring-security-web-boot-3\src\main\java\com\baeldung\relationships\SpringSecurityConfig.java
1
请在Spring Boot框架中完成以下Java代码
public class EmailServer { @Value("${email.smtp.server}") private String server; @Value("${email.smtp.port}") private Integer port; @Value("${email.smtp.username}") private String username; public String getServer() { return server; } public void setServer(String server)...
public Integer getPort() { return port; } public void setPort(Integer port) { this.port = port; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } }
repos\spring-boot-master\spring-boot-externalize-config-2\src\main\java\com\mkyong\global\EmailServer.java
2
请在Spring Boot框架中完成以下Java代码
public class GoogleOpenIdConnectConfig { @Value("${google.clientId}") private String clientId; @Value("${google.clientSecret}") private String clientSecret; @Value("${google.accessTokenUri}") private String accessTokenUri; @Value("${google.userAuthorizationUri}") private String userAu...
details.setClientId(clientId); details.setClientSecret(clientSecret); details.setAccessTokenUri(accessTokenUri); details.setUserAuthorizationUri(userAuthorizationUri); details.setScope(Arrays.asList("openid", "email")); details.setPreEstablishedRedirectUri(redirectUri); d...
repos\tutorials-master\spring-security-modules\spring-security-legacy-oidc\src\main\java\com\baeldung\openid\oidc\GoogleOpenIdConnectConfig.java
2
请完成以下Java代码
public Graph toGraph() { Graph graph = new Graph(getVertexesLineFirst()); for (int row = 0; row < vertexes.length - 1; ++row) { List<Vertex> vertexListFrom = vertexes[row]; for (Vertex from : vertexListFrom) { assert from.realWord.length()...
*/ public void clear() { for (List<Vertex> vertexList : vertexes) { vertexList.clear(); } size = 0; } /** * 清理from属性 */ public void clean() { for (List<Vertex> vertexList : vertexes) { for (Vertex vertex : vertexL...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\common\WordNet.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isRouteFilterCacheEnabled() { return routeFilterCacheEnabled; } public void setRouteFilterCacheEnabled(boolean routeFilterCacheEnabled) { this.routeFilterCacheEnabled = routeFilterCacheEnabled; } public List<RouteDefinition> getRoutes() { return routes; } public void setRoutes(List<RouteDe...
return failOnRouteDefinitionError; } public void setFailOnRouteDefinitionError(boolean failOnRouteDefinitionError) { this.failOnRouteDefinitionError = failOnRouteDefinitionError; } public String getTrustedProxies() { return trustedProxies; } public void setTrustedProxies(String trustedProxies) { this.tru...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\config\GatewayProperties.java
2
请完成以下Java代码
public class OmsOrderSetting implements Serializable { private Long id; @ApiModelProperty(value = "秒杀订单超时关闭时间(分)") private Integer flashOrderOvertime; @ApiModelProperty(value = "正常订单超时时间(分)") private Integer normalOrderOvertime; @ApiModelProperty(value = "发货后自动确认收货时间(天)") private Integer ...
public void setFinishOvertime(Integer finishOvertime) { this.finishOvertime = finishOvertime; } public Integer getCommentOvertime() { return commentOvertime; } public void setCommentOvertime(Integer commentOvertime) { this.commentOvertime = commentOvertime; } @Override...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\OmsOrderSetting.java
1
请完成以下Java代码
public void setSKU (java.lang.String SKU) { set_Value (COLUMNNAME_SKU, SKU); } /** Get SKU. @return Stock Keeping Unit */ @Override public java.lang.String getSKU () { return (java.lang.String)get_Value(COLUMNNAME_SKU); } /** Set UPC/EAN. @param UPC Bar Code (Universal Product Code or its super...
if (ii == null) return 0; return ii.intValue(); } @Override public org.compiere.model.I_C_ElementValue getUser2() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_User2_ID, org.compiere.model.I_C_ElementValue.class); } @Override public void setUser2(org.compiere.model.I_C_ElementValue User2) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_GLJournal.java
1
请完成以下Java代码
public int bosTag() { return tagSet.size(); } public TagSet tagSet; /** * 是否允许新增特征 */ public boolean mutable; public FeatureMap(TagSet tagSet) { this(tagSet, false); } public FeatureMap(TagSet tagSet, boolean mutable) { this.tagSet = tagSet; ...
{ out.writeUTF(entry.getKey()); } } @Override public boolean load(ByteArray byteArray) { loadTagSet(byteArray); int size = byteArray.nextInt(); for (int i = 0; i < size; i++) { idOf(byteArray.nextUTF()); } return true; ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\perceptron\feature\FeatureMap.java
1
请完成以下Java代码
private static String getSmsSignName(DySmsEnum dySmsEnum) { JeecgSmsTemplateConfig baseConfig = SpringContextUtils.getBean(JeecgSmsTemplateConfig.class); String signName = dySmsEnum.getSignName(); if (StringUtils.isNotEmpty(baseConfig.getSignature())) { logger.debug("yml中读取签名名称: {}"...
} /** * 从JSONObject中提取模板参数(按原始顺序) * * @param templateParamJson 模板参数 */ private static String[] extractTemplateParams(JSONObject templateParamJson) { if (templateParamJson == null || templateParamJson.isEmpty()) { return new String[0]; } List<String> param...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\TencentSms.java
1
请完成以下Spring Boot application配置
spring.datasource.url=jdbc:sqlite:dev.db spring.datasource.driver-class-name=org.sqlite.JDBC spring.datasource.username= spring.datasource.password= spring.jackson.deserialization.UNWRAP_ROOT_VALUE=true image.default=https://static.productionready.io/images/smiley-cyrus.jpg jwt.secret=nRvyYC4soFxBdZ-F-5Nnzz5USXstR1Yy...
s=true mybatis.type-handlers-package=io.spring.infrastructure.mybatis mybatis.mapper-locations=mapper/*.xml logging.level.io.spring.infrastructure.mybatis.readservice.ArticleReadService=DEBUG logging.level.io.spring.infrastructure.mybatis.mapper=DEBUG
repos\spring-boot-realworld-example-app-master\src\main\resources\application.properties
2
请完成以下Java代码
public ImmutableSet<String> getFieldNames() { return map.keySet(); } public Comparable<?> getAsComparable( @NonNull final String fieldName, @NonNull final JSONOptions jsonOpts) { final Object valueObj = map.get(fieldName); if (JSONNullValue.isNull(valueObj)) { return null; } else if (valueObj...
else { return NumberUtils.asInt(valueObj, defaultValueIfNotFoundOrError); } } public BigDecimal getAsBigDecimal(@NonNull final String fieldName, final BigDecimal defaultValueIfNotFoundOrError) { final Object valueObj = map.get(fieldName); if (JSONNullValue.isNull(valueObj)) { return defaultValueIfN...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ViewRowFieldNameAndJsonValues.java
1
请在Spring Boot框架中完成以下Java代码
public class DemoController { @Autowired private UserServiceFeignClient userClient; @GetMapping("/get") public String get(@RequestParam("id") Integer id) { // 请求 UserGetRequest request = new UserGetRequest(); request.setId(id); // 执行 Web Services 请求 UserGetRespo...
@GetMapping("/create") // 为了方便测试,实际使用 @PostMapping public Integer create(@RequestParam("name") String name, @RequestParam("gender") Integer gender) { // 请求 UserCreateRequest request = new UserCreateRequest(); request.setName(name); request.setGender(gender);...
repos\SpringBoot-Labs-master\lab-65\lab-65-ws-feign-client\src\main\java\cn\iocoder\springboot\lab65\demo\controller\DemoController.java
2
请在Spring Boot框架中完成以下Java代码
public class ShipmentScheduleAndJobScheduleId implements Comparable<ShipmentScheduleAndJobScheduleId> { @NonNull ShipmentScheduleId shipmentScheduleId; @Nullable PickingJobScheduleId jobScheduleId; @Nullable public static ShipmentScheduleAndJobScheduleId ofRepoIdsOrNull(final int shipmentScheduleRepoId, final int...
try { final int idx = json.indexOf("_"); if (idx > 0) { return of( ShipmentScheduleId.ofRepoId(Integer.parseInt(json.substring(0, idx))), PickingJobScheduleId.ofRepoId(Integer.parseInt(json.substring(idx + 1))) ); } else { return of( ShipmentScheduleId.ofRepoId(Integer....
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\picking\api\ShipmentScheduleAndJobScheduleId.java
2
请完成以下Java代码
public class Alphabet implements ICacheAble { ITrie<Integer> trie; String[] idToLabelMap; public Alphabet() { trie = new DoubleArrayTrie<Integer>(); } /** * id转label * @param id * @return */ public String labelOf(int id) { return idToLabelMap[id]; ...
public Integer idOf(String label) { return trie.get(label); } /** * 字母表大小 * @return */ public int size() { return trie.size(); } public void save(DataOutputStream out) throws Exception { out.writeInt(idToLabelMap.length); for (String value...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dependency\nnparser\Alphabet.java
1
请完成以下Java代码
public Map<String, Map<String, Link>> links(ServerWebExchange exchange) { String requestUri = UriComponentsBuilder.fromUri(exchange.getRequest().getURI()) .replaceQuery(null) .toUriString(); Map<String, Link> links = WebFluxEndpointHandlerMapping.this.linksResolver.resolveLinks(requestUri); return Oper...
static class WebFluxEndpointHandlerMappingRuntimeHints implements RuntimeHintsRegistrar { private final ReflectiveRuntimeHintsRegistrar reflectiveRegistrar = new ReflectiveRuntimeHintsRegistrar(); private final BindingReflectionHintsRegistrar bindingRegistrar = new BindingReflectionHintsRegistrar(); @Override ...
repos\spring-boot-4.0.1\module\spring-boot-webflux\src\main\java\org\springframework\boot\webflux\actuate\endpoint\web\WebFluxEndpointHandlerMapping.java
1
请在Spring Boot框架中完成以下Java代码
private ImmutableSet<DDOrderMoveScheduleId> getScheduleIds(final DistributionJob job) { return job.streamSteps() .filter(this::isStepEligible) .map(DistributionJobStep::getScheduleId) .collect(ImmutableSet.toImmutableSet()); } private boolean isStepEligible(final DistributionJobStep step) { if (onl...
private DistributionJob updateJob(final DistributionJob job, final ImmutableMap<DistributionJobStepId, DDOrderMoveSchedule> schedulesByStepId) { return job.withChangedSteps(step -> { final DDOrderMoveSchedule schedule = schedulesByStepId.get(step.getId()); return schedule != null ? DistributionJobLoader.t...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\job\service\commands\drop_to\DistributionJobDropToCommand.java
2
请完成以下Java代码
public void add(final CacheKey ignored, @NonNull final DataItem dataItem) { add(dataItem); } public void add(@NonNull final DataItem dataItem) { final DataItemId dataItemId = extractDataItemId(dataItem); final Collection<CacheKey> cacheKeys = extractCacheKeys(dataItem); final Collection<TableRecordReferenc...
final DataItemId dataItemId = extractDataItemId(dataItem); final Collection<TableRecordReference> recordRefs = extractRecordRefs(dataItem); removeDataItemId(dataItemId, cacheKey, recordRefs); } private synchronized void removeDataItemId( final DataItemId dataItemId, final CacheKey cacheKey, final Colle...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\CacheIndex.java
1
请完成以下Java代码
public class AtomLink { private String method; private String href; private String rel; public AtomLink() { } public AtomLink(String rel, String href, String method) { this.href = href; this.rel = rel; this.method = method; } public String getHref() { return href; } publ...
return rel; } public void setRel(String rel) { this.rel = rel; } public String getMethod() { return method; } public void setMethod(String method) { this.method = method; } }
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\AtomLink.java
1
请完成以下Java代码
class UPCProductBarcodeFilterDataFactory implements ProductBarcodeFilterDataFactory { @Override public Optional<ProductBarcodeFilterData> createData( final @NonNull ProductBarcodeFilterServicesFacade services, final @NonNull String barcodeParam, final @NonNull ClientId clientId) { Check.assumeNotEmpty(bar...
if (!ediProductLookupList.isEmpty()) { for (final ResolvedScannedProductCode ediProductLookup : ediProductLookupList) { final ICompositeQueryFilter<I_M_Packageable_V> filter = resultFilter.addCompositeQueryFilter() .setJoinAnd() .addEqualsFilter(I_M_Packageable_V.COLUMNNAME_M_Product_ID, ediProd...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\packageable\filters\UPCProductBarcodeFilterDataFactory.java
1
请在Spring Boot框架中完成以下Java代码
public class ApiKeyAuthenticationToken extends AbstractAuthenticationToken { @Serial private static final long serialVersionUID = 2978710889397403536L; private ApiKeyAuthRequest apiKeyAuthRequest; private SecurityUser securityUser; public ApiKeyAuthenticationToken(ApiKeyAuthRequest apiKeyAuthRequ...
} @Override public Object getCredentials() { return apiKeyAuthRequest; } @Override public Object getPrincipal() { return this.securityUser; } @Override public void eraseCredentials() { super.eraseCredentials(); this.apiKeyAuthRequest = null; } }
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\security\auth\pat\ApiKeyAuthenticationToken.java
2
请在Spring Boot框架中完成以下Java代码
public class RpMicroSubmitRecordServiceImpl implements RpMicroSubmitRecordService { @Autowired private RpMicroSubmitRecordDao rpMicroSubmitRecordDao; @Autowired private RpTradePaymentRecordDao rpTradePaymentRecordDao; private static final Logger LOG = LoggerFactory.getLogger(RpMicroSubmitRecordSe...
@Override public Map<String, Object> microSubmit(RpMicroSubmitRecord rpMicroSubmitRecord) { rpMicroSubmitRecord.setBusinessCode(StringUtil.get32UUID()); rpMicroSubmitRecord.setIdCardValidTime("[\"" + rpMicroSubmitRecord.getIdCardValidTimeBegin() + "\",\"" + rpMicroSubmitRecord.getIdCardValidTimeEnd(...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\service\impl\RpMicroSubmitRecordServiceImpl.java
2
请完成以下Java代码
final ExecutorService getExecutor() { return this.executor; } } /** * Client configuration for remote update and restarts. */ @Configuration(proxyBeanMethods = false) @ConditionalOnBooleanProperty(name = "spring.devtools.remote.restart.enabled", matchIfMissing = true) static class RemoteRestartClientCon...
private FileSystemWatcher newFileSystemWatcher() { Restart restartProperties = this.properties.getRestart(); FileSystemWatcher watcher = new FileSystemWatcher(true, restartProperties.getPollInterval(), restartProperties.getQuietPeriod()); String triggerFile = restartProperties.getTriggerFile(); if (Str...
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\remote\client\RemoteClientConfiguration.java
1
请在Spring Boot框架中完成以下Java代码
public class HCURR1 { @XmlElement(name = "DOCUMENTID", required = true) protected String documentid; @XmlElement(name = "CURRENCYQUAL", required = true) protected String currencyqual; @XmlElement(name = "CURRENCYCODE", required = true) protected String currencycode; @XmlElement(name = "CURR...
public void setCURRENCYQUAL(String value) { this.currencyqual = value; } /** * Gets the value of the currencycode property. * * @return * possible object is * {@link String } * */ public String getCURRENCYCODE() { return currencycode; } ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\HCURR1.java
2
请在Spring Boot框架中完成以下Java代码
public class RelatedDocumentsTargetWindow { public static RelatedDocumentsTargetWindow ofAdWindowId(@NonNull final AdWindowId adWindowId) { return new RelatedDocumentsTargetWindow(adWindowId, null); } public static RelatedDocumentsTargetWindow ofAdWindowIdAndCategory( @NonNull final AdWindowId adWindowId, ...
@Nullable final String category) { return new RelatedDocumentsTargetWindow(adWindowId, category); } AdWindowId adWindowId; String category; private RelatedDocumentsTargetWindow( @NonNull final AdWindowId adWindowId, @Nullable final String category) { this.adWindowId = adWindowId; this.category = Str...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\references\related_documents\RelatedDocumentsTargetWindow.java
2
请完成以下Java代码
public int getPageNum() { return pageNum; } public void setPageNum(int pageNum) { this.pageNum = pageNum; } public int getPageSize() { return pageSize; } public void setPageSize(int pageSize) { this.pageSize = pageSize; } public long getTotal() { ...
return isLastPage; } public void setIsLastPage(boolean isLastPage) { this.isLastPage = isLastPage; } @Override public String toString() { final StringBuffer sb = new StringBuffer("PageInfo{"); sb.append("pageNum=").append(pageNum); sb.append(", pageSize=").append(pa...
repos\spring-boot-student-master\spring-boot-student-drools\src\main\java\com\xiaolyuh\page\PageInfo.java
1
请完成以下Java代码
public class JsonAlbertaCareGiver { @ApiModelProperty(position = 10) private String caregiverIdentifier; @ApiModelProperty(position = 20) @Nullable private String type; @ApiModelProperty(hidden = true) private boolean typeSet; @ApiModelProperty(position = 30) @Nullable private Boolean isLegalCarer; @ApiM...
public void setCaregiverIdentifier(@NonNull final String caregiverIdentifier) { this.caregiverIdentifier = caregiverIdentifier; } public void setType(@Nullable final String type) { this.type = type; this.typeSet = true; } public void setIsLegalCarer(@Nullable final Boolean isLegalCarer) { this.isLegalC...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-bpartner\src\main\java\de\metas\common\bpartner\v2\request\alberta\JsonAlbertaCareGiver.java
1
请在Spring Boot框架中完成以下Java代码
public void setDocumentNo (final java.lang.String DocumentNo) { set_Value (COLUMNNAME_DocumentNo, DocumentNo); } @Override public java.lang.String getDocumentNo() { return get_ValueAsString(COLUMNNAME_DocumentNo); } @Override public void setIsClosed (final boolean IsClosed) { set_Value (COLUMNNAME_IsC...
{ return get_ValueAsBoolean(COLUMNNAME_IsClosed); } @Override public void setOpeningNote (final @Nullable java.lang.String OpeningNote) { set_Value (COLUMNNAME_OpeningNote, OpeningNote); } @Override public java.lang.String getOpeningNote() { return get_ValueAsString(COLUMNNAME_OpeningNote); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java-gen\de\metas\pos\repository\model\X_C_POS_Journal.java
2
请完成以下Java代码
public String getName() { return name; } public Set<Book> getBooks() { return books; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; }
Author author = (Author) o; return Objects.equals(id, author.id) && Objects.equals(name, author.name) && Objects.equals(books, author.books); } @Override public int hashCode() { return Objects.hash(id, name, books); } @Override public String toString() { return "Author{" + "name='" + name + '\'' + '}'...
repos\spring-data-examples-main\jdbc\graalvm-native\src\main\java\example\springdata\jdbc\graalvmnative\model\Author.java
1
请在Spring Boot框架中完成以下Java代码
class SecurityConfig { private static final String[] AUTH_WHITELIST = { "/swagger-resources/**", "/swagger-ui/**", "/swagger-ui.html", "/v3/api-docs/**", "/h2-console/**", "/webjars/**", "/favicon.ico", "/static/**", "/signup/**", "/er...
} @Bean JwtDecoder jwtDecoder(@Value("${spring.security.oauth2.client.provider.oidc.issuer-uri}") String issuerUri) { return JwtDecoders.fromOidcIssuerLocation(issuerUri); } @Bean public GrantedAuthoritiesMapper userAuthoritiesMapper() { return authorities -> authorities.stream().f...
repos\spring-boot-web-application-sample-master\main-app\main-webapp\src\main\java\gt\app\config\security\SecurityConfig.java
2
请完成以下Java代码
public int filterOrder() { return 0; } @Override public boolean shouldFilter() { return true; } @Override public Object run() throws ZuulException { RequestContext context = RequestContext.getCurrentContext(); try (final InputStream responseDataStream = context...
logger.info("BODY: {}", ""); return null; } String responseData = CharStreams.toString(new InputStreamReader(responseDataStream, "UTF-8")); logger.info("BODY: {}", responseData); context.setResponseBody(responseData); } catch (Exception e...
repos\tutorials-master\spring-cloud-modules\spring-cloud-zuul\spring-zuul-post-filter\src\main\java\com\baeldung\filters\ResponseLogFilter.java
1
请完成以下Java代码
public BigDecimal getQtyEnteredTU() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyEnteredTU); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyOrdered (final BigDecimal QtyOrdered) { set_Value (COLUMNNAME_QtyOrdered, QtyOrdered); } @Override public BigDecimal getQty...
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyProcessed); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyToProcess (final BigDecimal QtyToProcess) { set_Value (COLUMNNAME_QtyToProcess, QtyToProcess); } @Override public BigDecimal getQtyToProcess() { final BigDecimal...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_DD_Order_Candidate.java
1
请完成以下Java代码
public void addLastClean(PropertySource<?> propertySource) { envCopy.addLast(propertySource); super.addLast(propertySource); } /** {@inheritDoc} */ @Override public void addBefore(String relativePropertySourceName, PropertySource<?> propertySource) { envCopy.addBefore(relativePr...
@Override public void replace(String name, PropertySource<?> propertySource) { envCopy.replace(name, propertySource); super.replace(name, makeEncryptable(propertySource)); } /** {@inheritDoc} */ @Override public PropertySource<?> remove(String name) { envCopy.remove(name); ...
repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\wrapper\EncryptableMutablePropertySourcesWrapper.java
1
请完成以下Java代码
public class X_M_Product_SupplierApproval_Norm extends org.compiere.model.PO implements I_M_Product_SupplierApproval_Norm, org.compiere.model.I_Persistent { private static final long serialVersionUID = 1977517179L; /** Standard Constructor */ public X_M_Product_SupplierApproval_Norm (final Properties ctx, f...
@Override public int getM_Product_SupplierApproval_Norm_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_SupplierApproval_Norm_ID); } /** * SupplierApproval_Norm AD_Reference_ID=541363 * Reference name: SupplierApproval_Norm */ public static final int SUPPLIERAPPROVAL_NORM_AD_Reference_ID=541363; /** ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_SupplierApproval_Norm.java
1
请完成以下Java代码
public void setAD_PInstance_ID (int AD_PInstance_ID) { if (AD_PInstance_ID < 1) set_Value (COLUMNNAME_AD_PInstance_ID, null); else set_Value (COLUMNNAME_AD_PInstance_ID, Integer.valueOf(AD_PInstance_ID)); } /** Get Process Instance. @return Instance of the process */ public int getAD_PInstance_ID ...
/** Get Sequence. @return Method of ordering records; lowest number comes first */ public int getSeqNo () { Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); if (ii == null) return 0; return ii.intValue(); } /** Set Temporal MRP & CRP. @param T_MRP_CRP_ID Temporal MRP & CRP */ public void set...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_T_MRP_CRP.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonExternalSystemLeichMehlPluFileConfig { @NonNull @JsonProperty("targetFieldName") String targetFieldName; @NonNull @JsonProperty("targetFieldType") JsonTargetFieldType targetFieldType; @NonNull @JsonProperty("replacePattern") String replacePattern; @NonNull @JsonProperty("replacement") St...
JsonReplacementSource replacementSource; @Builder @JsonCreator public JsonExternalSystemLeichMehlPluFileConfig( @JsonProperty("targetFieldName") @NonNull final String targetFieldName, @JsonProperty("targetFieldType") @NonNull final JsonTargetFieldType targetFieldType, @JsonProperty("replacePattern") @NonNu...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-externalsystem\src\main\java\de\metas\common\externalsystem\leichundmehl\JsonExternalSystemLeichMehlPluFileConfig.java
2
请完成以下Java代码
public ImmutableList<PPOrderRoutingActivity> getNextActivities(@NonNull final PPOrderRoutingActivity activity) { return getNextActivityCodes(activity) .stream() .map(this::getActivityByCode) .collect(ImmutableList.toImmutableList()); } @Nullable public PPOrderRoutingActivity getPreviousActivityOrNull...
getActivityById(report.getActivityId()).reportProgress(report); } public void completeActivity(final PPOrderRoutingActivityId activityId) { getActivityById(activityId).completeIt(); } public void closeActivity(final PPOrderRoutingActivityId activityId) { getActivityById(activityId).closeIt(); } public vo...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\api\PPOrderRouting.java
1
请完成以下Java代码
public static String parse(String expression, String inputVariable, String inputVariableType) { expression = expression.replaceAll("fn_date", "date:toDate"); expression = expression.replaceAll("fn_subtractDate", "date:subtractDate"); expression = expression.replaceAll("fn_addDate", "dat...
} } parsedExpressionBuilder.append("}"); return parsedExpressionBuilder.toString(); } protected static String parseSegmentWithOperator(String expression) { String parsedExpressionSegment; if (expression.length() < 2 || !StringUtils.startsWithAny(expression, OPER...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\el\ELInputEntryExpressionPreParser.java
1
请在Spring Boot框架中完成以下Java代码
public AuthorizationRequestRepository<OAuth2AuthorizationRequest> authorizationRequestRepository() { return new HttpSessionOAuth2AuthorizationRequestRepository(); } @Bean public OAuth2AccessTokenResponseClient<OAuth2AuthorizationCodeGrantRequest> accessTokenResponseClient() { DefaultAuthori...
} private static String CLIENT_PROPERTY_KEY = "spring.security.oauth2.client.registration."; @Autowired private Environment env; private ClientRegistration getRegistration(String client) { String clientId = env.getProperty(CLIENT_PROPERTY_KEY + client + ".client-id"); if (clientId ==...
repos\tutorials-master\spring-security-modules\spring-security-oauth2\src\main\java\com\baeldung\oauth2\CustomRequestSecurityConfig.java
2
请完成以下Java代码
public int getRecordId() { return recordId; } /** * Sets the value of the recordId property. * */ public void setRecordId(int value) { this.recordId = value; } /** * Gets the value of the tariffType property. * * @return * possible object is...
*/ public XMLGregorianCalendar getDateBegin() { return dateBegin; } /** * Sets the value of the dateBegin property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setDateBegin(XMLGregorianCalendar value) { ...
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\CaseDetailType.java
1
请完成以下Java代码
public class DBForeignKeyConstraintException extends DBException { /** * */ private static final long serialVersionUID = -2810401877944246237L; private static final String AD_Message = "DBForeignKeyConstraintException"; public DBForeignKeyConstraintException(final Throwable cause) { super(cause); } @Ov...
// * find the local and foreign table and column names // * display a nice error message: Datensatz {} kann nicht gelöscht werden, weil er von anderen Datensätzen referenziert wird // NOTE: // * here is how others extracted the foreign key name: org.hibernate.dialect.new TemplatedViolatedConstraintNameExtracter(...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\exceptions\DBForeignKeyConstraintException.java
1
请完成以下Java代码
protected ByteArrayEntity findByteArrayById(String byteArrayId, CommandContext commandContext) { return commandContext.getDbEntityManager() .selectById(ByteArrayEntity.class, byteArrayId); } protected HistoricProcessInstanceEntity findProcessInstanceById(String instanceId, CommandContext commandContext) ...
protected SetRemovalTimeBatchConfiguration createJobConfiguration(SetRemovalTimeBatchConfiguration configuration, List<String> processInstanceIds) { return new SetRemovalTimeBatchConfiguration(processInstanceIds) .setRemovalTime(configuration.getRemovalTime()) .setHasRemovalTime(configuration.hasR...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\removaltime\ProcessSetRemovalTimeJobHandler.java
1
请完成以下Java代码
private PartyIdentification32CHName convertPartyIdentification32CHName( @NonNull final I_SEPA_Export_Line line, @Nullable final BankAccount bankAccount, @NonNull final String paymentType) { final PartyIdentification32CHName cdtr = objectFactory.createPartyIdentification32CHName(); if (bankAccount == null)...
cdtr.setPstlAdr(pstlAdr); return cdtr; } @VisibleForTesting static boolean isInvalidQRReference(@NonNull final String reference) { if (reference.length() != 27) { return true; } final int[] checkSequence = { 0, 9, 4, 6, 8, 2, 7, 1, 3, 5 }; int carryOver = 0; for (int i = 1; i <= reference.lengt...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\base\src\main\java\de\metas\payment\sepa\sepamarshaller\impl\SEPAVendorCreditTransferMarshaler_Pain_001_001_03_CH_02.java
1
请在Spring Boot框架中完成以下Java代码
public DeploymentBuilder nameFromDeployment(String deploymentId) { String name = deployment.getName(); if (name != null && !name.isEmpty()) { String message = String.format("Cannot set the given deployment id '%s' to get the name from it, because the deployment name has been already set to '%s'.", deploym...
// getters and setters ////////////////////////////////////////////////////// public DeploymentEntity getDeployment() { return deployment; } public boolean isDuplicateFilterEnabled() { return isDuplicateFilterEnabled; } public boolean isDeployChangedOnly() { return deployChangedOnly; } pub...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\repository\DeploymentBuilderImpl.java
2
请完成以下Java代码
public boolean isProcessing () { Object oo = get_Value(COLUMNNAME_Processing); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Sql WHERE. @param WhereClause Fully qualified SQL WHERE clause */ publi...
{ return (String)get_Value(COLUMNNAME_WhereClause); } @Override public String getBeforeChangeWarning() { return (String)get_Value(COLUMNNAME_BeforeChangeWarning); } @Override public void setBeforeChangeWarning(String BeforeChangeWarning) { set_Value (COLUMNNAME_BeforeChangeWarning, BeforeChangeWarning);...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Index_Table.java
1
请完成以下Java代码
public String docValidate(final PO po, final int timing) { // nothing to do return null; } @Override public String modelChange(final PO po, int type) { onNewAndChangeAndDelete(po, type); return null; } private void onNewAndChangeAndDelete(final PO po, int type) { if (!(type == TYPE_AFTER_NEW || type...
final String dontUpdateOrder = Env.getContext(po.getCtx(), OrderFastInput.OL_DONT_UPDATE_ORDER + orderPO.get_ID()); if (Check.isEmpty(dontUpdateOrder) || !"Y".equals(dontUpdateOrder)) { final boolean newOrDelete = type == TYPE_AFTER_NEW || type == TYPE_AFTER_DELETE; final boolean lineNetAmtChanged = po.is_Val...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\modelvalidator\OrderLine.java
1
请完成以下Java代码
public int getRecord_ID() { return user.getAD_User_ID(); } @Override public EMail sendEMail(final I_AD_User from, final String toEmail, final String subject, final BoilerPlateContext attributes) { final Mailbox mailbox = mailService.findMailbox(MailboxQuery.builder() .clientId(getClientId...
+ ", " + msgBL.parseTranslation(getCtx(), "@AD_User_ID@: " + user.getName()) // +", "+Msg.parseTranslation(getCtx(), "@AD_PInstance_ID@: "+getAD_PInstance_ID()) ; final MNote note = new MNote(getCtx(), adMessageId.getRepoId(), getFromUserId().getRepoId(), InterfaceWrapperHelper.getModelTableId(use...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\letters\report\AD_BoilderPlate_SendToUsers.java
1
请完成以下Java代码
public int getM_Product_ID() { return invoiceLine.getM_Product_ID(); } @Override public void setM_Product_ID(final int productId) { invoiceLine.setM_Product_ID(productId); } @Override public int getM_AttributeSetInstance_ID() { return invoiceLine.getM_AttributeSetInstance_ID(); } @Override public v...
invoiceLine.setM_HU_PI_Item_Product_ID(huPiItemProductId); } @Override public BigDecimal getQtyTU() { return invoiceLine.getQtyEnteredTU(); } @Override public void setQtyTU(final BigDecimal qtyPacks) { invoiceLine.setQtyEnteredTU(qtyPacks); } @Override public void setC_BPartner_ID(final int partnerId)...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\impl\InvoiceLineHUPackingAware.java
1
请完成以下Java代码
public Predicate<ServerWebExchange> apply(Config config) { throw new UnsupportedOperationException("ReadBodyPredicateFactory is only async."); } public static class Config { private @Nullable Class inClass; private @Nullable Predicate predicate; private @Nullable Map<String, Object> hints; public @Null...
this.predicate = predicate; return this; } public @Nullable Map<String, Object> getHints() { return hints; } public Config setHints(Map<String, Object> hints) { this.hints = hints; return this; } } }
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\handler\predicate\ReadBodyRoutePredicateFactory.java
1
请在Spring Boot框架中完成以下Java代码
public Job numberGeneratorNotifierJob(JobRepository jobRepository, PlatformTransactionManager transactionManager, @Qualifier("NotificationStep") Step notificationStep) { int[] billableData = { 11, -2, -3 }; Step dataProviderStep = numberGeneratorStep(jobRepository, transactionManager, billableData, "Sec...
return factory.getObject(); } @Bean(name = "dataSource") public DataSource dataSource() { EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder(); return builder.setType(EmbeddedDatabaseType.H2) .addScript("classpath:org/springframework/batch/core/schema-drop-h2.sql"...
repos\tutorials-master\spring-batch-2\src\main\java\com\baeldung\conditionalflow\config\NumberInfoConfig.java
2
请完成以下Java代码
public boolean canDebatch(MessageProperties properties) { return MessageProperties.BATCH_FORMAT_LENGTH_HEADER4.equals(properties .getHeaders() .get(MessageProperties.SPRING_BATCH_FORMAT)); } /** * Debatch a message that has a header with {@link MessageProperties#SPRING_BATCH_FORMAT} * set to {@link Mes...
Message fragment; if (byteBuffer.hasRemaining()) { fragment = new Message(body, messageProperties); } else { MessageProperties lastProperties = new MessageProperties(); BeanUtils.copyProperties(messageProperties, lastProperties); lastProperties.setLastInBatch(true); fragment = new Message(...
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\batch\SimpleBatchingStrategy.java
1
请完成以下Java代码
private void checkOffsetsAndCommitIfNecessary(List<ConsumerRecord<K, R>> list, @Nullable Consumer<?, ?> consumer) { list.forEach(record -> this.offsets.compute( new TopicPartition(record.topic(), record.partition()), (k, v) -> v == null ? record.offset() + 1 : Math.max(v, record.offset() + 1))); if (this.pe...
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } @SuppressWarnings("rawtypes") RecordHolder other = (RecordHolder) obj; if (this.record == null) { if (other....
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\requestreply\AggregatingReplyingKafkaTemplate.java
1
请完成以下Java代码
public class ImpDataLine { private final String lineStr; private final int fileLineNo; private final ImmutableList<ImpDataCell> cells; private final ErrorMessage parseError; @Builder private ImpDataLine( final int fileLineNo, @Nullable final String lineStr, @Nullable @Singular final ImmutableList<ImpDat...
for (final ImpDataCell cell : cells) { if (!cell.isCellError()) { continue; } final String cellErrorMessage = cell.getCellErrorMessage().getMessage(); if (result.length() > 0) { result.append("; "); } result.append(cellErrorMessage); if (result.length() >= maxLengthE...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\parser\ImpDataLine.java
1
请在Spring Boot框架中完成以下Java代码
default List<VariableInstanceEntity> findVariableInstanceByScopeIdAndScopeType(String scopeId, String scopeType) { return createInternalVariableInstanceQuery().scopeId(scopeId).withoutSubScopeId().scopeType(scopeType).list(); } default List<VariableInstanceEntity> findVariableInstanceBySubScopeIdAndSco...
void insertVariableInstance(VariableInstanceEntity variable); /** * Inserts a variable instance with the given value. * @param variable the variable instance to insert * @param value the value to set * @param tenantId the tenant id of the variable instance */ void insertVariableInstanc...
repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\VariableService.java
2
请完成以下Java代码
public ProcessPreconditionsResolution checkPreconditionsApplicable(final @NonNull IProcessPreconditionsContext context) { if (!context.isSingleSelection()) { return ProcessPreconditionsResolution.rejectBecauseNotSingleSelection(); } return ProcessPreconditionsResolution.accept(); } @Override protected S...
.orgId(currentRow.getOrgId()) .productId(currentRow.getProductId()) .attributesKey(currentRow.getAttributesKey()) .onlyNonZeroQty(true) .build(); final List<TableRecordReference> recordReferences = ppOrderCandidateDAO.listIdsByQuery(ppOrderCandidatesQuery) .stream() .map(id -> TableRecordRefe...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\material\process\QtyDemand_QtySupply_V_to_PP_Order_Candidate.java
1
请完成以下Java代码
public void actionPerformed (ActionEvent e) { if (e.getActionCommand().equals(ConfirmPanel.A_CANCEL)) { dispose(); } else if (e.getActionCommand().equals(ConfirmPanel.A_REFRESH) || e.getActionCommand().equals(ConfirmPanel.A_OK)) { refresh(); } else if (e.getActionCommand().equals(ConfirmPanel.A...
*/ private void refresh() { final Object organization = orgField.getValue(); final Object locator = locatorField.getValue(); final Object product = productField.getValue(); final Object movementType = mtypeField.getValue(); final Timestamp movementDateFrom = dateFField.getValue(); final Timestamp movement...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\form\VTrxMaterial.java
1
请完成以下Java代码
private void updateCampaignContactPersonAdUserId(@NonNull final I_MKTG_ContactPerson contactPersonRecord) { final UserId newAdUserId = UserId.ofRepoIdOrNullIfSystem(contactPersonRecord.getAD_User_ID()); final IQueryUpdater<I_MKTG_Campaign_ContactPerson> updater = queryBL .createCompositeQueryUpdater(I_MKTG_Ca...
{ if (contacts == null) { throw new AdempiereException("collector already committed"); } contacts.put(contact.getContactPersonId(), contact); } public void commit() { if (contacts == null) { return; } final ImmutableList<ContactPerson> contacts = ImmutableList.copyOf(this.contac...
repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java\de\metas\marketing\base\interceptor\MKTG_ContactPerson.java
1
请在Spring Boot框架中完成以下Java代码
private void configureSsl(ConfigurableEnvironment environment, String trustedKeyStore) { Properties gemfireSslProperties = new Properties(); gemfireSslProperties.setProperty(SECURITY_SSL_KEYSTORE_PROPERTY, trustedKeyStore); gemfireSslProperties.setProperty(SECURITY_SSL_TRUSTSTORE_PROPERTY, trustedKeyStore); ...
@ConditionalOnProperty(SECURITY_SSL_USE_DEFAULT_CONTEXT) static class SpringDataGeodeSslUseDefaultContextPropertySet { } @ConditionalOnProperty({ GEMFIRE_SSL_KEYSTORE_PROPERTY, GEMFIRE_SSL_TRUSTSTORE_PROPERTY }) static class ApacheGeodeSslKeyStoreAndTruststorePropertiesSet { } } static class TrustedKeyStoreI...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\SslAutoConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
class DemoServerInstanceConfiguration { @Bean ServiceInstanceListSupplier serviceInstanceListSupplier() { return new DemoInstanceSupplier("example-service"); } } @Configuration @LoadBalancerClient(name = "example-service", configuration = DemoServerInstanceConfiguration.class) class WebClientConfig...
public DemoInstanceSupplier(String serviceId) { this.serviceId = serviceId; } @Override public String getServiceId() { return serviceId; } @Override public Flux<List<ServiceInstance>> get() { return Flux.just(Arrays .asList(new DefaultServiceInstance(service...
repos\tutorials-master\spring-cloud-modules\spring-cloud-loadbalancer\spring-cloud-loadbalancer-client\src\main\java\com\baeldung\spring\cloud\loadbalancer\client\ClientApplication.java
2
请在Spring Boot框架中完成以下Java代码
public class Book { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private int id; @Column(name = "title") private String title; @ManyToMany @Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.PERSIST}) @JoinTable(joinColumns = { @JoinC...
public void setId(int id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public Set<Author> getAuthors() { return authors; } public void setAuthors(Set<Author> authors) { ...
repos\tutorials-master\persistence-modules\hibernate-exceptions\src\main\java\com\baeldung\hibernate\exception\transientobject\entity\Book.java
2
请在Spring Boot框架中完成以下Java代码
private SecurityContext getContextByPath() { Set<String> urls = AnonTagUtils.getAllAnonymousUrl(applicationContext); urls = urls.stream().filter(url -> !url.equals("/")).collect(Collectors.toSet()); String regExp = "^(?!" + apiPath + String.join("|" + apiPath, urls) + ").*$"; return Secu...
mappings.addAll(filteredMappings); } private List<RequestMappingInfoHandlerMapping> getHandlerMappings(Object bean) { Field field = ReflectionUtils.findField(bean.getClass(), "handlerMappings"); if (field != null) { field.setAccessible(true); ...
repos\eladmin-master\eladmin-common\src\main\java\me\zhengjie\config\webConfig\SwaggerConfig.java
2
请完成以下Java代码
public TransportProtos.SessionInfoProto getSessionByEndpoint(String endpoint) { return bsSessions.get(endpoint); } public TransportProtos.SessionInfoProto removeSessionByEndpoint(String endpoint) { return bsSessions.remove(endpoint); } public BootstrapConfig getBootstrapConfigByEndpoin...
Optional<Map.Entry<Integer, BootstrapConfig.ServerConfig>> serverConfigs = bsConfigNew.servers.entrySet().stream().filter(serv -> (serv.getValue()).shortId == serverSortId).findAny(); if (serverConfigs.isPresent()) { bsConfigNew.servers.entrySet().remove(serve...
repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\bootstrap\store\LwM2MBootstrapSecurityStore.java
1
请完成以下Java代码
private void setupCaching() { CacheMgt.get().enableRemoteCacheInvalidationForTableName(I_M_ShipmentSchedule.Table_Name); } @VisibleForTesting public static void registerSSAggregationKeyDependencies() { final IAggregationKeyRegistry keyRegistry = Services.get(IAggregationKeyRegistry.class); final String reg...
} private void productChange(@NonNull final I_M_Product productPO, @NonNull final ModelChangeType type) { if (type.isChange() /* not on new, because a new product can't have any shipment schedules yet */ && type.isAfter()) { final boolean isDiverseChanged = InterfaceWrapperHelper.isValueChanged(productPO,...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\modelvalidator\InOutCandidateValidator.java
1
请完成以下Java代码
static String englishToMorse(String english) { if (english == null) { return null; } String upperCaseEnglish = english.toUpperCase(); String[] morse = new String[upperCaseEnglish.length()]; for (int index = 0; index < upperCaseEnglish.length(); index++) { ...
return null; } if (morse.isEmpty()) { return ""; } String[] morseUnitCharacters = morse.split(" "); StringBuilder stringBuilder = new StringBuilder(); for (int index = 0; index < morseUnitCharacters.length; index ++) { String englishCharacter = mor...
repos\tutorials-master\core-java-modules\core-java-string-operations-9\src\main\java\com\baeldung\morse\MorseTranslator.java
1
请完成以下Java代码
public ChannelModel getChannelModelById(String channelDefinitionId) { return commandExecutor.execute(new GetChannelModelCmd(null, channelDefinitionId)); } @Override public ChannelModel getChannelModelByKey(String channelDefinitionKey) { return commandExecutor.execute(new GetChannelModelCmd(...
} @Override public EventModelBuilder createEventModelBuilder() { return new EventModelBuilderImpl(this, eventRegistryEngineConfiguration.getEventJsonConverter()); } @Override public InboundChannelModelBuilder createInboundChannelModelBuilder() { return new InboundChannelDe...
repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\EventRepositoryServiceImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class DeleteSuspendedJobCmd implements Command<Object>, Serializable { private static final Logger LOGGER = LoggerFactory.getLogger(DeleteSuspendedJobCmd.class); private static final long serialVersionUID = 1L; protected JobServiceConfiguration jobServiceConfiguration; protected String sus...
eventDispatcher.dispatchEvent(FlowableJobEventBuilder.createEntityEvent(FlowableEngineEventType.JOB_CANCELED, jobToDelete), jobServiceConfiguration.getEngineName()); } } protected SuspendedJobEntity getJobToDelete(CommandContext commandContext) { if (suspendedJobId == null) ...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\cmd\DeleteSuspendedJobCmd.java
2
请完成以下Java代码
private void add(@NonNull final HUToReport hu, @NonNull final PrintInstructions printInstructions) { // Don't add it if we already considered it if (!huIdsCollected.add(hu.getHUId())) { return; } final BatchToPrint lastBatch = !batches.isEmpty() ? batches.get(batches.size() - 1) : null; final ...
private BatchToPrint(final @NonNull PrintInstructions printInstructions) {this.printInstructions = printInstructions;} public boolean isMatching(@NonNull final PrintInstructions printInstructions) { return Objects.equals(this.printInstructions, printInstructions); } public void addHU(@NonNull final HUToRep...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\report\labels\HULabelPrintCommand.java
1
请完成以下Java代码
public void setC_BPartner_ID (int C_BPartner_ID) { if (C_BPartner_ID < 1) set_Value (COLUMNNAME_C_BPartner_ID, null); else set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); } /** Get Business Partner . @return Identifies a Business Partner */ @Override public int getC_BPartner...
else set_Value (COLUMNNAME_C_BPartner_Location_ID, Integer.valueOf(C_BPartner_Location_ID)); } /** Get Partner Location. @return Identifies the (ship to) address for this Business Partner */ @Override public int getC_BPartner_Location_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_Locat...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java-gen\de\metas\banking\model\X_C_RecurrentPayment.java
1
请在Spring Boot框架中完成以下Java代码
public class Employee { @Id private int id; @Column private String firstName; @Column private String lastName; @Column private double salary; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getFirstName()...
public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public double getSalary() { return salary; } public void setSalary(double salary) { this.salary = salary; } }
repos\tutorials-master\persistence-modules\spring-data-jpa-repo-4\src\main\java\com\baeldung\spring\data\noconverterfound\models\Employee.java
2
请完成以下Java代码
public List<String> getFieldNames() { return getParent().getFieldNames(); } @Override public boolean isIdentityField(String fieldName) { return getParent().isIdentityField(fieldName); } @Override public Object getObject() { return getParent().getObject(); } @Override public Wri...
return getParent().hasField(fieldName); } }; } /** * Determines whether the given {@link String field name} is a {@link PropertyDescriptor property} * on the underlying, target {@link Object}. * * @param fieldName {@link String} containing the name of the field to match against * a {@link PropertyDesc...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\pdx\ObjectPdxInstanceAdapter.java
1
请完成以下Java代码
public class DLMReferenceException extends DBException { private static final long serialVersionUID = -4557251479983766242L; private final boolean referencingTableHasDLMLevel; private final TableRecordIdDescriptor tableReferenceDescriptor; @VisibleForTesting public DLMReferenceException( @Nullable final Throw...
} public boolean isReferencingTableHasDLMLevel() { return referencingTableHasDLMLevel; } public TableRecordIdDescriptor getTableReferenceDescriptor() { return tableReferenceDescriptor; } @Override public String toString() { return "DLMException [tableReferenceDescriptor=" + tableReferenceDescriptor + ...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\exception\DLMReferenceException.java
1
请完成以下Java代码
public void evaluateModels() throws Exception { log.info("Training model"); evaluate(model, "trainSet", trainSet); log.info("Testing model"); evaluate(model, "testSet", testSet); log.info("Dataset Provenance: --------------------"); log.info(ProvenanceUtil.formattedProv...
Regressor dimension0 = new Regressor("DIM-0", Double.NaN); log.info("MAE: " + evaluation.mae(dimension0)); log.info("RMSE: " + evaluation.rmse(dimension0)); log.info("R^2: " + evaluation.r2(dimension0)); } public void saveModel() throws Exception { File modelFile = new File(MOD...
repos\tutorials-master\libraries-ai\src\main\java\com\baeldung\tribuo\WineQualityRegression.java
1
请在Spring Boot框架中完成以下Java代码
public class PricingConditionsRowChangeRequest { PricingConditionsBreak pricingConditionsBreak; PricingConditionsBreakId sourcePricingConditionsBreakId; Percent discount; /** {@code null} means that no change is requested. Empty means "change ID to null". */ @Nullable Optional<PaymentTermId> paymentTermId; /...
BigDecimal fixedPriceAmt; CurrencyId currencyId; CurrencyId defaultCurrencyId; } @lombok.Value(staticConstructor = "of") public static final class CompletePriceChange implements PriceChange { @NonNull PriceSpecification price; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\pricingconditions\view\PricingConditionsRowChangeRequest.java
2
请完成以下Java代码
public void setTp(CashAccountType2Choice value) { this.tp = value; } /** * Gets the value of the ccy property. * * @return * possible object is * {@link String } * */ public String getCcy() { return ccy; } /** * Sets the value o...
* Sets the value of the ownr property. * * @param value * allowed object is * {@link PartyIdentification43 } * */ public void setOwnr(PartyIdentification43 value) { this.ownr = value; } /** * Gets the value of the svcr property. * * @retur...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\CashAccount25.java
1
请完成以下Spring Boot application配置
spring.datasource.url=jdbc:mysql://localhost:3306/bookstoredb?cachePrepStmts=true&useServerPrepStmts=true&rewriteBatchedStatements=true&createDatabaseIfNotExist=true spring.datasource.username=root spring.datasource.password=root spring.jpa.hibernate.ddl-auto=create spring.jpa.show-sql=true spring.jpa.properties.hibe...
operties.hibernate.cache.use_second_level_cache=false # this is needed for ordering updates in case of relationships # spring.jpa.properties.hibernate.order_updates=true spring.jpa.properties.hibernate.generate_statistics=true
repos\Hibernate-SpringBoot-master\HibernateSpringBootBatchUpdateOrderSingleEntity\src\main\resources\application.properties
2
请完成以下Java代码
public class C_BPartner_Modify_SupplierApproval extends JavaProcess implements IProcessPrecondition { final BPartnerSupplierApprovalRepository repo = SpringContextHolder.instance.getBean(BPartnerSupplierApprovalRepository.class); @Param(parameterName = "SupplierApproval_Parameter") private String p_SupplierApproval...
return ProcessPreconditionsResolution.accept(); } @Override protected String doIt() throws Exception { final BPSupplierApprovalId bpSupplierApprovalId = BPSupplierApprovalId.ofRepoId(getRecord_ID()); repo.updateBPSupplierApproval(bpSupplierApprovalId, p_SupplierApproval, p_SupplierApprov...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\process\C_BPartner_Modify_SupplierApproval.java
1
请完成以下Java代码
public class RefreshContextEditorAction extends AbstractContextMenuAction { @Override public String getName() { return "Refresh"; } @Override public String getIcon() { return "Refresh16"; } @Override public boolean isAvailable() { final IRefreshableEditor editor = getRefreshableEditor(); if (edito...
else { return null; } } @Override public boolean isRunnable() { return true; } @Override public void run() { final IRefreshableEditor editor = (IRefreshableEditor)getEditor(); editor.refreshValue(); } @Override public boolean isLongOperation() { return true; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\menu\RefreshContextEditorAction.java
1
请完成以下Java代码
public void onSuccess(SendResult sendResult) { // 消息发送成功。 log.info( "async send success" ); } @Override public void onException(Throwable throwable) { // 消息发送失败,需要进行重试处理,可重新发送这条消息或持久化这条数据进行补偿处理。 log.info( "async send fa...
*/ public void sendBatchMsg(List<Message> messages) { rocketMQTemplate.syncSend( "springboot-rocketmq", messages ); } /** * 事务消息 */ public void sendTransactionMsg(){ TransactionSendResult transactionSendResult = rocketMQTemplate.sendMessageInTransaction( "Topi...
repos\SpringBootLearning-master (1)\springboot-rocketmq-message\src\main\java\com\itwolfed\msg\Producer.java
1
请完成以下Java代码
public Batch execute(CommandContext commandContext) { BatchElementConfiguration elementConfiguration = collectHistoricDecisionInstanceIds(commandContext); ensureNotEmpty(BadUserRequestException.class, "historicDecisionInstanceIds", elementConfiguration.getIds()); return new BatchBuilder(commandContext) ...
if (decisionInstanceQuery != null) { elementConfiguration.addDeploymentMappings(decisionInstanceQuery.listDeploymentIdMappings()); } return elementConfiguration; } protected void writeUserOperationLog(CommandContext commandContext, int numInstances) { List<PropertyChange> propertyChanges = new A...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\dmn\cmd\DeleteHistoricDecisionInstancesBatchCmd.java
1
请完成以下Java代码
private PPOrderId getPPOrderId() { Check.assumeEquals(getTableName(), I_PP_Order.Table_Name, "TableName"); return PPOrderId.ofRepoId(getRecord_ID()); } private void unclose(final I_PP_Order ppOrder) { ModelValidationEngine.get().fireDocValidate(ppOrder, ModelValidator.TIMING_BEFORE_UNCLOSE); // // Unclo...
// Sort the cost collectors in reverse order of their creation, // just to make sure we are reversing the effect from last one to first one. costCollectors.sort(ModelByIdComparator.getInstance().reversed()); for (final I_PP_Cost_Collector cc : costCollectors) { final DocStatus docStatus = DocStatus.ofNullab...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\process\PP_Order_UnClose.java
1
请完成以下Java代码
public class DeviceAuthResult { private final boolean success; private final DeviceId deviceId; private final String errorMsg; public static DeviceAuthResult of(DeviceId deviceId) { return new DeviceAuthResult(true, deviceId, null); } public static DeviceAuthResult of(String errorMsg)...
} public DeviceId getDeviceId() { return deviceId; } public String getErrorMsg() { return errorMsg; } @Override public String toString() { return "DeviceAuthResult [success=" + success + ", deviceId=" + deviceId + ", errorMsg=" + errorMsg + "]"; } }
repos\thingsboard-master\common\transport\transport-api\src\main\java\org\thingsboard\server\common\transport\auth\DeviceAuthResult.java
1
请完成以下Java代码
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; PrintPackageInfo other = (PrintPackageInfo)obj; if (calX != other.calX) return false; if (calY != other.calY) return false; if (pageFrom != other...
return false; } else if (!printService.equals(other.printService)) return false; if (tray == null) { if (other.tray != null) return false; } else if (!tray.equals(other.tray)) return false; if (trayNumber != other.trayNumber) return false; return true; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.printing.common\de.metas.printing.api\src\main\java\de\metas\printing\esb\api\PrintPackageInfo.java
1
请完成以下Java代码
private I_PP_Order getPP_Order() { return ppOrder; } @Override protected ProductId getProductId() { return productId; } @Override protected Object getAllocationRequestReferencedModel() { return getPP_Order(); } @Override protected IAllocationSource createAllocationSource() { final I_PP_Order ppO...
.locatorId(getLocatorId()) .pickingCandidateId(getPickingCandidateId()) .build(); } @Override protected void addAssignedHUs(final Collection<I_M_HU> hus) { final I_PP_Order ppOrder = getPP_Order(); huPPOrderBL.addAssignedHandlingUnits(ppOrder, hus); } @Override public IPPOrderReceiptHUProducer with...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pporder\api\impl\CostCollectorCandidateFinishedGoodsHUProducer.java
1
请在Spring Boot框架中完成以下Java代码
public class ApplicationProps { private List<Object> profiles; private List<Map<String, Object>> props; private List<User> users; public List<Object> getProfiles() { return profiles; } public void setProfiles(List<Object> profiles) { this.profiles = profiles; } public...
public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public List<String> getRoles() { ...
repos\tutorials-master\spring-boot-modules\spring-boot-properties\src\main\java\com\baeldung\yamllist\pojo\ApplicationProps.java
2
请完成以下Java代码
protected void ensureVariableDeletionsInitialized() { if (variableDeletions == null) { variableDeletions = new ArrayList<String>(); } } protected void ensureVariableDeletionsLocalInitialized() { if (variableLocalDeletions == null) { variableLocalDeletions = new ArrayList<String>(); } ...
} } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseExecutionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } catch (CaseDefinitionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } catch (CaseI...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\CaseExecutionCommandBuilderImpl.java
1
请在Spring Boot框架中完成以下Java代码
private static class SkipStrategy implements TbRuleEngineProcessingStrategy { private final String queueName; private final boolean skipTimeoutMsgs; public SkipStrategy(String name, boolean skipTimeoutMsgs) { this.queueName = name; this.skipTimeoutMsgs = skipTimeoutMsgs...
@Override public TbRuleEngineProcessingDecision analyze(TbRuleEngineProcessingResult result) { if (!result.isSuccess()) { log.debug("[{}] Reprocessing skipped for {} failed and {} timeout messages", queueName, result.getFailedMap().size(), result.getPendingMap().size()); ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\queue\processing\TbRuleEngineProcessingStrategyFactory.java
2
请完成以下Java代码
public class BulletedSection<T> implements Section { private final TemplateRenderer templateRenderer; private final String templateName; private final String itemName; private final List<T> items = new ArrayList<>(); /** * Create a new instance adding items in the model with the {@code items} key. * @para...
} /** * Specify whether this section is empty. * @return {@code true} if no item is registered */ public boolean isEmpty() { return this.items.isEmpty(); } /** * Return an immutable list of the registered items. * @return the registered items */ public List<T> getItems() { return Collections.unmo...
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\io\text\BulletedSection.java
1
请完成以下Java代码
public class ActivityAfterInstantiationCmd extends AbstractInstantiationCmd { protected String activityId; public ActivityAfterInstantiationCmd(String activityId) { this(null, activityId); } public ActivityAfterInstantiationCmd(String processInstanceId, String activityId) { this(processInstanceId, ac...
activity); if (activity.getOutgoingTransitions().isEmpty()) { throw new ProcessEngineException("Cannot start after activity " + activityId + "; activity " + "has no outgoing sequence flow to take"); } else if (activity.getOutgoingTransitions().size() > 1) { throw new ProcessEngineExce...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\ActivityAfterInstantiationCmd.java
1
请在Spring Boot框架中完成以下Java代码
public class MailWithAttachmentService { private final String username; private final String password; private final String host; private final int port; MailWithAttachmentService(String username, String password, String host, int port) { this.username = username; this.password = p...
MimeBodyPart attachmentPart = new MimeBodyPart(); attachmentPart.attachFile(getFile("attachment.txt")); multipart.addBodyPart(attachmentPart); MimeBodyPart attachmentPart2 = new MimeBodyPart(); attachmentPart2.attachFile(getFile("attachment2.txt")); multipart.addBodyPart(attachm...
repos\tutorials-master\core-java-modules\core-java-networking-2\src\main\java\com\baeldung\mail\mailwithattachment\MailWithAttachmentService.java
2
请在Spring Boot框架中完成以下Java代码
public String getOrderId() { return orderId; } public void setOrderId(String orderId) { this.orderId = orderId; } public OrderMapping salesId(String salesId) { this.salesId = salesId; return this; } /** * Id des Auftrags aus WaWi * @return salesId **/ @Schema(example = "A123445...
@Override public int hashCode() { return Objects.hash(orderId, salesId, updated); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderMapping {\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); sb.append(" ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-orders-api\src\main\java\io\swagger\client\model\OrderMapping.java
2
请在Spring Boot框架中完成以下Java代码
void setMessageConverter(@Nullable MessageConverter messageConverter) { this.messageConverter = messageConverter; } /** * Set the {@link ExceptionListener} to use or {@code null} if no exception listener * should be associated by default. * @param exceptionListener the {@link ExceptionListener} */ void se...
/** * Configure the specified jms listener container factory. The factory can be further * tuned and default settings can be overridden. * @param factory the {@link AbstractJmsListenerContainerFactory} instance to * configure * @param connectionFactory the {@link ConnectionFactory} to use */ public void co...
repos\spring-boot-main\module\spring-boot-jms\src\main\java\org\springframework\boot\jms\autoconfigure\AbstractJmsListenerContainerFactoryConfigurer.java
2
请完成以下Java代码
static class OrderLinePromotionCandidate { BigDecimal qty; MOrderLine orderLine; I_M_PromotionReward promotionReward; } private static void addDiscountLine(MOrder order, List<OrderLinePromotionCandidate> candidates) throws Exception { for (OrderLinePromotionCandidate candidate : candidates) { final Str...
} } } private static void setPromotion(MOrderLine nol, I_M_Promotion promotion) { nol.addDescription(promotion.getName()); nol.set_ValueOfColumn("M_Promotion_ID", promotion.getM_Promotion_ID()); if (promotion.getC_Campaign_ID() > 0) { nol.setC_Campaign_ID(promotion.getC_Campaign_ID()); } } private s...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\adempiere\model\PromotionRule.java
1