instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public class Event implements Serializable { @Id @GeneratedValue private Long id; private String description; public Event() { } public Event(String description) { this.description = description; } public Long getId() {
return id; } public void setId(Long id) { this.id = id; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } }
repos\tutorials-master\persistence-modules\spring-hibernate-3\src\main\java\com\baeldung\persistence\model\Event.java
2
请完成以下Java代码
protected void ensureSourceCaseExecutionInitialized() { if ((sourceCaseExecution == null) && (sourceCaseExecutionId != null)) { sourceCaseExecution = findCaseExecutionById(sourceCaseExecutionId); } } public void setSourceCaseExecution(CmmnExecution sourceCaseExecution) { this.sourceCaseExecution ...
protected CaseExecutionEntity findCaseExecutionById(String caseExecutionId) { return Context .getCommandContext() .getCaseExecutionManager() .findCaseExecutionById(caseExecutionId); } @Override public Set<String> getReferencedEntityIds() { Set<String> referencedEntityIds = new Has...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\entity\runtime\CaseSentryPartEntity.java
1
请完成以下Java代码
public class VariableContainerWrapper implements VariableContainer { protected Map<String, Object> variables = new HashMap<>(); protected String instanceId; protected String scopeType; protected String tenantId; public VariableContainerWrapper(Map<String, Object> variables) { if (v...
@Override public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } @Override public Set<String> getVariableNames() { return variables.keySet(); } @Override public String toString() { ret...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\el\VariableContainerWrapper.java
1
请完成以下Java代码
public void setValue (String Value) { set_Value (COLUMNNAME_Value, Value); } /** Get Search Key. @return Search key for the record in the format required - must be unique */ public String getValue () { return (String)get_Value(COLUMNNAME_Value); } /** Set Sql WHERE. @param WhereClause
Fully qualified SQL WHERE clause */ public void setWhereClause (String WhereClause) { set_Value (COLUMNNAME_WhereClause, WhereClause); } /** Get Sql WHERE. @return Fully qualified SQL WHERE clause */ public String getWhereClause () { return (String)get_Value(COLUMNNAME_WhereClause); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_HouseKeeping.java
1
请完成以下Java代码
public static void concatByStreamBy100(Blackhole blackhole) { concatByStream(ITERATION_100, blackhole); } @Benchmark public static void concatByStreamBy1000(Blackhole blackhole) { concatByStream(ITERATION_1000, blackhole); } @Benchmark public static void concatByStreamBy10000(B...
concatString = strList.stream().collect(Collectors.joining("")); strList.set(0, concatString); } blackhole.consume(concatString); } public static void main(String[] args) throws Exception { Options options = new OptionsBuilder() .include(LoopConcatBenchmark.class...
repos\tutorials-master\core-java-modules\core-java-string-operations-6\src\main\java\com\baeldung\performance\LoopConcatBenchmark.java
1
请完成以下Java代码
public int getM_InOutLine_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_InOutLine_ID); if (ii == null) return 0; return ii.intValue(); } /** Set M_InOutLine_To_C_Customs_Invoice_Line. @param M_InOutLine_To_C_Customs_Invoice_Line_ID M_InOutLine_To_C_Customs_Invoice_Line */ @Override public vo...
Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Bewegungs-Menge. @param MovementQty Menge eines bewegten Produktes. */ @Override public void setMovementQty (java.math.BigDecimal MovementQty) { set_Value (COLUMNNAME_MovementQty, ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_InOutLine_To_C_Customs_Invoice_Line.java
1
请完成以下Java代码
public boolean isDirectory() { return this.delegate.isDirectory(); } @Override public boolean isReadable() { return this.delegate.isReadable(); } @Override public Instant lastModified() { return this.delegate.lastModified(); } @Override public long length() { return this.delegate.length(); } @Ove...
public @Nullable Resource resolve(String subUriPath) { if (subUriPath.startsWith(LOADER_RESOURCE_PATH_PREFIX)) { return null; } Resource resolved = this.delegate.resolve(subUriPath); return (resolved != null) ? new LoaderHidingResource(this.base, resolved) : null; } @Override public boolean isAlias() { ...
repos\spring-boot-4.0.1\module\spring-boot-jetty\src\main\java\org\springframework\boot\jetty\servlet\LoaderHidingResource.java
1
请完成以下Java代码
public void setLabelReport_Process_ID (final int LabelReport_Process_ID) { if (LabelReport_Process_ID < 1) set_Value (COLUMNNAME_LabelReport_Process_ID, null); else set_Value (COLUMNNAME_LabelReport_Process_ID, LabelReport_Process_ID); } @Override public int getLabelReport_Process_ID() { return get...
public int getM_HU_Label_Config_ID() { return get_ValueAsInt(COLUMNNAME_M_HU_Label_Config_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.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Label_Config.java
1
请在Spring Boot框架中完成以下Java代码
public class Book { @Id @Generated private @Nullable ObjectId id; @NotBlank private String title; @NotNull private Author author; private int year; public Book() { } public Book(@Nullable ObjectId id, String title, Author author, int year) { this.id = id; t...
return title; } public void setTitle(String title) { this.title = title; } public Author getAuthor() { return author; } public void setAuthor(Author author) { this.author = author; } public int getYear() { return year; } public void setYear(in...
repos\tutorials-master\microservices-modules\micronaut-reactive\src\main\java\com\baeldung\micronautreactive\entity\Book.java
2
请在Spring Boot框架中完成以下Java代码
private static final class IncotermsMap { private final ImmutableMap<IncotermsId, Incoterms> byId; private final ImmutableMap<OrgId, Incoterms> defaultByOrgId; private final ImmutableMap<ValueAndOrgId, Incoterms> byValueAndOrgId; IncotermsMap(final List<Incoterms> list) { this.byId = Maps.uniqueIndex(lis...
{ final Incoterms incoterms = CoalesceUtil.coalesce(byValueAndOrgId.get(ValueAndOrgId.builder().value(value).orgId(orgId).build()), byValueAndOrgId.get(ValueAndOrgId.builder().value(value).orgId(OrgId.ANY).build())); if (incoterms == null) { throw new AdempiereException("Incoterms not found by value: ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\incoterms\IncotermsRepository.java
2
请在Spring Boot框架中完成以下Java代码
public String getMerchantShortname() { return merchantShortname; } public void setMerchantShortname(String merchantShortname) { this.merchantShortname = merchantShortname; } public String getServicePhone() { return servicePhone; } public void setServicePhone(String ser...
public String toString() { return "RpMicroSubmitRecord{" + "businessCode='" + businessCode + '\'' + ", subMchId='" + subMchId + '\'' + ", idCardCopy='" + idCardCopy + '\'' + ", idCardNational='" + idCardNational + '\'' + ", idCardNa...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\entity\RpMicroSubmitRecord.java
2
请在Spring Boot框架中完成以下Java代码
public static class HUQRCodeGenerateRequestBuilder { public HUQRCodeGenerateRequestBuilder attribute(@NonNull AttributeId attributeId, @Nullable String valueString) { return _attribute(Attribute.builder().attributeId(attributeId).valueString(valueString).build()); } public HUQRCodeGenerateRequestBuilder at...
// // @Value @Builder public static class Attribute { @Nullable AttributeId attributeId; @Nullable AttributeCode code; @Nullable String valueString; @Nullable BigDecimal valueNumber; @Nullable LocalDate valueDate; @Nullable AttributeValueId valueListId; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\qrcodes\service\HUQRCodeGenerateRequest.java
2
请完成以下Java代码
public FlowElementsContainer getParentContainer() { return parentContainer; } @JsonIgnore public SubProcess getSubProcess() { SubProcess subProcess = null; if (parentContainer instanceof SubProcess) { subProcess = (SubProcess) parentContainer; } return s...
public abstract FlowElement clone(); public void setValues(FlowElement otherElement) { super.setValues(otherElement); setName(otherElement.getName()); setDocumentation(otherElement.getDocumentation()); executionListeners = new ArrayList<>(); if (otherElement.getExecutionLis...
repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\FlowElement.java
1
请完成以下Java代码
public String getId() { return name + reporter + timestamp.toString(); } @Override public void setId(String id) { throw new UnsupportedOperationException("Not supported yet."); } @Override public Object getPersistentState() { return MetricIntervalEntity.class; } @Override public int has...
} if (getClass() != obj.getClass()) { return false; } final MetricIntervalEntity other = (MetricIntervalEntity) obj; if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) { return false; } if ((this.reporter == null) ? (other.reporter != null) : !this.report...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\MetricIntervalEntity.java
1
请在Spring Boot框架中完成以下Java代码
class ProductService { private final String PRODUCT_ADDED_TO_CART_TOPIC = "product-added-to-cart"; private final ProductRepository repository; private final DiscountService discountService; private final KafkaTemplate<String, ProductAddedToCartEvent> kafkaTemplate; public ProductService(ProductRep...
Price price = computePrice(productId, product); var event = new ProductAddedToCartEvent(productId, price.value(), price.currency(), cartId); kafkaTemplate.send(PRODUCT_ADDED_TO_CART_TOPIC, cartId, event); } private Price computePrice(String productId, Product product) { if (product.cat...
repos\tutorials-master\spring-reactive-modules\spring-reactive-performance\src\main\java\com\baeldung\spring\reactive\performance\virtualthreads\ProductService.java
2
请在Spring Boot框架中完成以下Java代码
class DefaultEndpointObjectNameFactory implements EndpointObjectNameFactory { private final JmxEndpointProperties properties; private final JmxProperties jmxProperties; private final @Nullable MBeanServer mBeanServer; private final @Nullable String contextId; DefaultEndpointObjectNameFactory(JmxEndpointProper...
} return "org.springframework.boot"; } private boolean hasMBean(String baseObjectName) throws MalformedObjectNameException { ObjectName query = new ObjectName(baseObjectName + ",*"); Assert.state(this.mBeanServer != null, "'mBeanServer' must not be null"); return !this.mBeanServer.queryNames(query, null).isE...
repos\spring-boot-4.0.1\module\spring-boot-actuator-autoconfigure\src\main\java\org\springframework\boot\actuate\autoconfigure\endpoint\jmx\DefaultEndpointObjectNameFactory.java
2
请完成以下Java代码
public void setMatchingRequestParameterName(String matchingRequestParameterName) { this.matchingRequestParameterName = matchingRequestParameterName; } private ServerHttpRequest stripMatchingRequestParameterName(ServerHttpRequest request) { if (this.matchingRequestParameterName == null) { return request; } ...
private URI createRedirectUri(String uri) { if (this.matchingRequestParameterName == null) { return URI.create(uri); } // @formatter:off return UriComponentsBuilder.fromUriString(uri) .queryParam(this.matchingRequestParameterName) .build() .toUri(); // @formatter:on } private static ServerWe...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\savedrequest\WebSessionServerRequestCache.java
1
请在Spring Boot框架中完成以下Java代码
public String showAddTodoPage(ModelMap model) { model.addAttribute("todo", new Todo(0, getLoggedInUserName(model), "Default Desc", new Date(), false)); return "todo"; } @RequestMapping(value = "/delete-todo", method = RequestMethod.GET) public String deleteTodo(@RequestParam int id) { if(id==1) throw ...
return "todo"; } todo.setUser(getLoggedInUserName(model)); service.updateTodo(todo); return "redirect:/list-todos"; } @RequestMapping(value = "/add-todo", method = RequestMethod.POST) public String addTodo(ModelMap model, @Valid Todo todo, BindingResult result) { if (result.hasErrors()) { return "t...
repos\SpringBootForBeginners-master\02.Spring-Boot-Web-Application\src\main\java\com\in28minutes\springboot\web\controller\TodoController.java
2
请完成以下Java代码
public class Region implements Serializable { @Serial private static final long serialVersionUID = 1L; /** * 区划编号 */ @TableId(value = "code", type = IdType.INPUT) @Schema(description = "区划编号") private String code; /** * 父区划编号 */ @Schema(description = "父区划编号") private String parentCode; /** * 祖区划编号...
private String townName; /** * 村级区划编号 */ @Schema(description = "村级区划编号") private String villageCode; /** * 村级名称 */ @Schema(description = "村级名称") private String villageName; /** * 层级 */ @Schema(description = "层级") private Integer level; /** * 排序 */ @Schema(description = "排序") private Integer ...
repos\SpringBlade-master\blade-service-api\blade-system-api\src\main\java\org\springblade\system\entity\Region.java
1
请在Spring Boot框架中完成以下Java代码
public class RestService { @Autowired private RestTemplate restTemplate; private static String HOST = "http://localhost:8080"; private static String GET_URL = "/testGet"; private static String POST_URL = "/testPost"; private static String POST_PARAM_URL = "/testPostParam"; private static ...
HttpHeaders headers = new HttpHeaders(); HttpEntity<TestDTO> httpEntity = new HttpEntity<>(td, headers); ResponseEntity<TestDTO> responseEntity = this.restTemplate.postForEntity(url, httpEntity, TestDTO.class); System.out.println("postForEntity: " + responseEntity.getBody()); TestDTO ...
repos\spring-boot-quick-master\quick-rest-template\src\main\java\com\rest\template\service\RestService.java
2
请在Spring Boot框架中完成以下Java代码
public class WarehouseGroup { @NonNull WarehouseGroupId id; @NonNull String name; @Nullable String description; @NonNull ImmutableSet<WarehouseGroupAssignment> assignments; @NonNull ImmutableSetMultimap<WarehouseGroupAssignmentType, WarehouseId> warehouseIdsByAssignmentType; @Builder public WarehouseGroup( @...
this.name = StringUtils.trimBlankToOptional(name) .orElseThrow(() -> new AdempiereException("Blank warehouse group name not allowed")); this.description = StringUtils.trimBlankToNull(description); this.assignments = assignments; this.warehouseIdsByAssignmentType = assignments .stream() .collect(Immuta...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\warehouse\groups\WarehouseGroup.java
2
请完成以下Java代码
public @Nullable Object invoke(MethodInvocation mi) throws Throwable { PreFilterExpressionAttributeRegistry.PreFilterExpressionAttribute attribute = this.registry.getAttribute(mi); if (attribute == null) { return mi.proceed(); } MethodSecurityExpressionHandler expressionHandler = this.registry.getExpressionH...
Assert.state(!filterTarget.getClass().isArray(), "Pre-filtering on array types is not supported. Using a Collection will solve this problem."); return filterTarget; } private Authentication getAuthentication() { Authentication authentication = this.securityContextHolderStrategy.get().getContext().getAuthenti...
repos\spring-security-main\core\src\main\java\org\springframework\security\authorization\method\PreFilterAuthorizationMethodInterceptor.java
1
请在Spring Boot框架中完成以下Java代码
KafkaMessageListenerContainer<String, NotificationDispatchResponse> kafkaMessageListenerContainer( ConsumerFactory<String, NotificationDispatchResponse> consumerFactory ) { String replyTopic = synchronousKafkaProperties.replyTopic(); ContainerProperties containerProperties = new ContainerPro...
return new KafkaTemplate<>(producerFactory); } @Bean KafkaListenerContainerFactory<ConcurrentMessageListenerContainer<String, NotificationDispatchRequest>> kafkaListenerContainerFactory( ConsumerFactory<String, NotificationDispatchRequest> consumerFactory, KafkaTemplate<String, Notification...
repos\tutorials-master\spring-kafka-4\src\main\java\com\baeldung\kafka\synchronous\KafkaConfiguration.java
2
请完成以下Java代码
public abstract class AbstractDelegatingMessageListenerAdapter<T> implements ConsumerSeekAware, DelegatingMessageListener<T> { protected final LogAccessor logger = new LogAccessor(LogFactory.getLog(this.getClass())); // NOSONAR protected final T delegate; //NOSONAR protected final ListenerType delegateType; // ...
@Override public void onPartitionsAssigned(Map<TopicPartition, Long> assignments, ConsumerSeekCallback callback) { if (this.seekAware != null) { this.seekAware.onPartitionsAssigned(assignments, callback); } } @Override public void onPartitionsRevoked(@Nullable Collection<TopicPartition> partitions) { if (...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\adapter\AbstractDelegatingMessageListenerAdapter.java
1
请完成以下Java代码
public void setCharset(@Nullable Charset charset) { this.charset = charset; } /** * Set the name of the charset used for reading Mustache template files. * @param charset the charset * @deprecated since 4.1.0 for removal in 4.3.0 in favor of * {@link #setCharset(Charset)} */ @Deprecated(since = "4.1.0",...
return (resource.exists()) ? resource : null; } private Template createTemplate(Resource resource) throws IOException { try (Reader reader = getReader(resource)) { Assert.state(this.compiler != null, "'compiler' must not be null"); return this.compiler.compile(reader); } } private Reader getReader(Resou...
repos\spring-boot-main\module\spring-boot-mustache\src\main\java\org\springframework\boot\mustache\servlet\view\MustacheView.java
1
请完成以下Java代码
public Message<?> preSend(Message<?> message, MessageChannel channel) { if (!this.matcher.matches(message)) { return message; } Map<String, Object> sessionAttributes = SimpMessageHeaderAccessor.getSessionAttributes(message.getHeaders()); CsrfToken expectedToken = (sessionAttributes != null) ? (CsrfToken)...
* @param actual * @return */ private static boolean equalsConstantTime(String expected, @Nullable String actual) { if (expected == actual) { return true; } if (expected == null || actual == null) { return false; } // Encode after ensure that the string is not null byte[] expectedBytes = Utf8.enco...
repos\spring-security-main\messaging\src\main\java\org\springframework\security\messaging\web\csrf\XorCsrfChannelInterceptor.java
1
请完成以下Java代码
public List<Execution> executeList(CommandContext commandContext, Page page) { checkQueryOk(); ensureVariablesInitialized(); return (List) commandContext .getExecutionManager() .findExecutionsByQueryCriteria(this, page); } //getters //////////////////////////////////////////////////// pu...
public SuspensionState getSuspensionState() { return suspensionState; } public void setSuspensionState(SuspensionState suspensionState) { this.suspensionState = suspensionState; } public List<EventSubscriptionQueryValue> getEventSubscriptions() { return eventSubscriptions; } public void setEv...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ExecutionQueryImpl.java
1
请完成以下Java代码
public void changePassword(@RequestBody PasswordChangeDTO passwordChangeDto) { if (isPasswordLengthInvalid(passwordChangeDto.getNewPassword())) { throw new InvalidPasswordException(); } userService.changePassword(passwordChangeDto.getCurrentPassword(), passwordChangeDto.getNewPasswor...
* * @param keyAndPassword the generated key and the new password. * @throws InvalidPasswordException {@code 400 (Bad Request)} if the password is incorrect. * @throws RuntimeException {@code 500 (Internal Server Error)} if the password could not be reset. */ @PostMapping(path = "/account/reset-p...
repos\tutorials-master\jhipster-8-modules\jhipster-8-monolithic\src\main\java\com\baeldung\jhipster8\web\rest\AccountResource.java
1
请完成以下Java代码
public SqlLookupDescriptorProviderBuilder setAD_Val_Rule_ID(@NonNull final LookupDescriptorProvider.LookupScope scope, @Nullable final AdValRuleId AD_Val_Rule_ID) { if (AD_Val_Rule_ID == null) { adValRuleIdByScope.remove(scope); } else { adValRuleIdByScope.put(scope, AD_Val_Rule_ID); } return this;...
return this; } public SqlLookupDescriptorProviderBuilder setReadOnlyAccess() { this.requiredAccess = Access.READ; return this; } public SqlLookupDescriptorProviderBuilder setPageLength(final Integer pageLength) { this.pageLength = pageLength; return this; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\SqlLookupDescriptorProviderBuilder.java
1
请在Spring Boot框架中完成以下Java代码
private ProductId getProductId() { final I_PP_Order_BOMLine coProductLine = getCOProductLine(); if (coProductLine != null) { return ProductId.ofRepoId(coProductLine.getM_Product_ID()); } else { final I_PP_Order ppOrder = getPPOrder(); return ProductId.ofRepoId(ppOrder.getM_Product_ID()); } } ...
{ if (barcode == null) {return;} final IAttributeStorage huAttributes = handlingUnitsBL.getAttributeStorage(hu); if (!huAttributes.hasAttribute(HUAttributeConstants.ATTR_QRCode)) {return;} huAttributes.setSaveOnChange(true); huAttributes.setValue(HUAttributeConstants.ATTR_QRCode, barcode.getAsString()); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\service\commands\receive\ReceiveGoodsCommand.java
2
请完成以下Java代码
class CookieValue { private final HttpServletRequest request; private final HttpServletResponse response; private final String cookieValue; private int cookieMaxAge = -1; /** * Creates a new instance. * @param request the {@link HttpServletRequest} to use. Useful for determining * the context in...
*/ public HttpServletResponse getResponse() { return this.response; } /** * The value to be written. This value may be modified by the * {@link CookieSerializer} before written to the cookie. However, the value must * be the same as the original when it is read back in. * @return the value to be w...
repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\web\http\CookieSerializer.java
1
请完成以下Java代码
public void listenGroupFoo(String message) { System.out.println("Received Message in group 'foo': " + message); latch.countDown(); } @KafkaListener(topics = "${message.topic.name}", groupId = "bar", containerFactory = "barKafkaListenerContainerFactory") public void liste...
this.partitionLatch.countDown(); } @KafkaListener(topics = "${filtered.topic.name}", containerFactory = "filterKafkaListenerContainerFactory") public void listenWithFilter(String message) { System.out.println("Received Message in filtered listener: " + message); this.fil...
repos\tutorials-master\spring-kafka\src\main\java\com\baeldung\spring\kafka\KafkaApplication.java
1
请在Spring Boot框架中完成以下Java代码
public DocumentReferenceType getInvoiceReference() { return invoiceReference; } /** * Sets the value of the invoiceReference property. * * @param value * allowed object is * {@link DocumentReferenceType } ...
this.stockEntryReference = value; } /** * Gets the value of the additionalReferences property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\INVRPTListLineItemExtensionType.java
2
请完成以下Java代码
protected String doIt() throws Exception { final TableRecordReference startReference = TableRecordReference.of(adTableStart.getAD_Table_ID(), recordIdStart); final TableRecordReference goalReference = TableRecordReference.of(adTableGoal.getAD_Table_ID(), recordIdGoal); final IDLMService dlmService = Services.ge...
final List<ITableRecordReference> path = findPathIterateResult.getPath(); if (path == null) { addLog("There is no path between start={} and goal={}", startReference, goalReference); return MSG_OK; } addLog("Records that make up the path from start to goal (size={}):", path.size()); for (int i = 0; i < p...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\partitioner\process\DLM_FindPathBetweenRecords.java
1
请在Spring Boot框架中完成以下Java代码
public class BookstoreService { private final AuthorRepository authorRepository; public BookstoreService(AuthorRepository authorRepository) { this.authorRepository = authorRepository; } @Transactional public void addAuthorWithBooks() { Author author = new Author(); aut...
@Transactional(readOnly = true) public void fetchAuthorByName() { Author author = authorRepository.fetchByName("Alicia Tom"); System.out.println(author); } @Transactional public void removeBookOfAuthor() { Author author = authorRepository.fetchWithBooks(new AuthorI...
repos\Hibernate-SpringBoot-master\HibernateSpringBootCompositeKeyEmbeddable\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
public List<Event> findEventsByTaskId(String taskId) { return getDbSqlSession().selectList("selectEventsByTaskId", taskId); } @Override @SuppressWarnings("unchecked") public List<Event> findEventsByProcessInstanceId(String processInstanceId) { return getDbSqlSession().selectList("select...
} @Override @SuppressWarnings("unchecked") public List<Comment> findCommentsByProcessInstanceId(String processInstanceId, String type) { Map<String, Object> params = new HashMap<>(); params.put("processInstanceId", processInstanceId); params.put("type", type); return getDbSq...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\data\impl\MybatisCommentDataManager.java
1
请完成以下Java代码
public java.lang.String getProductValue() { return get_ValueAsString(COLUMNNAME_ProductValue); } @Override public void setQtyConfirmedBySupplier (final @Nullable BigDecimal QtyConfirmedBySupplier) { set_ValueNoCheck (COLUMNNAME_QtyConfirmedBySupplier, QtyConfirmedBySupplier); } @Override public BigDecima...
{ set_ValueNoCheck (COLUMNNAME_QtyToMove, QtyToMove); } @Override public BigDecimal getQtyToMove() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyToMove); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyToProduce (final @Nullable BigDecimal QtyToProduce) { set_Val...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java-gen\de\metas\material\cockpit\model\X_QtyDemand_QtySupply_V.java
1
请在Spring Boot框架中完成以下Java代码
public class CaseDefinitionDto { protected String id; protected String key; protected String category; protected String name; protected int version; protected String resource; protected String deploymentId; protected String tenantId; protected Integer historyTimeToLive; public String getId() { ...
public Integer getHistoryTimeToLive() { return historyTimeToLive; } public static CaseDefinitionDto fromCaseDefinition(CaseDefinition definition) { CaseDefinitionDto dto = new CaseDefinitionDto(); dto.id = definition.getId(); dto.key = definition.getKey(); dto.category = definition.getCategory...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\repository\CaseDefinitionDto.java
2
请在Spring Boot框架中完成以下Java代码
public class SentinelConfiguration { @Value("${spring.application.name}") private String applicationName; @Bean public SentinelResourceAspect sentinelResourceAspect() { return new SentinelResourceAspect(); } @Bean public ApolloDataSource apolloDataSource(ObjectMapper objectMapper)...
new Converter<String, List<FlowRule>>() { // 转换器,将读取的 Apollo 配置,转换成 FlowRule 数组 @Override public List<FlowRule> convert(String value) { try { return Arrays.asList(objectMapper.readValue(value, FlowRule[].class)); ...
repos\SpringBoot-Labs-master\lab-46\lab-46-sentinel-demo-apollo\src\main\java\cn\iocoder\springboot\lab46\sentineldemo\config\SentinelConfiguration.java
2
请完成以下Java代码
public class CashBalanceAvailability2 { @XmlElement(name = "Dt", required = true) protected CashBalanceAvailabilityDate1 dt; @XmlElement(name = "Amt", required = true) protected ActiveOrHistoricCurrencyAndAmount amt; @XmlElement(name = "CdtDbtInd", required = true) @XmlSchemaType(name = "string...
* allowed object is * {@link ActiveOrHistoricCurrencyAndAmount } * */ public void setAmt(ActiveOrHistoricCurrencyAndAmount value) { this.amt = value; } /** * Gets the value of the cdtDbtInd property. * * @return * possible object is * {@...
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\CashBalanceAvailability2.java
1
请在Spring Boot框架中完成以下Java代码
private static final String extractRemoteAddr(final HttpServletRequest httpRequest) { try { final String remoteAddr = httpRequest.getRemoteAddr(); if (remoteAddr == null || remoteAddr.isEmpty()) { return MDC_Param_RemoteAddr_DefaultValue; } return remoteAddr; } catch (final Exception e) { ...
return "?"; } private static final String extractUserAgent(final HttpServletRequest httpRequest) { try { final String userAgent = httpRequest.getHeader("User-Agent"); return userAgent; } catch (final Exception e) { e.printStackTrace(); return "?"; } } private static final String extractLo...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\config\ServletLoggingFilter.java
2
请完成以下Java代码
public final class WebServerGracefulShutdownLifecycle implements SmartLifecycle { /** * {@link SmartLifecycle#getPhase() SmartLifecycle phase} in which graceful shutdown * of the web server is performed. * @deprecated as of 4.0.0 in favor of * {@link WebServerApplicationContext#GRACEFUL_SHUTDOWN_PHASE} */ ...
@Override public void stop() { throw new UnsupportedOperationException("Stop must not be invoked directly"); } @Override public void stop(Runnable callback) { this.running = false; this.webServer.shutDownGracefully((result) -> callback.run()); } @Override public boolean isRunning() { return this.runnin...
repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\context\WebServerGracefulShutdownLifecycle.java
1
请完成以下Java代码
private static boolean checkStrings(String ltrim, String rtrim) { boolean result = false; if (ltrimResult.equalsIgnoreCase(ltrim) && rtrimResult.equalsIgnoreCase(rtrim)) result = true; return result; } // Going through the String detecting Whitespaces @Benchmark pu...
return checkStrings(ltrim, rtrim); } // Guava CharMatcher trimLeadingFrom / trimTrailingFrom @Benchmark public boolean guavaCharMatcher() { String ltrim = CharMatcher.whitespace().trimLeadingFrom(src); String rtrim = CharMatcher.whitespace().trimTrailingFrom(src); return checkS...
repos\tutorials-master\core-java-modules\core-java-string-operations-2\src\main\java\com\baeldung\trim\LTrimRTrim.java
1
请在Spring Boot框架中完成以下Java代码
public String createCustomer(String email, String token) { String id = null; try { Stripe.apiKey = API_SECRET_KEY; Map<String, Object> customerParams = new HashMap<>(); // add customer unique id here to track them in your web application customerParams.put...
status = true; } catch (Exception ex) { ex.printStackTrace(); status = false; } return status; } public Coupon retrieveCoupon(String code) { try { Stripe.apiKey = API_SECRET_KEY; return Coupon.retrieve(code); } catch (Excep...
repos\springboot-demo-master\stripe\src\main\java\com\et\stripe\service\StripeService.java
2
请完成以下Java代码
public final class PathPatternRequestTransformer implements AuthorizationManagerWebInvocationPrivilegeEvaluator.HttpServletRequestTransformer { @Override public HttpServletRequest transform(HttpServletRequest request) { HttpServletRequest wrapped = new AttributesSupportingHttpServletRequest(request); ServletRe...
} @Override public void setAttribute(String name, Object value) { this.attributes.put(name, value); } @Override public void removeAttribute(String name) { this.attributes.remove(name); } } }
repos\spring-security-main\web\src\main\java\org\springframework\security\web\access\PathPatternRequestTransformer.java
1
请完成以下Java代码
public class JobDefinitionResourceImpl implements JobDefinitionResource { protected ProcessEngine engine; protected String jobDefinitionId; public JobDefinitionResourceImpl(ProcessEngine engine, String jobDefinitionId) { this.engine = engine; this.jobDefinitionId = jobDefinitionId; } public JobDefi...
try { ManagementService managementService = engine.getManagementService(); if (dto.getPriority() != null) { managementService.setOverridingJobPriorityForJobDefinition(jobDefinitionId, dto.getPriority(), dto.isIncludeJobs()); } else { if (dto.isIncludeJobs()) { throw ne...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\management\JobDefinitionResourceImpl.java
1
请完成以下Java代码
public class UserEntity extends BaseVersionedEntity<User> { @Column(name = ModelConstants.USER_TENANT_ID_PROPERTY) private UUID tenantId; @Column(name = ModelConstants.USER_CUSTOMER_ID_PROPERTY) private UUID customerId; @Enumerated(EnumType.STRING) @Column(name = ModelConstants.USER_AUTHORITY...
@Override public User toData() { User user = new User(new UserId(this.getUuid())); user.setCreatedTime(createdTime); user.setVersion(version); user.setAuthority(authority); if (tenantId != null) { user.setTenantId(TenantId.fromUUID(tenantId)); } if...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\sql\UserEntity.java
1
请完成以下Java代码
public Stream<PickingJobStepPickedToHU> stream() {return actualPickedHUs.stream();} @Nullable public PickingJobStepPickedTo removing(final List<PickingJobStepPickedToHU> toRemove) { if (toRemove.isEmpty()) { return this; } final ImmutableList<PickingJobStepPickedToHU> actualPickedHUsNew = this.actualPic...
} @NonNull public List<HuId> getPickedHuIds() { return actualPickedHUs.stream() .map(PickingJobStepPickedToHU::getActualPickedHU) .map(HUInfo::getId) .collect(ImmutableList.toImmutableList()); } @NonNull public Optional<PickingJobStepPickedToHU> getLastPickedHu() { return actualPickedHUs.stream...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\PickingJobStepPickedTo.java
1
请在Spring Boot框架中完成以下Java代码
public Optional<RateLimit> extractRateLimit(final HttpHeaders httpHeaders) { final List<String> rateLimitRemaining = httpHeaders.get(RATE_LIMIT_REMAINING.getValue()); final List<String> rateLimitReset = httpHeaders.get(RATE_LIMIT_RESET.getValue()); if (!Check.isEmpty(rateLimitRemaining) && !Check.isEmpty(rateLi...
MAX_TIME_TO_WAIT_FOR_LIMIT_RESET.getDefaultValue() ); if (msToLimitReset > maxTimeToWait) { throw new AdempiereException("Limit Reset is too far in the future! aborting!") .appendParametersToMessage() .setParameter("RateLimit", rateLimit) .setParameter("MaxMsToWaitForLimitReset", maxTimeToWait); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.issue.tracking.github\src\main\java\de\metas\issue\tracking\github\api\v3\service\RateLimitService.java
2
请在Spring Boot框架中完成以下Java代码
public class CostRevaluationId implements RepoIdAware { @JsonCreator public static CostRevaluationId ofRepoId(final int repoId) { return new CostRevaluationId(repoId); } public static int toRepoId(@Nullable final CostRevaluationId costRevaluationId) { return costRevaluationId != null ? costRevaluationId.get...
private CostRevaluationId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "M_CostRevaluation_ID"); } @Override @JsonValue public int getRepoId() { return repoId; } public static CostRevaluationId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? new CostRevaluationId(repoId) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costrevaluation\CostRevaluationId.java
2
请完成以下Java代码
public org.compiere.model.I_AD_Role getAD_Role() { return get_ValueAsPO(COLUMNNAME_AD_Role_ID, org.compiere.model.I_AD_Role.class); } @Override public void setAD_Role(final org.compiere.model.I_AD_Role AD_Role) { set_ValueFromPO(COLUMNNAME_AD_Role_ID, org.compiere.model.I_AD_Role.class, AD_Role); } @Overri...
set_ValueNoCheck (COLUMNNAME_AD_Role_TableOrg_Access_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_Role_TableOrg_Access_ID, AD_Role_TableOrg_Access_ID); } @Override public int getAD_Role_TableOrg_Access_ID() { return get_ValueAsInt(COLUMNNAME_AD_Role_TableOrg_Access_ID); } @Override public void setA...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Role_TableOrg_Access.java
1
请完成以下Java代码
public final IClientUIInvoker setLongOperation(final boolean longOperation) { this.longOperation = longOperation; return this; } protected final boolean isLongOperation() { return longOperation; } @Override public IClientUIInvoker setShowGlassPane(final boolean showGlassPane) { this.showGlassPane = s...
@Override public abstract IClientUIInvoker setParentComponent(final Object parentComponent); @Override public abstract IClientUIInvoker setParentComponentByWindowNo(final int windowNo); protected final void setParentComponent(final int windowNo, final Object component) { this.parentWindowNo = windowNo; this....
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\adempiere\form\AbstractClientUIInvoker.java
1
请完成以下Java代码
public class DocLine_CostRevaluation extends DocLine<Doc_CostRevaluation> { private final CostRevaluationLine costRevaluationLine; public DocLine_CostRevaluation(final @NonNull I_M_CostRevaluationLine lineRecord, final @NonNull Doc_CostRevaluation doc) { super(InterfaceWrapperHelper.getPO(lineRecord), doc); co...
// .date(getDateAcctAsInstant()) // .build()) // .getTotalAmountToPost(as); } else { return services.createCostDetail( CostDetailCreateRequest.builder() .acctSchemaId(costSegmentAndElement.getAcctSchemaId()) .clientId(costSegmentAndElement.getClientId()) .orgId...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\DocLine_CostRevaluation.java
1
请完成以下Java代码
public boolean isProcessed () { Object oo = get_Value(COLUMNNAME_Processed); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** * Status AD_Reference_ID=541011 * Reference name: C_Payment_Reservation_Status ...
public static final String STATUS_COMPLETED = "C"; /** Set Status. @param Status Status */ @Override public void setStatus (java.lang.String Status) { set_Value (COLUMNNAME_Status, Status); } /** Get Status. @return Status */ @Override public java.lang.String getStatus () { return (java.lang.Str...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Payment_Reservation.java
1
请完成以下Java代码
public void setProcessed (boolean Processed) { set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); } /** Get Processed. @return The document has been processed */ public boolean isProcessed () { Object oo = get_Value(COLUMNNAME_Processed); if (oo != null) { if (oo instanceof Boolean) ...
public I_AD_User getSalesRep() throws RuntimeException { return (I_AD_User)MTable.get(getCtx(), I_AD_User.Table_Name) .getPO(getSalesRep_ID(), get_TrxName()); } /** Set Sales Representative. @param SalesRep_ID Sales Representative or Company Agent */ public void setSalesRep_ID (int SalesRep_ID) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_DunningRunEntry.java
1
请完成以下Java代码
public byte[] getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * byte[] */ public void setValue(byte[] value) { this.value = value; } /** * Gets the value of the id property. ...
public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = 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\SignatureValueType.java
1
请完成以下Java代码
public ImmutableCredentialRecordBuilder credentialType(@Nullable PublicKeyCredentialType credentialType) { this.credentialType = credentialType; return this; } public ImmutableCredentialRecordBuilder credentialId(Bytes credentialId) { this.credentialId = credentialId; return this; } public Immutab...
public ImmutableCredentialRecordBuilder attestationClientDataJSON(@Nullable Bytes attestationClientDataJSON) { this.attestationClientDataJSON = attestationClientDataJSON; return this; } public ImmutableCredentialRecordBuilder created(Instant created) { this.created = created; return this; } public...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\api\ImmutableCredentialRecord.java
1
请在Spring Boot框架中完成以下Java代码
public class Author implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private int age; private String name; private String genre; @Lob private Blob avatar; @Lob ...
public void setAge(int age) { this.age = age; } public Blob getAvatar() { return avatar; } public void setAvatar(Blob avatar) { this.avatar = avatar; } public Clob getBiography() { return biography; } public void setBiography(Clob biography) { ...
repos\Hibernate-SpringBoot-master\HibernateSpringBootMappingLobToClobAndBlob\src\main\java\com\bookstore\entity\Author.java
2
请在Spring Boot框架中完成以下Java代码
public String getExclude() { return this.exclude; } public void setExclude(String exclude) { this.exclude = exclude; } public @Nullable String getAdditionalExclude() { return this.additionalExclude; } public void setAdditionalExclude(@Nullable String additionalExclude) { this.additionalExclud...
/** * LiveReload properties. */ public static class Livereload { /** * Whether to enable a livereload.com-compatible server. */ private boolean enabled; /** * Server port. */ private int port = 35729; public boolean isEnabled() { return this.enabled; } public void setEnabled(boolea...
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\autoconfigure\DevToolsProperties.java
2
请完成以下Java代码
void triggerReload() throws IOException { if (this.webSocket) { logger.debug("Triggering LiveReload"); writeWebSocketFrame(new Frame("{\"command\":\"reload\",\"path\":\"/\"}")); } } private void writeWebSocketFrame(Frame frame) throws IOException { frame.write(this.outputStream); } private String getW...
MessageDigest messageDigest = MessageDigest.getInstance("SHA-1"); messageDigest.update(response.getBytes(), 0, response.length()); return Base64.getEncoder().encodeToString(messageDigest.digest()); } /** * Close the connection. * @throws IOException in case of I/O errors */ void close() throws IOException...
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\livereload\Connection.java
1
请在Spring Boot框架中完成以下Java代码
public int getMaxConnections() { return this.maxConnections; } public void setMaxConnections(int maxConnections) { this.maxConnections = maxConnections; } public int getMaxMessageCount() { return this.maxMessageCount; } public void setMaxMessageCount(int maxMessageCount) { this.maxMessageCount = maxMes...
public void setSocketBufferSize(int socketBufferSize) { this.socketBufferSize = socketBufferSize; } public int getSubscriptionCapacity() { return this.subscriptionCapacity; } public void setSubscriptionCapacity(int subscriptionCapacity) { this.subscriptionCapacity = subscriptionCapacity; } public String ...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\CacheServerProperties.java
2
请完成以下Java代码
public String getInstrId() { return instrId; } /** * Sets the value of the instrId property. * * @param value * allowed object is * {@link String } * */ public void setInstrId(String value) { this.instrId = value; } /** * Gets t...
public String getEndToEndId() { return endToEndId; } /** * Sets the value of the endToEndId property. * * @param value * allowed object is * {@link String } * */ public void setEndToEndId(String value) { this.endToEndId = value; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_001_01_03_ch_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_001_001_03_ch_02\PaymentIdentification1.java
1
请完成以下Java代码
private boolean isJustProcessed(final PO po, final int changeType) { if (!po.isActive()) { return false; } final boolean isNew = changeType == ModelValidator.TYPE_BEFORE_NEW || changeType == ModelValidator.TYPE_AFTER_NEW; final int idxProcessed = po.get_ColumnIndex(DocOutboundProducerValidator.COLUMNNAME...
else if (po.is_ValueChanged(idxProcessed)) { return processed; } else { return false; } } else // Processed column is not available { // If is not available, we always consider the record as processed right after it was created // This condition was introduced because we need to arc...
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代码
public class BatchManager extends AbstractManager { public void insertBatch(BatchEntity batch) { batch.setCreateUserId(getCommandContext().getAuthenticatedUserId()); getDbEntityManager().insert(batch); } public BatchEntity findBatchById(String id) { return getDbEntityManager().selectById(BatchEntity...
public void updateBatchSuspensionStateById(String batchId, SuspensionState suspensionState) { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("batchId", batchId); parameters.put("suspensionState", suspensionState.getStateCode()); ListQueryParameterObject queryParameter = ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\BatchManager.java
1
请完成以下Spring Boot application配置
spring.application.name=spring-security spring.datasource.url= jdbc:h2:file:C:/your_folder_here/test;DB_CLOSE_DELAY=-1;IFEXISTS=FALSE spring.datasource.driverClassName=org.h2.Driver spring.datasource.username=sa spring.datasource.password=qwerty spring.h2.conso
le.enabled=true spring.h2.console.path=/h2-console spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=true
repos\tutorials-master\spring-security-modules\spring-security-authorization\spring-security-url-http-method-auth\src\main\resources\application.properties
2
请完成以下Java代码
private BPartnerOrderParams ofRecord( @NonNull final I_C_BPartner billBPartnerRecord, @NonNull final I_C_BPartner shipBPartnerRecord, @NonNull final SOTrx soTrx) { final BPartnerEffective billBPartnerEffective = bPartnerEffectiveBL.getByRecord(billBPartnerRecord); final BPartnerEffective shipBPartnerEffec...
{ return Optional.ofNullable(DeliveryViaRule.ofNullableCode(bpartnerRecord.getDeliveryViaRule())); } else if (soTrx.isPurchase()) { return Optional.ofNullable(DeliveryViaRule.ofNullableCode(bpartnerRecord.getPO_DeliveryViaRule())); } return Optional.empty(); // shall not happen } private Optional<Sh...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\BPartnerOrderParamsRepository.java
1
请完成以下Java代码
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { String url = WebUtils.getSourceUrl(request); String host = WebUtils.getHost(url); assert host != null; if (isNotTrustHost(host)) { String html = th...
return !ConfigConstants.getTrustHostSet().contains(host); } // 安全加固:默认拒绝所有未配置的主机(防止SSRF攻击) // 如果需要允许所有主机,请在配置文件中明确设置 trust.host = * logger.warn("未配置信任主机列表,拒绝访问主机: {},请在配置文件中设置 trust.host 或 KK_TRUST_HOST 环境变量", host); return true; } @Override public void destroy() { ...
repos\kkFileView-master\server\src\main\java\cn\keking\web\filter\TrustHostFilter.java
1
请完成以下Java代码
public void setAD_Role_ID (int AD_Role_ID) { if (AD_Role_ID < 0) set_ValueNoCheck (COLUMNNAME_AD_Role_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_Role_ID, Integer.valueOf(AD_Role_ID)); } /** Get Role. @return Responsibility Role */ public int getAD_Role_ID () { Integer ii = (Integer)get_Va...
{ if (CM_AccessProfile_ID < 1) set_ValueNoCheck (COLUMNNAME_CM_AccessProfile_ID, null); else set_ValueNoCheck (COLUMNNAME_CM_AccessProfile_ID, Integer.valueOf(CM_AccessProfile_ID)); } /** Get Web Access Profile. @return Web Access Profile */ public int getCM_AccessProfile_ID () { Integer ii = (...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_AccessListRole.java
1
请完成以下Java代码
public boolean isMysql() { return dbSqlSessionFactory.getDatabaseType().equals("mysql"); } public boolean isMariaDb() { return dbSqlSessionFactory.getDatabaseType().equals("mariadb"); } public boolean isOracle() { return dbSqlSessionFactory.getDatabaseType().equals("oracle"); ...
return new HistoricProcessInstanceQueryImpl(); } public HistoricActivityInstanceQueryImpl createHistoricActivityInstanceQuery() { return new HistoricActivityInstanceQueryImpl(); } public HistoricTaskInstanceQueryImpl createHistoricTaskInstanceQuery() { return new HistoricTaskInstanceQu...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\db\DbSqlSession.java
1
请完成以下Java代码
public void onError(String params, Exception e) { if (e instanceof TimeoutException || e instanceof org.eclipse.leshan.core.request.exception.TimeoutException) { client.setLastSentRpcId(null); transportService.process(client.getSession(), this.request, RpcStatus.TIMEOUT, TransportService...
abstract protected void sendRpcReplyOnSuccess(T response); protected void sendRpcReplyOnValidationError(String msg) { reply(LwM2MRpcResponseBody.builder().result(ResponseCode.BAD_REQUEST.getName()).error(msg).build()); } protected void sendRpcReplyOnError(Exception e) { String error = e.ge...
repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\server\rpc\RpcDownlinkRequestCallbackProxy.java
1
请完成以下Java代码
public String checkHostname() { String hostname; try { hostname = getHostname(); } catch (UnknownHostException e) { throw LOG.cannotGetHostnameException(e); } return hostname; } public String getHostname() throws UnknownHostException { return InetAddress.getLocalHost().getHostN...
public String getDefaultSerializationFormat() { return defaultSerializationFormat; } public String getDateFormat() { return dateFormat; } public ObjectMapper getObjectMapper() { return objectMapper; } public ValueMappers getValueMappers() { return valueMappers; } public TypedValues g...
repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\impl\ExternalTaskClientBuilderImpl.java
1
请在Spring Boot框架中完成以下Java代码
public void setData(String data) { this.data = data; } @Override public void setExecutionId(String executionId) { this.executionId = executionId; } @Override public void setProcessInstanceId(String processInstanceId) { this.processInstanceId = processInstanceId; } ...
public String getData() { return data; } @Override public String getExecutionId() { return executionId; } @Override public String getProcessInstanceId() { return processInstanceId; } @Override public String getProcessDefinitionId() { return processD...
repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\persistence\entity\HistoricTaskLogEntryEntityImpl.java
2
请完成以下Java代码
public void setId(Long id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getIsbn() { return isbn; } public void setIsbn(String isbn) { this.isbn = isbn; ...
} if(obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } IdGenBook other = (IdGenBook) obj; return id != null && id.equals(other.getId()); } @Override public int hashCode() { r...
repos\Hibernate-SpringBoot-master\HibernateSpringBootLombokEqualsAndHashCode\src\main\java\com\app\IdGenBook.java
1
请完成以下Java代码
public DbOperation addRemovalTimeToCommentsByRootProcessInstanceId(String rootProcessInstanceId, Date removalTime, Integer batchSize) { Map<String, Object> parameters = new HashMap<>(); parameters.put("rootProcessInstanceId", rootProcessInstanceId); parameters.put("removalTime", removalTime); parameters...
} public DbOperation deleteCommentsByRemovalTime(Date removalTime, int minuteFrom, int minuteTo, int batchSize) { Map<String, Object> parameters = new HashMap<>(); parameters.put("removalTime", removalTime); if (minuteTo - minuteFrom + 1 < 60) { parameters.put("minuteFrom", minuteFrom); param...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\CommentManager.java
1
请在Spring Boot框架中完成以下Java代码
public CronTriggerFactoryBean executeJobTrigger(@Qualifier("executeJobDetail") JobDetail jobDetail) { //每天凌晨3点执行 return cronTriggerFactoryBean(jobDetail, "0 1 0 * * ? "); } /** * 加载job * * 新建job 类用来代理 * * * @return */ @Bean public JobDetailFactoryBean...
* @param jobClass * @param groupName * @param targetObject * @return */ private static JobDetailFactoryBean createJobDetail(Class<? extends Job> jobClass, String groupName, String targ...
repos\springBoot-master\springboot-Quartz\src\main\java\com\abel\quartz\config\QuartzConfig.java
2
请完成以下Java代码
public int getRowCount() { return (int)view.size(); } } private static class ListRowsSupplier implements RowsSupplier { private final ImmutableList<IViewRow> rows; private ListRowsSupplier(@NonNull final IView view, @NonNull final DocumentIdsSelection rowIds) { Check.assume(!rowIds.isAll(), "rowIds...
@Override public int getRowCount() { return rows.size(); } } @Override protected List<CellValue> getNextRow() { final ArrayList<CellValue> result = new ArrayList<>(); for (int i = 0; i < getColumnCount(); i++) { result.add(getValueAt(rowNumber, i)); } rowNumber++; return result; } @Over...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ViewExcelExporter.java
1
请在Spring Boot框架中完成以下Java代码
public void updateModifiableFieldsFromEntity(DecisionRequirementsDefinitionEntity updatingDefinition) { } /** * Returns the cached version if exists; does not update the entity from the database in that case */ protected DecisionRequirementsDefinitionEntity loadDecisionRequirementsDefinition(String decisio...
} protected void resetPreviousDecisionRequirementsDefinitionId() { previousDecisionRequirementsDefinitionId = null; ensurePreviousDecisionRequirementsDefinitionIdInitialized(); } protected void ensurePreviousDecisionRequirementsDefinitionIdInitialized() { if (previousDecisionRequirementsDefinitionId...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\dmn\entity\repository\DecisionRequirementsDefinitionEntity.java
2
请完成以下Java代码
public class MongoAppender extends AppenderSkeleton { private MongoClient mongoClient; private MongoDatabase mongoDatabase; private MongoCollection<BasicDBObject> logsCollection; private String connectionUrl; private String databaseName; private String collectionName; @Override prote...
public String getConnectionUrl() { return connectionUrl; } public void setConnectionUrl(String connectionUrl) { this.connectionUrl = connectionUrl; } public String getDatabaseName() { return databaseName; } public void setDatabaseName(String databaseName) { thi...
repos\SpringBoot-Learning-master\1.x\Chapter4-2-5\src\main\java\com\didispace\log\MongoAppender.java
1
请在Spring Boot框架中完成以下Java代码
public static LanguageKey ofString(@NonNull final String languageInfo) { final String separator = languageInfo.contains("-") ? "-" : "_"; final String[] localeParts = languageInfo.trim().split(separator); if (localeParts.length == 0) { // shall not happen throw new IllegalArgumentException("Invalid langu...
public Locale toLocale() { return new Locale(language, country, variant); } @Override @Deprecated public String toString() { return getAsString(); } @JsonValue public String getAsString() { final StringBuilder sb = new StringBuilder(); sb.append(language); if (!country.isBlank()) { sb.append(...
repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\util\LanguageKey.java
2
请在Spring Boot框架中完成以下Java代码
public class ProxyResponseAutoConfiguration implements WebFluxConfigurer { @Autowired private ApplicationContext context; @Bean @ConditionalOnMissingBean public ProxyExchangeArgumentResolver proxyExchangeArgumentResolver(Optional<WebClient.Builder> optional, ProxyExchangeWebfluxProperties properties) { WebC...
} if (!CollectionUtils.isEmpty(properties.getSkipped())) { excludedHeaderNames.addAll(properties.getSkipped()); } resolver.setExcluded(excludedHeaderNames); return resolver; } @Override public void configureArgumentResolvers(ArgumentResolverConfigurer configurer) { WebFluxConfigurer.super.configureArgu...
repos\spring-cloud-gateway-main\spring-cloud-gateway-proxyexchange-webflux\src\main\java\org\springframework\cloud\gateway\webflux\config\ProxyResponseAutoConfiguration.java
2
请完成以下Java代码
public void changeState() { if (runtimeService == null) { throw new FlowableException("RuntimeService cannot be null, Obtain your builder instance from the RuntimeService to access this feature"); } runtimeService.changeActivityState(this); } public String getProcessInstance...
return moveActivityIdList; } public List<EnableActivityIdContainer> getEnableActivityIdList() { return enableActivityIdList; } public Map<String, Object> getProcessInstanceVariables() { return processVariables; } public Map<String, Map<String, Object>> getLocalVariables() { ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\runtime\ChangeActivityStateBuilderImpl.java
1
请在Spring Boot框架中完成以下Java代码
public Mono<UserVO> get(@RequestParam("id") Integer id) { // 查询用户 UserVO user = new UserVO().setId(id).setUsername("username:" + id); // 返回 return Mono.just(user); } /** * 获得指定用户编号的用户 * * @param id 用户编号 * @return 用户 */ @GetMapping("/get2") public...
// 返回 return CommonResult.success(user); } /** * 测试抛出 NullPointerException 异常 */ @GetMapping("/exception-01") public UserVO exception01() { throw new NullPointerException("没有粗面鱼丸"); } /** * 测试抛出 ServiceException 异常 */ @GetMapping("/exception-02") pub...
repos\SpringBoot-Labs-master\lab-27\lab-27-webflux-02\src\main\java\cn\iocoder\springboot\lab27\springwebflux\controller\UserController.java
2
请完成以下Java代码
public String getName() { return title; } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("Customer [title="); builder.append(title); builder.append(", tenantId="); builder.append(tenantId); builder.app...
builder.append(city); builder.append(", address="); builder.append(address); builder.append(", address2="); builder.append(address2); builder.append(", zip="); builder.append(zip); builder.append(", phone="); builder.append(phone); builder.append("...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\Customer.java
1
请完成以下Java代码
public class AuthorizationResourceImpl extends AbstractAuthorizedRestResource implements AuthorizationResource { protected final AuthorizationService authorizationService; protected String relativeRootResourcePath; public AuthorizationResourceImpl(String processEngineName, String resourceId, String relativeRoot...
.path(AuthorizationRestService.PATH) .path(resourceId) .build(); dto.addReflexiveLink(uri, HttpMethod.GET, "self"); if (isAuthorized(DELETE)) { dto.addReflexiveLink(uri, HttpMethod.DELETE, "delete"); } if (isAuthorized(UPDATE)) { dto.addReflexiveLink(uri, HttpMethod.PUT, "u...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\authorization\impl\AuthorizationResourceImpl.java
1
请在Spring Boot框架中完成以下Java代码
private void cleanUp(TenantId tenantId) { if (!partitionService.resolve(ServiceType.TB_CORE, tenantId, tenantId).isMyPartition()) { return; } Optional<DefaultTenantProfileConfiguration> tenantProfileConfiguration = tenantProfileCache.get(tenantId).getProfileConfiguration(); ...
} if (!toRemove.hasNext()) { break; } } alarmService.delAlarmTypes(tenantId, typesToRemove); if (totalRemoved > 0) { getLogger().info("Removed {} outdated alarm(s) for tenant {} older than {}", totalRemoved, tenantId, new Date(expirationTime)...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\ttl\AlarmsCleanUpService.java
2
请完成以下Java代码
public Method functionMethod() { if (method != null) { return method; } method = findMethod(functionName); return method; } // Helper methods protected static Object getVariableValue(VariableContainer variableContainer, String variableName) { if (va...
Method method = functionMethod(); int parametersCardinality = parameters.getCardinality(); int methodParameterCount = method.getParameterCount(); if (method.isVarArgs() || parametersCardinality < methodParameterCount) { // If the method is a varargs or the number of parameters is les...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\el\function\AbstractFlowableVariableExpressionFunction.java
1
请完成以下Java代码
private I_M_PriceList_Version toPriceListVersionRecord(@NonNull final PriceListVersion request) { final I_M_PriceList_Version existingRecord = getRecordById(request.getPriceListVersionId()); existingRecord.setAD_Org_ID(request.getOrgId().getRepoId()); existingRecord.setM_PriceList_ID(request.getPriceListId().ge...
} @NonNull private PriceListVersion toPriceListVersion(@NonNull final I_M_PriceList_Version record) { return PriceListVersion.builder() .priceListVersionId(PriceListVersionId.ofRepoId(record.getM_PriceList_Version_ID())) .priceListId(PriceListId.ofRepoId(record.getM_PriceList_ID())) .orgId(OrgId.ofRep...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\pricelist\PriceListVersionRepository.java
1
请完成以下Java代码
public int getMD_Cockpit_ID() { return get_ValueAsInt(COLUMNNAME_MD_Cockpit_ID); } @Override public void setM_Warehouse_ID (final int M_Warehouse_ID) { if (M_Warehouse_ID < 1) set_Value (COLUMNNAME_M_Warehouse_ID, null); else set_Value (COLUMNNAME_M_Warehouse_ID, M_Warehouse_ID); } @Override pu...
{ return get_ValueAsInt(COLUMNNAME_M_Warehouse_ID); } @Override public void setQtyPending (final BigDecimal QtyPending) { set_Value (COLUMNNAME_QtyPending, QtyPending); } @Override public BigDecimal getQtyPending() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyPending); return bd != nul...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java-gen\de\metas\material\cockpit\model\X_MD_Cockpit_DDOrder_Detail.java
1
请完成以下Java代码
public boolean isPassiva() { String accountType = getAccountType(); return (ACCOUNTTYPE_Liability.equals(accountType) || ACCOUNTTYPE_OwnerSEquity.equals(accountType)); } // isPassiva @Override public String toString() { return getValue() + " - " + getName(); } /** * Extended String Representatio...
{ DB.close(rs); } } return true; } // beforeSave @Override protected boolean afterSave(boolean newRecord, boolean success) { // Value/Name change if (!newRecord && (is_ValueChanged(COLUMNNAME_Value) || is_ValueChanged(COLUMNNAME_Name))) { MAccount.updateValueDescription(getCtx(), "Account_ID...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MElementValue.java
1
请完成以下Java代码
protected void posTag(char[] charArray, int[] wordNet, Nature[] natureArray) { if (config.speechTagging) { for (int i = 0; i < natureArray.length; ) { if (natureArray[i] == null) { int j = i + 1; for (; j...
} i = j; } else { ++i; } } } } @Override public Segment enableCustomDictionary(boolean enable) { if (enable) { logger.warning("为基于词典的分词器开启用户词典太浪费了,建议直接...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\DictionaryBasedSegment.java
1
请完成以下Java代码
public PaymentsToReconcileView getByIdOrNull(@NonNull final ViewId paymentsToReconcileViewId) { final ViewId bankStatementReconciliationViewId = toBankStatementReconciliationViewId(paymentsToReconcileViewId); final BankStatementReconciliationView bankStatementReconciliationView = banksStatementReconciliationViewFa...
public Stream<IView> streamAllViews() { return banksStatementReconciliationViewFactory.streamAllViews() .map(BankStatementReconciliationView::cast) .map(BankStatementReconciliationView::getPaymentsToReconcileView); } @Override public void invalidateView(final ViewId paymentsToReconcileViewId) { final ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\bankstatement_reconciliation\PaymentsToReconcileViewFactory.java
1
请在Spring Boot框架中完成以下Java代码
public class UserDaoImpl implements UserDao { @Autowired private MongoTemplate mongoTemplate; /** * 创建对象 * @param user */ @Override public void saveUser(UserEntity user) { mongoTemplate.save(user); } /** * 根据用户名查询对象 * @param userName * @return */...
Query query=new Query(Criteria.where("id").is(user.getId())); Update update= new Update().set("userName", user.getUserName()).set("passWord", user.getPassWord()); //更新查询返回结果集的第一条 WriteResult result =mongoTemplate.updateFirst(query,update,UserEntity.class); //更新查询返回结果集的所有 // mongo...
repos\spring-boot-leaning-master\1.x\第12课:MongoDB 实战\spring-boot-mongodb-template\src\main\java\com\neo\repository\impl\UserDaoImpl.java
2
请在Spring Boot框架中完成以下Java代码
public JsonGetNextEligiblePickFromLineResponse getNextEligiblePickFromLine(@NonNull final JsonGetNextEligiblePickFromLineRequest request, @NonNull final UserId callerId) { final DistributionJobId jobId = DistributionJobId.ofWFProcessId(request.getWfProcessId()); final DistributionJob job = getJobById(jobId); job...
return JsonGetNextEligiblePickFromLineResponse.builder() .lineId(nextEligiblePickFromLineId) .build(); } public void printMaterialInTransitReport( @NonNull final UserId userId, @NonNull final String adLanguage) { @NonNull final LocatorId inTransitLocatorId = warehouseService.getTrolleyByUserId(userI...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\job\service\DistributionRestService.java
2
请完成以下Java代码
public Long getId() { return id; } public String getCountry() { return country; } public void setCountry(String country) { this.country = country; } public String getPhoneNumber() { return phoneNumber; } public void setPhoneNumber(String phoneNumber) {...
return email; } public void setEmail(String email) { this.email = email; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } }
repos\tutorials-master\spring-web-modules\spring-thymeleaf\src\main\java\com\baeldung\thymeleaf\errors\User.java
1
请完成以下Java代码
public PartyIdentificationSEPA2 getDbtr() { return dbtr; } /** * Sets the value of the dbtr property. * * @param value * allowed object is * {@link PartyIdentificationSEPA2 } * */ public void setDbtr(PartyIdentificationSEPA2 value) { this.dbt...
* Gets the value of the purp property. * * @return * possible object is * {@link PurposeSEPA } * */ public PurposeSEPA getPurp() { return purp; } /** * Sets the value of the purp property. * * @param value * allowed object is ...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_008_003_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_008_003_02\DirectDebitTransactionInformationSDD.java
1
请在Spring Boot框架中完成以下Java代码
private SessionAuthenticationStrategy getSessionAuthenticationStrategy() { if (this.sessionAuthenticationStrategy != null) { return this.sessionAuthenticationStrategy; } CsrfAuthenticationStrategy csrfAuthenticationStrategy = new CsrfAuthenticationStrategy( this.csrfTokenRepository); if (this.requestHand...
} @Override protected IgnoreCsrfProtectionRegistry chainRequestMatchers(List<RequestMatcher> requestMatchers) { CsrfConfigurer.this.ignoredCsrfProtectionMatchers.addAll(requestMatchers); return this; } } private static final class SpaCsrfTokenRequestHandler implements CsrfTokenRequestHandler { priva...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\CsrfConfigurer.java
2
请完成以下Java代码
/* package */class BooleanGetterMethodInfo extends AbstractModelMethodInfo { private final String propertyName; private final Class<?> returnType; public BooleanGetterMethodInfo(final Method interfaceMethod, final String propertyName) { super(interfaceMethod); this.propertyName = propertyName; this.returnTy...
ii = model.getColumnIndex(propertyNameToUse); if (ii >= 0) { return model.getValue(propertyNameToUse, ii, returnType); } propertyNameToUse = "is" + propertyName; ii = model.getColumnIndex(propertyNameToUse); if (ii >= 0) { return model.getValue(propertyNameToUse, ii, returnType); } final Metho...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\persistence\BooleanGetterMethodInfo.java
1
请完成以下Java代码
public static void fillTypes( Map<String, Class<? extends BaseBpmnJsonConverter>> convertersToBpmnMap, Map<Class<? extends BaseElement>, Class<? extends BaseBpmnJsonConverter>> convertersToJsonMap ) { fillJsonTypes(convertersToBpmnMap); fillBpmnTypes(convertersToJsonMap); } ...
Map<String, JsonNode> shapeMap ) { EventSubProcess subProcess = new EventSubProcess(); JsonNode childShapesArray = elementNode.get(EDITOR_CHILD_SHAPES); processor.processJsonElements( childShapesArray, modelNode, subProcess, shapeMap, ...
repos\Activiti-develop\activiti-core\activiti-json-converter\src\main\java\org\activiti\editor\language\json\converter\EventSubProcessJsonConverter.java
1
请在Spring Boot框架中完成以下Java代码
public class ClientWebConfigJava implements WebMvcConfigurer { public ClientWebConfigJava() { super(); } @Bean public MessageSource messageSource() { final ResourceBundleMessageSource ms = new ResourceBundleMessageSource(); ms.setBasenames("messages"); return ms; }...
@Bean public ViewResolver viewResolver() { final InternalResourceViewResolver bean = new InternalResourceViewResolver(); bean.setViewClass(JstlView.class); bean.setPrefix("/WEB-INF/view/"); bean.setSuffix(".jsp"); return bean; } @Bean public MethodValidationPos...
repos\tutorials-master\spring-web-modules\spring-mvc-xml\src\main\java\com\baeldung\spring\ClientWebConfigJava.java
2
请在Spring Boot框架中完成以下Java代码
public class Company extends User { // ============== // PRIVATE FIELDS // ============== // Company's name private String name; // Company's headquarters city private String hqCity; // ============== // PUBLIC METHODS // ============== /** * @return the name */ public String get...
/** * @return the hqCity */ public String getHqCity() { return hqCity; } /** * @param name the name to set */ public void setName(String name) { this.name = name; } /** * @param hqCity the hqCity to set */ public void setHqCity(String hqCity) { this.hqCity = hqCity; } } ...
repos\spring-boot-samples-master\spring-boot-springdatajpa-inheritance\src\main\java\netgloo\models\Company.java
2