instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public class Config { private String toDoEndpoint; private String postEndpoint; private String environmentName; private Credentials toDoCredentials; private Credentials postCredentials; public String getToDoEndpoint() { return toDoEndpoint; } public void setToDoEndpoint(String...
public Credentials getToDoCredentials() { return toDoCredentials; } public void setToDoCredentials(Credentials toDoCredentials) { this.toDoCredentials = toDoCredentials; } public Credentials getPostCredentials() { return postCredentials; } public void setPostCredential...
repos\tutorials-master\aws-modules\aws-lambda-modules\todo-reminder-lambda\ToDoFunction\src\main\java\com\baeldung\lambda\todo\config\Config.java
2
请完成以下Java代码
public Font getFont() { return m_retFont; } // getFont /** * ActionListener * @param e */ @Override public void actionPerformed(ActionEvent e) { if (m_setting) return; if (e.getSource() == bOK) { m_retFont = m_font; dispose(); } else if (e.getSource() == bCancel) dispose(); ...
* Font Style Value Object */ class FontStyle { /** * Create FontStyle * @param name * @param id */ public FontStyle(String name, int id) { m_name = name; m_id = id; } // FontStyle private String m_name; private int m_id; /** * Get Name * @return name */ @Override public Strin...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\FontChooser.java
1
请完成以下Java代码
class SqlServerR2dbcDockerComposeConnectionDetailsFactory extends DockerComposeConnectionDetailsFactory<R2dbcConnectionDetails> { SqlServerR2dbcDockerComposeConnectionDetailsFactory() { super("mssql/server", "io.r2dbc.spi.ConnectionFactoryOptions"); } @Override protected R2dbcConnectionDetails getDockerCompos...
"mssql", 1433); private final ConnectionFactoryOptions connectionFactoryOptions; SqlServerR2dbcDockerComposeConnectionDetails(RunningService service) { super(service); SqlServerEnvironment environment = new SqlServerEnvironment(service.env()); this.connectionFactoryOptions = connectionFactoryOptionsBuild...
repos\spring-boot-4.0.1\module\spring-boot-r2dbc\src\main\java\org\springframework\boot\r2dbc\docker\compose\SqlServerR2dbcDockerComposeConnectionDetailsFactory.java
1
请完成以下Java代码
public User userStatus(Integer userStatus) { this.userStatus = userStatus; return this; } /** * User Status * @return userStatus **/ @ApiModelProperty(value = "User Status") public Integer getUserStatus() { return userStatus; } public void setUserStatus(Integer userStatus) { this....
public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firs...
repos\tutorials-master\spring-swagger-codegen-modules\spring-swagger-codegen-api-client\src\main\java\com\baeldung\petstore\client\model\User.java
1
请完成以下Java代码
public int getLine() { return orderLine.getLine(); } public ZonedDateTime getDatePromised() { return orderLine.getDatePromised(); } public ProductId getProductId() { return orderLine.getProductId(); }
public AttributeSetInstanceId getAsiId() { return orderLine.getAsiId(); } public Quantity getOrderedQty() { return orderLine.getOrderedQty(); } public ProductPrice getPriceActual() { return orderLine.getPriceActual(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\SalesOrderLine.java
1
请完成以下Java代码
public class TbCheckpointNode implements TbNode { private String queueName; @Override public void init(TbContext ctx, TbNodeConfiguration configuration) throws TbNodeException { queueName = ctx.getQueueName(); } @Override public void onMsg(TbContext ctx, TbMsg msg) { ctx.enque...
boolean hasChanges = false; switch (fromVersion) { case 0: if (oldConfiguration.has(QUEUE_NAME)) { hasChanges = true; ((ObjectNode) oldConfiguration).remove(QUEUE_NAME); } break; default: ...
repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\flow\TbCheckpointNode.java
1
请完成以下Java代码
public class ParaModel { @ApiModelProperty(allowableValues = "省") private String provice; @ApiModelProperty(allowableValues = "地区") private String area; private List<Street> streets; @Override public String toString() { return "ParaModel{" + "provice='" + provice...
public void setProvice(String provice) { this.provice = provice; } public String getArea() { return area; } public void setArea(String area) { this.area = area; } public List<Street> getStreets() { return streets; } public void setStreets(List<Street> ...
repos\spring-boot-quick-master\quick-swagger\src\main\java\com\quick\po\ParaModel.java
1
请完成以下Java代码
private void writeObject(ObjectOutputStream out) throws IOException { loseWeight(); out.writeInt(size); out.writeObject(data); out.writeInt(linearExpandFactor); out.writeBoolean(exponentialExpanding); out.writeDouble(exponentialExpandFactor); } private void r...
exponentialExpanding = in.readBoolean(); exponentialExpandFactor = in.readDouble(); } @Override public String toString() { ArrayList<Integer> head = new ArrayList<Integer>(20); for (int i = 0; i < Math.min(size, 20); ++i) { head.add(data[i]); } ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\trie\datrie\IntArrayList.java
1
请完成以下Java代码
public class RouteToRequestUrlFilter implements GlobalFilter, Ordered { /** * Order of Route to URL. */ public static final int ROUTE_TO_URL_FILTER_ORDER = 10000; private static final Log log = LogFactory.getLog(RouteToRequestUrlFilter.class); private static final String SCHEME_REGEX = "[a-zA-Z]([a-zA-Z]|\\d...
URI routeUri = route.getUri(); if (hasAnotherScheme(routeUri)) { // this is a special url, save scheme to special attribute // replace routeUri with schemeSpecificPart exchange.getAttributes().put(GATEWAY_SCHEME_PREFIX_ATTR, routeUri.getScheme()); routeUri = URI.create(routeUri.getSchemeSpecificPart()); ...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\RouteToRequestUrlFilter.java
1
请在Spring Boot框架中完成以下Java代码
public class NettyServer { private Logger logger = LoggerFactory.getLogger(getClass()); @Value("${netty.port}") private Integer port; @Autowired private NettyServerHandlerInitializer nettyServerHandlerInitializer; /** * boss 线程组,用于服务端接受客户端的连接 */ private EventLoopGroup bossGroup...
.option(ChannelOption.SO_BACKLOG, 1024) // 服务端 accept 队列的大小 .childOption(ChannelOption.SO_KEEPALIVE, true) // TCP Keepalive 机制,实现 TCP 层级的心跳保活功能 .childOption(ChannelOption.TCP_NODELAY, true) // 允许较小的数据包的发送,降低延迟 .childHandler(nettyServerHandlerInitializer); // 绑定端口,...
repos\SpringBoot-Labs-master\lab-67\lab-67-netty-demo\lab-67-netty-demo-server\src\main\java\cn\iocoder\springboot\lab67\nettyserverdemo\server\NettyServer.java
2
请完成以下Java代码
public void setResponseText (String ResponseText) { set_Value (COLUMNNAME_ResponseText, ResponseText); } /** Get Response Text. @return Request Response Text */ public String getResponseText () { return (String)get_Value(COLUMNNAME_ResponseText); } /** Set Standard Response. @param R_StandardRespon...
set_ValueNoCheck (COLUMNNAME_R_StandardResponse_ID, null); else set_ValueNoCheck (COLUMNNAME_R_StandardResponse_ID, Integer.valueOf(R_StandardResponse_ID)); } /** Get Standard Response. @return Request Standard Response */ public int getR_StandardResponse_ID () { Integer ii = (Integer)get_Value(COLU...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_StandardResponse.java
1
请完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } public long getInstances() { return instances; } public void setInstances(long instances) { this.instances = instances; } public long getFinished() { return finished; } public void setFinishe...
} public void setOpenIncidents(long openIncidents) { this.openIncidents = openIncidents; } public long getResolvedIncidents() { return resolvedIncidents; } public void setResolvedIncidents(long resolvedIncidents) { this.resolvedIncidents = resolvedIncidents; } public long getDeletedInciden...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\HistoricActivityStatisticsImpl.java
1
请在Spring Boot框架中完成以下Java代码
public Result<SystemRuleEntity> apiUpdateIfNotNull(Long id, String app, Double highestSystemLoad, Double highestCpuUsage, Long avgRt, Long maxThread, Double qps) { if (id == null) { return Result.ofFail(-1, "id can't be null"); } ...
return Result.ofSuccess(entity); } @RequestMapping("/delete.json") @AuthAction(PrivilegeType.DELETE_RULE) public Result<?> delete(Long id) { if (id == null) { return Result.ofFail(-1, "id can't be null"); } SystemRuleEntity oldEntity = repository.findById(id); ...
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-sentinel\src\main\java\com\alibaba\csp\sentinel\dashboard\controller\SystemController.java
2
请在Spring Boot框架中完成以下Java代码
private ImmutableList<BPartnerId> extractBPartnerIds(@Nullable final I_AD_User userRecord) { final ImmutableList<BPartnerId> result; if (userRecord == null) // can happen while we are in the process of storing a bpartner with locations and contacts { result = ImmutableList.of(); } else { final BPartn...
if (I_C_BPartner.Table_Name.equals(recordRef.getTableName())) { return false; // recordRef.getRecord_ID() returns the C_BPartner_ID to invalidate => no need to reset all } else if (I_C_User_Role.Table_Name.equals(recordRef.getTableName()) || I_C_User_Assigned_Role.Table_Name.equals(recordRef.getTableName()...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\composite\repository\BPartnerCompositeCachingKeysMapper.java
2
请完成以下Java代码
public ProcessInstanceResult getExecutionResult() { Check.assumeNotNull(result, "action was already executed"); return result; } @Override public ProcessInstanceResult startProcess(@NonNull final ProcessExecutionContext context) { assertNotExecuted(); // // Validate parameters, if any if (parametersD...
throw AdempiereException.wrapIfNeeded(ex); } } private ResultAction processResultAction(final ResultAction resultAction, final IViewsRepository viewRepos) { if (resultAction == null) { return null; } if (resultAction instanceof CreateAndOpenIncludedViewAction) { final IView view = viewRepos.creat...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\view\ViewActionInstance.java
1
请完成以下Java代码
public static Map<String, String> createSingletonMap() { Map<String, String> passwordMap = Collections.singletonMap("username1", "password1"); return passwordMap; } public Map<String, String> createEmptyMap() { Map<String, String> emptyMap = Collections.emptyMap(); return empty...
.collect(Collectors.toMap(data -> (String) data[0], data -> (Integer) data[1])); return map; } public Map<String, Integer> createMapUsingStreamSimpleEntry() { Map<String, Integer> map = Stream.of(new AbstractMap.SimpleEntry<>("idea", 1), new AbstractMap.SimpleEntry<>("mobile", 2)) ...
repos\tutorials-master\core-java-modules\core-java-collections-maps\src\main\java\com\baeldung\map\initialize\MapInitializer.java
1
请完成以下Java代码
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((models == null) ? 0 : models.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); return resul...
if (other.id != null) return false; } else if (!id.equals(other.id)) return false; if (models == null) { if (other.models != null) return false; } else if (!models.equals(other.models)) return false; if (name == null) { ...
repos\tutorials-master\apache-olingo\src\main\java\com\baeldung\examples\olingo2\domain\CarMaker.java
1
请完成以下Java代码
public void setDeploymentId(String deploymentId) { this.deploymentId = deploymentId; } public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } public String getBatchId() { return batchId; } public void setBatchId(String ...
this.externalTaskId = externalTaskId; } public String getAnnotation() { return annotation; } public void setAnnotation(String annotation) { this.annotation = annotation; } @Override public String toString() { return this.getClass().getSimpleName() + "[taskId=" + taskId + ", ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\UserOperationLogEntryEventEntity.java
1
请完成以下Java代码
abstract class AbstractClientHttpRequestFactoryBuilder<T extends ClientHttpRequestFactory> implements ClientHttpRequestFactoryBuilder<T> { private final List<Consumer<T>> customizers; protected AbstractClientHttpRequestFactoryBuilder(@Nullable List<Consumer<T>> customizers) { this.customizers = (customizers != ...
private <E> List<E> merge(Collection<E> list, Collection<? extends E> additional) { List<E> merged = new ArrayList<>(list); merged.addAll(additional); return List.copyOf(merged); } @Override @SuppressWarnings("unchecked") public final T build(@Nullable HttpClientSettings settings) { T factory = createClien...
repos\spring-boot-4.0.1\module\spring-boot-http-client\src\main\java\org\springframework\boot\http\client\AbstractClientHttpRequestFactoryBuilder.java
1
请完成以下Java代码
public Iterator<E> iterator() { return new CustomIterator(); } @Override public ListIterator<E> listIterator() { return null; } @Override public ListIterator<E> listIterator(int index) { // ignored for brevity return null; } private class CustomIterator...
int index; @Override public boolean hasNext() { return index != internal.length; } @SuppressWarnings("unchecked") @Override public E next() { E element = (E) CustomList.this.internal[index]; index++; return element; ...
repos\tutorials-master\core-java-modules\core-java-collections-list-7\src\main\java\com\baeldung\list\CustomList.java
1
请完成以下Java代码
public RouterFunctions.Builder resources(String pattern, Resource location) { builder.resources(pattern, location); return this; } @Override public RouterFunctions.Builder resources(Function<ServerRequest, Optional<Resource>> lookupFunction) { builder.resources(lookupFunction); return this; } @Override ...
HandlerFilterFunction<T, R> filterFunction) { builder.filter(filterFunction); return this; } @Override public RouterFunctions.Builder before(Function<ServerRequest, ServerRequest> requestProcessor) { builder.before(requestProcessor); return this; } @Override public <T extends ServerResponse, R extends S...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\handler\GatewayRouterFunctionsBuilder.java
1
请完成以下Java代码
public Builder withProcessInstanceId(String processInstanceId) { this.processInstanceId = processInstanceId; return this; } /** * Builder method for processDefinitionId parameter. * @param processDefinitionId field to set * @return builder */ ...
} /** * Builder method for activityId parameter. * @param activityId field to set * @return builder */ public Builder withActivityId(String activityId) { this.activityId = activityId; return this; } /** * Builder meth...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\MessageSubscriptionImpl.java
1
请完成以下Java代码
public static Map<String, Object> map(Object... objects) { return mapOfClass(Object.class, objects); } /** * Helper method to easily create a map with keys of type String and values of a given Class. Null values are allowed. * * @param clazz the target Value class * @param objects v...
if (!String.class.isInstance(key)) { throw new ActivitiIllegalArgumentException( "key at index " + keyIndex + " should be a String but is a " + key.getClass() ); } if (value != null && !clazz.isInstance(value)) { throw new Activ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\util\CollectionUtil.java
1
请完成以下Java代码
public String getCurrency() { return currency; } public void setCurrency(String currency) { this.currency = currency; } public BigDecimal getAsk() { return ask; } public void setAsk(BigDecimal ask) { this.ask = ask; } public BigDecimal getBid() {
return bid; } public void setBid(BigDecimal bid) { this.bid = bid; } public LocalDate getDate() { return date; } public void setDate(LocalDate date) { this.date = date; } }
repos\tutorials-master\core-java-modules\java-spi\exchange-rate-api\src\main\java\com\baeldung\rate\api\Quote.java
1
请在Spring Boot框架中完成以下Java代码
public class SessionController { @GetMapping("/websession/test") public Mono<CustomResponse> testWebSessionByParam( @RequestParam(value = "id") int id, @RequestParam(value = "note") String note, WebSession session) { session.getAttributes().put("id", id); se...
} @GetMapping("/websession") public Mono<CustomResponse> getSession(WebSession session) { session.getAttributes().putIfAbsent("id", 0); session.getAttributes().putIfAbsent("note", "Howdy Cosmic Spheroid!"); CustomResponse r = new CustomResponse(); r.setId((int) session.getAttr...
repos\tutorials-master\spring-reactive-modules\spring-reactive-3\src\main\java\com\baeldung\websession\controller\SessionController.java
2
请完成以下Java代码
public @NonNull Set<FAOpenItemsHandlerMatchingKey> getMatchers() { // shall not be called return ImmutableSet.of(); } @Override public Optional<FAOpenItemTrxInfo> computeTrxInfo(final FAOpenItemTrxInfoComputeRequest request) { final ElementValue elementValue = elementValueService.getById(request.getElementV...
private static boolean isClearing(final String tableName) { return I_C_AllocationHdr.Table_Name.equals(tableName) || I_M_MatchInv.Table_Name.equals(tableName); } @Override public void onGLJournalLineCompleted(final SAPGLJournalLine line) { } @Override public void onGLJournalLineReactivated(final SAPGLJo...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\open_items\handlers\Generic_OIHandler.java
1
请完成以下Java代码
public DbEntityCache getDbEntityCache() { return dbEntityCache; } public void setDbEntityCache(DbEntityCache dbEntityCache) { this.dbEntityCache = dbEntityCache; } // query factory methods //////////////////////////////////////////////////// public DeploymentQueryImpl createDeploymentQuery() { ...
public HistoricJobLogQueryImpl createHistoricJobLogQuery() { return new HistoricJobLogQueryImpl(); } public UserQueryImpl createUserQuery() { return new DbUserQueryImpl(); } public GroupQueryImpl createGroupQuery() { return new DbGroupQueryImpl(); } public void registerOptimisticLockingListen...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\entitymanager\DbEntityManager.java
1
请完成以下Java代码
public void setDescription (final java.lang.String Description) { set_Value (COLUMNNAME_Description, Description); } @Override public java.lang.String getDescription() { return get_ValueAsString(COLUMNNAME_Description); } /** * FileCharset AD_Reference_ID=541224 * Reference name: FileCharset */ pu...
} @Override public boolean isManualImport() { return get_ValueAsBoolean(COLUMNNAME_IsManualImport); } @Override public void setIsMultiLine (final boolean IsMultiLine) { set_Value (COLUMNNAME_IsMultiLine, IsMultiLine); } @Override public boolean isMultiLine() { return get_ValueAsBoolean(COLUMNNAME_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ImpFormat.java
1
请在Spring Boot框架中完成以下Java代码
public int hashCode() { return Objects.hash(payerId, payerType, numberOfInsured, copaymentFromDate, copaymentToDate); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PatientPayer {\n"); sb.append(" payerId: ").append(toIndentedString(payerI...
return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-patient-api\src\main\java\io\swagger\client\model\PatientPayer.java
2
请完成以下Java代码
public static void main(String[] args) { try { generateImageFromPDF(PDF, "png"); generateImageFromPDF(PDF, "jpeg"); generateImageFromPDF(PDF, "gif"); generatePDFFromImage(JPG, "jpg"); generatePDFFromImage(GIF, "gif"); } catch (IOException | DocumentException | URISyntaxException e) { e.printStackT...
document.close(); } private static void generatePDFFromImage(String filename, String extension) throws IOException, DocumentException, URISyntaxException { Document document = new Document(); String input = filename + "." + extension; String output = "src/output/" + extension + ".pdf"; FileOutput...
repos\tutorials-master\text-processing-libraries-modules\pdf\src\main\java\com\baeldung\pdf\PDF2ImageExample.java
1
请完成以下Java代码
public void setMobileUI_UserProfile_Picking_ID (final int MobileUI_UserProfile_Picking_ID) { if (MobileUI_UserProfile_Picking_ID < 1) set_ValueNoCheck (COLUMNNAME_MobileUI_UserProfile_Picking_ID, null); else set_ValueNoCheck (COLUMNNAME_MobileUI_UserProfile_Picking_ID, MobileUI_UserProfile_Picking_ID); } ...
@Override public java.lang.String getPickingLineGroupBy() { return get_ValueAsString(COLUMNNAME_PickingLineGroupBy); } /** * PickingLineSortBy AD_Reference_ID=541900 * Reference name: PickingLineSortByValues */ public static final int PICKINGLINESORTBY_AD_Reference_ID=541900; /** ORDER_LINE_SEQ_NO = OR...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_MobileUI_UserProfile_Picking.java
1
请完成以下Java代码
public int hashCode() { return Objects.hash(code, type, message); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(t...
} /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
repos\tutorials-master\spring-swagger-codegen-modules\spring-swagger-codegen-api-client\src\main\java\com\baeldung\petstore\client\model\ModelApiResponse.java
1
请完成以下Java代码
private Collection<ObjectName> register() { return this.endpoints.stream().filter(this::hasOperations).map(this::register).toList(); } private boolean hasOperations(ExposableJmxEndpoint endpoint) { return !CollectionUtils.isEmpty(endpoint.getOperations()); } private ObjectName register(ExposableJmxEndpoint en...
} private void unregister(ObjectName objectName) { try { if (logger.isDebugEnabled()) { logger.debug("Unregister endpoint with ObjectName '" + objectName + "' from the JMX domain"); } this.mBeanServer.unregisterMBean(objectName); } catch (InstanceNotFoundException ex) { // Ignore and continue ...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\jmx\JmxEndpointExporter.java
1
请完成以下Java代码
public void setC_Invoice_Candidate_Commission_ID (final int C_Invoice_Candidate_Commission_ID) { if (C_Invoice_Candidate_Commission_ID < 1) set_Value (COLUMNNAME_C_Invoice_Candidate_Commission_ID, null); else set_Value (COLUMNNAME_C_Invoice_Candidate_Commission_ID, C_Invoice_Candidate_Commission_ID); } ...
} @Override public java.lang.String getCommissionFactTimestamp() { return get_ValueAsString(COLUMNNAME_CommissionFactTimestamp); } @Override public void setCommissionPoints (final BigDecimal CommissionPoints) { set_ValueNoCheck (COLUMNNAME_CommissionPoints, CommissionPoints); } @Override public BigDec...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\commission\model\X_C_Commission_Fact.java
1
请完成以下Java代码
public boolean isRegisterDefaultServlet() { return this.registerDefaultServlet; } public void setRegisterDefaultServlet(boolean registerDefaultServlet) { this.registerDefaultServlet = registerDefaultServlet; } public MimeMappings getMimeMappings() { return this.mimeMappings; } public @Nullable File getDo...
public void setLocaleCharsetMappings(Map<Locale, Charset> localeCharsetMappings) { Assert.notNull(localeCharsetMappings, "'localeCharsetMappings' must not be null"); this.localeCharsetMappings = localeCharsetMappings; } public void setInitParameters(Map<String, String> initParameters) { this.initParameters = i...
repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\servlet\ServletWebServerSettings.java
1
请在Spring Boot框架中完成以下Java代码
public class ArticleDAO implements IArticleDAO { @PersistenceContext private EntityManager entityManager; @Override public Article getArticleById(int articleId) { return entityManager.find(Article.class, articleId); } @SuppressWarnings("unchecked") @Override public List<Article...
public void updateArticle(Article article) { Article artcl = getArticleById(article.getArticleId()); artcl.setTitle(article.getTitle()); artcl.setCategory(article.getCategory()); entityManager.flush(); } @Override public void deleteArticle(int articleId) { entityMana...
repos\SpringBootBucket-master\springboot-hibernate\src\main\java\com\xncoding\pos\dao\repository\impl\ArticleDAO.java
2
请完成以下Java代码
public HashMap<String, ExecutionEntity> getCreatedEmbeddedSubProcesses() { return createdEmbeddedSubProcess; } public Optional<ExecutionEntity> getCreatedEmbeddedSubProcessByKey(String key) { return Optional.ofNullable(createdEmbeddedSubProcess.get(key)); } public void addCreatedEmbedd...
this.createdMultiInstanceRootExecution.put(key, executionEntity); } public Map<String, List<ExecutionEntity>> getProcessInstanceActiveEmbeddedExecutions() { return processInstanceActiveEmbeddedExecutions; } public ProcessInstanceChangeState setProcessInstanceActiveEmbeddedExecutions(Map<String...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\dynamic\ProcessInstanceChangeState.java
1
请在Spring Boot框架中完成以下Java代码
public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) { return http .csrf(csrfSpec -> csrfSpec.disable()) .authorizeExchange(auth -> auth.pathMatchers(HttpMethod.GET,"/**") .authenticated()) .httpBasic(httpBasicSpec -> httpBasicSpec.dis...
public ReactiveAuthenticationManager employeesAuthenticationManager() { return authentication -> employee(authentication) .switchIfEmpty(Mono.error(new UsernameNotFoundException(authentication .getPrincipal() .toString()))) .map( b -> new UsernamePasswordA...
repos\tutorials-master\spring-reactive-modules\spring-reactive-security\src\main\java\com\baeldung\reactive\authresolver\CustomWebSecurityConfig.java
2
请完成以下Java代码
public static List<JSONDocumentReference> ofList(final Collection<WebuiDocumentReference> documentReferences, final JSONOptions jsonOpts) { if (documentReferences.isEmpty()) { return ImmutableList.of(); } return documentReferences.stream() .map(documentReference -> of(documentReference, jsonOpts)) ...
@JsonProperty("filter") private final JSONDocumentFilter filter; @JsonProperty("loadDuration") @JsonInclude(JsonInclude.Include.NON_EMPTY) private final String loadDuration; private JSONDocumentReference( @NonNull final WebuiDocumentReference documentReference, @NonNull final JSONOptions jsonOpts) { fin...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\references\json\JSONDocumentReference.java
1
请完成以下Java代码
public static com.baeldung.serialization.protocols.UserProtos.User getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<User> PARSER = new com.google.protobuf.AbstractParser<User>() { @java.lang.Override public User parseP...
return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_protobuf_User_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_protobuf_User_fieldAccessorTable; public static com.google.proto...
repos\tutorials-master\libraries-data-io\src\main\java\com\baeldung\serialization\protocols\UserProtos.java
1
请完成以下Java代码
public class SpringAdvancedBusinessCalendarManagerFactory { private Integer defaultScheduleVersion; private Clock clock; public Integer getDefaultScheduleVersion() { return defaultScheduleVersion; } public void setDefaultScheduleVersion(Integer defaultScheduleVersion) { this.defa...
mapBusinessCalendarManager.addBusinessCalendar( DurationBusinessCalendar.NAME, new DurationBusinessCalendar(getClock()) ); mapBusinessCalendarManager.addBusinessCalendar( DueDateBusinessCalendar.NAME, new DueDateBusinessCalendar(getClock()) ); ...
repos\Activiti-develop\activiti-core\activiti-spring\src\main\java\org\activiti\spring\SpringAdvancedBusinessCalendarManagerFactory.java
1
请完成以下Java代码
public class FieldDeclaration implements Serializable { private static final long serialVersionUID = 1L; protected String name; protected String type; protected Object value; public FieldDeclaration(String name, String type, Object value) { this.name = name; this.type = type; ...
return type; } public void setType(String type) { this.type = type; } public Object getValue() { return value; } public void setValue(Object value) { this.value = value; } }
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\parser\FieldDeclaration.java
1
请完成以下Java代码
public class Meter { protected AtomicLong counter = new AtomicLong(0); protected String name; public Meter(String name) { this.name = name; } public void mark() { counter.incrementAndGet(); } public void markTimes(long times) { counter.addAndGet(times); }
public String getName() { return name; } public void setName(String name) { this.name = name; } public long getAndClear() { return counter.getAndSet(0); } public long get() { return counter.get(); } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\metrics\Meter.java
1
请在Spring Boot框架中完成以下Java代码
public LocatorInfo getLocatorInfoByRepoId(final int locatorRepoId) { return warehouseService.getLocatorInfoByRepoId(locatorRepoId); } public Stream<I_DD_Order> stream(@NonNull final DDOrderQuery query) { return ddOrderService.streamDDOrders(query); } public I_DD_Order getDDOrderById(final DDOrderId ddOrderI...
public ZoneId getTimeZone(final OrgId orgId) { return orgDAO.getTimeZone(orgId); } public HUInfo getHUInfo(final HuId huId) {return huService.getHUInfoById(huId);} @Nullable public SalesOrderRef getSalesOderRef(@NonNull final I_DD_Order ddOrder) { final OrderId salesOrderId = OrderId.ofRepoIdOrNull(ddOrder....
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\job\service\DistributionJobLoaderSupportingServices.java
2
请完成以下Java代码
public void setActive(boolean active) { this.active = active; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + id; return result; } @Override public boolean equals(Object obj) { if (this == obj) ...
return false; if (getClass() != obj.getClass()) return false; Account other = (Account) obj; if (id != other.id) return false; return true; } @Override public String toString() { return MessageFormat.format("id:{0}, name:{1}, active:{2}, type:...
repos\tutorials-master\persistence-modules\spring-hibernate-6\src\main\java\com\baeldung\hibernate\dynamicupdate\model\Account.java
1
请在Spring Boot框架中完成以下Java代码
public void setImportErrorMsg (final @Nullable java.lang.String ImportErrorMsg) { set_Value (COLUMNNAME_ImportErrorMsg, ImportErrorMsg); } @Override public java.lang.String getImportErrorMsg() { return get_ValueAsString(COLUMNNAME_ImportErrorMsg); } @Override public void setJSONValue (final @Nullable jav...
{ return get_ValueAsString(COLUMNNAME_JSONValue); } @Override public void setS_FailedTimeBooking_ID (final int S_FailedTimeBooking_ID) { if (S_FailedTimeBooking_ID < 1) set_ValueNoCheck (COLUMNNAME_S_FailedTimeBooking_ID, null); else set_ValueNoCheck (COLUMNNAME_S_FailedTimeBooking_ID, S_FailedTimeBo...
repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java-gen\de\metas\serviceprovider\model\X_S_FailedTimeBooking.java
2
请完成以下Java代码
public Void execute(CommandContext commandContext) { if (deploymentId == null) { throw new FlowableIllegalArgumentException("Deployment id is null"); } ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext); ...
public String getDeploymentId() { return deploymentId; } public void setDeploymentId(String deploymentId) { this.deploymentId = deploymentId; } public String getCategory() { return category; } public void setCategory(String category) { this.category = category;...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cmd\SetDeploymentCategoryCmd.java
1
请在Spring Boot框架中完成以下Java代码
public String getExchangeRate() { return exchangeRate; } public void setExchangeRate(String exchangeRate) { this.exchangeRate = exchangeRate; } public DisputeAmount value(String value) { this.value = value; return this; } /** * The monetary amount, in the currency specified by the currency field....
return Objects.equals(this.convertedFromCurrency, disputeAmount.convertedFromCurrency) && Objects.equals(this.convertedFromValue, disputeAmount.convertedFromValue) && Objects.equals(this.currency, disputeAmount.currency) && Objects.equals(this.exchangeRate, disputeAmount.exchangeRate) && Objects.equals(...
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\DisputeAmount.java
2
请完成以下Java代码
public String getSuperCaseInstanceId() { return superCaseInstanceId; } public String getCaseInstanceId() { return caseInstanceId; } public String getTenantId() { return tenantId; } public String getState() { return state; } public void setState(String state) { this.state = state;...
public static HistoricProcessInstanceDto fromHistoricProcessInstance(HistoricProcessInstance historicProcessInstance) { HistoricProcessInstanceDto dto = new HistoricProcessInstanceDto(); dto.id = historicProcessInstance.getId(); dto.businessKey = historicProcessInstance.getBusinessKey(); dto.processDe...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricProcessInstanceDto.java
1
请完成以下Java代码
public void actionPerformed(final ActionEvent e) { } /** * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent) * @param e */ @Override public void mouseClicked(final MouseEvent e) { } /** * @see java.awt.event.MouseListener#mouseEntered(java.awt.event.MouseEvent) * @param e *...
{ super(actionName); putValue(Action.ACTION_COMMAND_KEY, actionName); } // DialogAction /** * Action Listener * * @param e event */ @Override public void actionPerformed(final ActionEvent e) { if (ACTION_DISPOSE.equals(e.getActionCommand())) { Object source = e.getSource(); wh...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CDialog.java
1
请在Spring Boot框架中完成以下Java代码
public Queue queueMessages() { return new Queue("topic.messages"); } //===============以上是验证topic Exchange的队列========== //===============以下是验证Fanout Exchange的队列========== @Bean public Queue AMessage() { return new Queue("fanout.A"); } @Bean public Queue BMessage() { return new Queue("fanout.B"); } @B...
Binding bindingExchangeMessages(Queue queueMessages, TopicExchange exchange) { return BindingBuilder.bind(queueMessages).to(exchange).with("topic.#"); } @Bean Binding bindingExchangeA(Queue AMessage, FanoutExchange fanoutExchange) { return BindingBuilder.bind(AMessage).to(fanoutExchange); } @Bean Binding bi...
repos\spring-boot-quick-master\quick-rabbitmq\src\main\java\com\quick\mq\config\RabbitConfig.java
2
请完成以下Java代码
private List<I_M_HU> retrieveVHUsFromStorage( @NonNull final List<I_M_ShipmentSchedule> shipmentSchedules, final boolean considerAttributes, final boolean isExcludeAllReserved) { // // Create storage queries from shipment schedules final IShipmentScheduleBL shipmentScheduleBL = Services.get(IShipmentSch...
final I_M_Locator locator = huStorageRecord.getLocator(); if (locator != null && locator.getM_Locator_ID() != vhu.getM_Locator_ID()) { return; } final PickingCandidateRepository pickingCandidatesRepo = SpringContextHolder.instance.getBean(PickingCandidateRepository.class); final HuId huId = HuId.ofRepoId...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\slot\impl\HUPickingSlotBLs\RetrieveAvailableHUsToPick.java
1
请完成以下Java代码
public void setM_Attribute_ID (final int M_Attribute_ID) { if (M_Attribute_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Attribute_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Attribute_ID, M_Attribute_ID); } @Override public int getM_Attribute_ID() { return get_ValueAsInt(COLUMNNAME_M_Attribute_ID); }...
@Override public java.lang.String getValue() { return get_ValueAsString(COLUMNNAME_Value); } @Override public void setValueMax (final @Nullable BigDecimal ValueMax) { set_Value (COLUMNNAME_ValueMax, ValueMax); } @Override public BigDecimal getValueMax() { final BigDecimal bd = get_ValueAsBigDecimal(...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Attribute.java
1
请完成以下Java代码
public boolean getParameter_ToAsBool(final String parameterName) { final ProcessInfoParameter processInfoParameter = getProcessInfoParameterOrNull(parameterName); if (processInfoParameter == null) { return false; } return processInfoParameter.getParameter_ToAsBoolean(); } @Override public final Timest...
@Override public LocalDate getParameter_ToAsLocalDate(final String parameterName) { final ProcessInfoParameter processInfoParameter = getProcessInfoParameterOrNull(parameterName); return processInfoParameter != null ? processInfoParameter.getParameter_ToAsLocalDate() : null; } @Override public ZonedDateTime g...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ProcessParams.java
1
请在Spring Boot框架中完成以下Java代码
public Boolean isArchived() { return archived; } public void setArchived(Boolean archived) { this.archived = archived; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ...
sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null)...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-patient-api\src\main\java\io\swagger\client\model\PatientNote.java
2
请在Spring Boot框架中完成以下Java代码
public class X_SUMUP_Config extends org.compiere.model.PO implements I_SUMUP_Config, org.compiere.model.I_Persistent { private static final long serialVersionUID = 886836191L; /** Standard Constructor */ public X_SUMUP_Config (final Properties ctx, final int SUMUP_Config_ID, @Nullable final String trxName) ...
public int getSUMUP_CardReader_ID() { return get_ValueAsInt(COLUMNNAME_SUMUP_CardReader_ID); } @Override public void setSUMUP_Config_ID (final int SUMUP_Config_ID) { if (SUMUP_Config_ID < 1) set_ValueNoCheck (COLUMNNAME_SUMUP_Config_ID, null); else set_ValueNoCheck (COLUMNNAME_SUMUP_Config_ID, SUMU...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sumup\src\main\java-gen\de\metas\payment\sumup\repository\model\X_SUMUP_Config.java
2
请完成以下Java代码
public void setAD_AlertRecipient_ID (int AD_AlertRecipient_ID) { if (AD_AlertRecipient_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_AlertRecipient_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_AlertRecipient_ID, Integer.valueOf(AD_AlertRecipient_ID)); } /** Get Alert Recipient. @return Recipient of the A...
/** Set User/Contact. @param AD_User_ID User within the system - Internal or Business Partner Contact */ public void setAD_User_ID (int AD_User_ID) { if (AD_User_ID < 1) set_Value (COLUMNNAME_AD_User_ID, null); else set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID)); } /** Get User/...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_AlertRecipient.java
1
请在Spring Boot框架中完成以下Java代码
public PPOrderId createRepairOrder( @NonNull final ServiceRepairProjectInfo project, @NonNull final ServiceRepairProjectTask task) { if (!ServiceRepairProjectTaskType.REPAIR_ORDER.equals(task.getType())) { throw new AdempiereException("Not an repair order task: " + task); } if (!ServiceRepairProjectTa...
// .productId(task.getProductId()) .attributeSetInstanceId(task.getAsiId()) .qtyRequired(task.getQtyRequired()) // .dateOrdered(now) .datePromised(now) .dateStartSchedule(now) // .projectId(project.getProjectId()) // .completeDocument(true) // .build()); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\repair_order\RepairManufacturingOrderService.java
2
请完成以下Java代码
/* for testing */ static class Forwarded { private static final char EQUALS = '='; private static final char SEMICOLON = ';'; private final Map<String, String> values; Forwarded() { this.values = new HashMap<>(); } Forwarded(Map<String, String> values) { this.values = values; } public Forwar...
return this.values.get(key); } /* for testing */ Map<String, String> getValues() { return this.values; } @Override public String toString() { return "Forwarded{" + "values=" + this.values + '}'; } public String toHeaderValue() { StringBuilder builder = new StringBuilder(); for (Map.Entry<St...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\headers\ForwardedHeadersFilter.java
1
请在Spring Boot框架中完成以下Java代码
static class Jsr250MethodSecurityMetadataSourceBeanFactory extends AbstractGrantedAuthorityDefaultsBeanFactory { private Jsr250MethodSecurityMetadataSource source = new Jsr250MethodSecurityMetadataSource(); Jsr250MethodSecurityMetadataSource getBean() { this.source.setDefaultRolePrefix(this.rolePrefix); ret...
private LazyInitBeanDefinitionRegistryPostProcessor(String beanName) { this.beanName = beanName; } @Override public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException { if (!registry.containsBeanDefinition(this.beanName)) { return; } BeanDefinition beanD...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\method\GlobalMethodSecurityBeanDefinitionParser.java
2
请完成以下Java代码
public void decisionWithoutExpression(Decision decision) { logInfo( "014", "The decision '{}' has no expression and will be ignored.", decision.getName() ); } public DmnTransformException requiredDecisionLoopDetected(String decisionId) { return new DmnTransformException(exceptionMessage( ...
} public DmnTransformException drdIdIsMissing(DmnDecisionRequirementsGraph drd) { return new DmnTransformException(exceptionMessage( "017", "The decision requirements graph '{}' must have an 'id' attribute set.", drd) ); } public DmnTransformException decisionVariableIsMissing(String decisio...
repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\transform\DmnTransformLogger.java
1
请完成以下Java代码
public class TriggerPlanItemInstanceOperation extends AbstractPlanItemInstanceOperation { public TriggerPlanItemInstanceOperation(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity) { super(commandContext, planItemInstanceEntity); } @Override public void run()...
protected void executeTrigger() { Object behaviorObject = planItemInstanceEntity.getPlanItem().getBehavior(); if (!(behaviorObject instanceof CmmnTriggerableActivityBehavior)) { throw new FlowableException("Cannot trigger a plan item which activity behavior does not implement the " ...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\agenda\operation\TriggerPlanItemInstanceOperation.java
1
请完成以下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...
set_ValueNoCheck (COLUMNNAME_M_PromotionGroup_ID, Integer.valueOf(M_PromotionGroup_ID)); } /** Get Promotion Group. @return Promotion Group */ public int getM_PromotionGroup_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_PromotionGroup_ID); if (ii == null) return 0; return ii.intValue(); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PromotionGroupLine.java
1
请完成以下Java代码
public void output(Writer out) { output ( new PrintWriter(out) ); } /** Override output(BufferedWriter) incase any elements are in the registry. @param out OutputStream to write to. */ public void output(PrintWriter out) { boolean prettyPrint = getPrettyPrint(); int tabLevel = getTabLevel(); if (regi...
out.write(createEndTag()); } } } /** * Allows all Elements the ability to be cloned. */ public Object clone() { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(baos); out.writeObject(this); out.close(); ByteArrayInputStream...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\ConcreteElement.java
1
请在Spring Boot框架中完成以下Java代码
public class CustomizedResponseEntityExceptionHandler extends ResponseEntityExceptionHandler{ @ExceptionHandler(Exception.class) public final ResponseEntity<ErrorDetails> handleAllExceptions(Exception ex, WebRequest request) throws Exception { ErrorDetails errorDetails = new ErrorDetails(LocalDateTime.now(), ...
return new ResponseEntity<ErrorDetails>(errorDetails, HttpStatus.NOT_FOUND); } @Override protected ResponseEntity<Object> handleMethodArgumentNotValid( MethodArgumentNotValidException ex, HttpHeaders headers, HttpStatusCode status, WebRequest request) { ErrorDetails errorDetails = new ErrorDetails(Local...
repos\master-spring-and-spring-boot-main\12-rest-api\src\main\java\com\in28minutes\rest\webservices\restfulwebservices\exception\CustomizedResponseEntityExceptionHandler.java
2
请在Spring Boot框架中完成以下Java代码
public class UserController { @Autowired private UserRepository userRepository; @RequestMapping("/hello") @Cacheable(value="helloCache") public String hello(String name) { System.out.println("没有走缓存!"); return "hello "+name; } @RequestMapping("/condition") @Cacheable(value="co...
} @RequestMapping("/getPutUsers") @CachePut(value="usersCache",key="#nickname") public List<User> getPutUsers(String nickname) { List<User> users=userRepository.findByNickname(nickname); System.out.println("执行了数据库操作"); return users; } @RequestMapping("/allEntries") @Cac...
repos\spring-boot-leaning-master\1.x\第10课:Redis实现数据缓存和Session共享\spring-boot-redis-data-cache\src\main\java\com\neo\web\UserController.java
2
请完成以下Java代码
public BigDecimal getAmount() { return amount; } /** * Sets the value of the amount property. * * @param value * allowed object is * {@link String } * */ public void setAmount(BigDecimal value) { this.amount = value; } /** * Get...
* * @return * possible object is * {@link String } * */ public String getSectionCode() { return sectionCode; } /** * Sets the value of the sectionCode property. * * @param value * allowed object is * {@link String } * ...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_450_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_450\request\ServiceType.java
1
请完成以下Java代码
public BPartnerDepartment getById(@NonNull final BPartnerDepartmentId id) { return getByBPartnerId(id.getBpartnerId()) .stream() .filter(dpt -> id.equals(dpt.getId())) .findFirst().orElse(null); } @NonNull public BPartnerDepartment getByIdNotNull(@NonNull final BPartnerDepartmentId id) { return ge...
private List<BPartnerDepartment> getByBPartnerId0(@NonNull final BPartnerId bPartnerId) { return queryBL.createQueryBuilder(I_C_BPartner_Department.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_C_BPartner_Department.COLUMNNAME_C_BPartner_ID, bPartnerId) .orderBy(I_C_BPartner_Department.COLUMNNA...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\department\BPartnerDepartmentRepo.java
1
请完成以下Java代码
public DmnDecisionResultEntries get(int index) { return ruleResults.get(index); } @Override public boolean contains(Object o) { return ruleResults.contains(o); } @Override public Object[] toArray() { return ruleResults.toArray(); } @Override public <T> T[] toArray(T[] a) { return ru...
@Override public void clear() { throw new UnsupportedOperationException("decision result is immutable"); } @Override public DmnDecisionResultEntries set(int index, DmnDecisionResultEntries element) { throw new UnsupportedOperationException("decision result is immutable"); } @Override public void...
repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DmnDecisionResultImpl.java
1
请完成以下Java代码
public void onPartitionsRevoked(Collection<TopicPartition> partitions) { logger.info("Revoked partitions: {}", partitions); // complete processing of current records } @Override public void onPartitionsAssigned(Collection<TopicPartition> partitions) {...
for (ConsumerRecord<String, String> record : records) { try { processOrder(record); totalProcessed++; } catch (Exception e) { logger.error("Processing failed for offset: {}", record.offset(), e); break; ...
repos\tutorials-master\apache-kafka-3\src\main\java\com\baeldung\kafka\partitions\KafkaMultiplePartitionsDemo.java
1
请完成以下Java代码
public static POSPaymentMethod ofCode(@NonNull String code) {return index.ofCode(code);} @JsonValue @NonNull public String getCode() {return code;} public static boolean equals(@Nullable final POSPaymentMethod value1, @Nullable final POSPaymentMethod value2) {return Objects.equals(value1, value2);} public boole...
{ throw new AdempiereException("Expected CASH payment method but it was " + this); } } public void assertCard() { if (!isCard()) { throw new AdempiereException("Expected CARD payment method but it was " + this); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java\de\metas\pos\POSPaymentMethod.java
1
请在Spring Boot框架中完成以下Java代码
public Date getEndTime() { return endTime; } public void setEndTime(Date endTime) { this.endTime = endTime; } @ApiModelProperty(example = "kermit") public String getStartUserId() { return startUserId; } public void setStartUserId(String startUserId) { this....
} @ApiModelProperty(example = "active") public String getState() { return state; } public void setState(String state) { this.state = state; } @ApiModelProperty(example = "123") public String getCallbackId() { return callbackId; } public void setCallbackId(...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\caze\HistoricCaseInstanceResponse.java
2
请完成以下Java代码
public final class PublicClientAuthenticationConverter implements AuthenticationConverter { @Nullable @Override public Authentication convert(HttpServletRequest request) { if (!OAuth2EndpointUtils.matchesPkceTokenRequest(request)) { return null; } MultiValueMap<String, String> parameters = "GET".equals(re...
// code_verifier (REQUIRED) if (parameters.get(PkceParameterNames.CODE_VERIFIER).size() != 1) { throw new OAuth2AuthenticationException(OAuth2ErrorCodes.INVALID_REQUEST); } parameters.remove(OAuth2ParameterNames.CLIENT_ID); Map<String, Object> additionalParameters = new HashMap<>(); parameters.forEach((k...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\web\authentication\PublicClientAuthenticationConverter.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonKPIDataResult { @With @JsonInclude(JsonInclude.Include.NON_NULL) Integer itemId; @JsonInclude(JsonInclude.Include.NON_NULL) TimeRange range; @JsonInclude(JsonInclude.Include.NON_NULL) List<JsonKPIDataSet> datasets; @JsonInclude(JsonInclude.Include.NON_NULL) JsonWebuiError error; @JsonInclude(Js...
assert error != null; return builder() .itemId(itemData.getItemId().getRepoId()) .error(JsonWebuiError.of(error, jsonOpts)) .build(); } } public static JsonKPIDataResult of( @NonNull final KPIDataResult kpiData, @NonNull final KPIJsonOptions jsonOpts) { return builder() .range(kpiDat...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\dashboard\json\JsonKPIDataResult.java
2
请在Spring Boot框架中完成以下Java代码
public void get() throws URISyntaxException { ResponseEntity<TestDTO> responseEntity = this.restTemplate.getForEntity(HOST + GET_URL, TestDTO.class); System.out.println("getForEntity: " + responseEntity.getBody()); TestDTO forObject = this.restTemplate.getForObject(HOST + GET_URL, TestDTO.class...
System.out.println("postForEntity: " + responseEntity.getBody()); TestDTO testDTO = this.restTemplate.postForObject(url, httpEntity, TestDTO.class); System.out.println("postForObject: " + testDTO); ResponseEntity<TestDTO> exchange = this.restTemplate.exchange(url, HttpMethod.POST, httpEntity, ...
repos\spring-boot-quick-master\quick-rest-template\src\main\java\com\rest\template\service\RestService.java
2
请完成以下Java代码
public void add(E e) { elements.add(e); int elementIndex = elements.size() - 1; while (!isRoot(elementIndex) && !isCorrectChild(elementIndex)) { int parentIndex = parentIndex(elementIndex); swap(elementIndex, parentIndex); elementIndex = parentIndex; }...
return rightChildIndex; } private boolean isLeaf(int index) { return !isValidIndex(leftChildIndex(index)); } private boolean isCorrectParent(int index) { return isCorrect(index, leftChildIndex(index)) && isCorrect(index, rightChildIndex(index)); } private boolean isCorrectChil...
repos\tutorials-master\algorithms-modules\algorithms-sorting-2\src\main\java\com\baeldung\algorithms\heapsort\Heap.java
1
请完成以下Java代码
protected String doIt() throws Exception { final List<ForecastRequest> forecastRequests = streamSelectedRows() .map(MaterialNeedsPlannerRow::ofViewRow) .filter(MaterialNeedsPlannerRow::isDemandFilled) .collect(Collectors.groupingBy(MaterialNeedsPlannerRow::getWarehouseId)) .entrySet() .stream() ...
private Instant getDefaultDatePromised() { final OrgId orgId = getOrgId() != null ? getOrgId() : Env.getOrgId(); final ZoneId timeZone = orgDAO.getTimeZone(orgId); return SystemTime.asLocalDate() .with(TemporalAdjusters.next(DayOfWeek.MONDAY)) .atStartOfDay(timeZone) .toInstant(); } private Strin...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\replenish\process\WEBUI_M_Replenish_Generate_Forecasts.java
1
请完成以下Java代码
public class Campus { @Id private String id; @Field @NotNull private String name; @Field @NotNull private Point location; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return n...
return false; if (obj == this) return true; Campus other = (Campus) obj; return this.hashCode() == other.hashCode(); } @SuppressWarnings("unused") private Campus() { } public Campus(Builder b) { this.id = b.id; this.name = b.name; this.lo...
repos\tutorials-master\persistence-modules\spring-data-couchbase-2\src\main\java\com\baeldung\spring\data\couchbase\model\Campus.java
1
请在Spring Boot框架中完成以下Java代码
ServletRegistrationBean servletRegistrationBean() { ServletRegistrationBean servlet = new ServletRegistrationBean(new CamelHttpTransportServlet(), contextPath + "/*"); servlet.setName("CamelServlet"); return servlet; } @Component class RestApi extends RouteBuilder { @Overri...
.to("direct:remoteService"); from("direct:remoteService").routeId("direct-route") .tracing() .log(">>> ${body.id}") .log(">>> ${body.name}") // .transform().simple("blue ${in.body.name}") .process(new Processor() { ...
repos\tutorials-master\messaging-modules\spring-apache-camel\src\main\java\com\baeldung\camel\boot\Application.java
2
请完成以下Java代码
public void setVhuReservedFlag( @NonNull final I_M_HU_Reservation huReservationRecord, @NonNull final ModelChangeType type) { final boolean reservationIsHere = type.isNew() || ModelChangeUtil.isJustActivated(huReservationRecord); if (reservationIsHere) { final boolean isReserved = true; updateVhuIsRe...
{ final boolean reservationIsGone = type.isDelete() || ModelChangeUtil.isJustDeactivated(huReservationRecord); if (reservationIsGone) { final boolean isReserved = false; updateVhuIsReservedFlag(huReservationRecord, isReserved); } } private void updateVhuIsReservedFlag( @NonNull final I_M_HU_Reservat...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\reservation\interceptor\M_HU_Reservation.java
1
请完成以下Java代码
public class GuessGame extends BroadcastingGuessGame { public static final int SECOND = 1000; private static final Logger log = Logger.getLogger(GuessGame.class.getCanonicalName()); private final List<Player> players; private volatile boolean isFinished = false; private volatile boolean isPaused =...
@Override public void finishGame() { isFinished = true; } @Override public void pauseGame() { isPaused = true; } @Override public void unpauseGame() { isPaused = false; } public List<Player> getPlayers() { return players; } private void wai...
repos\tutorials-master\core-java-modules\core-java-perf-2\src\main\java\com\baeldung\jmxterm\GuessGame.java
1
请在Spring Boot框架中完成以下Java代码
public void setCancelRequestState(String cancelRequestState) { this.cancelRequestState = cancelRequestState; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CancelRequest cancelRequest = (CancelReque...
sb.append(" cancelCompletedDate: ").append(toIndentedString(cancelCompletedDate)).append("\n"); sb.append(" cancelInitiator: ").append(toIndentedString(cancelInitiator)).append("\n"); sb.append(" cancelReason: ").append(toIndentedString(cancelReason)).append("\n"); sb.append(" cancelRequestedDate: ")....
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\CancelRequest.java
2
请完成以下Java代码
public URL checkValidFileLocation(String url) throws MalformedURLException { if (url == null || url.isEmpty()) { return null; } Pattern filePattern = Pattern.compile("^(/|[A-z]://?|[A-z]:\\\\).*[/|\\\\]bpm-platform\\.xml$", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE); Matcher fileMatcher = f...
if (fileLocation != null) { LOG.foundConfigAtLocation(resourceLocation, fileLocation.toString()); } return fileLocation; } public URL lookupBpmPlatformXmlFromClassPath() { return lookupBpmPlatformXmlFromClassPath(BPM_PLATFORM_XML_RESOURCE_LOCATION); } public URL lookupBpmPlatformXml() { ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\deployment\AbstractParseBpmPlatformXmlStep.java
1
请在Spring Boot框架中完成以下Java代码
public class ProjectValueSequenceProvider implements ValueSequenceInfoProvider { private final IDocumentSequenceDAO documentSequenceDAO = Services.get(IDocumentSequenceDAO.class); private final ProjectTypeRepository projectTypeRepository; public ProjectValueSequenceProvider( @NonNull final ProjectTypeRepository ...
return ProviderResult.EMPTY; } final ProjectType projectType = projectTypeRepository.getById(projectTypeId); final DocSequenceId docSequenceId = projectType.getDocSequenceId(); if (docSequenceId == null) { return ProviderResult.EMPTY; } final DocumentSequenceInfo documentSequenceInfo = documentSequen...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\project\sequence\ProjectValueSequenceProvider.java
2
请完成以下Java代码
public void endElement (String uri, String localName, String qName) throws SAXException { if (qName.equals(PrintData.XML_TAG)) { pop(); } else if (qName.equals(PrintDataElement.XML_TAG)) { m_curPD.addNode(new PrintDataElement(m_curPDEname, m_curPDEvalue.toString(),0, null)); } } // endElement /*...
} // push /** * Pop last PD from Stack and set m_cutPD */ private void pop () { // remove last if (m_stack.size() > 0) m_stack.remove(m_stack.size()-1); // get previous if (m_stack.size() > 0) m_curPD = (PrintData)m_stack.get(m_stack.size()-1); } // pop } // PrintDataHandler
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\PrintDataHandler.java
1
请完成以下Java代码
public String getBusinessKey() { return subscriptionConfiguration.getBusinessKey(); } @Override public String getProcessDefinitionId() { return subscriptionConfiguration.getProcessDefinitionId(); } @Override public List<String> getProcessDefinitionIdIn() { return subscriptionConfiguration.getP...
@Override public boolean isWithoutTenantId() { return subscriptionConfiguration.getWithoutTenantId(); } @Override public List<String> getTenantIdIn() { return subscriptionConfiguration.getTenantIdIn(); } @Override public boolean isIncludeExtensionProperties() { return subscriptionConfigurati...
repos\camunda-bpm-platform-master\spring-boot-starter\starter-client\spring\src\main\java\org\camunda\bpm\client\spring\impl\subscription\SpringTopicSubscriptionImpl.java
1
请完成以下Java代码
public int compare(Map.Entry<Integer, Double> o1, Map.Entry<Integer, Double> o2) { return o1.getValue().compareTo(o2.getValue()); } }); for (Map.Entry<Integer, Double> entry : selectedFeatures.entrySet()) { maxHeap.a...
{ this.chisquareCriticalValue = chisquareCriticalValue; } public ChiSquareFeatureExtractor setALevel(double aLevel) { chisquareCriticalValue = ContinuousDistributions.ChisquareInverseCdf(aLevel, 1); return this; } public double getALevel() { return ContinuousDis...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\classification\features\ChiSquareFeatureExtractor.java
1
请完成以下Java代码
public void setEdiEnabledForNewOrder(@NonNull final I_C_Order order) { final boolean ediEnabledByInputDataSource; if (order.getAD_InputDataSource_ID() <= 0) { ediEnabledByInputDataSource = false; } else { ediEnabledByInputDataSource = inputDataSourceBL.isEDIInputDataSource(order.getAD_InputDataSource...
order.setIsEdiEnabled(true); } } @ModelChange(timings = ModelValidator.TYPE_BEFORE_CHANGE, ifColumnsChanged = I_C_Order.COLUMNNAME_C_BPartner_ID) public void onPartnerChange(final I_C_Order order) { final I_C_BPartner partner = InterfaceWrapperHelper.create(order.getC_BPartner(), de.metas.edi.model.I_C_BPartn...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\model\validator\C_Order.java
1
请完成以下Java代码
public class StreamSumCalculatorWithObject { public static Integer getSumUsingCustomizedAccumulator(List<Item> items) { return items.stream() .map(x -> x.getPrice()) .reduce(0, ArithmeticUtils::add); } public static Integer getSumUsingJavaAccumulator(List<Item> items) { ...
.map(item -> item.getPrice()) .reduce(0, (a, b) -> a + b); } public static Integer getSumUsingCollect(List<Item> items) { return items.stream() .map(x -> x.getPrice()) .collect(Collectors.summingInt(Integer::intValue)); } public static Integer getSumUsingSum...
repos\tutorials-master\core-java-modules\core-java-streams\src\main\java\com\baeldung\stream\sum\StreamSumCalculatorWithObject.java
1
请在Spring Boot框架中完成以下Java代码
public Collection<ConfigAttribute> getAllConfigAttributes() { //初始化 所有资源 对应的角色 loadResourceDefine(); return null; } @Override public boolean supports(Class<?> aClass) { return true; } /** * 初始化 所有资源 对应的角色 */ public void loadResourceDefine() { m...
String url = rolePermisson.getUrl(); String roleName = rolePermisson.getRoleName(); ConfigAttribute role = new SecurityConfig(roleName); if(map.containsKey(url)){ map.get(url).add(role); }else{ List<ConfigAttribute> list = new ArrayList<>...
repos\SpringBootLearning-master (1)\springboot-jwt\src\main\java\com\gf\config\MyInvocationSecurityMetadataSourceService.java
2
请完成以下Java代码
public void setTargetFlowElement(FlowElement targetFlowElement) { this.targetFlowElement = targetFlowElement; } public List<Integer> getWaypoints() { return waypoints; } public void setWaypoints(List<Integer> waypoints) { this.waypoints = waypoints; } public String toS...
public SequenceFlow clone() { SequenceFlow clone = new SequenceFlow(); clone.setValues(this); return clone; } public void setValues(SequenceFlow otherFlow) { super.setValues(otherFlow); setConditionExpression(otherFlow.getConditionExpression()); setSourceRef(othe...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\SequenceFlow.java
1
请完成以下Java代码
public void setC_BPartner_ID (final int C_BPartner_ID) { if (C_BPartner_ID < 1) set_ValueNoCheck (COLUMNNAME_C_BPartner_ID, null); else set_ValueNoCheck (COLUMNNAME_C_BPartner_ID, C_BPartner_ID); } @Override public int getC_BPartner_ID() { return get_ValueAsInt(COLUMNNAME_C_BPartner_ID); } @Over...
{ return get_ValueAsString(COLUMNNAME_Lookup_Label); } @Override public void setStoreGLN (final @Nullable java.lang.String StoreGLN) { set_Value (COLUMNNAME_StoreGLN, StoreGLN); } @Override public java.lang.String getStoreGLN() { return get_ValueAsString(COLUMNNAME_StoreGLN); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_C_BPartner_Lookup_BPL_GLN_v.java
1
请完成以下Java代码
public class TelecomAddressType { @XmlElement(required = true) protected List<String> phone; protected List<String> fax; /** * Gets the value of the phone property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modificati...
* returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the fax property. * * <p> * For example, to add a new item, do as follows: * <pre> * getFax().add(newItem); * </pre> * * * <p> * Objects of the fo...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_response\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\response\TelecomAddressType.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO (Properties ctx) { org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo (ctx, Table_Name, get_TrxName()); return poi; } /** Set C_DocBaseType_Counter. @param C_DocBaseType_Counter_ID C_DocBaseType_Counter */ @Override public void setC...
/** Set Document BaseType. @param DocBaseType Logical type of document */ @Override public void setDocBaseType (java.lang.String DocBaseType) { set_Value (COLUMNNAME_DocBaseType, DocBaseType); } /** Get Document BaseType. @return Logical type of document */ @Override public java.lang.String getDo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_DocBaseType_Counter.java
1
请完成以下Java代码
public static String reversalMessage(String fromUserName, String toUserName, String Content) { TextMessage text = new TextMessage(); text.setToUserName(fromUserName); text.setFromUserName(toUserName); text.setContent(Content); text.setCreateTime(new Date().getTime()); tex...
* * @param content * @return */ public static boolean isQqFace(String content) { boolean result = false; // 判断QQ表情的正则表达式 Matcher m = p.matcher(content); if (m.matches()) { result = true; } return result; } }
repos\spring-boot-quick-master\quick-wx-public\src\main\java\com\wx\pn\api\utils\MessageUtil.java
1
请完成以下Java代码
public Optional<DocTax> getByTaxId(@Nullable final TaxId taxId) { if (taxId == null) { return Optional.empty(); } return Optional.ofNullable(taxesByTaxId.get(taxId)); } public void mapEach(@NonNull final UnaryOperator<DocTax> mapper) { final ImmutableSet<TaxId> taxIds = ImmutableSet.copyOf(taxesByTax...
taxesByTaxId.compute(taxId, (k, docTax) -> mapper.apply(docTax)); } } public void add(@NonNull final DocTax docTax) { final TaxId taxId = docTax.getTaxId(); final DocTax existingDocTax = taxesByTaxId.get(taxId); if (existingDocTax != null) { throw new AdempiereException("Cannot add " + docTax + " since...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\DocTaxesList.java
1
请完成以下Java代码
public class StartProcessInstanceAsyncCmd extends StartProcessInstanceCmd { public StartProcessInstanceAsyncCmd(ProcessInstanceBuilderImpl processInstanceBuilder) { super(processInstanceBuilder); } @Override public ProcessInstance execute(CommandContext commandContext) { ProcessEngineC...
return processInstance; } protected void executeAsynchronous(ExecutionEntity execution, Process process, CommandContext commandContext) { ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext); JobService jobService = process...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cmd\StartProcessInstanceAsyncCmd.java
1
请在Spring Boot框架中完成以下Java代码
public CommonResult create(@RequestParam String name) { int count = productAttributeCategoryService.create(name); if (count > 0) { return CommonResult.success(count); } else { return CommonResult.failed(); } } @ApiOperation("修改商品属性分类") @RequestMapping...
@ApiOperation("获取单个商品属性分类信息") @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult<PmsProductAttributeCategory> getItem(@PathVariable Long id) { PmsProductAttributeCategory productAttributeCategory = productAttributeCategoryService.getItem(id); retur...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\controller\PmsProductAttributeCategoryController.java
2
请在Spring Boot框架中完成以下Java代码
public class ExternalReferenceRestController { private final ExternalReferenceRestControllerService externalReferenceRestControllerService; public ExternalReferenceRestController(@NonNull final ExternalReferenceRestControllerService externalReferenceRestControllerService) { this.externalReferenceRestControllerSe...
return ResponseEntity.ok().build(); } @PutMapping("/upsert/{orgCode}") public ResponseEntity<?> upsert( @ApiParam(required = true, value = "`AD_Org.Value` of the external references we are upserting") // @PathVariable("orgCode") // @Nullable final String orgCode, @RequestBody @NonNull final JsonRequest...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalreference\src\main\java\de\metas\externalreference\rest\v1\ExternalReferenceRestController.java
2
请完成以下Java代码
public class GatewayToStringStyler extends DefaultToStringStyler { private static final GatewayToStringStyler FILTER_INSTANCE = new GatewayToStringStyler(GatewayFilterFactory.class, NameUtils::normalizeFilterFactoryName); private final Function<Class, String> classNameFormatter; private final Class instanceCla...
@Override public void styleStart(StringBuilder buffer, Object obj) { if (!obj.getClass().isArray()) { String shortName; if (instanceClass.isInstance(obj)) { shortName = classNameFormatter.apply(obj.getClass()); } else { shortName = ClassUtils.getShortName(obj.getClass()); } buffer.append('[...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\support\GatewayToStringStyler.java
1