instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } public String getType() { return type; } public void setType(String type) { this.type = type; } public Long getPrice() { return price; } public void se...
public StoreItem(String type, String name, Long price) { this.type = type; this.name = name; this.price = price; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { ...
repos\tutorials-master\persistence-modules\spring-data-elasticsearch\src\main\java\com\baeldung\spring\data\es\aggregation\model\StoreItem.java
1
请完成以下Java代码
public int getRevision() { return revision; } @Override public int getRevisionNext() { return revision + 1; } @Override public void setRevision(int revision) { this.revision = revision; } @Override public String getTenantId() { return tenantId; ...
public void setTenantId(String tenantId) { this.tenantId = tenantId; } @Override public boolean hasEditorSource() { return this.editorSourceValueId != null; } @Override public boolean hasEditorSourceExtra() { return this.editorSourceExtraValueId != null; } }
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ModelEntity.java
1
请完成以下Java代码
public void setDataEntry_SubTab(final de.metas.dataentry.model.I_DataEntry_SubTab DataEntry_SubTab) { set_ValueFromPO(COLUMNNAME_DataEntry_SubTab_ID, de.metas.dataentry.model.I_DataEntry_SubTab.class, DataEntry_SubTab); } @Override public void setDataEntry_SubTab_ID (final int DataEntry_SubTab_ID) { if (DataE...
return get_ValueAsString(COLUMNNAME_Name); } @Override public void setSectionName (final java.lang.String SectionName) { set_Value (COLUMNNAME_SectionName, SectionName); } @Override public java.lang.String getSectionName() { return get_ValueAsString(COLUMNNAME_SectionName); } @Override public void se...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\dataentry\model\X_DataEntry_Section.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isEnableLocalization() { return enableLocalization; } public TaskServiceConfiguration setEnableLocalization(boolean enableLocalization) { this.enableLocalization = enableLocalization; return this; } public TaskQueryInterceptor getTaskQueryInterceptor() { ...
@Override public TaskServiceConfiguration setEventDispatcher(FlowableEventDispatcher eventDispatcher) { this.eventDispatcher = eventDispatcher; return this; } @Override public TaskServiceConfiguration setEventListeners(List<FlowableEventListener> eventListeners) { this.eventList...
repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\TaskServiceConfiguration.java
2
请完成以下Spring Boot application配置
spring.datasource.url=jdbc:postgresql://localhost:5432/postgres spring.datasource.username=postgres spring.datasource.password=postgres spring.jpa.hibernate.ddl-auto=create spring.jpa.show-sql=true spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect sp
ring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true logging.level.org.hibernate.type.descriptor.sql=TRACE
repos\Hibernate-SpringBoot-master\HibernateSpringBootCustomSequenceGenerator\src\main\resources\application.properties
2
请在Spring Boot框架中完成以下Java代码
public String getEventName() { return eventName; } public void setEventName(String eventName) { this.eventName = eventName; } public String getActivityId() { return activityId; } public void setActivityId(String activityId) { this.activityId = activityId; }...
public void setScopeType(String scopeType) { this.scopeType = scopeType; } public String getSubScopeId() { return subScopeId; } public void setSubScopeId(String subScopeId) { this.subScopeId = subScopeId; } public String getScopeDefinitionId() { return scopeDef...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\process\EventSubscriptionResponse.java
2
请完成以下Java代码
public List<DeadLetterJobEntity> findDeadLetterJobsByExecutionId(String executionId) { return getDbSqlSession().selectList("selectDeadLetterJobsByExecutionId", executionId); } @SuppressWarnings("unchecked") public List<Job> findJobsByQueryCriteria(JobQueryImpl jobQuery, Page page) { final S...
return getDbSqlSession().selectList("selectDeadLetterJobByTypeAndProcessDefinitionId", params); } public long findDeadLetterJobCountByQueryCriteria(JobQueryImpl jobQuery) { return (Long) getDbSqlSession().selectOne("selectDeadLetterJobCountByQueryCriteria", jobQuery); } public void updateDeadL...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\DeadLetterJobEntityManager.java
1
请在Spring Boot框架中完成以下Java代码
public static String getStringByStringMap(Map<String, String> map) { SortedMap<String, Object> smap = new TreeMap<String, Object>(map); StringBuffer sb = new StringBuffer(); for (Map.Entry<String, Object> m : smap.entrySet()) { sb.append(m.getKey()).append("=").append(m.getValue()).a...
/** * 订单查询 * * @param outTradeNo * @return */ public static Map<String, Object> orderQuery(String outTradeNo, String appId, String MchId, String partnerKey) { Random random = new Random(); Map<String, Object> paramMap = new HashMap<>(); paramMap.put("appid", appId); ...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\utils\WeiXinPayUtils.java
2
请完成以下Java代码
public Optional<DeviceAccessor> getDeviceAccessorById(@NonNull final DeviceId id) { return deviceConfigPool.getAllAttributeCodes() .stream() .map(this::getDeviceAccessors) .map(deviceAccessorsList -> deviceAccessorsList.getByIdOrNull(id)) .filter(Objects::nonNull) .findFirst(); } public @NonNu...
final List<IDeviceRequest<ISingleValueResponse>> allRequestsFor = DeviceInstanceUtils.getAllRequestsFor(deviceConfig, attributeCode, ISingleValueResponse.class); logger.info("Found these requests for {} and attribute {}: {}", deviceConfig, attributeCode, allRequestsFor); // NOTE: usually we expect one element (m...
repos\metasfresh-new_dawn_uat\backend\de.metas.device.adempiere\src\main\java\de\metas\device\accessor\DeviceAccessorsHub.java
1
请完成以下Java代码
public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Integer getOrderStatus() { return orderStatus; } public void setOrderStatus(Integer orderStatus) { this.orderStatus = orderSta...
} @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", orderId=").append(orderId); sb.appe...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\OmsOrderOperateHistory.java
1
请完成以下Java代码
public class WebsocketActiveSubscriptionsIndex { private final SetMultimap<WebsocketTopicName, WebsocketSubscriptionId> subscriptionIdsByTopicName = HashMultimap.create(); private final SetMultimap<WebsocketSessionId, WebsocketSubscriptionId> subscriptionIdsBySessionId = HashMultimap.create(); private final HashMap<...
return ImmutableSet.of(); } final ImmutableSet.Builder<WebsocketTopicName> topicNames = ImmutableSet.builder(); for (final WebsocketSubscriptionId subscriptionId : subscriptionIds) { final WebsocketTopicName topicName = removeSubscriptionAndGetTopicName(subscriptionId); if (topicName != null) { to...
repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\websocket\producers\WebsocketActiveSubscriptionsIndex.java
1
请完成以下Java代码
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { if (!validateCertificateChain(chain)) { throw new CertificateException("Invalid Chain of X509 Certificates. "); } String clientDeviceCertValue = SslUtil.getCertifica...
log.error(e.getMessage(), e); } } private boolean validateCertificateChain(X509Certificate[] chain) { try { if (chain.length > 1) { X509Certificate leafCert = chain[0]; for (int i = 1; i < chain.length; i++) { ...
repos\thingsboard-master\common\transport\mqtt\src\main\java\org\thingsboard\server\transport\mqtt\MqttSslHandlerProvider.java
1
请在Spring Boot框架中完成以下Java代码
public CommonResult delete(@PathVariable Long id) { int count = resourceService.delete(id); dynamicSecurityMetadataSource.clearDataSource(); if (count > 0) { return CommonResult.success(count); } else { return CommonResult.failed(); } } @ApiOperat...
@RequestParam(required = false) String urlKeyword, @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { List<UmsR...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\controller\UmsResourceController.java
2
请完成以下Java代码
public void actionPerformed(ActionEvent e) { MQuery query = null; if (e.getSource() == m_active) { query = new MQuery(""); String where = "(" + m_where + ") AND Processed='N'"; query.addRestriction(where); } else if (e.getSource() == m_all) { query = new MQuery(""); query.addRestriction(m_wh...
} else if (m_AD_Table_ID == getTableId(I_M_Product.class)) { tab.setValue("M_Product_ID", new Integer(m_Record_ID)); } else if (m_AD_Table_ID == getTableId(I_C_Payment.class)) { tab.setValue("C_Payment_ID", new Integer(m_Record_ID)); } else if (m_AD_Table_ID == getTableId(I_M_InOut.class)) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\ARequest.java
1
请完成以下Java代码
public String getTenantId() { return tenantId; } public String getCreateUserId() { return createUserId; } public Date getStartTime() { return startTime; } public void setStartTime(final Date startTime) { this.startTime = startTime; } public Date getExecutionStartTime() { return e...
dto.jobsCreated = batch.getJobsCreated(); dto.batchJobsPerSeed = batch.getBatchJobsPerSeed(); dto.invocationsPerBatchJob = batch.getInvocationsPerBatchJob(); dto.seedJobDefinitionId = batch.getSeedJobDefinitionId(); dto.monitorJobDefinitionId = batch.getMonitorJobDefinitionId(); dto.batchJobDefiniti...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\batch\BatchDto.java
1
请完成以下Java代码
public boolean isOnlyStages() { return onlyStages; } public String getTenantId() { return tenantId; } public String getTenantIdLike() { return tenantIdLike; } public boolean isWithoutTenantId() { return withoutTenantId; } public boolean isIncludeLocalVaria...
public void setSafeInvolvedGroups(List<List<String>> safeInvolvedGroups) { this.safeInvolvedGroups = safeInvolvedGroups; } public List<List<String>> getSafeCaseInstanceIds() { return safeCaseInstanceIds; } public void setSafeCaseInstanceIds(List<List<String>> safeProcessInstanceIds) { ...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\history\HistoricPlanItemInstanceQueryImpl.java
1
请完成以下Java代码
public void setAccessTokenCustomizer(OAuth2TokenCustomizer<OAuth2TokenClaimsContext> accessTokenCustomizer) { Assert.notNull(accessTokenCustomizer, "accessTokenCustomizer cannot be null"); this.accessTokenCustomizer = accessTokenCustomizer; } /** * Sets the {@link Clock} used when obtaining the current instant...
private OAuth2AccessTokenClaims(TokenType tokenType, String tokenValue, Instant issuedAt, Instant expiresAt, Set<String> scopes, Map<String, Object> claims) { super(tokenType, tokenValue, issuedAt, expiresAt, scopes); this.claims = claims; } @Override public Map<String, Object> getClaims() { return ...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\token\OAuth2AccessTokenGenerator.java
1
请完成以下Java代码
public Iterator<String> iterator() { return this.candidates.iterator(); } /** * Returns the list of loaded import candidates. * @return the list of import candidates */ public List<String> getCandidates() { return this.candidates; } /** * Loads the names of import candidates from the classpath. The n...
throw new IllegalArgumentException("Failed to load configurations from location [" + location + "]", ex); } } private static List<String> readCandidateConfigurations(URL url) { try (BufferedReader reader = new BufferedReader( new InputStreamReader(new UrlResource(url).getInputStream(), StandardCharsets.UTF_8...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\annotation\ImportCandidates.java
1
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getGenre() { return genre; } public void setG...
public int getAge() { return age; } public void setAge(int age) { this.age = age; } public List<Book> getBooks() { return books; } public void setBooks(List<Book> books) { this.books = books; } }
repos\Hibernate-SpringBoot-master\HibernateSpringBootDtoViaFullJoins\src\main\java\com\bookstore\entity\Author.java
1
请完成以下Java代码
public void setEventOutParameters(List<IOParameter> eventOutParameters) { this.eventOutParameters = eventOutParameters; } @Override public SendEventServiceTask clone() { SendEventServiceTask clone = new SendEventServiceTask(); clone.setValues(this); return clone; } ...
eventInParameters = new ArrayList<>(); if (otherElement.getEventInParameters() != null && !otherElement.getEventInParameters().isEmpty()) { for (IOParameter parameter : otherElement.getEventInParameters()) { eventInParameters.add(parameter.clone()); } } ...
repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\SendEventServiceTask.java
1
请完成以下Java代码
public String getVersion() { return version; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column rule.version * * @param version the value for rule.version * * @mbggenerated */ public void setVersion(String v...
this.createTime = createTime; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column rule.update_time * * @return the value of rule.update_time * * @mbggenerated */ public Date getUpdateTime() { return update...
repos\spring-boot-student-master\spring-boot-student-drools\src\main\java\com\xiaolyuh\domain\model\Rule.java
1
请在Spring Boot框架中完成以下Java代码
public class UserSessionRestController { public static final String ENDPOINT = WebConfig.ENDPOINT_ROOT + "/userSession"; private static final String SYSCONFIG_SETTINGS_PREFIX = "webui.frontend."; private final ISysConfigBL sysConfigBL = Services.get(ISysConfigBL.class); @NonNull private final UserSession userSess...
.map(UserSessionRestController::toJSONLookupValue) .ifPresent(builder::currentWorkplace); if (includeAvailable) { builder.available(workplaceService.getAllActive() .stream() .map(UserSessionRestController::toJSONLookupValue) .sorted(Comparator.comparing(JSONLookupValue::getCaption)) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\session\UserSessionRestController.java
2
请完成以下Java代码
private boolean applies(final List<I_C_Flatrate_Term> flatrateTermsForInvoiceId) { if (flatrateTermsForInvoiceId.isEmpty()) { return false; } if (containsNewTerm(flatrateTermsForInvoiceId)) { return false; } return true; } private boolean containsNewTerm(@NonNull final List<I_C_Flatrate_Term> fl...
private List<I_C_Flatrate_Term> retrieveFlatrateTermsForInvoiceId0(@NonNull final InvoiceId invoiceId) { final List<I_C_Flatrate_Term> flatrateTerms = Services .get(IQueryBL.class) .createQueryBuilder(I_C_InvoiceLine.class) .addEqualsFilter(I_C_InvoiceLine.COLUMN_C_Invoice_ID, invoiceId) .andCollectC...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\dunning\ContractBasedInvoiceDueDateProvider.java
1
请在Spring Boot框架中完成以下Java代码
static class EnableRedisKeyspaceNotificationsInitializer implements InitializingBean { private final RedisConnectionFactory connectionFactory; private final ConfigureRedisAction configure; EnableRedisKeyspaceNotificationsInitializer(RedisConnectionFactory connectionFactory, ConfigureRedisAction configure) ...
RedisConnection connection = this.connectionFactory.getConnection(); try { this.configure.configure(connection); } finally { try { connection.close(); } catch (Exception ex) { LogFactory.getLog(getClass()).error("Error closing RedisConnection", ex); } } } } }
repos\spring-session-main\spring-session-data-redis\src\main\java\org\springframework\session\data\redis\config\annotation\web\http\RedisIndexedHttpSessionConfiguration.java
2
请完成以下Java代码
private static <T> T getContextualReference(BeanManager bm, Set<Bean<?>> beans, Class<?> type) { if (beans == null || beans.size() == 0) { return null; } // if we would resolve to multiple beans then BeanManager#resolve would throw an AmbiguousResolutionException Bean<?> bean = bm.resolve(beans);...
} private static boolean isDependentScoped(Bean<?> bean) { return Dependent.class.equals(bean.getScope()); } private static void releaseOnContextClose(CreationalContext<?> creationalContext, Bean<?> bean) { CommandContext commandContext = Context.getCommandContext(); if(commandContext != null) { ...
repos\camunda-bpm-platform-master\engine-cdi\core\src\main\java\org\camunda\bpm\engine\cdi\impl\util\ProgrammaticBeanLookup.java
1
请完成以下Java代码
public CostDetailCreateRequest withQtyZero() { return withQty(qty.toZero()); } public CostDetailBuilder toCostDetailBuilder() { final CostDetailBuilder costDetail = CostDetail.builder() .clientId(getClientId()) .orgId(getOrgId()) .acctSchemaId(getAcctSchemaId()) .productId(getProductId()) ....
.amt(getAmt()) .qty(getQty()) // .documentRef(getDocumentRef()) .description(getDescription()) .dateAcct(getDate()); if (isExplicitCostElement()) { costDetail.costElementId(getCostElementId()); } return costDetail; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\CostDetailCreateRequest.java
1
请完成以下Java代码
default void setBatchListener(boolean batchListener) { } /** * Whether this endpoint is for a batch listener. * @return {@link Boolean#TRUE} if batch. * @since 3.0 */ @Nullable Boolean getBatchListener(); /** * Set a {@link BatchingStrategy} to use when debatching messages. * @param batchingStrategy ...
* sent. * @return the post processor. * @since 2.2.5 */ default @Nullable ReplyPostProcessor getReplyPostProcessor() { return null; } /** * Get the reply content type. * @return the content type. * @since 2.3 */ default @Nullable String getReplyContentType() { return null; } /** * Return whe...
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\listener\RabbitListenerEndpoint.java
1
请完成以下Java代码
public class CronTimer { protected final Cron cron; public CronTimer(final Cron cron) { this.cron = cron; } public Date getDueDate(final Date afterTime) { long fromEpochMilli = afterTime.getTime(); final var next = ExecutionTime.forCron(cron) .nextExecution(ZonedDateTime.ofInstant(Instan...
return new Date(next.orElse(fromEpochMilli)); } public static CronTimer parse(final String text) throws ParseException { try { final var cron = new CronParser(CronDefinitionBuilder.instanceDefinitionFor(CronType.SPRING53)) .parse(text); return new CronTimer(cron); } catc...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\calendar\CronTimer.java
1
请完成以下Java代码
public Date getTimestamp() { return timestamp; } public void setTimestamp(Date timestamp) { this.timestamp = timestamp; } public List<Group> getGroups() { return groups; } public void setGroups(List<Group> groups) { this....
// moment) // Experimental stuff! public static interface LDAPGroupCacheListener { void cacheHit(String userId); void cacheMiss(String userId); void cacheEviction(String userId); void cacheExpired(String userId); } }
repos\flowable-engine-main\modules\flowable-ldap\src\main\java\org\flowable\ldap\LDAPGroupCache.java
1
请在Spring Boot框架中完成以下Java代码
public class MyAdditionalEntityManagerFactoryConfiguration { @Qualifier("second") @Bean(defaultCandidate = false) @ConfigurationProperties("app.jpa") public JpaProperties secondJpaProperties() { return new JpaProperties(); } @Qualifier("second") @Bean(defaultCandidate = false) public LocalContainerEntityMan...
jpaProperties.getProperties()); return new EntityManagerFactoryBuilder(jpaVendorAdapter, jpaPropertiesFactory, null); } private JpaVendorAdapter createJpaVendorAdapter(JpaProperties jpaProperties) { // ... map JPA properties as needed return new HibernateJpaVendorAdapter(); } private Map<String, ?> createJp...
repos\spring-boot-4.0.1\documentation\spring-boot-docs\src\main\java\org\springframework\boot\docs\howto\dataaccess\usemultipleentitymanagers\MyAdditionalEntityManagerFactoryConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public Page<Article> getArticleFavoritedByUsername(UserName username, Pageable pageable) { return userFindService.findByUsername(username) .map(user -> articleRepository.findAllByUserFavoritedContains(user, pageable) .map(article -> article.updateFavoriteByUser(user))) ...
public Article favoriteArticle(long userId, String articleSlugToFavorite) { return mapIfAllPresent( userFindService.findById(userId), getArticleBySlug(articleSlugToFavorite), User::favoriteArticle) .orElseThrow(NoSuchElementException::new); } @Transaction...
repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\domain\article\ArticleService.java
2
请在Spring Boot框架中完成以下Java代码
public class BlogsController { private final ChatClient chatClient; private final VectorStore vectorStore; public BlogsController(ChatClient.Builder chatClientBuilder, EmbeddingModel embeddingModel) throws IOException { this.chatClient = chatClientBuilder.build(); this.vectorStore = Simple...
.call() .content(); } record Article(String title, Set<String> tags) { } @GetMapping("v2") List<Article> askQuestionAndRetrieveArticles(@RequestParam(name = "question") String question) { return chatClient.prompt() .user(question) .call() .en...
repos\tutorials-master\spring-ai-modules\spring-ai-3\src\main\java\com\baeldung\springai\chatclient\rest\BlogsController.java
2
请完成以下Java代码
private List<I_M_HU_PI_Item_Product> getTUPIItemProducts(final @NonNull FinishedGoodsReceiveLine finishedGoodsReceiveLine, final @Nullable BPartnerId customerId) { return huPIItemProductDAO.retrieveTUs( Env.getCtx(), finishedGoodsReceiveLine.getProductId(), customerId, false); } private HuPackingI...
private QtyTU computeQtyTUsRequired(final @NonNull FinishedGoodsReceiveLine finishedGoodsReceiveLine, final I_M_HU_PI_Item_Product tuPIItemProduct) { final UomId uomId = UomId.ofRepoId(tuPIItemProduct.getC_UOM_ID()); final Quantity qtyCusPerTU = Quantitys.of(tuPIItemProduct.getQty(), uomId); final Quantity qtyCU...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\workflows_api\activity_handlers\generateHUQRCodes\GenerateHUQRCodesActivityHandler.java
1
请完成以下Java代码
public ContextPath newChild(@NonNull final DocumentEntityDescriptor entityDescriptor) { return newChild(ContextPathElement.ofNameAndId( extractName(entityDescriptor), AdTabId.toRepoId(entityDescriptor.getAdTabIdOrNull()) )); } private ContextPath newChild(@NonNull final ContextPathElement element) { ...
return new ContextPathElement(name, id); } else { return new ContextPathElement(json, -1); } } catch (final Exception ex) { throw new AdempiereException("Failed parsing: " + json, ex); } } public static ContextPathElement ofName(@NonNull final String name) {return new ContextPathElement(na...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\health\ContextPath.java
1
请完成以下Java代码
public boolean isExecutable() { return true; } } /** * Executable expanded archive layout. */ public static class Expanded extends Jar { @Override public String getLauncherClassName() { return "org.springframework.boot.loader.launch.PropertiesLauncher"; } } /** * No layout. */ public st...
locations.put(LibraryScope.CUSTOM, "WEB-INF/lib/"); locations.put(LibraryScope.RUNTIME, "WEB-INF/lib/"); locations.put(LibraryScope.PROVIDED, "WEB-INF/lib-provided/"); SCOPE_LOCATION = Collections.unmodifiableMap(locations); } @Override public String getLauncherClassName() { return "org.springframewo...
repos\spring-boot-4.0.1\loader\spring-boot-loader-tools\src\main\java\org\springframework\boot\loader\tools\Layouts.java
1
请完成以下Java代码
public boolean isExpanded() { return expanded; } @Override public void setExpanded(final boolean expanded) { if (this.expanded == expanded) { return; } this.expanded = expanded; findPanel.setVisible(expanded); findPanel.setEnabled(expanded); _pcs.firePropertyChange(PROPERTY_Expanded, !expand...
public boolean requestFocusInWindow() { return findPanel.requestFocusInWindow(); } private final synchronized PropertyChangeSupport getPropertyChangeSupport() { if (_pcs == null) { _pcs = new PropertyChangeSupport(this); } return _pcs; } @Override public void runOnExpandedStateChange(final Runnab...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\FindPanelContainer_EmbeddedPanel.java
1
请在Spring Boot框架中完成以下Java代码
public class UserController { @GetMapping("/list") @ApiOperation(value = "查询用户列表", notes = "目前仅仅是作为测试,所以返回用户全列表") public List<UserVO> list() { // 查询列表 List<UserVO> result = new ArrayList<>(); result.add(new UserVO().setId(1).setUsername("yudaoyuanma")); result.add(new UserVO...
Integer returnId = UUID.randomUUID().hashCode(); // 返回用户编号 return returnId; } @PostMapping("/update") @ApiOperation("更新指定用户编号的用户") public Boolean update(UserUpdateDTO updateDTO) { // 更新用户记录 Boolean success = true; // 返回更新是否成功 return success; } @P...
repos\SpringBoot-Labs-master\lab-24\lab-24-apidoc-swagger\src\main\java\cn\iocoder\springboot\lab24\apidoc\controller\UserController.java
2
请完成以下Java代码
public int compare (Object o1, Object o2) { // Get Objects to compare Object cmp1 = o1; if (o1 instanceof MSort) cmp1 = ((MSort)o1).data; if (cmp1 instanceof NamePair) cmp1 = ((NamePair)cmp1).getName(); Object cmp2 = o2; if (o2 instanceof MSort) cmp2 = ((MSort)o2).data; if (cmp2 instanceof Name...
return m_collator.compare(s, cmp2.toString()) * m_multiplier; // teo_sarca [ 1672820 ] } // compare /** * Equal (based on data, ignores index) * @param obj object * @return true if equal */ @Override public boolean equals (Object obj) { if (obj instanceof MSort) { MSort ms = (MSort)obj; if (d...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\MSort.java
1
请完成以下Java代码
public Builder setRecordId(@Nullable final DocumentId documentId) { recordIds = documentId != null ? ImmutableSet.of(documentId) : ImmutableSet.of(); return this; } public Builder setRecordIds(@Nullable final Collection<DocumentId> documentIds) { recordIds = documentIds != null ? Immut...
{ return _noSorting ? DocumentQueryOrderByList.EMPTY : DocumentQueryOrderByList.ofList(_orderBys); } public Builder setFirstRow(final int firstRow) { this.firstRow = firstRow; return this; } public Builder setPageLength(final int pageLength) { this.pageLength = pageLength; return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentQuery.java
1
请完成以下Java代码
private String tableToJava(String tableName, String tablePrefix) { if (StrUtil.isNotBlank(tablePrefix)) { tableName = tableName.replaceFirst(tablePrefix, ""); } return columnToJava(tableName); } /** * 获取配置信息 */ private Props getConfig(String fileName) { ...
return packagePath + "entity" + File.separator + className + ".java"; } if (template.contains(MAPPER_JAVA_VM)) { return packagePath + "mapper" + File.separator + className + "Mapper.java"; } if (template.contains(SERVICE_JAVA_VM)) { return packagePath + "service...
repos\spring-boot-demo-master\demo-codegen\src\main\java\com\xkcoding\codegen\utils\CodeGenUtil.java
1
请完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; }
public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getVersion() { return version; } public void setVersion(String version) { this.version = version; } }
repos\Activiti-develop\activiti-core-common\activiti-project-model\src\main\java\org\activiti\core\common\project\model\ProjectManifest.java
1
请完成以下Java代码
public class HttpFileToMultipartFileUtil { /** * 获取 * * @param fileUrl * @param filename * @return * @throws Exception */ public static MultipartFile httpFileToMultipartFile(String fileUrl, String filename) throws Exception { byte[] bytes = downloadImageData(fileUrl);...
connection.disconnect(); } } /** * byte转 MultipartFile * * @param data * @param fileName * @return */ private static MultipartFile convertByteToMultipartFile(byte[] data, String fileName) { FileItemFactory factory = new DiskFileItemFactory(); FileItem i...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\util\HttpFileToMultipartFileUtil.java
1
请完成以下Java代码
protected String encode(String data) { return encode(data.getBytes(StandardCharsets.UTF_8)); } protected String encode(byte[] data) { if (data == null || data.length == 0) { return ""; } return Base64.getEncoder().encodeToString(data); } protected String dec...
} @Override protected void removeEntity(TenantId tenantId, TbResourceId resourceId) { deleteResource(tenantId, resourceId, true); } }; @TransactionalEventListener(classes = ResourceInfoEvictEvent.class) @Override public void handleEvictEvent(ResourceInfoEvictEvent e...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\resource\BaseResourceService.java
1
请在Spring Boot框架中完成以下Java代码
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) { String dataSource = element.getAttribute(ATT_DATA_SOURCE); if (StringUtils.hasText(dataSource)) { builder.addPropertyReference("dataSource", dataSource); } else { parserContext.getReaderContext() .err...
builder.addPropertyValue("rolePrefix", rolePrefix); } if (StringUtils.hasText(usersQuery)) { builder.addPropertyValue("usersByUsernameQuery", usersQuery); } if (StringUtils.hasText(authoritiesQuery)) { builder.addPropertyValue("authoritiesByUsernameQuery", authoritiesQuery); } if (StringUtils.hasText(...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\authentication\JdbcUserServiceBeanDefinitionParser.java
2
请完成以下Java代码
public Optional<I_M_InOutLine> getReversalLineForLineId(@NonNull final InOutLineId inoutLineId) { final I_M_InOutLine inOutLine = load(inoutLineId, I_M_InOutLine.class); if (inOutLine == null) { return Optional.empty(); } if (inOutLine.getReversalLine_ID() <= 0) { return Optional.empty(); } re...
final IQueryBuilder<I_M_InOut> sqlQueryBuilder = queryBL.createQueryBuilder(I_M_InOut.class) .setLimit(query.getLimit()) .addOnlyActiveRecordsFilter(); if (query.getMovementDateFrom() != null) { sqlQueryBuilder.addCompareFilter(I_M_InOut.COLUMNNAME_MovementDate, Operator.GREATER_OR_EQUAL, query.getMovem...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\inout\impl\InOutDAO.java
1
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getParentId() { return parentId; } public void setParentId(Long parentId) { this.parentId = parentId; } public Date getCreateTime() { return createTime;...
return icon; } public void setIcon(String icon) { this.icon = icon; } public Integer getHidden() { return hidden; } public void setHidden(Integer hidden) { this.hidden = hidden; } @Override public String toString() { StringBuilder sb = new StringBu...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsMenu.java
1
请完成以下Java代码
public static final class Builder { private @Nullable AuthenticationEntryPoint defaultEntryPoint; private List<RequestMatcherEntry<AuthenticationEntryPoint>> entryPoints = new ArrayList<RequestMatcherEntry<AuthenticationEntryPoint>>(); /** * Set the default {@link AuthenticationEntryPoint} if none match. Th...
* {@link AuthenticationEntryPoint} is returned rather than wrapping it in * {@link DelegatingAuthenticationEntryPoint}. * @return the {@link AuthenticationEntryPoint} to use. */ public AuthenticationEntryPoint build() { AuthenticationEntryPoint defaultEntryPoint = this.defaultEntryPoint; if (defaultEnt...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\DelegatingAuthenticationEntryPoint.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonResponseBPRelationItem { @JsonProperty Integer bpartnerId; @JsonProperty @Nullable Integer locationId; @JsonProperty Integer targetBPartnerId; @JsonProperty Integer targetBPLocationId; @JsonProperty String name; @JsonProperty @JsonInclude(JsonInclude.Include.NON_NULL) String descript...
@Builder(toBuilder = true) @JsonCreator private JsonResponseBPRelationItem( @JsonProperty("bpartnerId") @NonNull final Integer bpartnerId, @JsonProperty("locationId") @Nullable final Integer locationId, @JsonProperty("targetBPartnerId") @NonNull final Integer targetBPartnerId, @JsonProperty("targetBPLocat...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-bpartner\src\main\java\de\metas\common\bprelation\response\JsonResponseBPRelationItem.java
2
请完成以下Java代码
public void setQtyEnteredInBPartnerUOM(final I_C_InvoiceLine invoiceLine) { if (invoiceLine.getC_OrderLine_ID() <= 0) { invoiceLine.setC_UOM_BPartner_ID(0); invoiceLine.setQtyEnteredInBPartnerUOM(null); return; } final I_C_OrderLine orderLine = orderDAO.getOrderLineById(OrderLineId.ofRepoId(invoiceLi...
.multiply(orderLine.getQtyEnteredInBPartnerUOM()) .divide(orderLine.getQtyOrdered()); if (invoicedQtyInBPartnerUOM.signum() < 0) { invoiceLine.setQtyEnteredInBPartnerUOM(BigDecimal.ZERO); } else { invoiceLine.setQtyEnteredInBPartnerUOM(invoicedQtyInBPartnerUOM.toBigDecimal()); } invoiceLine.se...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\model\validator\C_InvoiceLine.java
1
请完成以下Java代码
public String index() { return "external"; } @GetMapping("/logout") public String logout(HttpServletRequest request) throws Exception { request.logout(); return "redirect:/"; } @GetMapping(path = "/customers") public String customers(Principal principal, Model model) { ...
customer1.setServiceRendered("Important services"); customerDAO.save(customer1); Customer customer2 = new Customer(); customer2.setAddress("2222 bar street"); customer2.setName("Bar LLP"); customer2.setServiceRendered("Important services"); customerDAO.save(customer2); ...
repos\tutorials-master\spring-boot-modules\spring-boot-keycloak-adapters\src\main\java\com\baeldung\keycloak\WebController.java
1
请完成以下Java代码
public String getDefaultDescription() { return defaultDescription; } public void setDefaultDescription(String defaultDescription) { this.defaultDescription = defaultDescription; } public String getItemId() { return itemId; } public void setItemId(String itemId) { ...
if (caseDefinitionName != null) { if (extraInfoAlreadyPresent) { strb.append(" | "); } strb.append("caseDefinitionName = ").append(caseDefinitionName).append(" | "); extraInfoAlreadyPresent = true; } if (itemId != null) { if (ex...
repos\flowable-engine-main\modules\flowable-case-validation\src\main\java\org\flowable\cmmn\validation\validator\ValidationEntry.java
1
请完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } public UserName getUserName() { return userName; } public Email getEmail() { return email; } public void setUserName(@Nullable UserName userName) { this.userName = userName; } public void setEmail(@Nullable Emai...
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; var user = (User) o; return Objects.equals(id, user.id) && Objects.equals(userName, user.userName) && Objects.equals(email, user.email); } @Override public int hashCode...
repos\spring-data-examples-main\mongodb\example\src\main\java\example\springdata\mongodb\unwrapping\User.java
1
请完成以下Java代码
private static class ArtifactIdCapability extends TextCapability { private final TextCapability nameCapability; ArtifactIdCapability(TextCapability nameCapability) { super("artifactId", "Artifact", "project coordinates (infer archive name)"); this.nameCapability = nameCapability; } @Override public S...
@Override public String getContent() { String value = super.getContent(); if (value != null) { return value; } else if (this.groupId.getContent() != null && this.artifactId.getContent() != null) { return InitializrConfiguration .cleanPackageName(this.groupId.getContent() + "." + this.artifact...
repos\initializr-main\initializr-metadata\src\main\java\io\spring\initializr\metadata\InitializrMetadata.java
1
请在Spring Boot框架中完成以下Java代码
public class NewRelicPropertiesConfigAdapter extends StepRegistryPropertiesConfigAdapter<NewRelicProperties> implements NewRelicConfig { public NewRelicPropertiesConfigAdapter(NewRelicProperties properties) { super(properties); } @Override public String prefix() { return "management.newrelic.metrics.export"...
@Override public @Nullable String apiKey() { return get(NewRelicProperties::getApiKey, NewRelicConfig.super::apiKey); } @Override public @Nullable String accountId() { return get(NewRelicProperties::getAccountId, NewRelicConfig.super::accountId); } @Override public String uri() { return obtain(NewRelicPr...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\newrelic\NewRelicPropertiesConfigAdapter.java
2
请完成以下Java代码
public static final class Builder { private Integer adMenuId; private String caption; private String captionBreadcrumb; private MenuNodeType type; @Nullable private DocumentId elementId; private String mainTableName; private final List<MenuNode> childrenFirst = new ArrayList<>(); private final List<Me...
{ this.type = type; this.elementId = elementId; return this; } public Builder setTypeNewRecord(@NonNull final AdWindowId adWindowId) { return setType(MenuNodeType.NewRecord, DocumentId.of(adWindowId)); } public void setTypeGroup() { setType(MenuNodeType.Group, null); } public void addC...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\menu\MenuNode.java
1
请完成以下Java代码
public final class StrictTransportSecurityServerHttpHeadersWriter implements ServerHttpHeadersWriter { public static final String STRICT_TRANSPORT_SECURITY = "Strict-Transport-Security"; private String maxAge; private String subdomain; private String preload; private ServerHttpHeadersWriter delegate; public...
* @param preload if preload should be included * @since 5.2.0 */ public void setPreload(boolean preload) { this.preload = preload ? " ; preload" : ""; updateDelegate(); } /** * Sets the max age of the header. Default is a year. * @param maxAge the max age of the header */ public void setMaxAge(Durati...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\header\StrictTransportSecurityServerHttpHeadersWriter.java
1
请在Spring Boot框架中完成以下Java代码
public class BroadcastMessageApp { private static String ROUTING_KEY_USER_IMPORTANT_WARN = "user.important.warn"; private static String ROUTING_KEY_USER_IMPORTANT_ERROR = "user.important.error"; public static void main(String[] args) { SpringApplication.run(BroadcastMessageApp.class, args); } ...
System.out.println("Received fanout 1 message: " + message); } @RabbitListener(queues = { FANOUT_QUEUE_2_NAME }) public void receiveMessageFromFanout2(String message) { System.out.println("Received fanout 2 message: " + message); } @RabbitListener(queues = { TOPIC_QUEUE_1_NAME }) publi...
repos\tutorials-master\messaging-modules\spring-amqp\src\main\java\com\baeldung\springamqp\broadcast\BroadcastMessageApp.java
2
请在Spring Boot框架中完成以下Java代码
public class Attribute { @NonNull AttributeCode attributeCode; @NonNull ITranslatableString displayName; @NonNull AttributeValueType valueType; @Nullable Object value; public static Attribute of(@NonNull final org.adempiere.mm.attributes.api.Attribute attributeDescriptor) { return Attribute.builder() .attr...
{ throw new AdempiereException("Unknown attribute type: " + valueType); } } public ITranslatableString getValueAsTranslatableString() { switch (valueType) { case STRING: case LIST: { final String valueStr = getValueAsString(); return TranslatableStrings.anyLanguage(valueStr); } case ...
repos\metasfresh-new_dawn_uat\backend\de.metas.inventory.mobileui\src\main\java\de\metas\inventory\mobileui\deps\products\Attribute.java
2
请完成以下Java代码
public java.lang.String getModelPackage () { return (java.lang.String)get_Value(COLUMNNAME_ModelPackage); } /** Set Name. @param Name Alphanumeric identifier of the entity */ @Override public void setName (java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alpha...
return "Y".equals(oo); } return false; } /** Set Version. @param Version Version of the table definition */ @Override public void setVersion (java.lang.String Version) { set_Value (COLUMNNAME_Version, Version); } /** Get Version. @return Version of the table definition */ @Override public ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_EntityType.java
1
请完成以下Java代码
public void write(byte[] b) throws IOException { trackContentLength(b); this.delegate.write(b); } @Override public void write(byte[] b, int off, int len) throws IOException { checkContentLength(len); this.delegate.write(b, off, len); } @Override public boolean isReady() { return this.delega...
public boolean equals(Object obj) { return this.delegate.equals(obj); } @Override public int hashCode() { return this.delegate.hashCode(); } @Override public String toString() { return getClass().getName() + "[delegate=" + this.delegate.toString() + "]"; } } }
repos\spring-security-main\web\src\main\java\org\springframework\security\web\util\OnCommittedResponseWrapper.java
1
请完成以下Java代码
public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDescription() { return description; } ...
public void setImageUrls(List<String> imageUrls) { this.imageUrls = imageUrls; } public List<String> getVideoUrls() { return videoUrls; } public void setVideoUrls(List<String> videoUrls) { this.videoUrls = videoUrls; } public Integer getStock() { return stock; ...
repos\tutorials-master\spring-boot-modules\spring-boot-graphql-2\src\main\java\com\baeldung\graphqlvsrest\entity\Product.java
1
请完成以下Java代码
protected HistoricPlanItemInstanceEntityManager getHistoricPlanItemInstanceEntityManager() { return cmmnEngineConfiguration.getHistoricPlanItemInstanceEntityManager(); } protected VariableInstanceEntityManager getVariableInstanceEntityManager() { return cmmnEngineConfiguration.getVariableSe...
protected HistoricEntityLinkEntityManager getHistoricEntityLinkEntityManager() { return cmmnEngineConfiguration.getEntityLinkServiceConfiguration().getHistoricEntityLinkEntityManager(); } protected TaskEntityManager getTaskEntityManager() { return cmmnEngineConfiguration.getTaskServiceConfi...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\AbstractCmmnManager.java
1
请完成以下Java代码
public void setExternalSystem_Config_Alberta_ID (final int ExternalSystem_Config_Alberta_ID) { if (ExternalSystem_Config_Alberta_ID < 1) set_ValueNoCheck (COLUMNNAME_ExternalSystem_Config_Alberta_ID, null); else set_ValueNoCheck (COLUMNNAME_ExternalSystem_Config_Alberta_ID, ExternalSystem_Config_Alberta_ID...
public void setPharmacy_PriceList_ID (final int Pharmacy_PriceList_ID) { if (Pharmacy_PriceList_ID < 1) set_Value (COLUMNNAME_Pharmacy_PriceList_ID, null); else set_Value (COLUMNNAME_Pharmacy_PriceList_ID, Pharmacy_PriceList_ID); } @Override public int getPharmacy_PriceList_ID() { return get_ValueA...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_Alberta.java
1
请完成以下Java代码
public void e(CoNLLSentence right, CoNLLSentence test) { ++sentenceCount; A += right.word.length; for (int i = 0; i < test.word.length; ++i) { if (test.word[i].HEAD.ID == right.word[i].HEAD.ID) { ++U; if (right.word[i].DEPREL.eq...
} @Override public String toString() { NumberFormat percentFormat = NumberFormat.getPercentInstance(); percentFormat.setMinimumFractionDigits(2); StringBuilder sb = new StringBuilder(); sb.append("UA: "); sb.append(percentFormat.format(getUA())); sb.append('\...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dependency\CoNll\Evaluator.java
1
请完成以下Java代码
public class WEBUI_PickingSlotsClearingView_TakeOutHU extends PickingSlotsClearingViewBasedProcess implements IProcessPrecondition { private final transient IHUPickingSlotBL huPickingSlotBL = Services.get(IHUPickingSlotBL.class); private final PickingCandidateService pickingCandidateService = SpringContextHolder.inst...
// // Move the HU to an after picking locator moveToAfterPickingLocator(hu); // // Inactive all those picking candidates pickingCandidateService.inactivateForHUId(HuId.ofRepoId(hu.getM_HU_ID())); husExtractedEvents.add(HUExtractedFromPickingSlotEvent.builder() .huId(hu.getM_HU_ID()) .bpartnerId(hu...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingslotsClearing\process\WEBUI_PickingSlotsClearingView_TakeOutHU.java
1
请完成以下Java代码
public class InternationalShipmentRequestedEvent extends ShipmentRequestedEvent { private String destinationCountry; private String customsInfo; public InternationalShipmentRequestedEvent(){} public InternationalShipmentRequestedEvent(UUID orderId, String customerAddress, LocalDate shipBy, String des...
public String getDestinationCountry() { return destinationCountry; } public void setDestinationCountry(String destinationCountry) { this.destinationCountry = destinationCountry; } public String getCustomsInfo() { return customsInfo; } public void setCustomsInfo(String ...
repos\tutorials-master\spring-cloud-modules\spring-cloud-aws-v3\src\main\java\com\baeldung\spring\cloud\aws\sqs\conversion\model\event\InternationalShipmentRequestedEvent.java
1
请在Spring Boot框架中完成以下Java代码
public class User { @Id private String id; @Column(name = "name", columnDefinition="VARCHAR(128)") private String name; @Lob @Column(name = "photo", columnDefinition="BLOB") private byte[] photo; public String getId() { return id; } public void setId(String id) { this.id = id;
} public String getName() { return name; } public void setName(String name) { this.name = name; } public byte[] getPhoto() { return photo; } public void setPhoto(byte[] photo) { this.photo = photo; } }
repos\tutorials-master\persistence-modules\hibernate-mapping-2\src\main\java\com\baeldung\hibernate\lob\model\User.java
2
请完成以下Java代码
public class EngineClosedEventHandler extends AbstractDatabaseEventLoggerEventHandler { @Override public EventLogEntryEntity generateEventLogEntry(CommandContext commandContext) { Map<String, Object> data = new HashMap<String, Object>(); try { data.put("ip", InetAddress.getLocalHost...
// case // of // multiple // network // interfaces // - // but // it's // better // than // nothing. } catch (UnknownHostException e) { // Best effort } return crea...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\event\logger\handler\EngineClosedEventHandler.java
1
请完成以下Java代码
public Void call() throws Exception { for (Deployer deployer : deployers) { deployer.deploy(deployment); } return null; } }); } public void deployOnlyGivenResourcesOfDeployment(final DeploymentEntity deployment, String... resourceNames) { initDeployment(deployment, r...
}); deployment.setResources(null); } protected void initDeployment(final DeploymentEntity deployment, String... resourceNames) { deployment.clearResources(); for (String resourceName : resourceNames) { if (resourceName != null) { // with the given resource we prevent the deployment of que...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\deploy\cache\CacheDeployer.java
1
请完成以下Java代码
public EventDefinition getNoneBehaviorEventRef() { return noneBehaviorEventRefAttribute.getReferenceTargetElement(this); } public void setNoneBehaviorEventRef(EventDefinition noneBehaviorEventRef) { noneBehaviorEventRefAttribute.setReferenceTargetElement(this, noneBehaviorEventRef); } public boolean i...
public void setCamundaExclusive(boolean isCamundaExclusive) { camundaExclusive.setValue(this, isCamundaExclusive); } public String getCamundaCollection() { return camundaCollection.getValue(this); } public void setCamundaCollection(String expression) { camundaCollection.setValue(this, expression);...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\MultiInstanceLoopCharacteristicsImpl.java
1
请完成以下Java代码
public boolean isWithoutTenantId() { return withoutTenantId; } public static long getSerialversionuid() { return serialVersionUID; } public String getId() { return id; } public String getProcessDefinitionId() { return processDefinitionId; } public bool...
public Date getDuedateHigherThan() { return duedateHigherThan; } public Date getDuedateLowerThan() { return duedateLowerThan; } public Date getDuedateHigherThanOrEqual() { return duedateHigherThanOrEqual; } public Date getDuedateLowerThanOrEqual() { return dued...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\DeadLetterJobQueryImpl.java
1
请完成以下Java代码
public void setTemplated(boolean templated) { this.templated = templated; } public String getDescription() { return this.description; } public void setDescription(String description) { this.description = description; } public String getHref() { return this.href; } public Set<String> getTemplateVaria...
* @param parameters the parameters value * @return an URI where all variables have been expanded */ public URI expand(Map<String, String> parameters) { AtomicReference<String> result = new AtomicReference<>(this.href); this.templateVariables.forEach((var) -> { Object value = parameters.get(var); if (valu...
repos\initializr-main\initializr-metadata\src\main\java\io\spring\initializr\metadata\Link.java
1
请完成以下Java代码
public class CompositeMigrationStepExecutor extends AbstractMigrationStepExecutor { public CompositeMigrationStepExecutor(final IMigrationExecutorContext migrationCtx, final I_AD_MigrationStep step) { super(migrationCtx, step); } @Override public ExecutionResult apply(final String trxName) { final I_AD_Migra...
} final IMigrationStepExecutor executor = createDelegatedMigrationStepExecutor(step); return executor.rollback(trxName); } private IMigrationStepExecutor createDelegatedMigrationStepExecutor(final I_AD_MigrationStep step) { final IMigrationExecutorContext migrationCtx = getMigrationExecutorContext(); final...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\executor\impl\CompositeMigrationStepExecutor.java
1
请完成以下Java代码
public int getNotificationCount() { return delegate().getNotificationCount(); } @Override public List<I_AD_Note> getNotifications() { return delegate().getNotifications(); } @Override public String getNotificationsWhereClause() { return delegate().getNotificationsWhereClause(); } @Override
public void addInvoice(final I_C_Invoice invoice) { delegate().addInvoice(invoice); } @Override public void addNotifications(final List<I_AD_Note> notifications) { delegate().addNotifications(notifications); } @Override public String getSummary(final Properties ctx) { return delegate().getSummary(ctx);...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\ForwardingInvoiceGenerateResult.java
1
请完成以下Java代码
public int getAD_Printer_Config_Shared_ID() { return get_ValueAsInt(COLUMNNAME_AD_Printer_Config_Shared_ID); } @Override public void setAD_User_PrinterMatchingConfig_ID (int AD_User_PrinterMatchingConfig_ID) { if (AD_User_PrinterMatchingConfig_ID < 1) set_Value (COLUMNNAME_AD_User_PrinterMatchingConfig_I...
public org.compiere.model.I_C_Workplace getC_Workplace() { return get_ValueAsPO(COLUMNNAME_C_Workplace_ID, org.compiere.model.I_C_Workplace.class); } @Override public void setC_Workplace(final org.compiere.model.I_C_Workplace C_Workplace) { set_ValueFromPO(COLUMNNAME_C_Workplace_ID, org.compiere.model.I_C_Wor...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_AD_Printer_Config.java
1
请完成以下Java代码
public class MigratingScopeInstanceBranch { protected Map<ScopeImpl, MigratingScopeInstance> scopeInstances; public MigratingScopeInstanceBranch() { this(new HashMap<ScopeImpl, MigratingScopeInstance>()); } protected MigratingScopeInstanceBranch( Map<ScopeImpl, MigratingScopeInstance> scopeInstances...
public MigratingScopeInstance getInstance(ScopeImpl scope) { return scopeInstances.get(scope); } public boolean hasInstance(ScopeImpl scope) { return scopeInstances.containsKey(scope); } public void visited(MigratingScopeInstance scopeInstance) { ScopeImpl targetScope = scopeInstance.getTargetScop...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingScopeInstanceBranch.java
1
请在Spring Boot框架中完成以下Java代码
public String getLogin() { return login; } // Lowercase the login before saving it in database public void setLogin(String login) { this.login = StringUtils.lowerCase(login, Locale.ENGLISH); } public String getPassword() { return password; } public void setPassword...
} public Set<Authority> getAuthorities() { return authorities; } public void setAuthorities(Set<Authority> authorities) { this.authorities = authorities; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o i...
repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\gateway-app\src\main\java\com\gateway\domain\User.java
2
请完成以下Java代码
public class BpmnEdgeImpl extends LabeledEdgeImpl implements BpmnEdge { protected static AttributeReference<BaseElement> bpmnElementAttribute; protected static AttributeReference<DiagramElement> sourceElementAttribute; protected static AttributeReference<DiagramElement> targetElementAttribute; protected static...
public void setBpmnElement(BaseElement bpmnElement) { bpmnElementAttribute.setReferenceTargetElement(this, bpmnElement); } public DiagramElement getSourceElement() { return sourceElementAttribute.getReferenceTargetElement(this); } public void setSourceElement(DiagramElement sourceElement) { source...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\bpmndi\BpmnEdgeImpl.java
1
请在Spring Boot框架中完成以下Java代码
static RelationalManagedTypes r2dbcManagedTypes(ApplicationContext applicationContext) throws ClassNotFoundException { return RelationalManagedTypes.fromIterable(new EntityScanner(applicationContext).scan(Table.class)); } @Bean @ConditionalOnMissingBean R2dbcMappingContext r2dbcMappingContext(ObjectProvider<N...
MappingR2dbcConverter r2dbcConverter(R2dbcMappingContext mappingContext, R2dbcCustomConversions r2dbcCustomConversions) { return new MappingR2dbcConverter(mappingContext, r2dbcCustomConversions); } @Bean @ConditionalOnMissingBean R2dbcCustomConversions r2dbcCustomConversions() { List<Object> converters = ne...
repos\spring-boot-4.0.1\module\spring-boot-data-r2dbc\src\main\java\org\springframework\boot\data\r2dbc\autoconfigure\DataR2dbcAutoConfiguration.java
2
请完成以下Java代码
public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Sequence. @return Method of ordering records; lowest number comes first */ public int getSeqNo () { Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); if (ii == null) return 0; return ii.intValue()...
First effective day (inclusive) */ public void setStartDate (Timestamp StartDate) { set_Value (COLUMNNAME_StartDate, StartDate); } /** Get Start Date. @return First effective day (inclusive) */ public Timestamp getStartDate () { return (Timestamp)get_Value(COLUMNNAME_StartDate); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PromotionPreCondition.java
1
请完成以下Java代码
public class GameDTO { private Long id; private String name; private Long creationTime; private String creatorId; private String creator; private int totalPlayers; private List<PlayerDTO> players; private GameMode mode; private int maxPlayers; public Long getId() { r...
public void setCreator(String creator) { this.creator = creator; } public int getTotalPlayers() { return this.totalPlayers; } public void setTotalPlayers(int totalPlayers) { this.totalPlayers = totalPlayers; } public GameMode getMode() { return this.mode; }...
repos\tutorials-master\libraries-data\src\main\java\com\baeldung\modelmapper\dto\GameDTO.java
1
请完成以下Java代码
public void setC_DocType_ID (final int C_DocType_ID) { if (C_DocType_ID < 0) set_Value (COLUMNNAME_C_DocType_ID, null); else set_Value (COLUMNNAME_C_DocType_ID, C_DocType_ID); } @Override public int getC_DocType_ID() { return get_ValueAsInt(COLUMNNAME_C_DocType_ID); } @Override public void setD...
} @Override public org.compiere.model.I_InvoiceProcessingServiceCompany getInvoiceProcessingServiceCompany() { return get_ValueAsPO(COLUMNNAME_InvoiceProcessingServiceCompany_ID, org.compiere.model.I_InvoiceProcessingServiceCompany.class); } @Override public void setInvoiceProcessingServiceCompany(final org.c...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_InvoiceProcessingServiceCompany_BPartnerAssignment.java
1
请完成以下Java代码
private void setConnectTimeout(ClientHttpRequestFactory factory, Duration connectTimeout) { Method method = tryFindMethod(factory, "setConnectTimeout", Duration.class); if (method != null) { invoke(factory, method, connectTimeout); return; } method = findMethod(factory, "setConnectTimeout", int.class); ...
return method; } private @Nullable Method tryFindMethod(ClientHttpRequestFactory requestFactory, String methodName, Class<?>... parameters) { Method method = ReflectionUtils.findMethod(requestFactory.getClass(), methodName, parameters); if (method == null) { return null; } if (method.isAnnotationPresen...
repos\spring-boot-4.0.1\module\spring-boot-http-client\src\main\java\org\springframework\boot\http\client\ReflectiveComponentsClientHttpRequestFactoryBuilder.java
1
请在Spring Boot框架中完成以下Java代码
public class AttributeStorageFactoryService implements IAttributeStorageFactoryService { private static final Logger logger = LogManager.getLogger(AttributeStorageFactoryService.class); private final CopyOnWriteArrayList<Class<? extends IAttributeStorageFactory>> attributeStorageFactories = new CopyOnWriteArrayList<...
} return factory; } @Override public void addAttributeStorageFactory(@NonNull final Class<? extends IAttributeStorageFactory> attributeStorageFactoryClass) { final boolean added = attributeStorageFactories.addIfAbsent(attributeStorageFactoryClass); if (added) { logger.info("Registered: {}", attributeSt...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\AttributeStorageFactoryService.java
2
请完成以下Java代码
public void setIsShowInMainMenu (final boolean IsShowInMainMenu) { set_Value (COLUMNNAME_IsShowInMainMenu, IsShowInMainMenu); } @Override public boolean isShowInMainMenu() { return get_ValueAsBoolean(COLUMNNAME_IsShowInMainMenu); } @Override public void setMobile_Application_ID (final int Mobile_Applicat...
set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } @Override public void setValue (final java.lang.String Value) { set_Value (COLUMNNAME_Value, Value); } @Override public java.lang.String getValue() { return get_ValueAsS...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Mobile_Application.java
1
请完成以下Java代码
public boolean isGreaterThan(@NonNull final Money other) {return compareTo(other) > 0;} public boolean isEqualByComparingTo(@Nullable final Money other) { if (other == null) { return false; } return other.getCurrencyId().equals(currencyId) && other.toBigDecimal().compareTo(toBigDecimal()) == 0; } publi...
{ throw new AdempiereException("No precision was returned by " + precisionProvider + " for " + currencyId); } return round(precision); } private Money withValue(@NonNull final BigDecimal newValue) { return value.compareTo(newValue) != 0 ? of(newValue, currencyId) : this; } public static int countNonZero...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\money\Money.java
1
请在Spring Boot框架中完成以下Java代码
public ProducerTemplate producerTemplate() { return camelContext.createProducerTemplate(); } @Bean public CustomRouteController customRouteController() { return new CustomRouteController(this.camelContext); } @Bean CamelContextConfiguration contextConfiguration( @NonNull final MetasfreshAuthProvider me...
final String metasfreshAPIBaseURL = context.getEnvironment().getProperty(ExternalSystemCamelConstants.MF_API_BASE_URL_PROPERTY); if (Check.isBlank(metasfreshAPIBaseURL)) { throw new RuntimeException("Missing mandatory property! property = " + ExternalSystemCamelConstants.MF_API_BASE_URL_PROPERTY); } ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\core\src\main\java\de\metas\camel\externalsystems\core\AppConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public class SettBizException extends BizException { private static final long serialVersionUID = 1L; private static final Log LOG = LogFactory.getLog(SettBizException.class); public static final SettBizException SETT_STATUS_ERROR = new SettBizException(10010001, "结算状态错误"); public SettBizException() { } publi...
/** * 实例化异常 * * @param msgFormat * @param args * @return */ public SettBizException newInstance(String msgFormat, Object... args) { return new SettBizException(this.code, msgFormat, args); } public SettBizException print() { LOG.info("==>BizException, code:" + this.code + ", msg:" + this.msg); re...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\account\exception\SettBizException.java
2
请完成以下Java代码
public String getCustomPropertiesResolverImplementationType() { return customPropertiesResolverImplementationType; } public void setCustomPropertiesResolverImplementationType(String customPropertiesResolverImplementationType) { this.customPropertiesResolverImplementationType = customPropertiesR...
clone.setValues(this); return clone; } public void setValues(ActivitiListener otherListener) { setEvent(otherListener.getEvent()); setImplementation(otherListener.getImplementation()); setImplementationType(otherListener.getImplementationType()); fieldExtensions = new A...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\ActivitiListener.java
1
请完成以下Java代码
public Flux<Map<String, Object>> handleSubscription(Map<String, Object> payload) { return handleInternal(payload) .flatMapMany((response) -> { if (response.getData() instanceof Publisher) { Publisher<ExecutionResult> publisher = response.getData(); return Flux.from(publisher).map(ExecutionResult:...
} private Mono<RSocketGraphQlResponse> handleInternal(Map<String, Object> payload) { String requestId = this.idGenerator.generateId().toString(); return this.executionChain.next(new RSocketGraphQlRequest(payload, requestId, null)); } @SuppressWarnings("unchecked") private DataBuffer encodeErrors(RSocketGraphQ...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\server\GraphQlRSocketHandler.java
1
请在Spring Boot框架中完成以下Java代码
public static final class SqlSelect { private final String sql; private final ImmutableList<TableNameAndAlias> tableNameAndAliases; @Builder private SqlSelect( @NonNull final String sql, @NonNull @Singular final ImmutableList<TableNameAndAlias> tableNameAndAliases) { this.sql = sql; this.table...
} return tableNameAndAliases.get(0).getAliasOrTableName(); } public String getFirstTableNameOrEmpty() { if (tableNameAndAliases.isEmpty()) { return ""; } return tableNameAndAliases.get(0).getTableName(); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\impl\ParsedSql.java
2
请完成以下Java代码
public class BpmnParser extends AbstractModelParser { private static final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource"; private static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage"; private static final String W3C_XML_SCHEMA = "...
@Override protected BpmnModelInstanceImpl createModelInstance(DomDocument document) { return new BpmnModelInstanceImpl((ModelImpl) Bpmn.INSTANCE.getBpmnModel(), Bpmn.INSTANCE.getBpmnModelBuilder(), document); } @Override public BpmnModelInstanceImpl parseModelFromStream(InputStream inputStream) { retur...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\BpmnParser.java
1
请完成以下Java代码
public MContainer getParent() { if (m_parent == null) m_parent = new MContainer (getCtx(), getCM_Container_ID(), get_TrxName()); return m_parent; /** No reason to do this ?? - should never return null - always there - JJ int[] thisContainer = MContainer.getAllIDs("CM_Container","CM_Container_ID=" + this.ge...
return success; } // afterSave /** * reIndex * @param newRecord */ public void reIndex(boolean newRecord) { int CMWebProjectID = 0; if (getParent()!=null) CMWebProjectID = getParent().getCM_WebProject_ID(); String [] toBeIndexed = new String[3]; toBeIndexed[0] = this.getName(); toBeIndexed[1] ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MContainerElement.java
1
请完成以下Java代码
class M_HU_Item_SnapshotHandler extends AbstractSnapshotHandler<I_M_HU_Item, I_M_HU_Item_Snapshot, I_M_HU> { M_HU_Item_SnapshotHandler(final AbstractSnapshotHandler<?, ?, ?> parentHandler) { super(parentHandler); } @Override protected void createSnapshotsByParentIds(final Set<Integer> huIds) { query(I_M_HU_I...
} @Override protected void restoreChildrenFromSnapshots(I_M_HU_Item huItem) { final M_HU_SnapshotHandler includedHUSnapshotHandler = new M_HU_SnapshotHandler(this); includedHUSnapshotHandler.restoreModelsFromSnapshotsByParent(huItem); final M_HU_Item_Storage_SnapshotHandler huItemStorageSnapshotHandler = new...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\snapshot\impl\M_HU_Item_SnapshotHandler.java
1
请完成以下Java代码
public class EitherDemo { public static Object[] computeWithoutEitherUsingArray(int marks) { Object[] results = new Object[2]; if (marks < 85) { results[0] = "Marks not acceptable"; } else { results[1] = marks; } return results; } public static Map<String, Object> computeWithoutEitherUsingMap(int m...
results.put("FAILURE", "Marks not acceptable"); } else { results.put("SUCCESS", marks); } return results; } static Either<String, Integer> computeWithEither(int marks) { if (marks < 85) { return Either.left("Marks not acceptable"); } else { return Either.right(marks); } } }
repos\tutorials-master\vavr-modules\vavr-2\src\main\java\com\baeldung\vavr\either\EitherDemo.java
1
请完成以下Java代码
public LicenseKeyDataImpl getLicenseKeyFromDiagnostics() { DiagnosticsRegistry diagnosticsRegistry = ((ProcessEngineConfigurationImpl) processEngineConfiguration).getDiagnosticsRegistry(); if (diagnosticsRegistry != null) { return diagnosticsRegistry.getLicenseKey(); } return null; } public v...
public String execute(CommandContext commandContext) { commandContext.getAuthorizationManager().checkCamundaAdmin(); DbSqlSessionFactory dbSqlSessionFactory = (DbSqlSessionFactory) commandContext.getSessionFactories().get(DbSqlSession.class); DbSqlSession dbSqlSession = dbSqlSessionFactory.openSession...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ManagementServiceImpl.java
1
请完成以下Java代码
public int getC_BPartner_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Counter. @param Counter Count Value */ public void setCounter (int Counter) { throw new IllegalArgumentException ("Counter is virtual column");...
set_Value (COLUMNNAME_PageURL, PageURL); } /** Get Page URL. @return Page URL */ public String getPageURL () { return (String)get_Value(COLUMNNAME_PageURL); } /** Set Counter Count. @param W_CounterCount_ID Web Counter Count Management */ public void setW_CounterCount_ID (int W_CounterCount_ID) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_CounterCount.java
1
请完成以下Java代码
public void setPP_Product_Planning_ID (final int PP_Product_Planning_ID) { if (PP_Product_Planning_ID < 1) set_Value (COLUMNNAME_PP_Product_Planning_ID, null); else set_Value (COLUMNNAME_PP_Product_Planning_ID, PP_Product_Planning_ID); } @Override public int getPP_Product_Planning_ID() { return get...
@Override public BigDecimal getQtyProcessed() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyProcessed); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyToProcess (final BigDecimal QtyToProcess) { set_Value (COLUMNNAME_QtyToProcess, QtyToProcess); } @Override publi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_DD_Order_Candidate.java
1
请完成以下Java代码
public class MathUtility { public static int sum(int... var) { int sum = 0; for (int x : var) { sum += x; } return sum; } public static float sum(float... var) { float sum = 0; for (float x : var) { sum += x; ...
} public static void normalizeExp(double[] predictionScores) { double max = Double.NEGATIVE_INFINITY; for (double value : predictionScores) { max = Math.max(max, value); } double sum = 0.0; //通过减去最大值防止浮点数溢出 for (int i = 0; i < predictionScore...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\utility\MathUtility.java
1
请完成以下Java代码
public int getSeqNo () { Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); if (ii == null) return 0; return ii.intValue(); } /** Type AD_Reference_ID=53245 */ public static final int TYPE_AD_Reference_ID=53245; /** Concept = C */ public static final String TYPE_Concept = "C"; /** Rule Engine = E */ ...
/** Get Valid to. @return Valid to including this date (last day) */ public Timestamp getValidTo () { return (Timestamp)get_Value(COLUMNNAME_ValidTo); } /** Set Search Key. @param Value Search key for the record in the format required - must be unique */ public void setValue (String Value) { se...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_Concept.java
1