instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public void setReferenceId(String referenceId) { this.referenceId = referenceId; } @ApiModelProperty(example = "event-to-cmmn-1.1-case") public String getReferenceType() { return referenceType; } public void setReferenceType(String referenceType) { this.referenceType = refe...
this.tenantId = tenantId; } @ApiModelProperty(example = "null") public String getTenantId() { return tenantId; } public boolean isCompleted() { return completed; } public void setCompleted(boolean completed) { this.completed = completed; } }
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\caze\CaseInstanceResponse.java
2
请完成以下Java代码
public RouterFunctions.Builder path(String pattern, Consumer<RouterFunctions.Builder> builderConsumer) { builder.path(pattern, builderConsumer); return this; } @Override public <T extends ServerResponse, R extends ServerResponse> RouterFunctions.Builder filter( HandlerFilterFunction<T, R> filterFunction) { ...
return this; } @Override public RouterFunctions.Builder withAttribute(String name, Object value) { builder.withAttribute(name, value); return this; } @Override public RouterFunctions.Builder withAttributes(Consumer<Map<String, Object>> attributesConsumer) { builder.withAttributes(attributesConsumer); re...
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 class DocLine_ProjectIssue extends DocLine<Doc_ProjectIssue> { public DocLine_ProjectIssue(I_C_ProjectIssue projectIssue, Doc_ProjectIssue doc) { super(InterfaceWrapperHelper.getPO(projectIssue), doc); setQty(Quantity.of(projectIssue.getMovementQty(), getProductStockingUOM()), true); } public CostAmoun...
return services.createCostDetail( CostDetailCreateRequest.builder() .acctSchemaId(as.getId()) .clientId(getClientId()) .orgId(getOrgId()) .productId(getProductId()) .attributeSetInstanceId(getAttributeSetInstanceId()) .documentRef(CostingDocumentRef.ofProject...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\DocLine_ProjectIssue.java
1
请完成以下Java代码
public class VariableListenerSessionData { public static final String VARIABLE_CREATE = "create"; public static final String VARIABLE_UPDATE = "update"; public static final String VARIABLE_DELETE = "delete"; protected String changeType; protected String scopeId; protected String scopeType;...
return scopeId; } public void setScopeId(String scopeId) { this.scopeId = scopeId; } public String getScopeType() { return scopeType; } public void setScopeType(String scopeType) { this.scopeType = scopeType; } public String getScopeDefinitionId() { return...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\variablelistener\VariableListenerSessionData.java
1
请完成以下Java代码
public int getPage_Offset () { Integer ii = (Integer)get_Value(COLUMNNAME_Page_Offset); if (ii == null) return 0; return ii.intValue(); } /** Set Page_Size. @param Page_Size Page_Size */ @Override public void setPage_Size (int Page_Size) { set_ValueNoCheck (COLUMNNAME_Page_Size, Integer.valueOf(...
{ set_ValueNoCheck (COLUMNNAME_Total_Size, Integer.valueOf(Total_Size)); } /** Get Total_Size. @return Total_Size */ @Override public int getTotal_Size () { Integer ii = (Integer)get_Value(COLUMNNAME_Total_Size); if (ii == null) return 0; return ii.intValue(); } /** Set UUID. @param UUID UUI...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\dao\selection\model\X_T_Query_Selection_Pagination.java
1
请在Spring Boot框架中完成以下Java代码
public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } @ApiModelProperty(value = "Can be any arbitrary value. When a valid formatted media-type (e.g. application/xml, text/plain) is included, the binary ...
} @ApiModelProperty(value = "contentUrl:In case the attachment is a link to an external resource, the externalUrl contains the URL to the external content. If the attachment content is present in the Flowable engine, the contentUrl will contain an URL where the binary content can be streamed from.") public Str...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\engine\AttachmentResponse.java
2
请完成以下Java代码
public PartyType3Code getTp() { return tp; } /** * Sets the value of the tp property. * * @param value * allowed object is * {@link PartyType3Code } * */ public void setTp(PartyType3Code value) { this.tp = value; } /** * Gets th...
/** * Gets the value of the shrtNm property. * * @return * possible object is * {@link String } * */ public String getShrtNm() { return shrtNm; } /** * Sets the value of the shrtNm property. * * @param value * allowed object ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\GenericIdentification32.java
1
请完成以下Java代码
public void setControlBehavior(int controlBehavior) { this.controlBehavior = controlBehavior; } public int getMaxQueueingTimeMs() { return maxQueueingTimeMs; } public void setMaxQueueingTimeMs(int maxQueueingTimeMs) { this.maxQueueingTimeMs = maxQueueingTimeMs; } publi...
@Override public String getApp() { return app; } public void setApp(String app) { this.app = app; } @Override public String getIp() { return ip; } public void setIp(String ip) { this.ip = ip; } @Override public Integer getPort() { r...
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-sentinel\src\main\java\com\alibaba\csp\sentinel\dashboard\rule\nacos\entity\ParamFlowRuleCorrectEntity.java
1
请完成以下Java代码
public boolean isStorno() { if (storno == null) { return false; } else { return storno; } } /** * Sets the value of the storno property. * * @param value * allowed object is * {@link Boolean } * */ public void ...
this.copy = value; } /** * Gets the value of the responseTimestamp property. * */ public int getResponseTimestamp() { return responseTimestamp; } /** * Sets the value of the responseTimestamp property. * */ public void setResponseTimestamp(int value) { ...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_450_response\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_450\response\PayloadType.java
1
请完成以下Java代码
public String getInitialActivityId() { return initialActivityId; } public void setInitialActivityId(String initialActivityId) { this.initialActivityId = initialActivityId; } public FlowElement getInitialFlowElement() { return initialFlowElement; } public void setInitia...
public Process getProcess() { return process; } public void setProcess(Process process) { this.process = process; } public ProcessDefinition getProcessDefinition() { return processDefinition; } public void setProcessDefinition(ProcessDefinition processDefinition) { ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\interceptor\AbstractStartProcessInstanceBeforeContext.java
1
请完成以下Java代码
protected void checkElement(String elementName) { int [] tableKeys = X_CM_CStage_Element.getAllIDs("CM_CStage_Element", "CM_CStage_ID=" + this.get_ID() + " AND Name like '" + elementName + "'", get_TrxName()); if (tableKeys==null || tableKeys.length==0) { X_CM_CStage_Element thisElement = new X_CM_CStage_Element...
if (existingKeys==null || existingKeys.length==0) { X_CM_CStageTTable newCStageTTable = new X_CM_CStageTTable(getCtx(), 0, get_TrxName()); newCStageTTable.setAD_Client_ID(getAD_Client_ID()); newCStageTTable.setAD_Org_ID(getAD_Org_ID()); newCStageTTable.setCM_CStage_ID(get_ID()); newCStageTTable...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MCStage.java
1
请完成以下Java代码
public int getAD_Table_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_Table_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Staled. @param IsStaled Staled */ public void setIsStaled (boolean IsStaled) { set_Value (COLUMNNAME_IsStaled, Boolean.valueOf(IsStaled)); } /** Get...
*/ public boolean isValid () { Object oo = get_Value(COLUMNNAME_IsValid); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Last Refresh Date. @param LastRefreshDate Last Refresh Date */ public void setL...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\adempiere\model\X_AD_Table_MView.java
1
请完成以下Java代码
protected static void configureAcceptedServerCertificates(final Security security, final SslContextBuilder sslContextBuilder) { try { final Resource trustCertCollection = security.getTrustCertCollection(); final Resource trustStore = security.getTrustStore(); if ...
*/ // Keep this in sync with NettyChannelFactory#of protected static io.grpc.netty.shaded.io.grpc.netty.NegotiationType of(final NegotiationType negotiationType) { switch (negotiationType) { case PLAINTEXT: return io.grpc.netty.shaded.io.grpc.netty.NegotiationType.PLAINTEXT; ...
repos\grpc-spring-master\grpc-client-spring-boot-starter\src\main\java\net\devh\boot\grpc\client\channelfactory\ShadedNettyChannelFactory.java
1
请完成以下Java代码
public void setMD_Candidate_QtyDetails_ID (final int MD_Candidate_QtyDetails_ID) { if (MD_Candidate_QtyDetails_ID < 1) set_ValueNoCheck (COLUMNNAME_MD_Candidate_QtyDetails_ID, null); else set_ValueNoCheck (COLUMNNAME_MD_Candidate_QtyDetails_ID, MD_Candidate_QtyDetails_ID); } @Override public int getMD_...
} @Override public void setStock_MD_Candidate_ID (final int Stock_MD_Candidate_ID) { if (Stock_MD_Candidate_ID < 1) set_Value (COLUMNNAME_Stock_MD_Candidate_ID, null); else set_Value (COLUMNNAME_Stock_MD_Candidate_ID, Stock_MD_Candidate_ID); } @Override public int getStock_MD_Candidate_ID() { re...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java-gen\de\metas\material\dispo\model\X_MD_Candidate_QtyDetails.java
1
请在Spring Boot框架中完成以下Java代码
public int getSize() { return this.size; } public void setSize(int size) { this.size = size; } } public static class StoreProperties { private boolean allowForceCompaction = DiskStoreFactory.DEFAULT_ALLOW_FORCE_COMPACTION; private boolean autoCompact = DiskStoreFactory.DEFAULT_AUTO_COMPACT; priv...
public float getDiskUsageWarningPercentage() { return this.diskUsageWarningPercentage; } public void setDiskUsageWarningPercentage(float diskUsageWarningPercentage) { this.diskUsageWarningPercentage = diskUsageWarningPercentage; } public long getMaxOplogSize() { return this.maxOplogSize; } publi...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\DiskStoreProperties.java
2
请在Spring Boot框架中完成以下Java代码
public static String rsaEncrypt(String content, String ciphertext) throws Exception { final byte[] PublicKeyBytes = ciphertext.getBytes(); X509Certificate certificate = X509Certificate.getInstance(PublicKeyBytes); PublicKey publicKey = certificate.getPublicKey(); Cipher ci = Cipher.getIn...
try { MessageDigest MD5 = MessageDigest.getInstance("MD5"); byte[] buffer = new byte[8192]; int length; while ((length = fis.read(buffer)) != -1) { MD5.update(buffer, 0, length); } return new String(Hex.encodeHex(MD5.digest())); ...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\banklink\utils\weixin\WxCommonUtil.java
2
请在Spring Boot框架中完成以下Java代码
public class FeedbackForm { @GetMapping(path = "/feedback") public String getFeedbackForm(Model model) { Feedback feedback = new Feedback(); model.addAttribute("feedback", feedback); return "feedback"; } @PostMapping( path = "/web/feedback", consumes = {MediaType.AP...
} @GetMapping("/feedback/success") public ResponseEntity<String> getSuccess() { return new ResponseEntity<String>("Thank you for submitting feedback.", HttpStatus.OK); } @PostMapping( path = "/feedback", consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE}) public ResponseE...
repos\tutorials-master\spring-web-modules\spring-web-url\src\main\java\com\baeldung\form_submission\controllers\FeedbackForm.java
2
请完成以下Java代码
default List<String> getSubjectTypes() { return getClaimAsStringList(OidcProviderMetadataClaimNames.SUBJECT_TYPES_SUPPORTED); } /** * Returns the {@link JwsAlgorithm JWS} signing algorithms supported for the * {@link OidcIdToken ID Token} to encode the claims in a {@link Jwt} * {@code (id_token_signing_alg_v...
* {@code (userinfo_endpoint)}. * @return the {@code URL} of the OpenID Connect 1.0 UserInfo Endpoint */ default URL getUserInfoEndpoint() { return getClaimAsURL(OidcProviderMetadataClaimNames.USER_INFO_ENDPOINT); } /** * Returns the {@code URL} of the OpenID Connect 1.0 End Session Endpoint * {@code (end_...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\oidc\OidcProviderMetadataClaimAccessor.java
1
请完成以下Java代码
public class SavedCookie implements Serializable { private static final long serialVersionUID = 620L; private final String name; private final String value; private final String domain; private final int maxAge; private final String path; private final boolean secure; public SavedCookie(String name, Str...
} public String getPath() { return this.path; } public boolean isSecure() { return this.secure; } public Cookie getCookie() { Cookie cookie = new Cookie(getName(), getValue()); if (getDomain() != null) { cookie.setDomain(getDomain()); } if (getPath() != null) { cookie.setPath(getPath()); } ...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\savedrequest\SavedCookie.java
1
请完成以下Java代码
public static final <E> ListComboBoxModel<E> ofNullable(final Collection<E> list) { if(list == null) { return new ListComboBoxModel<>(); } else { return new ListComboBoxModel<>(list); } } private final List<E> list; private E selected = null; public ListComboBoxModel() { super(); this.lis...
// Fire interval added if any final int index0 = sizeBeforeAdd; final int index1 = sizeAfterAdd - 1; if (index0 <= index1) { fireIntervalAdded(this, index0, index1); } selectFirstItemIfOnlyOneItemAndNotSelected(); return added; } /** * @param item * @return <tt>true</tt> if the element was...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\swing\ListComboBoxModel.java
1
请完成以下Java代码
public I_Fact_Acct_Summary retrieveLastMatchingFactAcctSummary(final Properties ctx, final IFactAcctSummaryKey key) { return createFactAcctSummaryQueryForKeyNoDateAcct(ctx, key) .addCompareFilter(I_Fact_Acct_Summary.COLUMN_DateAcct, Operator.LESS_OR_EQUAL, key.getDateAcct()) // .orderBy() .addColumn(...
public Properties getCtx() { return ctx; } @Override public String getProcessingTag() { return processingTag; } @Override public void close() { releaseTag(ctx, processingTag); } @Override @NonNull public Iterator<I_Fact_Acct_Log> iterator() { return retrieveForTag(ctx, process...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\aggregation\legacy\impl\LegacyFactAcctLogDAO.java
1
请在Spring Boot框架中完成以下Java代码
public void publishUserChangedEvent(@NonNull final MSV3UserChangedBatchEvent event) { convertAndSend(RabbitMQConfig.QUEUENAME_UserChangedEvents, event); } public void publishUserChangedEvent(@NonNull final MSV3UserChangedEvent event) { convertAndSend(RabbitMQConfig.QUEUENAME_UserChangedEvents, MSV3UserChangedB...
public void publishProductExcludes(@NonNull final MSV3ProductExcludesUpdateEvent event) { convertAndSend(RabbitMQConfig.QUEUENAME_ProductExcludeUpdatedEvents, event); } public void publishSyncOrderRequest(final MSV3OrderSyncRequest request) { convertAndSend(RabbitMQConfig.QUEUENAME_SyncOrderRequestEvents, requ...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server-peer\src\main\java\de\metas\vertical\pharma\msv3\server\peer\service\MSV3ServerPeerService.java
2
请在Spring Boot框架中完成以下Java代码
public @Nullable String getName() { return name; } public void setName(String name) { this.name = name; } public Map<String, String> getArgs() { return args; } public void setArgs(Map<String, String> args) { this.args = args; } public void addArg(String key, String value) { this.args.put(key, valu...
@Override public int hashCode() { return Objects.hash(name, args); } @Override public String toString() { final StringBuilder sb = new StringBuilder("FilterDefinition{"); sb.append("name='").append(name).append('\''); sb.append(", args=").append(args); sb.append('}'); return sb.toString(); } }
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\config\FilterProperties.java
2
请完成以下Java代码
public I_CM_AccessProfile getCM_AccessProfile() throws RuntimeException { return (I_CM_AccessProfile)MTable.get(getCtx(), I_CM_AccessProfile.Table_Name) .getPO(getCM_AccessProfile_ID(), get_TrxName()); } /** Set Web Access Profile. @param CM_AccessProfile_ID Web Access Profile */ public void setCM_A...
public void setCM_Container_ID (int CM_Container_ID) { if (CM_Container_ID < 1) set_ValueNoCheck (COLUMNNAME_CM_Container_ID, null); else set_ValueNoCheck (COLUMNNAME_CM_Container_ID, Integer.valueOf(CM_Container_ID)); } /** Get Web Container. @return Web Container contains content like images, text e...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_AccessContainer.java
1
请完成以下Java代码
private List<I_S_ExternalReference> listIncludingInactiveBy(final int recordId, @NonNull final IExternalReferenceType type) { return queryBL.createQueryBuilder(I_S_ExternalReference.class) .addEqualsFilter(I_S_ExternalReference.COLUMNNAME_Type, type.getCode()) .addEqualsFilter(I_S_ExternalReference.COLUMNNAM...
.build(); } private ExternalSystem extractSystem(@NonNull final I_S_ExternalReference record) { return externalSystemRepository.getById(ExternalSystemId.ofRepoId(record.getExternalSystem_ID())); } private IExternalReferenceType extractType(@NonNull final I_S_ExternalReference record) { return externalRefere...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalreference\src\main\java\de\metas\externalreference\ExternalReferenceRepository.java
1
请完成以下Java代码
public double Z() { return 0.0; } public boolean parse() { return true; } public boolean empty() { return true; } public boolean clear() { return true; } public boolean next() { return true; } public String parse(St...
} public String toString(String result, int size) { return ""; } public String parse(String str, int size) { return ""; } public String parse(String str, int size1, String result, int size2) { return ""; } // set token-level penalty. It would be useful...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\crf\crfpp\Tagger.java
1
请完成以下Java代码
public void storeExternalSystemStatus(@NonNull final StoreExternalSystemStatusRequest request) { final ExternalSystemParentConfig externalSystemParentConfig = externalSystemConfigRepo .getByTypeAndValue(request.getSystemType(), request.getChildSystemConfigValue()) .orElseThrow(() -> new AdempiereException("N...
.stacktrace(jsonErrorItem.getStackTrace()) .errorCode(jsonErrorItem.getErrorCode()) .pInstance_ID(pInstanceId) .orgId(RestUtils.retrieveOrgIdOrDefault(jsonErrorItem.getOrgCode())) .build(); } @Nullable public ExternalSystemType getExternalSystemTypeByCodeOrNameOrNull(@Nullable final String value) {...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\externlasystem\ExternalSystemService.java
1
请完成以下Java代码
public static boolean isNew(Object model) { return getGridTab(model).getRecord_ID() <= 0; } public <T> T getDynAttribute(final String attributeName) { if (recordId2dynAttributes == null) { return null; } final int recordId = getGridTab().getRecord_ID(); final Map<String, Object> dynAttributes = rec...
removeOldDynAttributesEntries(recordId); // // return the old value return valueOld; } private void removeOldDynAttributesEntries(final int recordIdToKeep) { for (final Iterator<Integer> recordIds = recordId2dynAttributes.keySet().iterator(); recordIds.hasNext();) { final Integer dynAttribute_recordId...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\model\GridTabWrapper.java
1
请完成以下Java代码
public static LookupDescriptorProvider singleton(@NonNull final LookupDescriptor lookupDescriptor) { return new SingletonLookupDescriptorProvider(lookupDescriptor); } public static LookupDescriptorProvider ofNullableInstance(@Nullable final LookupDescriptor lookupDescriptor) { return lookupDescriptor != null ?...
private SingletonLookupDescriptorProvider(@NonNull final LookupDescriptor lookupDescriptor) { this.lookupDescriptor = Optional.of(lookupDescriptor); } @Override public Optional<LookupDescriptor> provideForScope(final LookupScope scope) { return lookupDescriptor; } } @ToString private static class...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\LookupDescriptorProviders.java
1
请完成以下Java代码
protected BigDecimal retrieveQtyInitial() { // Initial storage level BigDecimal qty = BigDecimal.ZERO; // // In case it's an inbound MTransaction (e.g. Vendor Receipts) // then this storage is already full with that qty if (inbound && !reversal) { qty = qty.add(capacityTotal.toBigDecimal()); } /...
} else { trxQty = trxQtyAbs; // .negate(); } qty = qty.add(trxQty); } return qty; } public boolean isReversal() { return reversal; } @Override protected Capacity retrieveTotalCapacity() { return capacityTotal; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\storage\impl\MTransactionProductStorage.java
1
请完成以下Java代码
public void onChange(final I_M_Product product) { final MSV3ServerConfig serverConfig = getServerConfigService().getServerConfig(); final I_M_Product productOld = InterfaceWrapperHelper.createOld(product, I_M_Product.class); final boolean wasMSV3Product = isMSV3ServerProduct(serverConfig, productOld); final bo...
{ return false; } final ProductCategoryId productCategoryId = ProductCategoryId.ofRepoId(product.getM_Product_Category_ID()); if (!serverConfig.getProductCategoryIds().contains(productCategoryId)) { return false; } return true; } private MSV3ServerConfigService getServerConfigService() { retur...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server-peer-metasfresh\src\main\java\de\metas\vertical\pharma\msv3\server\peer\metasfresh\interceptor\M_Product.java
1
请完成以下Java代码
public void deleteAllByUserId(final UserId adUserId) { retrieveNotesByUserId(adUserId) .create() .list() .forEach(this::deleteNotification); } private void deleteNotification(final I_AD_Note notificationPO) { notificationPO.setProcessed(false); InterfaceWrapperHelper.delete(notificationPO); } ...
public int getUnreadCountByUserId(final UserId adUserId) { return retrieveNotesByUserId(adUserId) .addEqualsFilter(I_AD_Note.COLUMN_Processed, false) .create() .count(); } @Override public int getTotalCountByUserId(final UserId adUserId) { return retrieveNotesByUserId(adUserId) .create() ....
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\notification\impl\NotificationRepository.java
1
请完成以下Java代码
protected void configureQuery(ActivityStatisticsQueryImpl query) { checkReadProcessDefinition(query); getAuthorizationManager().configureActivityStatisticsQuery(query); getTenantManager().configureQuery(query); } protected void configureQuery(BatchStatisticsQueryImpl batchQuery) { getAuthorizationM...
getTenantManager().configureQuery(decisionRequirementsDefinitionStatisticsQuery); } protected void checkReadDecisionRequirementsDefinition(HistoricDecisionInstanceStatisticsQueryImpl query) { CommandContext commandContext = getCommandContext(); if (isAuthorizationEnabled() && getCurrentAuthentication() != ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\StatisticsManager.java
1
请在Spring Boot框架中完成以下Java代码
public class CategoryServiceImpl implements CategoryService { @Autowired private NewsCategoryMapper newsCategoryMapper; @Override public List<NewsCategory> getAllCategories() { return newsCategoryMapper.findCategoryList(null); } @Override public NewsCategory queryById(Long id) { ...
NewsCategory newsCategory = newsCategoryMapper.selectByPrimaryKey(categoryId); if (newsCategory != null) { newsCategory.setCategoryName(categoryName); return newsCategoryMapper.updateByPrimaryKeySelective(newsCategory) > 0; } return false; } @Override public ...
repos\spring-boot-projects-main\SpringBoot咨询发布系统实战项目源码\springboot-project-news-publish-system\src\main\java\com\site\springboot\core\service\impl\CategoryServiceImpl.java
2
请完成以下Java代码
public void setArticleTitle(String articleTitle) { this.articleTitle = articleTitle; } public String getArticleTitle() { return articleTitle; } public void setArticleContent(String articleContent) { this.articleContent = articleContent; } public String getArticleConten...
public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } }
repos\spring-boot-projects-main\SpringBoot前后端分离实战项目源码\spring-boot-project-front-end&back-end\src\main\java\cn\lanqiao\springboot3\entity\Article.java
1
请完成以下Java代码
private ImmutableSet<PPOrderCandidateId> getSelectedPPOrderCandidateIds() { final DocumentIdsSelection selectedRowIds = getSelectedRowIds(); if (selectedRowIds.isAll()) { return getView().streamByIds(selectedRowIds) .limit(rowsLimit) .map(PP_Order_Candidate_SetStartDate::extractPPOrderCandidateId) ...
@NonNull private LookupValue.StringLookupValue toStringLookupValue(final int value) { final String formattedValue = String.format("%02d", value); return LookupValue.StringLookupValue.of(formattedValue, formattedValue); } @NonNull private static PPOrderCandidateId extractPPOrderCandidateId(final IViewRow row...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.webui\src\main\java\de\metas\manufacturing\webui\process\PP_Order_Candidate_SetStartDate.java
1
请在Spring Boot框架中完成以下Java代码
public User saveUser(User user) { userDao.insert(user, true); return user; } /** * 批量插入用户 * * @param users 用户列表 */ @Override public void saveUserList(List<User> users) { userDao.insertBatch(users); } /** * 根据主键删除用户 * * @param id 主键 ...
/** * 查询单个用户 * * @param id 主键id * @return 用户信息 */ @Override public User getUser(Long id) { return userDao.single(id); } /** * 查询用户列表 * * @return 用户列表 */ @Override public List<User> getUserList() { return userDao.all(); } /** ...
repos\spring-boot-demo-master\demo-orm-beetlsql\src\main\java\com\xkcoding\orm\beetlsql\service\impl\UserServiceImpl.java
2
请完成以下Java代码
public ComponentDescriptor findById(TenantId tenantId, ComponentDescriptorId componentId) { return findById(tenantId, componentId.getId()); } @Override public ComponentDescriptor findByClazz(TenantId tenantId, String clazz) { return DaoUtil.getData(componentDescriptorRepository.findByClazz(...
.findByScopeAndType( type, scope, pageLink.getTextSearch(), DaoUtil.toPageable(pageLink))); } @Override @Transactional public void deleteById(TenantId tenantId, ComponentDescriptorId componentId) { r...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\component\JpaBaseComponentDescriptorDao.java
1
请完成以下Java代码
public class BaeldungOpenAiCompletion { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println(Consts.INITIAL_MESSAGE); String userMessage = scanner.next(); OpenAIClient client = OpenAIOkHttpClient.fromEnv(); Builder create...
client.chat() .completions() .create(createParams.build()) .choices() .stream() .flatMap(choice -> choice.message() .content() .stream()) .forEach(System.out::println); scanner.close(); } }
repos\tutorials-master\libraries-ai\src\main\java\com\baeldung\openai\BaeldungOpenAiCompletion.java
1
请完成以下Java代码
public TransitionInstance getTransitionInstance() { return transitionInstance; } /** * Else asyncBefore */ public boolean isAsyncAfter() { return jobInstance.isAsyncAfter(); } public boolean isAsyncBefore() { return jobInstance.isAsyncBefore(); } public MigratingJobInstance getJobInst...
@Override public void setParent(MigratingScopeInstance parentInstance) { if (parentInstance != null && !(parentInstance instanceof MigratingActivityInstance)) { throw MIGRATION_LOGGER.cannotHandleChild(parentInstance, this); } MigratingActivityInstance parentActivityInstance = (MigratingActivityIns...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingTransitionInstance.java
1
请完成以下Java代码
private void doLogAction(AuditLog auditLogEntry) { String jsonContent = createElasticJsonRecord(auditLogEntry); HttpEntity entity = new NStringEntity( jsonContent, ContentType.APPLICATION_JSON); Request request = new Request(HttpMethod.POST.name(),String.format(...
} private ResponseListener responseListener = new ResponseListener() { @Override public void onSuccess(Response response) { log.trace("Elasticsearch sink log action method succeeded. Response result [{}]!", response); } @Override public void onFailure(Exception ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\audit\sink\ElasticsearchAuditLogSink.java
1
请完成以下Java代码
public void setMarginLeft (int MarginLeft) { set_Value (COLUMNNAME_MarginLeft, Integer.valueOf(MarginLeft)); } /** Get Left Margin. @return Left Space in 1/72 inch */ public int getMarginLeft () { Integer ii = (Integer)get_Value(COLUMNNAME_MarginLeft); if (ii == null) return 0; return ii.intValu...
@return Process Now */ public boolean isProcessing () { Object oo = get_Value(COLUMNNAME_Processing); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Size X. @param SizeX X (horizontal) dimension siz...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PrintPaper.java
1
请完成以下Java代码
public void addBuiltInListener(String eventName, DelegateListener<? extends BaseDelegateExecution> listener, int index) { addListenerToMap(listeners, eventName, listener, index); addListenerToMap(builtInListeners, eventName, listener, index); } public void addListener(String eventName, DelegateListener<? e...
} public void addBuiltInVariableListener(String eventName, VariableListener<?> listener, int index) { addListenerToMap(variableListeners, eventName, listener, index); addListenerToMap(builtInVariableListeners, eventName, listener, index); } public Map<String, List<DelegateListener<? extends BaseDelegate...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\core\model\CoreModelElement.java
1
请完成以下Java代码
public class FileSearchExample implements FileVisitor<Path> { private final String fileName; private final Path startDir; public FileSearchExample(String fileName, Path startingDir) { this.fileName = fileName; startDir = startingDir; } @Override public FileVisitResult preVisitD...
boolean finishedSearch = Files.isSameFile(dir, startDir); if (finishedSearch) { System.out.println("File:" + fileName + " not found"); return TERMINATE; } return CONTINUE; } public static void main(String[] args) throws IOException { Path startingDir = Pa...
repos\tutorials-master\core-java-modules\core-java-nio-3\src\main\java\com\baeldung\filevisitor\FileSearchExample.java
1
请完成以下Spring Boot application配置
quarkus.http.root-path=/customerapi/v1 quarkus.hibernate-orm.sql-load-script=import.sql # these aren't actually necessary for Testcontainers # needed to inject from docker compose quarkus.rest-client.order
-api.url=${ORDER_API_URL:} #quarkus.rest-client.order-api.scope=jakarta.inject.Singleton
repos\tutorials-master\quarkus-modules\quarkus-testcontainers\customer-service\src\main\resources\application.properties
2
请完成以下Java代码
public @Nullable PropertySource<?> getPropertySource() { return this.propertySource; } /** * Return the key of the data. * @return the data key */ public String getKey() { return this.key; } /** * Return the key as a lowercase value. * @return the key as a lowercase value * @since 3.5.0 */ pub...
} /** * Return a new {@link SanitizableData} instance with sanitized value. * @return a new sanitizable data instance. * @since 3.1.0 */ public SanitizableData withSanitizedValue() { return withValue(SANITIZED_VALUE); } /** * Return a new {@link SanitizableData} instance with a different value. * @p...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\SanitizableData.java
1
请完成以下Java代码
public class BaseTest { protected void initH2db(Connection conn) throws SQLException, ClassNotFoundException, URISyntaxException { Statement st = null; try { String schema = getClass().getResource("/db/schema.sql").toURI().toString().substring(6); String data = getClass().ge...
} } protected void initH2dbMybatis(SqlSession sqlSession) throws SQLException, ClassNotFoundException, URISyntaxException { Connection conn = sqlSession.getConnection(); try (Statement st = conn.createStatement()) { String schema = getClass().getResource("/db/schema.sql").toURI()....
repos\spring-boot-student-master\spring-boot-student-mybatis\src\main\java\com\xiaolyuh\BaseTest.java
1
请在Spring Boot框架中完成以下Java代码
public List<HistoricEntityLink> findHistoricEntityLinksWithSameRootScopeForScopeIdAndScopeType(String scopeId, String scopeType, String linkType) { return dataManager.findHistoricEntityLinksWithSameRootScopeForScopeIdAndScopeType(scopeId, scopeType, linkType); } @Override public List<HistoricEntity...
@Override public void bulkDeleteHistoricEntityLinksForScopeTypeAndScopeIds(String scopeType, Collection<String> scopeIds) { dataManager.bulkDeleteHistoricEntityLinksForScopeTypeAndScopeIds(scopeType, scopeIds); } @Override public void deleteHistoricEntityLinksForNonExistingProcessInstances() { ...
repos\flowable-engine-main\modules\flowable-entitylink-service\src\main\java\org\flowable\entitylink\service\impl\persistence\entity\HistoricEntityLinkEntityManagerImpl.java
2
请完成以下Java代码
public java.lang.String getMsgTip() { return get_ValueAsString(COLUMNNAME_MsgTip); } /** * MsgType AD_Reference_ID=103 * Reference name: AD_Message Type */ public static final int MSGTYPE_AD_Reference_ID=103; /** Fehler = E */ public static final String MSGTYPE_Fehler = "E"; /** Information = I */ pu...
} @Override public java.lang.String getMsgType() { return get_ValueAsString(COLUMNNAME_MsgType); } @Override public void setValue (final java.lang.String Value) { set_Value (COLUMNNAME_Value, Value); } @Override public java.lang.String getValue() { return get_ValueAsString(COLUMNNAME_Value); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Message.java
1
请完成以下Java代码
public String getArticleStatus() { return get_ValueAsString(COLUMNNAME_ArticleStatus); } /** * AssortmentType AD_Reference_ID=541278 * Reference name: AssortmentType */ public static final int ASSORTMENTTYPE_AD_Reference_ID=541278; /** Unknown = 0 */ public static final String ASSORTMENTTYPE_Unknown = "...
@Override public void setMedicalAidPositionNumber (final @Nullable String MedicalAidPositionNumber) { set_Value (COLUMNNAME_MedicalAidPositionNumber, MedicalAidPositionNumber); } @Override public String getMedicalAidPositionNumber() { return get_ValueAsString(COLUMNNAME_MedicalAidPositionNumber); } /** ...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java-gen\de\metas\vertical\healthcare\alberta\model\X_M_Product_AlbertaArticle.java
1
请完成以下Java代码
public Object put(String key, Object value) { if (key == null) { throw new IllegalArgumentException("This map does not support 'null' keys."); } Object variableBefore = businessProcess.getVariable(key); businessProcess.setVariable(key, value); return variableBefore; ...
@Override public Object remove(Object key) { throw new UnsupportedOperationException("ProcessVariableMap.remove is unsupported. Use ProcessVariableMap.put(key, null)"); } @Override public void clear() { throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + ".clear...
repos\flowable-engine-main\modules\flowable-cdi\src\main\java\org\flowable\cdi\impl\ProcessVariableMap.java
1
请完成以下Java代码
public class X_M_Product_Allergen_Trace extends org.compiere.model.PO implements I_M_Product_Allergen_Trace, org.compiere.model.I_Persistent { private static final long serialVersionUID = 272806817L; /** Standard Constructor */ public X_M_Product_Allergen_Trace (final Properties ctx, final int M_Product_All...
return get_ValueAsInt(COLUMNNAME_M_Allergen_Trace_ID); } @Override public void setM_Product_Allergen_Trace_ID (final int M_Product_Allergen_Trace_ID) { if (M_Product_Allergen_Trace_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Product_Allergen_Trace_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Product_Aller...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_Allergen_Trace.java
1
请在Spring Boot框架中完成以下Java代码
public class M_Warehouse { private final IBPartnerDAO bpartnerDAO = Services.get(IBPartnerDAO.class); @Init public void registerCallouts() { Services.get(IProgramaticCalloutProvider.class).registerAnnotatedCallout(this); } @CalloutMethod(columnNames = I_M_Warehouse.COLUMNNAME_C_BPartner_Location_ID) @ModelC...
return; } final I_C_BPartner_Location bpLocation = bpartnerDAO.getBPartnerLocationByIdEvenInactive(bPartnerLocationId); if (bpLocation == null) { return; } warehouse.setC_Location_ID(bpLocation.getC_Location_ID()); } @CalloutMethod(columnNames = I_M_Warehouse.COLUMNNAME_C_BPartner_ID) public void o...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\modelvalidator\M_Warehouse.java
2
请完成以下Java代码
public List<ProcessDefinition> getProcessDefinition() { return processRuntime.processDefinitions(Pageable.of(0, 100)).getContent(); } @Override public void run(String... args) {} @Bean public Connector processTextConnector() { return integrationContext -> { Map<String, ...
System.out.println("Final Content: " + contentToTag); return integrationContext; }; } @Bean public Connector discardTextConnector() { return integrationContext -> { String contentToDiscard = (String) integrationContext.getInBoundVariables().get("fileContent"); ...
repos\Activiti-develop\activiti-examples\activiti-api-web-example\src\main\java\org\activiti\examples\DemoApplication.java
1
请完成以下Java代码
public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } @Override public String toString...
final StringBuilder sb = new StringBuilder( "{\"Article\":{" ); sb.append( "\"id\":" ) .append( id ); sb.append( ",\"author\":\"" ) .append( author ).append( '\"' ); sb.append( ",\"title\":\"" ) .append( title ).append( '\"' ); sb.append( "...
repos\SpringBootLearning-master (1)\springboot-elasticsearch\src\main\java\com\gf\entity\Article.java
1
请在Spring Boot框架中完成以下Java代码
private Mono<User> findOneWithAuthoritiesBy(String fieldName, Object fieldValue) { return db .sql("SELECT * FROM jhi_user u LEFT JOIN jhi_user_authority ua ON u.id=ua.user_id WHERE u." + fieldName + " = :" + fieldName) .bind(fieldName, fieldValue) .map( (row, ...
user.setAuthorities( tuples .stream() .filter(t -> t.getT2().isPresent()) .map(t -> { Authority authority = new Authority(); authority.setName(t.getT2().orElseThrow()); return authority; ...
repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\gateway-app\src\main\java\com\gateway\repository\UserRepository.java
2
请在Spring Boot框架中完成以下Java代码
public class ValidateCodeFilter extends OncePerRequestFilter { @Autowired private AuthenticationFailureHandler authenticationFailureHandler; private SessionStrategy sessionStrategy = new HttpSessionSessionStrategy(); @Override protected void doFilterInternal(HttpServletRequest httpServletRequest,...
if (StringUtils.isBlank(codeInRequest)) { throw new ValidateCodeException("验证码不能为空!"); } if (codeInSession == null) { throw new ValidateCodeException("验证码不存在!"); } if (codeInSession.isExpire()) { sessionStrategy.removeAttribute(servletWebRequest, Valid...
repos\SpringAll-master\36.Spring-Security-ValidateCode\src\main\java\cc\mrbird\validate\code\ValidateCodeFilter.java
2
请完成以下Java代码
private static ImmutableSet<HuId> extractHUIds(final List<I_M_HU> hus) { return hus.stream().map(hu -> HuId.ofRepoId(hu.getM_HU_ID())).collect(ImmutableSet.toImmutableSet()); } private List<I_M_HU> splitOutOfPickFromHU(final DDOrderMoveSchedule schedule) { // Atm we always take top level HUs // TODO: impleme...
} private LocatorId getInTransitLocatorId() { if (inTransitLocatorIdEffective == null) { inTransitLocatorIdEffective = computeInTransitLocatorId(); } return inTransitLocatorIdEffective; } private LocatorId computeInTransitLocatorId() { if (inTransitLocatorId != null) { return inTransitLocatorId...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\distribution\ddorder\movement\schedule\commands\pick_from\DDOrderPickFromCommand.java
1
请完成以下Java代码
public void createMobileApplicationAccess(@NonNull final CreateMobileApplicationAccessRequest request) { final RoleId roleId = request.getRoleId(); final MobileApplicationRepoId applicationId = request.getApplicationId(); I_Mobile_Application_Access accessRecord = queryBL .createQueryBuilder(I_Mobile_Applic...
accessRecord.setIsAllowAllActions(true); } accessRecord.setIsActive(true); InterfaceWrapperHelper.save(accessRecord); } public void deleteMobileApplicationAccess(@NonNull final MobileApplicationRepoId applicationId) { queryBL.createQueryBuilder(I_Mobile_Application_Access.class) .addEqualsFilter(I_Mob...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\mobile_application\MobileApplicationPermissionsRepository.java
1
请完成以下Spring Boot application配置
ms.db.driverClassName=com.mysql.jdbc.Driver ms.db.url=jdbc:mysql://localhost:3306/cache?characterEncoding=utf-8&useSSL=false ms.db.username=root ms.db.password=admin ms.db.maxActive=500
logging.level.org.springframework.security= INFO spring.thymeleaf.cache=false
repos\springBoot-master\springboot-SpringSecurity0\src\main\resources\application.properties
2
请完成以下Java代码
/* package */ void collectValidStatusChanged(final IDocumentFieldView documentField) { fieldChangesOf(documentField).setValidStatus(documentField.getValidStatus()); } /* package */void collectDocumentSaveStatusChanged(final DocumentSaveStatus documentSaveStatus) { this.documentSaveStatus = documentSaveStatus; ...
public LogicExpressionResult getAllowNew() { return allowNew; } IncludedDetailInfo setAllowNew(final LogicExpressionResult allowNew) { this.allowNew = allowNew; return this; } public LogicExpressionResult getAllowDelete() { return allowDelete; } IncludedDetailInfo setAllowDelete(final L...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentChanges.java
1
请完成以下Java代码
public Builder notBefore(Instant notBefore) { return claim(JwtClaimNames.NBF, notBefore); } /** * Sets the issued at {@code (iat)} claim, which identifies the time at which the * JWT was issued. * @param issuedAt the time at which the JWT was issued * @return the {@link Builder} */ public Build...
} /** * Builds a new {@link JwtClaimsSet}. * @return a {@link JwtClaimsSet} */ public JwtClaimsSet build() { Assert.notEmpty(this.claims, "claims cannot be empty"); // The value of the 'iss' claim is a String or URL (StringOrURI). // Attempt to convert to URL. Object issuer = this.claims.get(...
repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\JwtClaimsSet.java
1
请在Spring Boot框架中完成以下Java代码
public class HistoryJobProcessorContextImpl implements HistoryJobProcessorContext { protected final Phase phase; protected final HistoryJobEntity historyJobEntity; public HistoryJobProcessorContextImpl(Phase phase, HistoryJobEntity historyJobEntity) { this.phase = phase; this.historyJobEnt...
@Override public boolean isInPhase(Phase phase) { return this.phase.equals(phase); } @Override public String toString() { return "HistoryJobProcessorContextImpl{" + "phase=" + phase + ", historyJobEntity=" + historyJobEntity + '}'; } ...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\HistoryJobProcessorContextImpl.java
2
请在Spring Boot框架中完成以下Java代码
public String getDelisId() { return delisId; } /** * Sets the value of the delisId property. * * @param value * allowed object is * {@link String } * */ public void setDelisId(String value) { this.delisId = value; } /** * Gets t...
* */ public String getAuthToken() { return authToken; } /** * Sets the value of the authToken property. * * @param value * allowed object is * {@link String } * */ public void setAuthToken(String value) { this.authToken = value;...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\ws\loginservice\v2_0\types\Login.java
2
请完成以下Java代码
public List<Map<String, AttributeValue>> getOrdersAfterDate(String userId, String startDate) { QueryRequest request = QueryRequest.builder() .tableName(TABLE_NAME) .keyConditionExpression("userId = :uid AND orderDate > :startDate") .expressionAttributeValues(Map.of( ":u...
return dynamoDb.query(request).items(); } public List<Map<String, AttributeValue>> getAllOrdersPaginated(String userId) { List<Map<String, AttributeValue>> allItems = new ArrayList<>(); Map<String, AttributeValue> lastKey = null; do { QueryRequest.Builder requestBuilder = Q...
repos\tutorials-master\aws-modules\aws-dynamodb-v2\src\main\java\com\baeldung\dynamodb\query\UserOrdersRepository.java
1
请完成以下Java代码
public class ClientErrorLoggingFilter extends GenericFilterBean { private static final Logger logger = LogManager.getLogger(ClientErrorLoggingFilter.class); private List<HttpStatus> errorCodes; public ClientErrorLoggingFilter(List<HttpStatus> errorCodes) { this.errorCodes = errorCodes; } ...
} int status = ((HttpServletResponse) response).getStatus(); if (status < 400 || status >= 500) { chain.doFilter(request, response); return; } if (errorCodes == null) { logger.debug("User " + auth.getName() + " encountered error " + status); }...
repos\tutorials-master\spring-security-modules\spring-security-core-3\src\main\java\com\baeldung\dsl\ClientErrorLoggingFilter.java
1
请在Spring Boot框架中完成以下Java代码
public String getAppid() { return appid; } public void setAppid(String appid) { this.appid = appid; } public ChangeType getType() { return type; } public void setType(ChangeType type) { this.type = type; } public String getValue() { return valu...
public Date getNoticeTime() { return noticeTime; } public void setNoticeTime(Date noticeTime) { this.noticeTime = noticeTime; } @Override public String toString() { return "ConfigChangeNotice{" + "noticeTime=" + noticeTime + ", appid='" + app...
repos\spring-boot-quick-master\quick-wx-public\src\main\java\com\wx\pn\api\config\ConfigChangeNotice.java
2
请完成以下Java代码
public void setPosition (String Position) { set_Value (COLUMNNAME_Position, Position); } /** Get Position. @return Position */ public String getPosition () { return (String)get_Value(COLUMNNAME_Position); } /** Set Sequence. @param Sequence Sequence */ public void setSequence (BigDecimal Sequence...
@param U_WebMenu_ID Web Menu */ public void setU_WebMenu_ID (int U_WebMenu_ID) { if (U_WebMenu_ID < 1) set_ValueNoCheck (COLUMNNAME_U_WebMenu_ID, null); else set_ValueNoCheck (COLUMNNAME_U_WebMenu_ID, Integer.valueOf(U_WebMenu_ID)); } /** Get Web Menu. @return Web Menu */ public int getU_WebMenu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_U_WebMenu.java
1
请完成以下Java代码
public HUPIItemProductId getSinglePackToHUPIItemProductId() { return getSingleValue(ScheduledPackageable::getPackToHUPIItemProductId).orElseThrow(() -> new AdempiereException("No single PackToHUPIItemProductId found in " + list)); } public Quantity getQtyToPick() { return list.stream() .map(ScheduledPackag...
final ShipmentScheduleAndJobScheduleIdSet scheduleIds = getScheduleIds(); return scheduleIds.size() == 1 ? Optional.of(scheduleIds.iterator().next()) : Optional.empty(); } public Optional<UomId> getSingleCatchWeightUomIdIfUnique() { final List<UomId> catchWeightUomIds = list.stream() .map(ScheduledPackageab...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\ScheduledPackageableList.java
1
请完成以下Java代码
public VATCodeMatchingRequest build() { return new VATCodeMatchingRequest(this); } public Builder setC_AcctSchema_ID(final int C_AcctSchema_ID) { this.C_AcctSchema_ID = C_AcctSchema_ID; return this; } public Builder setC_Tax_ID(final int C_Tax_ID) { this.C_Tax_ID = C_Tax_ID; return this;
} public Builder setIsSOTrx(final boolean isSOTrx) { this.isSOTrx = isSOTrx; return this; } public Builder setDate(final Date date) { this.date = date; return this; } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\vatcode\VATCodeMatchingRequest.java
1
请完成以下Java代码
public void setM_AttributeValue_ID (int M_AttributeValue_ID) { if (M_AttributeValue_ID < 1) set_Value (COLUMNNAME_M_AttributeValue_ID, null); else set_Value (COLUMNNAME_M_AttributeValue_ID, Integer.valueOf(M_AttributeValue_ID)); } /** Get Merkmals-Wert. @return Product Attribute Value */ @Override...
@param M_AttributeValue_To_ID Product Attribute Value To */ @Override public void setM_AttributeValue_To_ID (int M_AttributeValue_To_ID) { if (M_AttributeValue_To_ID < 1) set_Value (COLUMNNAME_M_AttributeValue_To_ID, null); else set_Value (COLUMNNAME_M_AttributeValue_To_ID, Integer.valueOf(M_Attrib...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_AttributeValue_Mapping.java
1
请在Spring Boot框架中完成以下Java代码
public String getPassword() { return password; } public void setPassword(final String password) { this.password = password; } @Nullable public String getPasswordResetKey() { return passwordResetKey; } public void setPasswordResetKey(@Nullable final String passwordResetKey) { this.passwordResetKey ...
public void markDeleted() { setDeleted(true); deleted_id = getId(); // FRESH-176: set the delete_id to current ID just to avoid the unique constraint } public void markNotDeleted() { setDeleted(false); deleted_id = null; // FRESH-176: set the delete_id to NULL just to make sure the the unique index is enfo...
repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\model\User.java
2
请在Spring Boot框架中完成以下Java代码
public String getScopeDefinitionId() { return scopeDefinitionId; } public void setScopeDefinitionId(String scopeDefinitionId) { this.scopeDefinitionId = scopeDefinitionId; } public String getScopeId() { return scopeId; } public void setScopeId(String scopeId) { ...
public void setCreated(Date created) { this.created = created; } public String getConfiguration() { return configuration; } public void setConfiguration(String configuration) { this.configuration = configuration; } public void setTenantId(String tenantId) { thi...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\caze\EventSubscriptionResponse.java
2
请完成以下Java代码
public String[] getProcessDefinitionKeys() { return processDefinitionKeys; } public String[] getProcessDefinitionKeyNotIn() { return processDefinitionKeyNotIn; } public String getDeploymentId() { return deploymentId; } public String getSuperProcessInstanceId() { return superProcessInstanc...
public boolean isProcessDefinitionWithoutTenantId() { return isProcessDefinitionWithoutTenantId; } public boolean isLeafProcessInstances() { return isLeafProcessInstances; } public String[] getTenantIds() { return tenantIds; } @Override public ProcessInstanceQuery or() { if (this != que...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ProcessInstanceQueryImpl.java
1
请完成以下Java代码
protected final void assertActive(final String errmsg) { assertActive(true, errmsg); } public List<ITrxSavepoint> getActiveSavepoints() { return ImmutableList.copyOf(activeSavepoints); } protected final void assertNotActive(final String errmsg) { assertActive(false, errmsg); } protected void assertAct...
// Log it if (debugLog != null) { final StringBuilder msg = new StringBuilder(); msg.append(trxStatusOld).append("->").append(trxStatus); if (!Check.isEmpty(detailMsg, true)) { msg.append(" (").append(detailMsg).append(")"); } logTrxAction(msg.toString()); } } private void logTrxAction(fi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\api\impl\PlainTrx.java
1
请完成以下Java代码
public final class ViewRowsOrderBy { public static ViewRowsOrderBy of(final DocumentQueryOrderByList orderBys, @NonNull final JSONOptions jsonOpts) { return new ViewRowsOrderBy(orderBys, jsonOpts); } public static ViewRowsOrderBy parseString(final String orderBysListStr, @NonNull final JSONOptions jsonOpts) { ...
public ViewRowsOrderBy withOrderBys(final DocumentQueryOrderByList orderBys) { if (DocumentQueryOrderByList.equals(this.orderBys, orderBys)) { return this; } else { return new ViewRowsOrderBy(orderBys, jsonOpts); } } public <T extends IViewRow> Comparator<T> toComparator() { return orderBys.toC...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ViewRowsOrderBy.java
1
请完成以下Java代码
public void setSelected(boolean selected) { final boolean old = m_selected; m_selected = selected; this.pcs.firePropertyChange( "selected", old, m_selected ); } /** * Is Selected * @return true if selected */ public boolean isSelected() { return m_selected; } /** * Set Record_ID * ...
*/ @Override public String toString() { return "IDColumn - ID=" + m_record_ID + ", Selected=" + m_selected; } // toString public void addPropertyChangeListener( PropertyChangeListener listener ) { this.pcs.addPropertyChangeListener( listener ); } public void removePropertyChangeListener(...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\minigrid\IDColumn.java
1
请完成以下Java代码
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 getC...
public void setChannelType(String channelType) { this.channelType = channelType; } public String getType() { return type; } public void setType(String type) { this.type = type; } public JsonNode getExtension() { return extension; } public void setExten...
repos\flowable-engine-main\modules\flowable-event-registry-model\src\main\java\org\flowable\eventregistry\model\ChannelModel.java
1
请完成以下Java代码
public class EntityRelationInfo extends EntityRelation { private static final long serialVersionUID = 2807343097519543363L; private String fromName; private String toName; public EntityRelationInfo() { super(); } public EntityRelationInfo(EntityRelation entityRelation) { supe...
public void setToName(String toName) { this.toName = toName; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; EntityRelationInfo that = (EntityRel...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\relation\EntityRelationInfo.java
1
请完成以下Java代码
public DateSequenceGeneratorBuilder byNthDay(final int day) { return incrementor(CalendarIncrementors.eachNthDay(day)); } public DateSequenceGeneratorBuilder byWeeks(final int week, final DayOfWeek dayOfWeek) { return incrementor(CalendarIncrementors.eachNthWeek(week, dayOfWeek)); } public DateSeque...
private static IDateSequenceExploder createDateSequenceExploder(final Frequency frequency) { if (frequency.isWeekly()) { if (frequency.isOnlySomeDaysOfTheWeek()) { return DaysOfWeekExploder.of(frequency.getOnlyDaysOfWeek()); } else { return DaysOfWeekExploder.ALL_DAYS_OF_WEEK; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\time\generator\DateSequenceGenerator.java
1
请完成以下Java代码
public List<HotelOffer> searchOffers(String city, String checkIn, int nights, int guests) { Objects.requireNonNull(city, "city"); Objects.requireNonNull(checkIn, "checkIn"); LocalDate.parse(checkIn); return inventory.stream() .filter(h -> h.city().equalsIgnoreCase(city)) ...
} public record Hotel(String id, String name, String city, int basePricePerNight, int maxGuests) { } public record HotelOffer( String hotelId, String hotelName, String city, int pricePerNight, int totalPrice, int maxGuests ) { } public record Bo...
repos\tutorials-master\libraries-ai\src\main\java\com\baeldung\simpleopenai\HotelService.java
1
请在Spring Boot框架中完成以下Java代码
private boolean anyPathsDontStartWithLeadingSlash(String... patterns) { for (String pattern : patterns) { if (!pattern.startsWith("/")) { return true; } } return false; } /** * <p> * Match when the request URI matches one of {@code patterns}. See * {@link org.springframework.web.util.pattern.Pa...
* </p> * <p> * If a specific {@link RequestMatcher} must be specified, use * {@link #requestMatchers(RequestMatcher...)} instead * </p> * @param method the {@link HttpMethod} to use or {@code null} for any * {@link HttpMethod}. * @return the object that is chained after creating the {@link RequestMatcher}...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\AbstractRequestMatcherRegistry.java
2
请完成以下Java代码
public void addPropertyChangeListener(final String propertyName, final PropertyChangeListener listener) { delegate.addPropertyChangeListener(propertyName, listener); } public void removePropertyChangeListener(final String propertyName, final PropertyChangeListener listener) { delegate.removePropertyChangeListe...
firePropertyChange(event); } public void fireIndexedPropertyChange(final String propertyName, final int index, final Object oldValue, final Object newValue) { final IndexedPropertyChangeEvent event = new IndexedPropertyChangeEvent(source, propertyName, oldValue, newValue, index); firePropertyChange(event); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\beans\DelayedPropertyChangeSupport.java
1
请完成以下Java代码
public class SignUtil { /** * 验证签名 * * @param signature * @param timestamp * @param nonce * @return */ public static boolean checkSignature(String token, String signature, String timestamp, String nonce) { String[] arr = new String[]{token, timestamp, nonce}; ...
private static String byteToStr(byte[] byteArray) { String strDigest = ""; for (int i = 0; i < byteArray.length; i++) { strDigest += byteToHexStr(byteArray[i]); } return strDigest; } /** * 将字节转换为十六进制字符串 * * @param mByte * @return */ priva...
repos\spring-boot-quick-master\quick-wx-public\src\main\java\com\wx\pn\api\utils\SignUtil.java
1
请完成以下Java代码
public void setA_Asset_Retirement_ID (int A_Asset_Retirement_ID) { if (A_Asset_Retirement_ID < 1) set_ValueNoCheck (COLUMNNAME_A_Asset_Retirement_ID, null); else set_ValueNoCheck (COLUMNNAME_A_Asset_Retirement_ID, Integer.valueOf(A_Asset_Retirement_ID)); } /** Get Asset Retirement. @return Internally ...
@param AssetValueAmt Book Value of the asset */ public void setAssetValueAmt (BigDecimal AssetValueAmt) { set_Value (COLUMNNAME_AssetValueAmt, AssetValueAmt); } /** Get Asset value. @return Book Value of the asset */ public BigDecimal getAssetValueAmt () { BigDecimal bd = (BigDecimal)get_Value(CO...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Retirement.java
1
请完成以下Java代码
default OptionalBoolean toOptionalBoolean() { return isConstant() ? OptionalBoolean.ofBoolean(constantValue()) : OptionalBoolean.UNKNOWN; } @Override default boolean isNoResult(final Object result) { // because evaluation is throwing exception in case of failure, the only "no result" would be the NULL...
} default ILogicExpression andNot(final ILogicExpression expression) { return LogicExpressionBuilder.build(this, LOGIC_OPERATOR_AND, expression.negate()); } /** * Compose this logic expression with the given one, using logic OR and return it */ default ILogicExpression or(final ILogicExpression expression)...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\ILogicExpression.java
1
请完成以下Java代码
private Map<String, Object> getAttributes() { return _attributes; } public InfoBuilder setInfoWindow(final I_AD_InfoWindow infoWindow) { _infoWindowDef = infoWindow; if (infoWindow != null) { final String tableName = Services.get(IADInfoWindowBL.class).getTableName(infoWindow); setTableName(tableNam...
} /** * @param iconName icon name (without size and without file extension). */ public InfoBuilder setIconName(final String iconName) { if (Check.isEmpty(iconName, true)) { return setIcon(null); } else { final Image icon = Images.getImage2(iconName + "16"); return setIcon(icon); } } publ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\InfoBuilder.java
1
请完成以下Java代码
public void setData_Export_Audit_Parent(final org.compiere.model.I_Data_Export_Audit Data_Export_Audit_Parent) { set_ValueFromPO(COLUMNNAME_Data_Export_Audit_Parent_ID, org.compiere.model.I_Data_Export_Audit.class, Data_Export_Audit_Parent); } @Override public void setData_Export_Audit_Parent_ID (final int Data_...
@Override public void setRecord_ID (final int Record_ID) { if (Record_ID < 0) set_Value (COLUMNNAME_Record_ID, null); else set_Value (COLUMNNAME_Record_ID, Record_ID); } @Override public int getRecord_ID() { return get_ValueAsInt(COLUMNNAME_Record_ID); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Data_Export_Audit.java
1
请在Spring Boot框架中完成以下Java代码
public class PageIndex { public static PageIndex ofFirstRowAndPageLength(final int firstRow, final int pageLength) { return new PageIndex(firstRow, pageLength); } public static PageIndex getPageContainingRow(final int rowIndex, final int pageLength) { Check.assume(rowIndex >= 0, "rowIndex >= 0"); Check.assu...
return ofFirstRowAndPageLength(firstRow, pageLength); } int firstRow; int pageLength; private PageIndex(final int firstRow, final int pageLength) { Check.assume(firstRow >= 0, "firstRow >= 0"); Check.assume(pageLength > 0, "pageLength > 0"); this.firstRow = firstRow; this.pageLength = pageLength; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\util\PageIndex.java
2
请完成以下Java代码
public static String createTweet(String tweet) throws TwitterException { Twitter twitter = getTwitterinstance(); Status status = twitter.updateStatus("creating baeldung API"); return status.getText(); } public static List<String> getTimeLine() throws TwitterException { Twitter twitter = getTwitterins...
@Override public void onStallWarning(StallWarning warning) { System.out.println("Got stall warning:" + warning); } @Override public void onStatus(Status status) { System.out.println(status.getUser().getName() + " : " + status.getText()); } ...
repos\tutorials-master\saas-modules\twitter4j\src\main\java\com\baeldung\Application.java
1
请完成以下Java代码
public GatewayFilter apply(MapRequestHeaderGatewayFilterFactory.Config config) { return new GatewayFilter() { @Override public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) { String fromHeader = Objects.requireNonNull(config.getFromHeader(), "fromHeader must be set"); String to...
return this.fromHeader; } public Config setFromHeader(String fromHeader) { this.fromHeader = fromHeader; return this; } public @Nullable String getToHeader() { return this.toHeader; } public Config setToHeader(String toHeader) { this.toHeader = toHeader; return this; } @Override pub...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\MapRequestHeaderGatewayFilterFactory.java
1
请完成以下Java代码
public static <T> Stream<List<T>> dice(@NonNull final Stream<T> stream, final int maxChunkSize, @Nullable final Function<T, Object> groupByKeyExtractor) { if (maxChunkSize <= 0) { throw new IllegalArgumentException("chunkSize shall be > 0"); } final PeekIterator<T> streamIterator = IteratorUtils.asPeekIter...
/** * Thanks to <a href="https://stackoverflow.com/a/27872852/1012103">https://stackoverflow.com/a/27872852/1012103</a> */ public static <T> Predicate<T> distinctByKey(@NonNull final Function<? super T, Object> keyExtractor) { final Map<Object, Boolean> seen = new ConcurrentHashMap<>(); return t -> seen.putIf...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\StreamUtils.java
1
请在Spring Boot框架中完成以下Java代码
public int getMaxTimeBetweenPings() { return this.maxTimeBetweenPings; } public void setMaxTimeBetweenPings(int maxTimeBetweenPings) { this.maxTimeBetweenPings = maxTimeBetweenPings; } public int getMessageTimeToLive() { return this.messageTimeToLive; } public void setMessageTimeToLive(int messageTimeToL...
public int getSubscriptionCapacity() { return this.subscriptionCapacity; } public void setSubscriptionCapacity(int subscriptionCapacity) { this.subscriptionCapacity = subscriptionCapacity; } public String getSubscriptionDiskStoreName() { return this.subscriptionDiskStoreName; } public void setSubscriptio...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\CacheServerProperties.java
2
请在Spring Boot框架中完成以下Java代码
abstract class ServiceOrRepairProjectBasedProcess extends JavaProcess { protected final ServiceRepairProjectService projectService = SpringContextHolder.instance.getBean(ServiceRepairProjectService.class); protected ProcessPreconditionsResolution checkIsServiceOrRepairProject(@NonNull final ProjectId projectId) { ...
return projectService.retainIdsOfTypeSpareParts(taskIds); } protected ImmutableSet<ServiceRepairProjectTaskId> getSelectedTaskIds(final @NonNull IProcessPreconditionsContext context) { final ProjectId projectId = ProjectId.ofRepoIdOrNull(context.getSingleSelectedRecordId()); if (projectId == null) { return...
repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.webui\src\main\java\de\metas\servicerepair\project\process\ServiceOrRepairProjectBasedProcess.java
2
请完成以下Java代码
public int getPP_Order_ID() { return get_ValueAsInt(COLUMNNAME_PP_Order_ID); } @Override public void setProcessed (final boolean Processed) { set_Value (COLUMNNAME_Processed, Processed); } @Override public boolean isProcessed() { return get_ValueAsBoolean(COLUMNNAME_Processed);
} @Override public void setQtyToPick (final BigDecimal QtyToPick) { set_Value (COLUMNNAME_QtyToPick, QtyToPick); } @Override public BigDecimal getQtyToPick() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyToPick); return bd != null ? bd : BigDecimal.ZERO; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_Picking_Job_Line.java
1
请完成以下Java代码
public class ProductVO { /** * 商品编号 */ @JacksonXmlProperty(localName = "id") private Integer id; /** * 商品标题 */ @JacksonXmlProperty(localName = "title") private String title; public Integer getId() { return id; }
public ProductVO setId(Integer id) { this.id = id; return this; } public String getTitle() { return title; } public ProductVO setTitle(String title) { this.title = title; return this; } }
repos\SpringBoot-Labs-master\lab-23\lab-springmvc-23-02\src\main\java\cn\iocoder\springboot\lab23\springmvc\vo\ProductVO.java
1
请完成以下Java代码
public ZipType getZip() { return zip; } /** * Sets the value of the zip property. * * @param value * allowed object is * {@link ZipType } * */ public void setZip(ZipType value) { this.zip = value; } /** * Gets the value of the c...
* */ public String getCity() { return city; } /** * Sets the value of the city property. * * @param value * allowed object is * {@link String } * */ public void setCity(String value) { this.city = value; } }
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\PostalAddressType.java
1
请完成以下Java代码
private static final class GridTabAsPreconditionsContext implements IProcessPreconditionsContext { private final GridTab gridTab; private GridTabAsPreconditionsContext(final GridTab gridTab) { this.gridTab = gridTab; } @Override public String toString() { return MoreObjects.toStringHelper(this).a...
} @Override public int getSingleSelectedRecordId() { return gridTab.getRecord_ID(); } @Override public SelectionSize getSelectionSize() { // backward compatibility return SelectionSize.ofSize(1); } @Override public <T> IQueryFilter<T> getQueryFilter(@NonNull Class<T> recordClass) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\GridTab.java
1
请完成以下Java代码
public final class ExchangeRate { private static final String DEFAULT_PROVIDER = "com.baeldung.rate.spi.YahooFinanceExchangeRateProvider"; //All providers public static List<ExchangeRateProvider> providers() { List<ExchangeRateProvider> services = new ArrayList<>(); ServiceLoader<ExchangeR...
} //provider by name public static ExchangeRateProvider provider(String providerName) { ServiceLoader<ExchangeRateProvider> loader = ServiceLoader.load(ExchangeRateProvider.class); Iterator<ExchangeRateProvider> it = loader.iterator(); while (it.hasNext()) { ExchangeRateProv...
repos\tutorials-master\core-java-modules\java-spi\exchange-rate-api\src\main\java\com\baeldung\rate\ExchangeRate.java
1
请完成以下Java代码
public LookupValuesList getFieldDropdown(@NonNull final String fieldName) { return getLookupDataSource(fieldName).findEntities(Evaluatees.empty(), 20).getValues(); } private LookupDataSource getLookupDataSource(@NonNull final String fieldName) { if (PricingConditionsRow.FIELDNAME_PaymentTerm.equals(fieldName))...
throw new AdempiereException("Field " + fieldName + " does not exist or it's not a lookup field"); } } public String getTemporaryPriceConditionsColor() { return temporaryPriceConditionsColorCache.getOrLoad(0, this::retrieveTemporaryPriceConditionsColor); } private String retrieveTemporaryPriceConditionsColor...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\pricingconditions\view\PricingConditionsRowLookups.java
1