instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public final class CarrierAdviseProcessService { @NonNull public static final AdMessageKey ONLY_EXACTLY_ONE_SHIPPER_ALLOWED = AdMessageKey.of("MoreThanOneOrNoShipperSelected"); // Services @NonNull private final ShipmentScheduleService shipmentScheduleService; @NonNull private final ITrxManager trxManager = Servic...
shipmentScheduleService.save(shipmentSchedule); }); } public void updateEligibleShipmentSchedules(@NonNull final CarrierAdviseUpdateRequest request) { shipmentScheduleService.updateByQuery(request.getQuery(), schedule -> updateEligibleShipmentSchedule(schedule, request)); } private void updateEligibleShipmen...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.commons\src\main\java\de\metas\shipper\gateway\commons\process\CarrierAdviseProcessService.java
2
请完成以下Java代码
public void createBucket(String bucketName) { s3Client.createBucket(request -> request.bucket(bucketName)); } public List<Bucket> listBuckets() { List<Bucket> allBuckets = new ArrayList<>(); String nextToken = null; do { String continuationToken = nextToken; ...
return allBuckets; } public void deleteBucket(String bucketName) { try { s3Client.deleteBucket(request -> request.bucket(bucketName)); } catch (S3Exception exception) { if (exception.statusCode() == HttpStatus.SC_CONFLICT) { throw new BucketNotEmptyExcept...
repos\tutorials-master\aws-modules\aws-s3\src\main\java\com\baeldung\s3\S3BucketOperationService.java
1
请完成以下Java代码
default SqlOrderByValue getFieldOrderBy(String fieldName) { return getFieldByFieldName(fieldName).getSqlOrderBy(); } default DocumentFilterDescriptorsProvider getFilterDescriptors() { throw new UnsupportedOperationException(); } /** * @return registered document filter to SQL converters */ default SqlD...
default SqlAndParams replaceTableNameWithTableAlias(final SqlAndParams sql, @NonNull final String tableAlias) { return SqlAndParams.of( replaceTableNameWithTableAlias(sql.getSql(), tableAlias), sql.getSqlParams()); } static String replaceTableNameWithTableAlias(final String sql, @NonNull final String tabl...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\SqlEntityBinding.java
1
请完成以下Java代码
public int getCarrier_ShipmentOrder_Parcel_ID() { return get_ValueAsInt(COLUMNNAME_Carrier_ShipmentOrder_Parcel_ID); } @Override public void setC_Currency_ID (final int C_Currency_ID) { if (C_Currency_ID < 1) set_Value (COLUMNNAME_C_Currency_ID, null); else set_Value (COLUMNNAME_C_Currency_ID, C_Cu...
{ set_Value (COLUMNNAME_QtyShipped, QtyShipped); } @Override public BigDecimal getQtyShipped() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyShipped); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setTotalPrice (final BigDecimal TotalPrice) { set_Value (COLUMNNAME_To...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Carrier_ShipmentOrder_Item.java
1
请完成以下Java代码
private String getTrxName() { if (trxManager.isNull(_trxName)) { return ITrx.TRXNAME_ThreadInherited; } return _trxName; } @Override public IInvoiceCandInvalidUpdater setLockedBy(final ILock lockedBy) { assertNotExecuted(); icTagger.setLockedBy(lockedBy); return this; } @Override public IInvo...
public String getSummary() { return "Updated " + countOk + " invoice candidates, " + countErrors + " errors"; } } /** * IC update exception handler */ private final class ICTrxItemExceptionHandler extends FailTrxItemExceptionHandler { private final ICUpdateResult result; public ICTrxItemExceptionHa...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceCandInvalidUpdater.java
1
请完成以下Java代码
public <D> Mono<List<D>> toEntityList(Class<D> elementType) { return this.responseMono.map((response) -> { ClientResponseField field = getValidField(response); return (field != null) ? field.toEntityList(elementType) : Collections.emptyList(); }); } @Override public <D> Mono<List<D>> toEntityList(P...
public <D> Flux<D> toEntity(ParameterizedTypeReference<D> entityType) { return this.responseFlux.mapNotNull(this::getValidField).mapNotNull((field) -> field.toEntity(entityType)); } @Override public <D> Flux<List<D>> toEntityList(Class<D> elementType) { return this.responseFlux.map((response) -> { Clie...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\client\DefaultGraphQlClient.java
1
请完成以下Java代码
public String getNm() { return nm; } /** * Sets the value of the nm property. * * @param value * allowed object is * {@link String } * */ public void setNm(String value) { this.nm = value; } /** * Gets the value of the adr prope...
return adr; } /** * Sets the value of the adr property. * * @param value * allowed object is * {@link PostalAddress6 } * */ public void setAdr(PostalAddress6 value) { this.adr = value; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\NameAndAddress10.java
1
请完成以下Java代码
public @Nullable String getMethod() { return this.savedRequest.getMethod(); } @Override public @Nullable String getContentType() { return getHeader(HttpHeaders.CONTENT_TYPE); } /** * If the parameter is available from the wrapped request then the request has been * forwarded/included to a URL with parame...
return names; } @Override public Enumeration<String> getParameterNames() { return new Enumerator<>(getCombinedParameterNames()); } @Override public String[] getParameterValues(String name) { String[] savedRequestParams = this.savedRequest.getParameterValues(name); String[] wrappedRequestParams = super.get...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\savedrequest\SavedRequestAwareWrapper.java
1
请完成以下Java代码
protected String doIt() { if (p_M_Product_Category_ID > 0) { final IQueryBuilder<I_M_Product> queryBuilder = Services.get(IQueryBL.class) .createQueryBuilder(I_M_Product.class) .addEqualsFilter(I_M_Product.COLUMNNAME_IsBOM, true) .addEqualsFilter(I_M_Product.COLUMNNAME_M_Product_Category_ID, p_M_...
InterfaceWrapperHelper.save(product); throw AdempiereException.wrapIfNeeded(ex); } } private void checkProductById(@NonNull final I_M_Product product) { if (!product.isBOM()) { log.info("Product is not a BOM"); // No BOM - should not happen, but no problem return; } // Check this level chec...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\process\PP_Product_BOM_Check.java
1
请在Spring Boot框架中完成以下Java代码
private void removeRequest(Integer rowId, IWebSession webSession) { if (rowId != null) { List<SessionNameRequest> requests = getRequestsFromSession(webSession); if (requests != null) { requests.remove(rowId.intValue()); } } } private void perf...
webSession.removeAttribute("lastAnalysis"); } private void sessionRegisterAnalysis(NameAnalysisEntity analysis, IWebSession webSession) { webSession.setAttributeValue("lastAnalysis", analysis); } private void sessionRegisterRequest(NameRequest nameRequest, IWebSession webSession) { web...
repos\tutorials-master\spring-web-modules\spring-thymeleaf-attributes\accessing-session-attributes\src\main\java\com\baeldung\accesing_session_attributes\web\controllers\NameAnalysisController.java
2
请完成以下Java代码
protected PageData<Customer> findEntities(TenantId tenantId, TenantId id, PageLink pageLink) { return customerDao.findCustomersByTenantId(id.getId(), pageLink); } @Override protected void removeEntity(TenantId tenantId, Customer entity) { ...
return FluentFuture.from(findCustomerByIdAsync(tenantId, new CustomerId(entityId.getId()))) .transform(Optional::ofNullable, directExecutor()); } @Override public long countByTenantId(TenantId tenantId) { return customerDao.countByTenantId(tenantId); } @Override public ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\customer\CustomerServiceImpl.java
1
请完成以下Java代码
public DocSequenceId getDocNoSequenceId(final ClientId adClientId, final OrgId adOrgId) { if (!docTypeSequences.isEmpty()) { final ArrayKey key = mkKey(adClientId, adOrgId); final DocTypeSequence docTypeSequence = docTypeSequences.get(key); if (docTypeSequence != null) { return docTypeSequence.getD...
docTypeSequences.put(key, docTypeSequence); } public Builder defaultDocNoSequenceId(final DocSequenceId defaultDocNoSequenceId) { this.defaultDocNoSequenceId = defaultDocNoSequenceId; return this; } } @Value private static final class DocTypeSequence { private final ClientId adClientId; private ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\DocTypeSequenceMap.java
1
请完成以下Spring Boot application配置
spring: # Quartz 的配置,对应 QuartzProperties 配置类 quartz: job-store-type: memory # Job 存储器类型。默认为 memory 表示内存,可选 jdbc 使用数据库。 auto-startup: true # Quartz 是否自动启动 startup-delay: 0 # 延迟 N 秒启动 wait-for-jobs-to-complete-on-shutdown: true # 应用关闭时,是否等待定时任务执行完成。默认为 false ,建议设置为 true overwrite-existing-jobs: fa...
threadPool: threadCount: 25 # 线程池大小。默认为 10 。 threadPriority: 5 # 线程优先级 class: org.quartz.simpl.SimpleThreadPool # 线程池类型 # jdbc: # 这里暂时不说明,使用 JDBC 的 JobStore 的时候,才需要配置
repos\SpringBoot-Labs-master\lab-28\lab-28-task-quartz-memory\src\main\resources\application.yaml
2
请完成以下Java代码
public int getC_BPartner_Location_ID() { return get_ValueAsInt(COLUMNNAME_C_BPartner_Location_ID); } @Override public void setIsDynamic (final boolean IsDynamic) { set_Value (COLUMNNAME_IsDynamic, IsDynamic); } @Override public boolean isDynamic() { return get_ValueAsBoolean(COLUMNNAME_IsDynamic); }...
@Override public int getM_Picking_Job_ID() { return get_ValueAsInt(COLUMNNAME_M_Picking_Job_ID); } @Override public void setM_PickingSlot_ID (final int M_PickingSlot_ID) { if (M_PickingSlot_ID < 1) set_ValueNoCheck (COLUMNNAME_M_PickingSlot_ID, null); else set_ValueNoCheck (COLUMNNAME_M_PickingSlo...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\picking\model\X_M_PickingSlot.java
1
请完成以下Java代码
protected static <T> T convertFromJsonNodeToObject(JsonNode jsonNode, ObjectMapper objectMapper) { return objectMapper.convertValue(jsonNode, new TypeReference<>() { }); } protected static String getJsonProperty(String propertyName, JsonNode jsonNode) { if (jsonNode.has(propertyNam...
return jsonNode.get(propertyName).asInt(); } return null; } protected static <V> V getLocalVariablesFromJson(JsonNode jsonNode, ObjectMapper objectMapper) { JsonNode localVariablesNode = jsonNode.get(LOCAL_VARIABLES_JSON_SECTION); if (localVariablesNode != null) { ...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\migration\CaseInstanceMigrationDocumentConverter.java
1
请完成以下Java代码
public Boolean getUvInitialized() { return uvInitialized; } public void setUvInitialized(Boolean uvInitialized) { this.uvInitialized = uvInitialized; } public String getTransports() { return transports; } public void setTransports(String transports) { this.tran...
} public Instant getLastUsed() { return lastUsed; } public void setLastUsed(Instant lastUsed) { this.lastUsed = lastUsed; } public Instant getCreated() { return created; } public void setCreated(Instant created) { this.created = created; } }
repos\tutorials-master\spring-security-modules\spring-security-passkey\src\main\java\com\baeldung\tutorials\passkey\domain\PasskeyCredential.java
1
请在Spring Boot框架中完成以下Java代码
public class Player { @Id private int id; private String playerName; private String teamName; private int age; @ManyToOne @JoinColumn(name = "league_id") private League league; public Player() { } public Player(int id, String playerName, String teamName, int age, League l...
public void setPlayerName(String playerName) { this.playerName = playerName; } public String getTeamName() { return teamName; } public void setTeamName(String teamName) { this.teamName = teamName; } public int getAge() { return age; } public void setAg...
repos\tutorials-master\persistence-modules\hibernate-queries\src\main\java\com\baeldung\hibernate\joinfetchcriteriaquery\model\Player.java
2
请在Spring Boot框架中完成以下Java代码
public CommonResult<UmsResource> getItem(@PathVariable Long id) { UmsResource umsResource = resourceService.getItem(id); return CommonResult.success(umsResource); } @ApiOperation("根据ID删除后台资源") @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) @ResponseBody public ...
@RequestParam(required = false) String urlKeyword, @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { List<UmsR...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\controller\UmsResourceController.java
2
请完成以下Java代码
public ArrayList<CompactTree> readStringData() throws IOException { ArrayList<CompactTree> treeSet = new ArrayList<CompactTree>(); String line; ArrayList<String> tags = new ArrayList<String>(); HashMap<Integer, Pair<Integer, String>> goldDependencies = new HashMap<Integer, Pair<Int...
int headIndex = Integer.parseInt(splitLine[6]); String relation = splitLine[7]; if (headIndex == 0) { relation = "ROOT"; } if (pos.length() > 0) goldDependencies.put(wordIndex, new Pair<Integer, Str...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dependency\perceptron\accessories\CoNLLReader.java
1
请完成以下Java代码
public static void main(String[] args) { SpringApplication.run(ThreadStarvationApp.class); } @RestController class RestApi { @GetMapping("/blocking") Mono<String> getBlocking() { return Mono.fromCallable(() -> { try { Thread.sleep(2_0...
} private Mono<String> fetchData() { return Mono.just("bar"); } @GetMapping("/blocking-with-scheduler") Mono<String> getBlockingWithDedicatedScheduler() { return Mono.fromCallable(this::fetchDataBlocking) .subscribeOn(Schedulers.boundedElastic())...
repos\tutorials-master\spring-reactive-modules\spring-webflux-2\src\main\java\com\baeldung\webflux\threadstarvation\ThreadStarvationApp.java
1
请在Spring Boot框架中完成以下Java代码
public class CacheController { @Autowired PersonService personService; @Autowired CacheManager cacheManager; @RequestMapping("/put") public long put(@RequestBody Person person) { Person p = personService.save(person); return p.getId(); } @RequestMapping("/able") p...
public Person cacheable1(Person person) { return personService.findOne1(); } @RequestMapping("/able2") public Person cacheable2(Person person) { return personService.findOne2(person); } @RequestMapping("/evit") public String evit(Long id) { personService.remove(id); ...
repos\spring-boot-student-master\spring-boot-student-cache-caffeine\src\main\java\com\xiaolyuh\controller\CacheController.java
2
请完成以下Java代码
private ApiResponse wrapBodyIfNeeded( @Nullable final ApiAuditConfig apiAuditConfig, @Nullable final ApiRequestAudit apiRequestAudit, @NonNull final ApiResponse apiResponse) { if (apiAuditConfig != null && apiRequestAudit != null && apiAuditConfig.isWrapApiResponse() && apiResponse.isJson()) { return a...
} return apiResponse.toBuilder().httpHeaders(httpHeaders).build(); } } @SuppressWarnings("BooleanMethodIsAlwaysInverted") private boolean isResetServletResponse(@NonNull final HttpServletResponse response) { if (!response.isCommitted()) { response.reset(); return true; } Loggables.addLog("Http...
repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\util\web\audit\ResponseHandler.java
1
请完成以下Java代码
protected void executeCommand(Command<?> command) { try { if(commandExecutor != null) { commandExecutor.execute(command); } else { command.execute(commandContext); } } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseExecut...
return variables; } public VariableMap getVariablesLocal() { return variablesLocal; } public Collection<String> getVariableDeletions() { return variableDeletions; } public Collection<String> getVariableLocalDeletions() { return variableLocalDeletions; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\CaseExecutionCommandBuilderImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class OrderPropertiesCommandLineRunner implements CommandLineRunner { private final Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private OrderProperties orderProperties; @Override public void run(String... args) { logger.info("payTimeoutSe...
@Value("${order.create-frequency-seconds}") private Integer createFrequencySeconds; // @Value("${order.desc}") // private String desc; @Override public void run(String... args) { logger.info("payTimeoutSeconds:" + payTimeoutSeconds); logger.info("createFre...
repos\SpringBoot-Labs-master\lab-43\lab-43-demo\src\main\java\cn\iocoder\springboot\lab43\propertydemo\Application.java
2
请完成以下Java代码
protected int get_AccessLevel() { return accessLevel.intValue(); } /** Load Meta Data */ protected POInfo initPO (Properties ctx) { POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); return poi; } public String toString() { StringBuffer sb = new Strin...
{ return (String)get_Value(COLUMNNAME_Description); } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { return...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Depreciation.java
1
请在Spring Boot框架中完成以下Java代码
private static class DocTypePrintOptionsKey { @NonNull DocTypeId docTypeId; @Nullable DocumentReportFlavor flavor; } private static class DocTypePrintOptionsMap { public static final DocTypePrintOptionsMap EMPTY = new DocTypePrintOptionsMap(ImmutableMap.of()); private final ImmutableMap<DocTypePrintOp...
{ this.map = ImmutableMap.copyOf(map); } public DocumentPrintOptions getByDocTypeAndFlavor( @NonNull final DocTypeId docTypeId, @NonNull final DocumentReportFlavor flavor) { return CoalesceUtil.coalesceSuppliers( () -> map.get(DocTypePrintOptionsKey.of(docTypeId, flavor)), () -> map.get(D...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\report\DocTypePrintOptionsRepository.java
2
请完成以下Java代码
public int getMSV3_VerfuegbarkeitsanfrageEinzelne_Artikel_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_MSV3_VerfuegbarkeitsanfrageEinzelne_Artikel_ID); if (ii == null) return 0; return ii.intValue(); } @Override public de.metas.vertical.pharma.vendor.gateway.msv3.model.I_MSV3_Verfuegbarkeitsanfrag...
set_ValueNoCheck (COLUMNNAME_MSV3_VerfuegbarkeitsanfrageEinzelne_ID, null); else set_ValueNoCheck (COLUMNNAME_MSV3_VerfuegbarkeitsanfrageEinzelne_ID, Integer.valueOf(MSV3_VerfuegbarkeitsanfrageEinzelne_ID)); } /** Get MSV3_VerfuegbarkeitsanfrageEinzelne. @return MSV3_VerfuegbarkeitsanfrageEinzelne */ @Ove...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java-gen\de\metas\vertical\pharma\vendor\gateway\msv3\model\X_MSV3_VerfuegbarkeitsanfrageEinzelne_Artikel.java
1
请在Spring Boot框架中完成以下Java代码
public class HttpResponse { /** * 返回中的Header信息 */ private Header[] responseHeaders; /** * String类型的result */ private String stringResult; /** * btye类型的result */ private byte[] byteResult; public Header[] getResponseHeaders() { return responseHeaders;...
if (stringResult != null) { return stringResult.getBytes(); } return null; } public void setByteResult(byte[] byteResult) { this.byteResult = byteResult; } public String getStringResult() throws UnsupportedEncodingException { if (stringResult != null) { ...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\utils\alipay\httpClient\HttpResponse.java
2
请在Spring Boot框架中完成以下Java代码
public Mono<Long> countManagedUsers() { return userRepository.count(); } @Transactional(readOnly = true) public Mono<User> getUserWithAuthoritiesByLogin(String login) { return userRepository.findOneWithAuthoritiesByLogin(login); } @Transactional(readOnly = true) public Mono<Use...
.findAllByActivatedIsFalseAndActivationKeyIsNotNullAndCreatedDateBefore( LocalDateTime.ofInstant(Instant.now().minus(3, ChronoUnit.DAYS), ZoneOffset.UTC) ) .flatMap(user -> userRepository.delete(user).thenReturn(user)) .doOnNext(user -> log.debug("Deleted User: {}", u...
repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\gateway-app\src\main\java\com\gateway\service\UserService.java
2
请完成以下Java代码
public void setHasGraphicalNotation(boolean hasGraphicalNotation) { this.isGraphicalNotationDefined = hasGraphicalNotation; } @Override public void setDiagramResourceName(String diagramResourceName) { this.diagramResourceName = diagramResourceName; } @Override public void s...
isIdentityLinksInitialized = true; } return definitionIdentityLinkEntities; } public String getLocalizedName() { return localizedName; } @Override public void setLocalizedName(String localizedName) { this.localizedName = localizedName; } public String...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\CaseDefinitionEntityImpl.java
1
请在Spring Boot框架中完成以下Java代码
public final class OpenSaml5LogoutRequestValidatorParametersResolver implements Saml2LogoutRequestValidatorParametersResolver { static { OpenSamlInitializationService.initialize(); } private final BaseOpenSamlLogoutRequestValidatorParametersResolver delegate; /** * Constructs a {@link OpenSaml5LogoutReques...
* if one could not be resolved * @throws Saml2AuthenticationException if the {@link RequestMatcher} specifies a * non-existent {@code registrationId} */ @Override public Saml2LogoutRequestValidatorParameters resolve(HttpServletRequest request, Authentication authentication) { return this.delegate.resolve(requ...
repos\spring-security-main\saml2\saml2-service-provider\src\opensaml5Main\java\org\springframework\security\saml2\provider\service\web\authentication\logout\OpenSaml5LogoutRequestValidatorParametersResolver.java
2
请完成以下Java代码
public String toString() { return MoreObjects.toStringHelper(this) .add("sql", sql) .add("sqlParams", sqlParams) .toString(); } public SqlAndParams build() { final String sql = this.sql != null ? this.sql.toString() : ""; final Object[] sqlParamsArray = sqlParams != null ? sqlParams.toA...
} public Builder append(@NonNull final CharSequence sql, @Nullable final Object... sqlParams) { final List<Object> sqlParamsList = sqlParams != null && sqlParams.length > 0 ? Arrays.asList(sqlParams) : null; return append(sql, sqlParamsList); } public Builder append(@NonNull final CharSequence sql, @Nul...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\descriptor\SqlAndParams.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonPaymentAllocationLine { @NonNull @ApiModelProperty(required = true, dataType = "java.lang.String", value = SwaggerDocConstants.INVOICE_IDENTIFIER_DOC) String invoiceIdentifier; @ApiModelProperty(position = 10) @Nullable String docBaseType; @ApiModelProperty(position = 20) @Nullable Str...
@Nullable BigDecimal amount; @ApiModelProperty(position = 40) @Nullable BigDecimal discountAmt; @ApiModelProperty(position = 50) @Nullable BigDecimal writeOffAmt; @JsonIgnoreProperties(ignoreUnknown = true) @JsonPOJOBuilder(withPrefix = "") public static class JsonPaymentAllocationLineBuilder { } }
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-rest_api\src\main\java\de\metas\common\rest_api\v1\payment\JsonPaymentAllocationLine.java
2
请完成以下Java代码
public void setCounter (int Counter) { throw new IllegalArgumentException ("Counter is virtual column"); } /** Get Counter. @return Count Value */ public int getCounter () { Integer ii = (Integer)get_Value(COLUMNNAME_Counter); if (ii == null) return 0; return ii.intValue(); } /** Set Descripti...
{ set_Value (COLUMNNAME_PageURL, PageURL); } /** Get Page URL. @return Page URL */ public String getPageURL () { return (String)get_Value(COLUMNNAME_PageURL); } /** Set Counter Count. @param W_CounterCount_ID Web Counter Count Management */ public void setW_CounterCount_ID (int W_CounterCount_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_CounterCount.java
1
请在Spring Boot框架中完成以下Java代码
public class CityWebFluxController { @Autowired private CityHandler cityHandler; @GetMapping(value = "/{id}") @ResponseBody public Mono<City> findCityById(@PathVariable("id") Long id) { return cityHandler.findCityById(id); } @GetMapping() @ResponseBody public Flux<City> fi...
@DeleteMapping(value = "/{id}") @ResponseBody public Mono<Long> deleteCity(@PathVariable("id") Long id) { return cityHandler.deleteCity(id); } @GetMapping("/hello") public Mono<String> hello(final Model model) { model.addAttribute("name", "泥瓦匠"); model.addAttribute("city", "...
repos\springboot-learning-example-master\springboot-webflux-4-thymeleaf\src\main\java\org\spring\springboot\webflux\controller\CityWebFluxController.java
2
请完成以下Java代码
public void setDocStatus (final java.lang.String DocStatus) { set_Value (COLUMNNAME_DocStatus, DocStatus); } @Override public java.lang.String getDocStatus() { return get_ValueAsString(COLUMNNAME_DocStatus); } @Override public void setDocumentNo (final java.lang.String DocumentNo) { set_Value (COLUMNN...
else set_ValueNoCheck (COLUMNNAME_M_CostRevaluation_ID, M_CostRevaluation_ID); } @Override public int getM_CostRevaluation_ID() { return get_ValueAsInt(COLUMNNAME_M_CostRevaluation_ID); } @Override public void setPosted (final boolean Posted) { set_Value (COLUMNNAME_Posted, Posted); } @Override p...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_CostRevaluation.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setC_BP_Contact_ID (final int C_BP_Contact_ID) { if (C_BP_Contact_ID < 1) set_ValueNoCheck (COLUMNNAME_C_BP_Contact_ID, null); else set_ValueNoCheck (COL...
return get_ValueAsString(COLUMNNAME_Firstname); } @Override public void setIsCompany (final boolean IsCompany) { set_ValueNoCheck (COLUMNNAME_IsCompany, IsCompany); } @Override public boolean isCompany() { return get_ValueAsBoolean(COLUMNNAME_IsCompany); } @Override public void setLastname (final @Nu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_Adv_Search_v.java
1
请完成以下Java代码
private PO createNode(int nodeId, int parentId) { final String nodeTableName = getNodeTableName(); PO node = null; if (nodeTableName.equals(MTree_Node.Table_Name)) { MTree_Node n = new MTree_Node(this, nodeId); if (nodeId != ROOT_Node_ID) n.setParent_ID(parentId); node = n; } else if (nodeTabl...
if (nodeId != ROOT_Node_ID) n.setParent_ID(parentId); node = n; } else { throw new AdempiereException("No Table Model for " + nodeTableName); } node.saveEx(); return node; } private final static TreeListenerSupport listeners = new TreeListenerSupport(); public static void registerTreeListene...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MTree_Base.java
1
请完成以下Java代码
private List<I_MD_Stock_From_HUs_V> retrieveHuData() { addLog("Performing a select for Records to correct on MD_Stock_From_HUs_V"); return queryBL .createQueryBuilder(I_MD_Stock_From_HUs_V.class) .addNotEqualsFilter(I_MD_Stock_From_HUs_V.COLUMNNAME_QtyOnHandChange, ZERO) .create() .list(); } pri...
final ProductId productId = ProductId.ofRepoId(huBasedDataRecord.getM_Product_ID()); final Quantity qtyInStorageUOM = Quantitys.of(huBasedDataRecord.getQtyOnHandChange(), UomId.ofRepoId(huBasedDataRecord.getC_UOM_ID())); final Quantity qtyInProductUOM = uomConversionBL.convertToProductUOM(qtyInStorageUOM, productId...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java\de\metas\material\cockpit\stock\process\MD_Stock_Update_From_M_HUs.java
1
请在Spring Boot框架中完成以下Java代码
public HelloWorldBean helloWorldBean() { return new HelloWorldBean("Hello World"); } // Path Parameters // /users/{id}/todos/{id} => /users/2/todos/200 // /hello-world/path-variable/{name} // /hello-world/path-variable/Ranga @GetMapping(path = "/hello-world/path-variable/{name}") public HelloWorldBean hel...
Locale locale = LocaleContextHolder.getLocale(); return messageSource.getMessage("good.morning.message", null, "Default Message", locale ); //return "Hello World V2"; //1: //2: // - Example: `en` - English (Good Morning) // - Example: `nl` - Dutch (Goedemorgen) // - Example: `fr` - French (Bonjour) //...
repos\master-spring-and-spring-boot-main\12-rest-api\src\main\java\com\in28minutes\rest\webservices\restfulwebservices\helloworld\HelloWorldController.java
2
请完成以下Java代码
public List<BpmnParseHandler> getHandlersFor(Class<? extends BaseElement> clazz) { return parseHandlers.get(clazz); } public void addHandlers(List<BpmnParseHandler> bpmnParseHandlers) { for (BpmnParseHandler bpmnParseHandler : bpmnParseHandlers) { addHandler(bpmnParseHandler); ...
if (element instanceof FlowElement) { bpmnParse.setCurrentFlowElement((FlowElement) element); } // Execute parse handlers List<BpmnParseHandler> handlers = parseHandlers.get(element.getClass()); if (handlers == null) { LOGGER.warn("Could not find matching parse ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\parser\BpmnParseHandlers.java
1
请完成以下Java代码
public Attribute get(String from, String to) { return get(from + "@" + to); } static class Attribute { final static Attribute NULL = new Attribute("未知", 10000.0f); /** * 依存关系 */ public String[] dependencyRelation; /** * 概率 */ ...
this.p = new float[]{p}; } /** * 加权 * @param boost */ public void setBoost(float boost) { for (int i = 0; i < p.length; ++i) { p[i] *= boost; } } @Override public String toString() ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\bigram\WordNatureDependencyModel.java
1
请完成以下Java代码
public class MyKey { private static final Logger LOG = LoggerFactory.getLogger(MyKey.class); private String name; private int id; public MyKey(int id, String name) { this.id = id; this.name = name; } public String getName() { return name; } public void set...
return id; } @Override public String toString() { return "MyKey [name=" + name + ", id=" + id + "]"; } @Override public boolean equals(Object obj) { LOG.debug("Calling equals() for key: " + obj); if (this == obj) return true; if (obj == null) ...
repos\tutorials-master\core-java-modules\core-java-collections-maps-3\src\main\java\com\baeldung\map\advanced\MyKey.java
1
请完成以下Java代码
public static class VariableInfo { protected Map<String, Object> variables; protected Map<String, Object> formVariables; protected String formOutcome; protected FormInfo formInfo; public VariableInfo(Map<String, Object> variables) { this.variables = variables; ...
} public void setFormVariables(Map<String, Object> formVariables) { this.formVariables = formVariables; } public String getFormOutcome() { return formOutcome; } public void setFormOutcome(String formOutcome) { this.formOutcome = formOutcome;...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\behavior\impl\ChildTaskActivityBehavior.java
1
请完成以下Java代码
public class RescheduleTimerJobCmd implements Command<TimerJobEntity>, Serializable { private static final long serialVersionUID = 1L; private final String timerJobId; private String timeDate; private String timeDuration; private String timeCycle; private String endDate; private String cal...
} @Override public TimerJobEntity execute(CommandContext commandContext) { TimerEventDefinition ted = new TimerEventDefinition(); ted.setTimeDate(timeDate); ted.setTimeDuration(timeDuration); ted.setTimeCycle(timeCycle); ted.setEndDate(endDate); ted.setCalendarNa...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cmd\RescheduleTimerJobCmd.java
1
请在Spring Boot框架中完成以下Java代码
public static class Config { @Min(1) private int replenishRate; @Min(0) private long burstCapacity = 1; @Min(1) private int requestedTokens = 1; public int getReplenishRate() { return replenishRate; } public Config setReplenishRate(int replenishRate) { this.replenishRate = replenishRate; ...
this.burstCapacity = burstCapacity; return this; } public int getRequestedTokens() { return requestedTokens; } public Config setRequestedTokens(int requestedTokens) { this.requestedTokens = requestedTokens; return this; } @Override public String toString() { return new ToStringCreator(th...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\ratelimit\RedisRateLimiter.java
2
请完成以下Java代码
private static final class BPartnerToUpdate { private final int bpartnerId; private final boolean alsoResetCreditStatusFromBPGroup; } private static final WorkpackagesOnCommitSchedulerTemplate<BPartnerToUpdate> SCHEDULER = new WorkpackagesOnCommitSchedulerTemplate<BPartnerToUpdate>(C_BPartner_UpdateStatsFromBPa...
} }; @Override public Result processWorkPackage(final I_C_Queue_WorkPackage workpackage, final String localTrxName) { // Services final IBPartnerStatsDAO bpartnerStatsDAO = Services.get(IBPartnerStatsDAO.class); final List<I_C_BPartner> bpartners = retrieveAllItems(I_C_BPartner.class); final boolean alsoS...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\bpartner\service\async\spi\impl\C_BPartner_UpdateStatsFromBPartner.java
1
请完成以下Java代码
public MUserDefField getField(AdFieldId AD_Field_ID) { if (AD_Field_ID == null) { return null; } for (MUserDefField field : getFields()) { if (AD_Field_ID.getRepoId() == field.getAD_Field_ID()) { return field; } } return null; } public void apply(GridTabVO vo) {
final String name = getName(); if (!Check.isEmpty(name) && name.length() > 1) vo.setName(name); if (!Check.isEmpty(getDescription())) vo.setDescription(getDescription()); if (!Check.isEmpty(getHelp())) vo.setHelp(getHelp()); // vo.IsSingleRow = this.isSingleRow(); vo.setReadOnly(this.isReadOnly());...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\model\MUserDefTab.java
1
请完成以下Java代码
public void setExpressionTextLengthCacheLimit(int expressionTextLengthCacheLimit) { this.expressionTextLengthCacheLimit = expressionTextLengthCacheLimit; } public void addPreDefaultResolver(ELResolver elResolver) { if (this.preDefaultResolvers == null) { this.preDefaultResolvers = n...
this.postDefaultResolvers = new ArrayList<>(); } this.postDefaultResolvers.add(elResolver); } public void addPreBeanResolver(ELResolver elResolver) { if (this.preBeanResolvers == null) { this.preBeanResolvers = new ArrayList<>(); } this.preBeanResolvers.add...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\el\DefaultExpressionManager.java
1
请完成以下Java代码
public IUnlockCommand setRecordByModel(final Object model) { _recordsToUnlock.setRecordByModel(model); return this; } @Override public IUnlockCommand setRecordsByModels(final Collection<?> models) { _recordsToUnlock.setRecordsByModels(models); return this; } @Override public IUnlockCommand setRecordBy...
{ _recordsToUnlock.setRecordsBySelection(modelClass, adPIstanceId); return this; } @Override public final AdTableId getSelectionToUnlock_AD_Table_ID() { return _recordsToUnlock.getSelection_AD_Table_ID(); } @Override public final PInstanceId getSelectionToUnlock_AD_PInstance_ID() { return _recordsToUn...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\lock\api\impl\UnlockCommand.java
1
请在Spring Boot框架中完成以下Java代码
public class RabbitMQEnqueuer implements EventEnqueuer { @NonNull private static final Logger logger = EventBusConfig.getLogger(RabbitMQEnqueuer.class); @NonNull private final AmqpTemplate amqpTemplate; @NonNull private final RabbitMQDestinationResolver rabbitMQDestinationResolver; @Override public void enqueueDi...
logger.debug("Send event; topicName={}; event={}; type={}", topic.getName(), event, topic.getType()); } @NonNull private MessagePostProcessor getMessagePostProcessor(@NonNull final Topic topic) { return message -> { final Map<String, Object> headers = message.getMessageProperties().getHeaders(); headers.pu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\impl\RabbitMQEnqueuer.java
2
请在Spring Boot框架中完成以下Java代码
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Phone phone = (Phone)o; return Objects.equals(this.countryCode, phone.countryCode) && Objects.equals(this.number, phone.number); } @Override public int hashCode...
{ StringBuilder sb = new StringBuilder(); sb.append("class Phone {\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); sb.append(" number: ").append(toIndentedString(number)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to s...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\Phone.java
2
请在Spring Boot框架中完成以下Java代码
public void deleteHistoricIdentityLinksByProcessInstanceId(String processInstanceId) { getHistoricIdentityLinkEntityManager().deleteHistoricIdentityLinksByProcInstance(processInstanceId); } @Override public void deleteHistoricIdentityLinksByTaskId(String taskId) { getHistoricIdentityLinkEnt...
@Override public void bulkDeleteHistoricIdentityLinksByScopeIdsAndScopeType(Collection<String> scopeIds, String scopeType) { getHistoricIdentityLinkEntityManager().bulkDeleteHistoricIdentityLinksForScopeIdsAndScopeType(scopeIds, scopeType); } @Override public void deleteHistoricProcessIdentityL...
repos\flowable-engine-main\modules\flowable-identitylink-service\src\main\java\org\flowable\identitylink\service\impl\HistoricIdentityLinkServiceImpl.java
2
请完成以下Java代码
private void detectDuplicates(final ImportRecordsSelection selection) { final StringBuilder sql = new StringBuilder("SELECT i.I_BankStatement_ID, l.C_BankStatementLine_ID, i.EftTrxID " + "FROM I_BankStatement i, C_BankStatement s, C_BankStatementLine l " + "WHERE i.I_isImported='N' " ...
rs.close(); pstmtDuplicates.close(); pupdt.close(); rs = null; pstmtDuplicates = null; pupdt = null; } catch (Exception e) { logger.error("DetectDuplicates {}", e.getMessage()); } logger.warn("Duplicates= {}", no); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\impexp\BankStatementImportTableSqlUpdater.java
1
请完成以下Java代码
public String getName() { return name; } @Override public void setName(String name) { this.name = name; } @Override public Date getTimeStamp() { return timeStamp; } @Override public void setTimeStamp(Date timeStamp) { this.timeStamp = timeStamp; } ...
return elementId; } @Override public void setElementId(String elementId) { this.elementId = elementId; } @Override public String getTenantId() { return tenantId; } @Override public void setTenantId(String tenantId) { this.tenantId = tenantId; } }
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\HistoricMilestoneInstanceEntityImpl.java
1
请完成以下Java代码
public OAuth2User getPrincipal() { return this.principal; } @Override public Object getCredentials() { return ""; } /** * Returns the {@link ClientRegistration client registration}. * @return the {@link ClientRegistration} */ public ClientRegistration getClientRegistration() { return this.clientRegi...
} /** * Returns the {@link OAuth2AccessToken access token}. * @return the {@link OAuth2AccessToken} */ public OAuth2AccessToken getAccessToken() { return this.accessToken; } /** * Returns the {@link OAuth2RefreshToken refresh token}. * @return the {@link OAuth2RefreshToken} * @since 5.1 */ public...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\authentication\OAuth2LoginAuthenticationToken.java
1
请完成以下Java代码
public static <V> LinkedList<ResultTerm<V>> segmentReverseOrder(String text, AhoCorasickDoubleArrayTrie<V> trie) { return segmentReverseOrder(text.toCharArray(), trie); } /** * 逆向最长分词,合并未知语素 * @param charArray 文本 * @param trie 自动机 * @param <V> 类型 * @return 结果链表 */ ...
int offset = i - 1; byte preCharType = CharType.get(charArray[offset]); while (i > 0 && wordNet[i] == null && CharType.get(charArray[i - 1]) == preCharType) { sbTerm.append(charArray[i - 1]); preCharType = CharType.get(charArray[i -...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\Other\CommonAhoCorasickSegmentUtil.java
1
请在Spring Boot框架中完成以下Java代码
public class DDOrderDeletedEventHandler implements MaterialEventHandler<DDOrderDeletedEvent> { private final IOrgDAO orgDAO = Services.get(IOrgDAO.class); private final MainDataRequestHandler mainDataRequestHandler; private final DDOrderDetailRequestHandler ddOrderDetailRequestHandler; private final CandidateRepos...
.mainDataRequestHandler(mainDataRequestHandler) .abstractDDOrderEvent(event) .ddOrderLine(ddOrderLine) .orgZone(timeZone) .build(); mainDataUpdater.handleDelete(); } final int ddOrderId = event.getDdOrder().getDdOrderId(); event.getDdOrder().getLines().forEach(line -> deleteCandidates(ddO...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\ddorder\DDOrderDeletedEventHandler.java
2
请完成以下Java代码
protected ProcessPreconditionsResolution checkPreconditionsApplicable() { if (!getSingleSelectedInvoiceId().isPresent()) { return ProcessPreconditionsResolution.rejectWithInternalReason("not a single selected Invoice"); } return ProcessPreconditionsResolution.accept(); } @Override protected String doIt...
.viewId(viewId.getViewId()) .target(ViewOpenTarget.ModalOverlay) .build()); return MSG_OK; } private Optional<InvoiceId> getSingleSelectedInvoiceId() { final DocumentIdsSelection selectedRowIds = getSelectedRowIds(); return selectedRowIds.isSingleDocumentId() ? Optional.of(selectedRowIds.getSingl...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\payment_allocation\process\PaymentView_Launcher_From_C_Invoice_View.java
1
请在Spring Boot框架中完成以下Java代码
public class SecurityConfiguration extends WebSecurityConfigurerAdapter implements WebMvcConfigurer { private final SecurityConfigurationProperties properties; SecurityConfiguration(SecurityConfigurationProperties properties) { this.properties = properties; } @Override public void configu...
.allowedOrigins(properties.getAllowedOrigins().toArray(new String[0])) .allowedHeaders("*") .allowCredentials(true); } } @ConstructorBinding @ConfigurationProperties("security") class SecurityConfigurationProperties { private final List<String> allowedOrigins; SecurityConfi...
repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\application\security\SecurityConfiguration.java
2
请完成以下Java代码
public void setFilterType (final java.lang.String FilterType) { set_Value (COLUMNNAME_FilterType, FilterType); } @Override public java.lang.String getFilterType() { return get_ValueAsString(COLUMNNAME_FilterType); } @Override public org.compiere.model.I_MobileUI_UserProfile_Picking getMobileUI_UserProfil...
} @Override public int getPickingProfile_Filter_ID() { return get_ValueAsInt(COLUMNNAME_PickingProfile_Filter_ID); } @Override public void setSeqNo (final int SeqNo) { set_Value (COLUMNNAME_SeqNo, SeqNo); } @Override public int getSeqNo() { return get_ValueAsInt(COLUMNNAME_SeqNo); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\picking\model\X_PickingProfile_Filter.java
1
请完成以下Java代码
public Builder noSorting() { _noSorting = true; _orderBys = null; return this; } public boolean isNoSorting() { return _noSorting; } public Builder addOrderBy(@NonNull final DocumentQueryOrderBy orderBy) { Check.assume(!_noSorting, "sorting not disabled for {}", this); if (_orderBys =...
this.firstRow = firstRow; return this; } public Builder setPageLength(final int pageLength) { this.pageLength = pageLength; return this; } public Builder setExistingDocumentsSupplier(final Function<DocumentId, Document> existingDocumentsSupplier) { this.existingDocumentsSupplier = existingDocu...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentQuery.java
1
请完成以下Spring Boot application配置
# database init, supports mysql too database=h2 spring.sql.init.schema-locations=classpath*:db/${database}/schema.sql spring.sql.init.data-locations=classpath*:db/${database}/data.sql # Web spring.thymeleaf.mode=HTML # JPA spring.jpa.hibernate.ddl-auto=none spring.jpa.open-in-view=false spring.jpa.hibernate.naming.ph...
el.org.springframework=INFO # logging.level.org.springframework.web=DEBUG # logging.level.org.springframework.context.annotation=TRACE # Maximum time static resources should be cached spring.web.resources.cache.cachecontrol.max-age=12h
repos\spring-petclinic-main\src\main\resources\application.properties
2
请完成以下Java代码
public Execution getExecution() { return execution; } public void setExecution(Execution execution) { this.execution = execution; } public Task getTask() { return task; } public void setTask(Task task) { this.task = task; } @SuppressWarnings("unchecked") public <T extends TypedValu...
throw new ProcessEngineCdiException("Cannot set a local cached variable: neither a Task nor an Execution is associated."); } cachedVariablesLocal.put(variableName, value); } public VariableMap getCachedVariablesLocal() { return cachedVariablesLocal; } public void flushVariableCache() { if(task...
repos\camunda-bpm-platform-master\engine-cdi\core\src\main\java\org\camunda\bpm\engine\cdi\impl\context\ScopedAssociation.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonBPartnerProduct { @Nullable @JsonProperty("MKREDID") String bpartnerId; @JsonProperty("STDKRED") boolean currentVendor; @JsonProperty("LIEFERANTENFREIGABE") boolean isExcludedFromPurchase; @JsonProperty("INAKTIV") boolean isActive; @Nullable @JsonProperty("METASFRESHID") String bPartner...
public JsonBPartnerProduct( @JsonProperty("MKREDID") final @Nullable String bpartnerId, @JsonProperty("STDKRED") final @NonNull Integer currentVendor, @JsonProperty("LIEFERANTENFREIGABE") final int approvedForPurchase, @JsonProperty("INAKTIV") final int inactive, @JsonProperty("METASFRESHID") final @Null...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-grssignum\src\main\java\de\metas\camel\externalsystems\grssignum\to_grs\api\model\JsonBPartnerProduct.java
2
请完成以下Java代码
public void setConfidentialType (java.lang.String ConfidentialType) { set_Value (COLUMNNAME_ConfidentialType, ConfidentialType); } /** Get Vertraulichkeit. @return Type of Confidentiality */ @Override public java.lang.String getConfidentialType () { return (java.lang.String)get_Value(COLUMNNAME_Confid...
} /** Get Moderation Status. @return Status of Moderation */ @Override public java.lang.String getModeratorStatus () { return (java.lang.String)get_Value(COLUMNNAME_ModeratorStatus); } /** Set Betreff. @param Subject Mail Betreff */ @Override public void setSubject (java.lang.String Subject) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_ChatEntry.java
1
请完成以下Java代码
public void setM_ShipmentSchedule_ID (final int M_ShipmentSchedule_ID) { if (M_ShipmentSchedule_ID < 1) set_Value (COLUMNNAME_M_ShipmentSchedule_ID, null); else set_Value (COLUMNNAME_M_ShipmentSchedule_ID, M_ShipmentSchedule_ID); } @Override public int getM_ShipmentSchedule_ID() { return get_ValueA...
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyDeliveredCatch); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyLU (final @Nullable BigDecimal QtyLU) { set_Value (COLUMNNAME_QtyLU, QtyLU); } @Override public BigDecimal getQtyLU() { final BigDecimal bd = get_ValueAsBig...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inoutcandidate\model\X_M_ShipmentSchedule_QtyPicked.java
1
请完成以下Java代码
public DataEntryRecord copyAsImmutable() { if (readOnly) { return this; } else { return new DataEntryRecord(this, true); } } private void assertReadWrite() { if (readOnly) { throw new AdempiereException("Changing readonly instance is not allowed: " + this); } } void setId(@NonNull fin...
} public Optional<UserId> getCreatedByValue(@NonNull final DataEntryFieldId fieldId) { return getCreatedUpdatedInfo(fieldId) .map(CreatedUpdatedInfo::getCreatedBy); } public Optional<ZonedDateTime> getUpdatedValue(@NonNull final DataEntryFieldId fieldId) { return getCreatedUpdatedInfo(fieldId) .map(C...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dataentry\data\DataEntryRecord.java
1
请在Spring Boot框架中完成以下Java代码
public void handleMessage(WebSocketSession session, WebSocketMessage<?> message) throws Exception { TextMessage textMessage = (TextMessage)message; String payload = textMessage.getPayload(); LOG.info("WS Terminal message: {} message={}", session.getId(), payload); session.sendMessage(ne...
LOG.info("WS Terminal connection closed: {}", session.getId()); this.sessions.remove(session.getId(), session); } @Override public boolean supportsPartialMessages() { return false; } @PreDestroy public void close() throws Exception { LOG.info("WS Terminal shutdown"); ...
repos\spring-examples-java-17\spring-websockets\src\main\java\itx\examples\springboot\websockets\config\WSTerminalHandler.java
2
请完成以下Java代码
private DocumentFilterDescriptor createIsCustomerFilterDescriptor() { return DocumentFilterDescriptor.builder() .setFilterId(FILTERID_IsCustomer) .setFrequentUsed(true) .addParameter(DocumentFilterParamDescriptor.builder() .fieldName(PARAM_IsCustomer) .displayName(Services.get(IMsgBL.class).t...
} public DocumentFilterList extractFilters(@NonNull final CreateViewRequest request) { return request.isUseAutoFilters() ? getDefaultFilters() : request.getFiltersUnwrapped(getFilterDescriptorsProvider()); } private DocumentFilterList getDefaultFilters() { if (defaultFilters == null) { final Doc...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\pricingconditions\view\PricingConditionsViewFilters.java
1
请完成以下Java代码
public void setIsOneTime (final boolean IsOneTime) { set_Value (COLUMNNAME_IsOneTime, IsOneTime); } @Override public boolean isOneTime() { return get_ValueAsBoolean(COLUMNNAME_IsOneTime); } @Override public void setIsRemitTo (final boolean IsRemitTo) { set_Value (COLUMNNAME_IsRemitTo, IsRemitTo); } ...
{ return get_ValueAsString(COLUMNNAME_Name); } @Override public void setPhone (final @Nullable java.lang.String Phone) { set_Value (COLUMNNAME_Phone, Phone); } @Override public java.lang.String getPhone() { return get_ValueAsString(COLUMNNAME_Phone); } @Override public void setPhone2 (final @Nullab...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_Location_QuickInput.java
1
请在Spring Boot框架中完成以下Java代码
public final class OAuth2AuthorizationServerJwtAutoConfiguration { @Bean @Role(BeanDefinition.ROLE_INFRASTRUCTURE) @ConditionalOnMissingBean JWKSource<SecurityContext> jwkSource() { RSAKey rsaKey = getRsaKey(); JWKSet jwkSet = new JWKSet(rsaKey); return new ImmutableJWKSet<>(jwkSet); } private static RSAK...
return keyPair; } @Configuration(proxyBeanMethods = false) @ConditionalOnClass(JwtDecoder.class) static class JwtDecoderConfiguration { @Bean @ConditionalOnMissingBean JwtDecoder jwtDecoder(JWKSource<SecurityContext> jwkSource) { return OAuth2AuthorizationServerConfiguration.jwtDecoder(jwkSource); } ...
repos\spring-boot-4.0.1\module\spring-boot-security-oauth2-authorization-server\src\main\java\org\springframework\boot\security\oauth2\server\authorization\autoconfigure\servlet\OAuth2AuthorizationServerJwtAutoConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public String getWithTransactionTimeout(@RequestParam String title) { return getAuthor(title); } private final TimeLimiter ourTimeLimiter = TimeLimiter.of(TimeLimiterConfig.custom() .timeoutDuration(Duration.ofMillis(500)) .build()); @GetMapping("/author/resilience4j") public C...
.retrieve() .bodyToMono(String.class) .block(); } @GetMapping("/author/restclient") public String getWithRestClient(@RequestParam String title) { return restClient.get() .uri(uriBuilder -> uriBuilder.path("/author/transactional") .queryParam("titl...
repos\tutorials-master\spring-web-modules\spring-rest-http\src\main\java\com\baeldung\requesttimeout\RequestTimeoutRestController.java
2
请完成以下Java代码
public class AccountSchemeName1Choice { @XmlElement(name = "Cd") protected String cd; @XmlElement(name = "Prtry") protected String prtry; /** * Gets the value of the cd property. * * @return * possible object is * {@link String } * */ public Str...
} /** * Gets the value of the prtry property. * * @return * possible object is * {@link String } * */ public String getPrtry() { return prtry; } /** * Sets the value of the prtry property. * * @param value * allowed obje...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\AccountSchemeName1Choice.java
1
请完成以下Spring Boot application配置
spring: datasource: driver-class-name: org.apache.shardingsphere.driver.ShardingSphereDriver url: jdbc:shardingsphere:classpath:sharding.yml jpa: properties: hibernate: d
ialect: org.hibernate.dialect.MySQL8Dialect hibernate: ddl-auto: create-drop
repos\springboot-demo-master\sharding-jdbc\src\main\resources\application.yml
2
请完成以下Java代码
public HistoricExternalTaskLogQuery orderByProcessDefinitionId() { orderBy(HistoricExternalTaskLogQueryProperty.PROCESS_DEFINITION_ID); return this; } @Override public HistoricExternalTaskLogQuery orderByProcessDefinitionKey() { orderBy(HistoricExternalTaskLogQueryProperty.PROCESS_DEFINITION_KEY); ...
return commandContext .getHistoricExternalTaskLogManager() .findHistoricExternalTaskLogsByQueryCriteria(this, page); } // getters & setters //////////////////////////////////////////////////////////// protected void setState(ExternalTaskState state) { this.state = state; } public boolea...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricExternalTaskLogQueryImpl.java
1
请完成以下Java代码
public static void main(String[] args) throws Exception { ConfigurableApplicationContext context = SpringApplication.run(Application.class, args); JmsTemplate jmsTemplate = context.getBean(JmsTemplate.class); //Send an user System.out.println("Sending an user message."); jmsTem...
public MessageConverter jacksonJmsMessageConverter() { MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter(); converter.setTargetType(MessageType.TEXT); converter.setTypeIdPropertyName("_type"); return converter; } @Bean public JmsListenerContaine...
repos\Spring-Boot-Advanced-Projects-main\springboot2-jms-activemq\src\main\java\net\alanbinu\springboot\Application.java
1
请完成以下Java代码
private void validateState() { if (OrderStatus.COMPLETED.equals(status)) { throw new DomainException("The order is in completed state."); } } private void validateProduct(final Product product) { if (product == null) { throw new DomainException("The product canno...
} @Override public int hashCode() { return Objects.hash(id, orderItems, price, status); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof Order)) return false; Order other = (Order) obj; ...
repos\tutorials-master\patterns-modules\ddd\src\main\java\com\baeldung\dddhexagonalspring\domain\Order.java
1
请完成以下Java代码
private SourceDocumentLine createSourceDocumentLine(@NonNull final I_C_OrderLine orderLineRecord, @NonNull final SOTrx soTrx) { final IProductDAO productsRepo = Services.get(IProductDAO.class); final ProductId productId = ProductId.ofRepoId(orderLineRecord.getM_Product_ID()); final ProductCategoryId productCateg...
private final ConcurrentHashMap<PricingConditionsBreak, Money> basePricesCache = new ConcurrentHashMap<>(); public OrderLineBasePricingSystemPriceCalculator(@NonNull final I_C_OrderLine orderLine) { this.orderLine = orderLine; } @Override public Money calculate(final BasePricingSystemPriceCalculatorReque...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\pricingconditions\view\OrderLinePricingConditionsViewFactory.java
1
请在Spring Boot框架中完成以下Java代码
public AuthenticationManager authManager(HttpSecurity http) throws Exception { return http.getSharedObject(AuthenticationManagerBuilder.class) .authenticationProvider(authProvider()) .build(); } @Bean public WebSecurityCustomizer webSecurityCustomizer() { return (web...
return http.build(); } @Bean public DaoAuthenticationProvider authProvider() { final CustomAuthenticationProvider authProvider = new CustomAuthenticationProvider(userRepository, userDetailsService); authProvider.setPasswordEncoder(encoder()); return authProvider; } ...
repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\rolesauthorities\config\SecurityConfig.java
2
请完成以下Java代码
public class Order { //下单日期 private Date bookingDate; //订单原价金额 private int amout; private int score; private Person person; public int getScore() { return score; } public void setScore(int score) { this.score = score; } public Date getBookingDate() { ...
public int getAmout() { return amout; } public void setAmout(int amout) { this.amout = amout; } public Person getPerson() { return person; } public void setPerson(Person person) { this.person = person; } }
repos\spring-boot-student-master\spring-boot-student-drools\src\main\java\com\xiaolyuh\domain\model\Order.java
1
请完成以下Java代码
public java.lang.String getISO_Code () { return (java.lang.String)get_Value(COLUMNNAME_ISO_Code); } /** Set Name. @param Name Alphanumeric identifier of the entity */ @Override public void setName (java.lang.String Name) { set_ValueNoCheck (COLUMNNAME_Name, Name); } /** Get Name. @return Alphan...
*/ @Override public java.lang.String getPhone () { return (java.lang.String)get_Value(COLUMNNAME_Phone); } /** Set Steuer-ID. @param TaxID Tax Identification */ @Override public void setTaxID (java.lang.String TaxID) { set_ValueNoCheck (COLUMNNAME_TaxID, TaxID); } /** Get Steuer-ID. @return T...
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java-gen\de\metas\rfq\model\X_C_RfQResponse_v.java
1
请完成以下Java代码
public class CamundaBpmRunLogger extends BaseLogger { public static final String PROJECT_CODE = "RUN"; public static final String PROJECT_ID = "CR"; public static final String PACKAGE = "org.camunda.bpm.run"; public static final CamundaBpmRunLogger LOG = createLogger(CamundaBpmRunLogger.class, PROJECT_CODE, P...
"Unable to register the process engine plugin '{}'. " + "Please ensure that the correct plugin class is configured in your " + "YAML configuration file, and that the class is present on the " + "classpath. More details: {}", ...
repos\camunda-bpm-platform-master\distro\run\core\src\main\java\org\camunda\bpm\run\utils\CamundaBpmRunLogger.java
1
请完成以下Java代码
public int getSerializerIndex(TypedValueSerializer<?> serializer) { return serializerList.indexOf(serializer); } public int getSerializerIndexByName(String serializerName) { TypedValueSerializer<?> serializer = serializerMap.get(serializerName); if(serializer != null) { return getSerializerIndex(...
serializer = thisSerializer; } copy.addSerializer(serializer); } // add all "other" serializers that did not exist before to the end of the list for (TypedValueSerializer<?> otherSerializer : other.getSerializers()) { if (!copy.serializerMap.containsKey(otherSerializer.getName())) { ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\variable\serializer\DefaultVariableSerializers.java
1
请在Spring Boot框架中完成以下Java代码
public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { http. authorizeRequests().antMatchers("/**").permitAll(); } @Autowired public void configureGlobal(AuthenticationManagerBuilder auth) ...
@Bean public PasswordEncoder passwordEncoder() { return new PasswordEncoder() { @Override public String encode(CharSequence charSequence) { return charSequence.toString(); } @Override public boolean matches(CharSequence charSequenc...
repos\SpringBootLearning-master (1)\springboot-security-oauth2-jwt\jwt-authserver\src\main\java\com\gf\config\WebSecurityConfig.java
2
请完成以下Java代码
public void destroy(final IDocOutboundProducerService producerService) { final String tableName = getTableName(); modelValidationEngine.removeModelChange(tableName, this); modelValidationEngine.removeDocValidate(tableName, this); } // NOTE: keep in sync with destroy method @Override public void initialize(f...
if (!acceptDocument(po)) { return null; } if (timing == ModelValidator.TIMING_AFTER_COMPLETE && !Services.get(IDocumentBL.class).isReversalDocument(po)) { createDocOutbound(po); } if (timing == ModelValidator.TIMING_AFTER_VOID || timing == ModelValidator.TIMING_AFTER_REVERSEACCRUAL || ti...
repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java\de\metas\document\archive\interceptor\DocOutboundProducerValidator.java
1
请完成以下Java代码
static void initCipher(Cipher cipher, int mode, SecretKey secretKey, @Nullable AlgorithmParameterSpec parameterSpec) { try { if (parameterSpec != null) { cipher.init(mode, secretKey, parameterSpec); } else { cipher.init(mode, secretKey); } } catch (InvalidKeyException ex) { throw new Ill...
* initialized mode). */ static byte[] doFinal(Cipher cipher, byte[] input) { try { return cipher.doFinal(input); } catch (IllegalBlockSizeException ex) { throw new IllegalStateException("Unable to invoke Cipher due to illegal block size", ex); } catch (BadPaddingException ex) { throw new IllegalSt...
repos\spring-security-main\crypto\src\main\java\org\springframework\security\crypto\encrypt\CipherUtils.java
1
请完成以下Java代码
private UOMConversionRate getRateOrNull(@NonNull final UomId fromUomId, @NonNull final UomId toUomId) { if (fromUomId.equals(toUomId)) { return UOMConversionRate.one(fromUomId); } final FromAndToUomIds key = FromAndToUomIds.builder() .fromUomId(fromUomId) .toUomId(toUomId) .build(); final UO...
.filter(UOMConversionRate::isCatchUOMForProduct) .map(UOMConversionRate::getToUomId) .collect(ImmutableSet.toImmutableSet()); } private static FromAndToUomIds toFromAndToUomIds(final UOMConversionRate conversion) { return FromAndToUomIds.builder() .fromUomId(conversion.getFromUomId()) .toUomId(con...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\uom\UOMConversionsMap.java
1
请完成以下Java代码
public ColumnInfo setWidthMin(final int widthMin) { this.widthMin = widthMin; return this; } public int getWidthMin(final int widthMinDefault) { if (widthMin < 0) { return widthMinDefault; } return widthMin; } private String columnName = null; /** * Sets internal (not translated) name of...
public int getPrecision() { return this.precision; } public ColumnInfo setSortNo(final int sortNo) { this.sortNo = sortNo; return this; } /** * Gets SortNo. * * @return * @see I_AD_Field#COLUMNNAME_SortNo. */ public int getSortNo() { return sortNo; } @Override public String toString() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\minigrid\ColumnInfo.java
1
请完成以下Java代码
private static Method getMethodOrNull( @NonNull final Class<? extends RepoIdAware> repoIdClass, @NonNull final String methodName, final Class<?>... parameterTypes) { try { return repoIdClass.getMethod(methodName, parameterTypes); } catch (final NoSuchMethodException e) { return null; } cat...
@Value @Builder @VisibleForTesting static class RepoIdAwareDescriptor { @NonNull IntFunction<RepoIdAware> ofRepoIdFunction; @NonNull IntFunction<RepoIdAware> ofRepoIdOrNullFunction; } public static <T, R extends RepoIdAware> Comparator<T> comparingNullsLast(@NonNull final Function<T, R> keyMapper) { r...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\lang\RepoIdAwares.java
1
请在Spring Boot框架中完成以下Java代码
public class RedisConfiguration extends CachingConfigurerSupport { @Bean public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) { RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>(); redisTemplate.setConnectionFactory(redisConnectionFac...
// 设置支持事务 redisTemplate.setEnableTransactionSupport(true); redisTemplate.afterPropertiesSet(); return redisTemplate; } @Bean public RedisSerializer<Object> redisSerializer() { //创建JSON序列化器 ObjectMapper objectMapper = new ObjectMapper(); objectMapper.setVisibi...
repos\spring-boot-projects-main\玩转SpringBoot系列案例源码\spring-boot-redis\src\main\java\cn\lanqiao\springboot3\redis\RedisConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public class Demo13Producer { private Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private RabbitTemplate rabbitTemplate; public void syncSend(Integer id) { // 创建 Demo13Message 消息 Demo13Message message = new Demo13Message(); message.setId(id); // 同步发...
@Override public void handle(long deliveryTag, boolean multiple) throws IOException { logger.info("[handle][Confirm 成功]"); } }, new ConfirmCallback() { @Override public void handle(long deliveryTag, boolean multiple) throws IOException { ...
repos\SpringBoot-Labs-master\lab-04-rabbitmq\lab-04-rabbitmq-demo-confirm\src\main\java\cn\iocoder\springboot\lab04\rabbitmqdemo\producer\Demo13Producer.java
2
请在Spring Boot框架中完成以下Java代码
public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException { return delegate.prepareStatement(customizeSql(sql), columnIndexes); } @Override public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException { return delegate.prepareStatement(cu...
public String getClientInfo(String name) throws SQLException { return delegate.getClientInfo(name); } @Override public Properties getClientInfo() throws SQLException { return delegate.getClientInfo(); } @Override public Array createArrayOf(String typeName, Object[] elements) throws SQLException { retur...
repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\jasper\data_source\JasperJdbcConnection.java
2
请完成以下Java代码
protected void doHealthCheck(Health.Builder builder) { if (getGemFireCache().filter(CacheUtils::isPeer).isPresent()) { AtomicInteger globalIndex = new AtomicInteger(0); Set<GatewayReceiver> gatewayReceivers = getGemFireCache() .map(Cache.class::cast) .map(Cache::getGatewayReceivers) .orElseGet(Co...
.withDetail(gatewayReceiverKey(index, "end-port"), gatewayReceiver.getEndPort()) .withDetail(gatewayReceiverKey(index, "host"), gatewayReceiver.getHost()) .withDetail(gatewayReceiverKey(index, "max-time-between-pings"), gatewayReceiver.getMaximumTimeBetweenPings()) .withDetail(gatewayReceiverKey(index...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-actuator\src\main\java\org\springframework\geode\boot\actuate\GeodeGatewayReceiversHealthIndicator.java
1
请在Spring Boot框架中完成以下Java代码
public class EdgeEventInsertRepository { private static final String INSERT = "INSERT INTO edge_event (id, created_time, edge_id, edge_event_type, edge_event_uid, entity_id, edge_event_action, body, tenant_id, ts) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) " + "O...
? edgeEvent.getEntityBody().toString() : null); ps.setObject(9, edgeEvent.getTenantId()); ps.setLong(10, edgeEvent.getTs()); } @Override public int getBatchSize() { ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\edge\EdgeEventInsertRepository.java
2
请完成以下Java代码
class WrongVoucher extends Money { private String store; WrongVoucher(int amount, String currencyCode, String store) { super(amount, currencyCode); this.store = store; } @Override public boolean equals(Object o) { if (o == this) return true; if (!(o in...
} @Override public int hashCode() { int result = 17; result = 31 * result + amount; if (this.currencyCode != null) { result = 31 * result + currencyCode.hashCode(); } if (this.store != null) { result = 31 * result + store.hashCode(); } ...
repos\tutorials-master\core-java-modules\core-java-lang-oop-methods\src\main\java\com\baeldung\equalshashcode\WrongVoucher.java
1
请在Spring Boot框架中完成以下Java代码
private ISpringTemplateEngine templateEngine(ITemplateResolver templateResolver) { SpringTemplateEngine engine = new SpringTemplateEngine(); engine.addDialect(new LayoutDialect(new GroupingStrategy())); engine.addDialect(new Java8TimeDialect()); engine.setTemplateResolver(templateResolve...
messageSource.setBasename("messages"); return messageSource; } @Bean public LocaleResolver localeResolver() { SessionLocaleResolver localeResolver = new SessionLocaleResolver(); localeResolver.setDefaultLocale(new Locale("en")); return localeResolver; } @Bean pu...
repos\tutorials-master\spring-web-modules\spring-thymeleaf\src\main\java\com\baeldung\thymeleaf\config\WebMVCConfig.java
2
请完成以下Java代码
public @NonNull ProductId getProductId() {return packageable.getProductId();} public @NonNull String getProductName() {return packageable.getProductName();} public @NonNull I_C_UOM getUOM() {return getQtyToDeliver().getUOM();} public @NonNull Quantity getQtyToDeliver() { return schedule != null ? schedule....
? schedule.getQtyToPick() : packageable.getQtyToPick(); } public @Nullable UomId getCatchWeightUomId() {return packageable.getCatchWeightUomId();} public @Nullable PPOrderId getPickFromOrderId() {return packageable.getPickFromOrderId();} public @Nullable ShipperId getShipperId() {return packageable.getShippe...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\ScheduledPackageable.java
1
请完成以下Java代码
public class RedirectServerAuthenticationFailureHandler implements ServerAuthenticationFailureHandler { private final URI location; private ServerRedirectStrategy redirectStrategy = new DefaultServerRedirectStrategy(); /** * Creates an instance * @param location the location to redirect to (i.e. "/login?faile...
/** * Sets the RedirectStrategy to use. * @param redirectStrategy the strategy to use. Default is DefaultRedirectStrategy. */ public void setRedirectStrategy(ServerRedirectStrategy redirectStrategy) { Assert.notNull(redirectStrategy, "redirectStrategy cannot be null"); this.redirectStrategy = redirectStrateg...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\authentication\RedirectServerAuthenticationFailureHandler.java
1
请完成以下Spring Boot application配置
server.port=8080 # datasource config spring.datasource.url=jdbc:mysql://localhost:3306/springboot3_db?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.username=root spring.datasource.password= spring.datasource.hikari....
spring.datasource.hikari.max-lifetime=1800000 spring.datasource.hikari.connection-timeout=30000 spring.datasource.hikari.connection-test-query=SELECT 1 # mybatis config mybatis.mapper-locations=classpath:mapper/*Dao.xml
repos\spring-boot-projects-main\SpringBoot前后端分离实战项目源码\spring-boot-project-front-end&back-end\src\main\resources\application.properties
2