instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
private void updateSubCnt(Long menuId){ if(menuId != null){ int count = menuRepository.countByPid(menuId); menuRepository.updateSubCntById(count, menuId); } } /** * 清理缓存 * @param id 菜单ID */ public void delCaches(Long id){ List<User> users = use...
*/ private static MenuVo getMenuVo(MenuDto menuDTO, MenuVo menuVo) { MenuVo menuVo1 = new MenuVo(); menuVo1.setMeta(menuVo.getMeta()); // 非外链 if(!menuDTO.getIFrame()){ menuVo1.setPath("index"); menuVo1.setName(menuVo.getName()); menuVo1.setComponen...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\service\impl\MenuServiceImpl.java
2
请完成以下Java代码
public class EOFDetection { public String readWithFileInputStream(String pathFile) throws IOException { try (FileInputStream fis = new FileInputStream(pathFile); ByteArrayOutputStream baos = new ByteArrayOutputStream()) { int data; while ((data = fis.read()) != -1) { ...
StringBuilder actualContent = new StringBuilder(); while (scanner.hasNext()) { String line = scanner.nextLine(); actualContent.append(line); } scanner.close(); return actualContent.toString(); } public String readFileWithFileChannelAndByteBuffer(String pa...
repos\tutorials-master\core-java-modules\core-java-io-apis-2\src\main\java\com\baeldung\eofdetections\EOFDetection.java
1
请完成以下Java代码
public RedisCacheManager getInstance() { if (redisCacheManager == null) { redisCacheManager = SpringContextUtils.getBean(RedisCacheManager.class); } return redisCacheManager; } /** * 获取过期时间 * * @return */ public long getExpirationSecondTime(String nam...
/** * 根据缓存名称设置缓存的有效时间和刷新时间,单位秒 * * @param cacheTimes */ public void setCacheTimess(Map<String, CacheTime> cacheTimes) { this.cacheTimes = (cacheTimes != null ? new ConcurrentHashMap<String, CacheTime>(cacheTimes) : null); } /** * 设置默认的过去时间, 单位:秒 * * @param default...
repos\spring-boot-student-master\spring-boot-student-cache-redis-2\src\main\java\com\xiaolyuh\redis\cache\CustomizedRedisCacheManager.java
1
请完成以下Java代码
public void deleteProcessedRequests() { final ApiRequestQuery apiRequestQuery = ApiRequestQuery.builder() .apiRequestStatusSet(ImmutableSet.of(Status.ERROR, Status.PROCESSED)) .build(); final ApiRequestIterator processedApiRequests = apiRequestAuditRepository.getByQuery(apiRequestQuery); if (!processed...
final boolean deleteProcessedRequest = (apiRequestAudit.isErrorAcknowledged() || Status.PROCESSED.equals(apiRequestAudit.getStatus())) && daysSinceLastUpdate > apiAuditConfig.getKeepRequestDays(); final boolean deleteErroredRequest = Status.ERROR.equals(apiRequestAudit.getStatus()) && daysSinceLastUpdate > a...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\audit\apirequest\ApiAuditCleanUpService.java
1
请完成以下Java代码
public void setC_Order_MFGWarehouse_Report(de.metas.fresh.model.I_C_Order_MFGWarehouse_Report C_Order_MFGWarehouse_Report) { set_ValueFromPO(COLUMNNAME_C_Order_MFGWarehouse_Report_ID, de.metas.fresh.model.I_C_Order_MFGWarehouse_Report.class, C_Order_MFGWarehouse_Report); } /** Set Order / MFG Warehouse report. ...
/** Set Produkt. @param M_Product_ID Produkt, Leistung, Artikel */ @Override public void setM_Product_ID (int M_Product_ID) { if (M_Product_ID < 1) set_Value (COLUMNNAME_M_Product_ID, null); else set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); } /** Get Produkt. @return P...
repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java-gen\de\metas\fresh\model\X_C_Order_MFGWarehouse_ReportLine.java
1
请完成以下Java代码
public void init() { // @formatter:off personRepository = new ArrayList<>(Arrays.asList( new Person(1, "Jhon", "jhon@test.com", 20, LocalDate.of(2019, 9, 9), BigDecimal.valueOf(1000)), new Person(2, "Jhon", "jhon1@test.com", 20, LocalDate.of(2019, 9, 9), BigDecimal.valueOf(1500)...
@PostMapping("/person") @ResponseStatus(HttpStatus.OK) @ResponseBody public boolean insertPerson(@RequestBody final Person person) { return personRepository.add(person); } @GetMapping("/person") @ResponseBody public List<Person> findAll() { return personRepository; } }
repos\tutorials-master\spring-5\src\main\java\com\baeldung\jsonb\PersonController.java
1
请完成以下Java代码
Collection<String> getCommonNames() { return this.factories.keySet().stream().map(CommonStructuredLogFormat::getId).toList(); } @Nullable StructuredLogFormatter<E> get(Instantiator<?> instantiator, String format) { CommonStructuredLogFormat commonFormat = CommonStructuredLogFormat.forId(format); CommonFor...
@Override public JsonMembersCustomizerBuilder nested(boolean nested) { this.nested = nested; return this; } @Override public StructuredLoggingJsonMembersCustomizer<E> build() { return (members) -> { List<StructuredLoggingJsonMembersCustomizer<?>> customizers = new ArrayList<>(); if (this.prope...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\logging\structured\StructuredLogFormatterFactory.java
1
请在Spring Boot框架中完成以下Java代码
public class BankStatementLineAmounts { public static BankStatementLineAmounts of(@NonNull final I_C_BankStatementLine bsl) { return BankStatementLineAmounts.builder() .stmtAmt(bsl.getStmtAmt()) .trxAmt(bsl.getTrxAmt()) .bankFeeAmt(bsl.getBankFeeAmt()) .chargeAmt(bsl.getChargeAmt()) .interestAmt...
if (differenceAmt.signum() == 0) { return this; } return toBuilder() .trxAmt(this.trxAmt.add(differenceAmt)) .build(); } public BankStatementLineAmounts withTrxAmt(@NonNull final BigDecimal trxAmt) { return !this.trxAmt.equals(trxAmt) ? toBuilder().trxAmt(trxAmt).build() : this; } pub...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\model\BankStatementLineAmounts.java
2
请完成以下Java代码
public static void retrieveValueUsingFind() { DB database = mongoClient.getDB(databaseName); DBCollection collection = database.getCollection(testCollectionName); BasicDBObject queryFilter = new BasicDBObject(); BasicDBObject projection = new BasicDBObject(); projection.put("p...
System.out.println("response:- " + response); } public static void main(String args[]) { // // Connect to cluster (default is localhost:27017) // setUp(); // // Fetch the data using find query with projected fields // retrieveValueUsingFind();...
repos\tutorials-master\persistence-modules\java-mongodb-2\src\main\java\com\baeldung\mongo\RetrieveValue.java
1
请完成以下Java代码
public Mono<CompromisedPasswordDecision> check(@Nullable String password) { return getHash(password).map((hash) -> new String(Hex.encode(hash))) .flatMap(this::findLeakedPassword) .defaultIfEmpty(Boolean.FALSE) .map(CompromisedPasswordDecision::new); } private Mono<Boolean> findLeakedPassword(String encod...
* Sets the {@link WebClient} to use when making requests to Have I Been Pwned REST * API. By default, a {@link WebClient} with a base URL of {@link #API_URL} is used. * @param webClient the {@link WebClient} to use */ public void setWebClient(WebClient webClient) { Assert.notNull(webClient, "webClient cannot b...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\password\HaveIBeenPwnedRestApiReactivePasswordChecker.java
1
请完成以下Java代码
byte getKeyByte(int keyId, int byteId) { if (byteId >= _keys[keyId].length) { return 0; } return _keys[keyId][byteId]; } /** * 是否含有值 * @return */ boolean hasValues() { return _values != null; } /** * 根据下标获取值 * @pa...
if (hasValues()) { return _values[id]; } return id; } /** * 键 */ private byte[][] _keys; /** * 值 */ private int _values[]; }
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\dartsclone\details\Keyset.java
1
请完成以下Java代码
class NestedByteChannel implements SeekableByteChannel { private long position; private final Resources resources; private final Cleanable cleanup; private final long size; private volatile boolean closed; NestedByteChannel(Path path, String nestedEntryName) throws IOException { this(path, nestedEntryName...
return this; } @Override public long size() throws IOException { assertNotClosed(); return this.size; } @Override public SeekableByteChannel truncate(long size) throws IOException { throw new NonWritableChannelException(); } private void assertNotClosed() throws ClosedChannelException { if (this.clos...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\nio\file\NestedByteChannel.java
1
请完成以下Java代码
public class ErrorDetails { private Date timestamp; private String message; private String details; public Date getTimestamp() { return timestamp; } public void setTimestamp(Date timestamp) { this.timestamp = timestamp; } public String getMessage() { return me...
public String getDetails() { return details; } public void setDetails(String details) { this.details = details; } public ErrorDetails(Date timestamp, String message, String details){ super(); this.timestamp = timestamp; this.details = details; this.mess...
repos\SpringBoot-Projects-FullStack-master\Part-4 Spring Boot REST API\SpringRestDB\src\main\java\spring\restdb\exception\ErrorDetails.java
1
请完成以下Java代码
public int getIMP_Processor_Type_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_IMP_Processor_Type_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Days to keep Log. @param KeepLogDays Number of days to keep the log entries */ public void setKeepLogDays (int KeepLogDays) { s...
{ Integer ii = (Integer)get_Value(COLUMNNAME_Port); if (ii == null) return 0; return ii.intValue(); } /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Process Now. @r...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_IMP_Processor.java
1
请完成以下Java代码
public String getProcessInstanceId() { return processInstanceId; } public String getExecutionId() { return executionId; } public String getProcessDefinitionId() { return processDefinitionId; } public String getActivityId() { return activityId; } public String getActivityName() { retu...
return startedAfter; } public Date getStartedBefore() { return startedBefore; } public Date getFinishedAfter() { return finishedAfter; } public Date getFinishedBefore() { return finishedBefore; } public ActivityInstanceState getActivityInstanceState() { return activityInstanceState; } ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricActivityInstanceQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class M_InOut { private static final AdMessageKey ERR_ShipmentDeclaration = AdMessageKey.of("de.metas.shipment.model.interceptor.M_InOut.ERR_ShipmentDeclaration"); private final ShipmentDeclarationCreator shipmentDeclarationCreator; private final ShipmentDeclarationRepository shipmentDeclarationRepo; privat...
final InOutId shipmentId = InOutId.ofRepoId(inout.getM_InOut_ID()); if (shipmentDeclarationRepo.existCompletedShipmentDeclarationsForShipmentId(shipmentId)) { throw new AdempiereException(ERR_ShipmentDeclaration).markAsUserValidationError(); } } } @ModelChange(timings = { ModelValidator.TYPE_BEFOR...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\shipment\model\interceptor\M_InOut.java
2
请在Spring Boot框架中完成以下Java代码
public class SecSecurityConfig { @Bean public InMemoryUserDetailsManager userDetailsService() { UserDetails user1 = User.withUsername("user1") .password(passwordEncoder().encode("user1Pass")) .roles("USER") .build(); UserDetails user2 = User.withUsername("use...
.loginProcessingUrl("/perform_login") .defaultSuccessUrl("/homepage.html", true) // .failureUrl("/login.html?error=true") .failureHandler(authenticationFailureHandler()) .and() .logout() .logoutUrl("/perform_logout") .deleteCookies("JSE...
repos\tutorials-master\spring-security-modules\spring-security-web-login\src\main\java\com\baeldung\security\config\SecSecurityConfig.java
2
请完成以下Java代码
public int getM_InventoryLine_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_InventoryLine_ID); if (ii == null) return 0; return ii.intValue(); } /** Set M_InventoryLineMA. @param M_InventoryLineMA_ID M_InventoryLineMA */ @Override public void setM_InventoryLineMA_ID (int M_InventoryLineMA_ID...
{ set_Value (COLUMNNAME_MovementQty, MovementQty); } /** Get Bewegungs-Menge. @return Quantity of a product moved. */ @Override public java.math.BigDecimal getMovementQty () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MovementQty); if (bd == null) return BigDecimal.ZERO; return bd; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_InventoryLineMA.java
1
请完成以下Java代码
public String getActivityInstanceId() { return activityInstanceId; } @Override public void setActivityInstanceId(String activityInstanceId) { this.activityInstanceId = activityInstanceId; } @Override public String getTaskId() { return taskId; } @Override pu...
public void setExecutionId(String executionId) { this.executionId = executionId; } @Override public Date getTime() { return time; } @Override public void setTime(Date time) { this.time = time; } @Override public String getDetailType() { return detai...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\HistoricDetailEntityImpl.java
1
请完成以下Java代码
public void onOccur(CmmnActivityExecution execution) { ensureTransitionAllowed(execution, AVAILABLE, COMPLETED, "occur"); } // suspension //////////////////////////////////////////////////////////// public void onSuspension(CmmnActivityExecution execution) { ensureTransitionAllowed(execution, AVAILABLE,...
public void onParentResume(CmmnActivityExecution execution) { throw createIllegalStateTransitionException("parentResume", execution); } // re-activation //////////////////////////////////////////////////////// public void onReactivation(CmmnActivityExecution execution) { throw createIllegalStateTransiti...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\behavior\EventListenerOrMilestoneActivityBehavior.java
1
请在Spring Boot框架中完成以下Java代码
public class ModificationBatchConfiguration extends BatchConfiguration { protected List<AbstractProcessInstanceModificationCommand> instructions; protected boolean skipCustomListeners; protected boolean skipIoMappings; protected String processDefinitionId; public ModificationBatchConfiguration(List<String> ...
} public String getProcessDefinitionId() { return processDefinitionId; } public boolean isSkipCustomListeners() { return skipCustomListeners; } public boolean isSkipIoMappings() { return skipIoMappings; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ModificationBatchConfiguration.java
2
请完成以下Java代码
public BigDecimal getQM_QtyDeliveredAvg() { return ppOrder.getQM_QtyDeliveredAvg(); } @Override public Object getModel() { return ppOrder; } @Override public String getVariantGroup() { return null; } @Override public BOMComponentType getComponentType() { return null; } @Override public IHand...
{ if (!_handlingUnitsInfoLoaded) { _handlingUnitsInfo = handlingUnitsInfoFactory.createFromModel(ppOrder); _handlingUnitsInfoLoaded = true; } return _handlingUnitsInfo; } @Override public I_M_Product getMainComponentProduct() { // there is no substitute for a produced material return null; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\PPOrderProductionMaterial.java
1
请完成以下Java代码
/* package */ InvoiceLineAggregationRequest build() { return new InvoiceLineAggregationRequest(this); } private Builder() { } @Override public String toString() { return ObjectUtils.toString(this); } public Builder setC_Invoice_Candidate(final I_C_Invoice_Candidate invoiceCandidate) { ...
* <p> * NOTE: basically this shall be always empty because everything which is related to line aggregation * shall be configured from aggregation definition, * but we are also leaving this door open in case we need to implement some quick/hot fixes. * * @deprecated This method will be removed because we ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceLineAggregationRequest.java
1
请完成以下Java代码
public static CostAmountAndQtyDetailed of(@NonNull final CostAmount amt, @NonNull final Quantity qty, @NonNull final CostAmountType type) { final CostAmountAndQty amtAndQty = CostAmountAndQty.of(amt, qty); return of(type, amtAndQty); } private static CostAmountAndQtyDetailed of(final @NonNull CostAmountType typ...
{ final CostAmountAndQty costAmountAndQty; switch (type) { case MAIN: costAmountAndQty = main; break; case ADJUSTMENT: costAmountAndQty = costAdjustment; break; case ALREADY_SHIPPED: costAmountAndQty = alreadyShipped; break; default: throw new IllegalArgumentException(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\methods\CostAmountAndQtyDetailed.java
1
请完成以下Java代码
private SaveDecoupledHUAttributesDAO getDelegate() { final String trxName = trxManager.getThreadInheritedTrxName(); final ITrx trx = trxManager.getTrx(trxName); Check.assumeNotNull(trx, "trx not null for trxName={}", trxName); // // Get an existing storage DAO from transaction. // If no storage DAO exists...
public void save(final I_M_HU_Attribute huAttribute) { final SaveDecoupledHUAttributesDAO delegate = getDelegate(); delegate.save(huAttribute); } @Override public void delete(final I_M_HU_Attribute huAttribute) { final SaveDecoupledHUAttributesDAO delegate = getDelegate(); delegate.delete(huAttribute); }...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\impl\SaveOnCommitHUAttributesDAO.java
1
请完成以下Java代码
public PMM_GenerateOrdersEnqueuer confirmRecordsToProcess(final ConfirmationCallback confirmationCallback) { this.confirmationCallback = confirmationCallback; return this; } /** * @return number of records enqueued */ public int enqueue() { final IQuery<I_PMM_PurchaseCandidate> query = createRecordsToPr...
// // Ask the callback if we shall process return confirmationCallback.confirmRecordsToProcess(countToProcess); } private IQuery<I_PMM_PurchaseCandidate> createRecordsToProcessQuery() { final IQueryBuilder<I_PMM_PurchaseCandidate> queryBuilder = queryBL.createQueryBuilder(I_PMM_PurchaseCandidate.class); if...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\order\async\PMM_GenerateOrdersEnqueuer.java
1
请完成以下Java代码
public DeploymentCache<CaseDefinitionCacheEntry> getCaseDefinitionCache() { return caseDefinitionCache; } public void setCaseDefinitionCache(DeploymentCache<CaseDefinitionCacheEntry> caseDefinitionCache) { this.caseDefinitionCache = caseDefinitionCache; } public CmmnEngineConfiguration...
return caseDefinitionEntityManager; } public void setCaseDefinitionEntityManager(CaseDefinitionEntityManager caseDefinitionEntityManager) { this.caseDefinitionEntityManager = caseDefinitionEntityManager; } public CmmnDeploymentEntityManager getDeploymentEntityManager() { return deploym...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\deployer\CmmnDeploymentManager.java
1
请完成以下Java代码
private static Language extractLanguageFromDraftInOut(@NonNull final Properties ctx, @Nullable final TableRecordReference recordRef) { final boolean isUseLoginLanguage = Services.get(ISysConfigBL.class).getBooleanValue(SYSCONFIG_UseLoginLanguageForDraftDocuments, true); // in case the sys config is not set, th...
// Nothing to do if not dealing with a sales inout. if (!X_C_DocType.DOCBASETYPE_MaterialDelivery.equals(docBaseType)) { return null; } // Nothing to do if the document is not a draft or in progress. if (!docActionBL.issDocumentDraftedOrInProgress(document)) { return null; } // If all ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ProcessInfo.java
1
请完成以下Java代码
public FormType getType() { return type; } public void setType(AbstractFormFieldType type) { this.type = type; } public boolean isReadable() { return isReadable; } public void setReadable(boolean isReadable) { this.isReadable = isReadable; } public boolean isRequired() { return i...
public void setVariableExpression(Expression variableExpression) { this.variableExpression = variableExpression; } public Expression getDefaultExpression() { return defaultExpression; } public void setDefaultExpression(Expression defaultExpression) { this.defaultExpression = defaultExpression; }...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\form\handler\FormPropertyHandler.java
1
请完成以下Java代码
public <T> T mapOnParams(@Nullable final CostCalculationMethodParams params, @NonNull final ParamsMapper<T> mapper) { if (this == CostCalculationMethod.FixedAmount) { return mapper.fixedAmount(castParams(params, FixedAmountCostCalculationMethodParams.class)); } else if (this == CostCalculationMethod.Percent...
public interface CaseMapper<T> { T fixedAmount(); T percentageOfAmount(); } public <T> T map(@NonNull final CaseMapper<T> mapper) { if (this == CostCalculationMethod.FixedAmount) { return mapper.fixedAmount(); } else if (this == CostCalculationMethod.PercentageOfAmount) { return mapper.percent...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\costs\calculation_methods\CostCalculationMethod.java
1
请完成以下Java代码
public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; }...
this.typeHandler = typeHandler; if (value instanceof List<?>) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } ...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\CmsPrefrenceAreaProductRelationExample.java
1
请在Spring Boot框架中完成以下Java代码
public String getTypeName() { return TYPE_NAME; } @Override public boolean isCachable() { return true; } @Override public Object getValue(ValueFields valueFields) { BigDecimal bigDecimal = null; String textValue = valueFields.getTextValue(); if (textValu...
public void setValue(Object value, ValueFields valueFields) { if (value != null) { valueFields.setTextValue(((BigDecimal) value).toPlainString()); } else { valueFields.setTextValue(null); } } @Override public boolean isAbleToStore(Object value) { if (...
repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\types\BigDecimalType.java
2
请完成以下Java代码
public String getTaskId() { return taskId; } public String getCalledProcessInstanceId() { return calledProcessInstanceId; } public String getCalledCaseInstanceId() { return calledCaseInstanceId; } public String getTenantId() { return tenantId; } public Date getCreateTime() { retu...
public Boolean getActive() { return active; } public Boolean getCompleted() { return completed; } public Boolean getTerminated() { return terminated; } public static HistoricCaseActivityInstanceDto fromHistoricCaseActivityInstance(HistoricCaseActivityInstance historicCaseActivityInstance) { ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricCaseActivityInstanceDto.java
1
请完成以下Java代码
public BigDecimal getPlannedAmt() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_PlannedAmt); return bd != null ? bd : BigDecimal.ZERO; } /** * ProjInvoiceRule AD_Reference_ID=383 * Reference name: C_Project InvoiceRule */ public static final int PROJINVOICERULE_AD_Reference_ID=383; /** None...
set_Value (COLUMNNAME_Qty, Qty); } @Override public BigDecimal getQty() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setSeqNo (final int SeqNo) { set_Value (COLUMNNAME_SeqNo, SeqNo); } @Override public int getSeqNo(...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ProjectTask.java
1
请完成以下Java代码
public Party6Choice getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link Party6Choice } * */ public void setId(Party6Choice value) { this.id = value; } /** * Gets the valu...
/** * Gets the value of the ctctDtls property. * * @return * possible object is * {@link ContactDetails2 } * */ public ContactDetails2 getCtctDtls() { return ctctDtls; } /** * Sets the value of the ctctDtls property. * * @param value ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\PartyIdentification32.java
1
请在Spring Boot框架中完成以下Java代码
public PollerMetadata pollerMetadata() { return Pollers.fixedDelay(5000) .advice(transactionInterceptor()) .transactionSynchronizationFactory(transactionSynchronizationFactory) .get(); } private TransactionInterceptor transactionInterceptor() { ...
public DataSource dataSource() { return new EmbeddedDatabaseBuilder() .setType(EmbeddedDatabaseType.H2) .addScript("classpath:table.sql") .build(); } @Bean public DataSourceTransactionManager txManager() { return new DataSourceTransactionManag...
repos\tutorials-master\spring-integration\src\main\java\com\baeldung\tx\TxIntegrationConfig.java
2
请完成以下Java代码
public void setCdtrAcct(CashAccount24 value) { this.cdtrAcct = value; } /** * Gets the value of the ultmtCdtr property. * * @return * possible object is * {@link PartyIdentification43 } * */ public PartyIdentification43 getUltmtCdtr() { retur...
/** * Gets the value of the prtry property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method f...
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\TransactionParties3.java
1
请在Spring Boot框架中完成以下Java代码
public List<Author> fetchAllAuthors() { return authorRepository.fetchAll(); } public Author fetchAuthorByNameAndAge() { return authorRepository.fetchByNameAndAge("Joana Nimar", 34); } /* causes exception public List<Author> fetchAuthorsViaSort() { return authorRepository.fe...
public Author fetchAuthorByNameAndAgeNative() { return authorRepository.fetchByNameAndAgeNative("Joana Nimar", 34); } /* causes exception public List<Author> fetchAuthorsViaSortNative() { return authorRepository.fetchViaSortNative(Sort.by(Direction.DESC, "name")); } */ ...
repos\Hibernate-SpringBoot-master\HibernateSpringBootNamedQueriesInOrmXml\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
void jbInit() throws Exception { this.setResizable(false); textLabel.setIcon(new ImageIcon(net.sf.memoranda.ui.htmleditor.HTMLEditor.class.getResource("resources/icons/findbig.png"))) ; textLabel.setIconTextGap(10); border1 = BorderFactory.createEmptyBorder(5, 5, 5, 5); border2 =...
noB.setText(Local.getString("No")); noB.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { noB_actionPerformed(e); } }); // noB.setFocusable(false); buttonsPanel.add(yesB, null); getContentPa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\net\sf\memoranda\ui\htmleditor\ReplaceOptionsDialog.java
1
请在Spring Boot框架中完成以下Java代码
class CreditMemoInvoiceCopyHandler implements IDocCopyHandler<I_C_Invoice, I_C_InvoiceLine> { private final InvoiceCreditContext creditCtx; public CreditMemoInvoiceCopyHandler(final InvoiceCreditContext creditCtx) { this.creditCtx = creditCtx; } @Override public void copyPreliminaryValues(final I_C_Invoice fr...
} private void completeAndAllocateCreditMemo(final de.metas.adempiere.model.I_C_Invoice invoice, final de.metas.adempiere.model.I_C_Invoice creditMemo) { if (!creditCtx.isCompleteAndAllocate()) { Services.get(IDocumentBL.class).processEx(creditMemo, IDocument.ACTION_Prepare, IDocument.STATUS_InProgress); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\service\impl\CreditMemoInvoiceCopyHandler.java
2
请完成以下Java代码
public BigDecimal getQtyItemCapacityInternal() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyItemCapacityInternal); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyShipped (final @Nullable BigDecimal QtyShipped) { set_Value (COLUMNNAME_QtyShipped, QtyShipped); } @Ov...
{ if (Record_ID < 0) set_ValueNoCheck (COLUMNNAME_Record_ID, null); else set_ValueNoCheck (COLUMNNAME_Record_ID, Record_ID); } @Override public int getRecord_ID() { return get_ValueAsInt(COLUMNNAME_Record_ID); } @Override public void setReplicationTrxErrorMsg (final @Nullable java.lang.String Re...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java-gen\de\metas\ordercandidate\model\X_C_OLCand.java
1
请在Spring Boot框架中完成以下Java代码
public Result<IPage<SysUserRoleCountVo>> queryPageRoleCount(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize) { Result<IPage<SysUserRoleCountVo>> result = new Result<>...
countQuery.eq(SysUserRole::getRoleId,role.getId()); long count = sysUserRoleService.count(countQuery); SysUserRoleCountVo countVo = new SysUserRoleCountVo(); BeanUtils.copyProperties(role,countVo); countVo.setCount(count); sysCountVoList.add(countVo); ...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\controller\SysRoleController.java
2
请在Spring Boot框架中完成以下Java代码
public class ReconciliationDataGetBiz { private static final Log LOG = LogFactory.getLog(ReconciliationDataGetBiz.class); @Autowired private RpTradePaymentQueryService rpTradePaymentQueryService; /** * 获取平台指定支付渠道、指定订单日下[所有成功]的数据 * * @param billDate * 账单日 * @param interfaceCode * ...
} /** * 获取平台指定支付渠道、指定订单日下[所有]的数据 * * @param billDate * 账单日 * @param interfaceCode * 支付渠道 * @return */ public List<RpTradePaymentRecord> getAllPlatformDateByBillDate(Date billDate, String interfaceCode) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String bill...
repos\roncoo-pay-master\roncoo-pay-app-reconciliation\src\main\java\com\roncoo\pay\app\reconciliation\biz\ReconciliationDataGetBiz.java
2
请完成以下Java代码
public void loadDataSource() { configAttributeMap = dynamicSecurityService.loadDataSource(); } public void clearDataSource() { configAttributeMap.clear(); configAttributeMap = null; } @Override public Collection<ConfigAttribute> getAttributes(Object o) throws IllegalArgumen...
if (pathMatcher.match(pattern, path)) { configAttributes.add(configAttributeMap.get(pattern)); } } // 未设置操作请求权限,返回空集合 return configAttributes; } @Override public Collection<ConfigAttribute> getAllConfigAttributes() { return null; } @Overr...
repos\mall-master\mall-security\src\main\java\com\macro\mall\security\component\DynamicSecurityMetadataSource.java
1
请完成以下Java代码
public int getId() { return id; } public void setId(int id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public Status getStatus() { return status; } public voi...
public Type getType() { return type; } public void setType(Type type) { this.type = type; } public Priority getPriority() { return priority; } public void setPriority(Priority priority) { this.priority = priority; } public Category getCategory() { ...
repos\tutorials-master\persistence-modules\java-jpa\src\main\java\com\baeldung\jpa\enums\Article.java
1
请完成以下Java代码
public void setType_Clearing (final java.lang.String Type_Clearing) { set_Value (COLUMNNAME_Type_Clearing, Type_Clearing); } @Override public java.lang.String getType_Clearing() { return get_ValueAsString(COLUMNNAME_Type_Clearing); } /** * Type_Conditions AD_Reference_ID=540271 * Reference name: Type...
{ set_ValueNoCheck (COLUMNNAME_Type_Conditions, Type_Conditions); } @Override public java.lang.String getType_Conditions() { return get_ValueAsString(COLUMNNAME_Type_Conditions); } /** * Type_Flatrate AD_Reference_ID=540264 * Reference name: Type_Flatrate */ public static final int TYPE_FLATRATE_AD...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Flatrate_Conditions.java
1
请完成以下Java代码
public Builder setKeyColumn(final boolean keyColumn) { this.keyColumn = keyColumn; return this; } public Builder setEncrypted(final boolean encrypted) { this.encrypted = encrypted; return this; } /** * Sets ORDER BY priority and direction (ascending/descending) * * @param priority pri...
{ if (priority >= 0) { orderByPriority = priority; orderByAscending = true; } else { orderByPriority = -priority; orderByAscending = false; } return this; } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\SqlDocumentFieldDataBindingDescriptor.java
1
请完成以下Java代码
protected void postProcess(final boolean success) { invalidateView(); invalidateParentView(); } private HuId getSelectedHUId() { return getSingleSelectedRow().getHuId(); } private boolean checkSourceHuPreconditionIncludingEmptyHUs() { final HuId huId = getSelectedHUId(); final Collection<HuId> source...
.filter(productStorage -> ProductId.equals(productStorage.getProductId(), productId)) .map(IHUProductStorage::getQty) .findFirst() .orElseThrow(() -> new AdempiereException("No Qty found for " + productId)); } private ImmutableList<IHUProductStorage> getHUProductStorages() { ImmutableList<IHUProductSt...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\process\WEBUI_Picking_ReturnQtyToSourceHU.java
1
请完成以下Java代码
public double getImageableHeight (boolean orientationCorrected) { if (orientationCorrected && m_landscape) return super.getImageableWidth(); return super.getImageableHeight(); } /** * Get Image Width in 1/72 inch * @param orientationCorrected correct for orientation * @return imagable width */ pub...
} /** * Get Margin * @param orientationCorrected correct for orientation * @return margin */ public Insets getMargin (boolean orientationCorrected) { return new Insets ((int)getImageableY(orientationCorrected), // top (int)getImageableX(orientationCorrected), // left (int)(getHeight(orientati...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\CPaper.java
1
请完成以下Java代码
public final String toString() { if ( getCodeset() != null ) return (html.toString(getCodeset())); else return(html.toString()); } /** Override the toString() method so that it prints something meaningful. */ public final String toString(St...
} /** Allows the XhtmlFrameSetDocument to be cloned. Doesn't return an instanceof XhtmlFrameSetDocument returns instance of html. */ public Object clone() { return(html.clone()); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\XhtmlFrameSetDocument.java
1
请在Spring Boot框架中完成以下Java代码
Output resizeBilinear(Output images, Output size) { return binaryOp("ResizeBilinear", images, size); } Output expandDims(Output input, Output dim) { return binaryOp("ExpandDims", input, dim); } Output cast(Output value, DataType dtype) { return g.opB...
} private final Graph g; } @PreDestroy public void close() { session.close(); } @Data @NoArgsConstructor @AllArgsConstructor public static class LabelWithProbability { private String label; private float probability; private long elapsed; } ...
repos\springboot-demo-master\Tensorflow\src\main\java\com\et\tf\service\ClassifyImageService.java
2
请完成以下Java代码
public VEditor createEditor(final boolean tableEditor) { // Reset lookup state // background: the lookup implements MutableComboBoxModel which stores the selected item. // If this lookup was previously used somewhere, the selected item is retained from there and we will get unexpected results. final Lookup loo...
@Override public boolean matchesColumnName(final String columnName) { if (columnName == null || columnName.isEmpty()) { return false; } if (columnName.equals(getColumnName())) { return true; } if (gridField.isVirtualColumn()) { if (columnName.equals(gridField.getColumnSQL(false))) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\FindPanelSearchField.java
1
请完成以下Java代码
protected PurchaseOrderFromItemFactory createGroup( @NonNull final Object itemHashKey, final PurchaseOrderItem item_NOTUSED) { final PurchaseOrderAggregationKey orderAggregationKey = PurchaseOrderAggregationKey.cast(itemHashKey); return PurchaseOrderFromItemFactory.builder() .orderAggregationKey(orderAg...
} @Override protected void addItemToGroup( @NonNull final PurchaseOrderFromItemFactory orderFactory, @NonNull final PurchaseOrderItem candidate) { orderFactory.addCandidate(candidate); } @VisibleForTesting List<I_C_Order> getCreatedPurchaseOrders() { return ImmutableList.copyOf(createdPurchaseOrders)...
repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\purchaseordercreation\localorder\PurchaseOrderFromItemsAggregator.java
1
请在Spring Boot框架中完成以下Java代码
private Optional<JsonPurchaseCandidateCreateItem> mapRowToRequestItem(@NonNull final PurchaseOrderRow purchaseOrderRow) { if (hasMissingFields(purchaseOrderRow)) { pInstanceLogger.logMessage("Skipping row due to missing mandatory information, see row: " + purchaseOrderRow); return Optional.empty(); } fi...
return Optional.of(requestItem); } private static boolean hasMissingFields(@NonNull final PurchaseOrderRow orderRow) { return Check.isBlank(orderRow.getProductIdentifier()) || Check.isBlank(orderRow.getBpartnerIdentifier()) || Check.isBlank(orderRow.getWarehouseIdentifier()) || Check.isBlank(orderRow....
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-pcm-file-import\src\main\java\de\metas\camel\externalsystems\pcm\purchaseorder\UpsertPurchaseCandidateProcessor.java
2
请完成以下Java代码
public IdentityOperationResult deleteTenant(String tenantId) { if (springSecurityAuthentication()) { unsupportedOperationForOAuth2(); } return super.deleteTenant(tenantId); } @Override public IdentityOperationResult createMembership(String userId, String groupId) { if (springSecurityAuthent...
@Override public IdentityOperationResult createTenantGroupMembership(String tenantId, String groupId) { if (springSecurityAuthentication()) { unsupportedOperationForOAuth2(); } return super.createTenantGroupMembership(tenantId, groupId); } @Override public IdentityOperationResult deleteTenant...
repos\camunda-bpm-platform-master\spring-boot-starter\starter-security\src\main\java\org\camunda\bpm\spring\boot\starter\security\oauth2\impl\OAuth2IdentityProvider.java
1
请完成以下Java代码
private final Method findMethodImplementationOrNull(final Method interfaceMethod) { try { final String name = interfaceMethod.getName(); final Class<?>[] parameterTypes = interfaceMethod.getParameterTypes(); final Method implMethod = implClass.getMethod(name, parameterTypes); return implMethod; } c...
{ try { final Method implMethod = interfaceMethod2implMethod.get(interfaceMethod); if (implMethod == null || implMethod == NullMethod.NULL) { return null; } return implMethod; } catch (ExecutionException e) { // NOTE: shall not happen final String message = "Error while trying to find...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\proxy\ProxyClassMethodBindings.java
1
请完成以下Java代码
public class PrintEvenOddWaitNotify { public static void main(String... args) { Printer print = new Printer(); Thread t1 = new Thread(new TaskEvenOdd(print, 10, false), "Odd"); Thread t2 = new Thread(new TaskEvenOdd(print, 10, true), "Even"); t1.start(); t2.start(); } } ...
while (!isOdd) { try { wait(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } System.out.println(Thread.currentThread().getName() + ":" + number); isOdd = false; notify(); } synchroni...
repos\tutorials-master\core-java-modules\core-java-concurrency-advanced-2\src\main\java\com\baeldung\concurrent\evenandodd\PrintEvenOddWaitNotify.java
1
请完成以下Java代码
public void exportDunnings(@NonNull final ImmutableList<DunningDocId> dunningDocIds) { for (final DunningDocId dunningDocId : dunningDocIds) { final List<DunningToExport> dunningsToExport = dunningToExportFactory.getCreateForId(dunningDocId); for (final DunningToExport dunningToExport : dunningsToExport) ...
loggable.addLog("DunningExportService - Attached export data to dunningDocId={}; attachment={}", dunningToExport.getId(), attachmentEntryCreateRequest); } } private AttachmentEntryCreateRequest createAttachmentRequest(@NonNull final DunningExportResult exportResult) { byte[] byteArrayData; try { byteArra...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\export\DunningExportService.java
1
请完成以下Java代码
private static DirContext connectToServer(Hashtable<String, String> env) throws NamingException { String url = env.get(Context.PROVIDER_URL); System.out.println("connecting to " + url + "..."); DirContext context = new InitialDirContext(env); System.out.println("successfully connected t...
env.put(Context.INITIAL_CONTEXT_FACTORY, factory); env.put("com.sun.jndi.ldap.read.timeout", "5000"); env.put("com.sun.jndi.ldap.connect.timeout", "5000"); env.put(Context.SECURITY_AUTHENTICATION, authType); env.put(Context.PROVIDER_URL, url); if (query != null) { env...
repos\tutorials-master\core-java-modules\core-java-jndi\src\main\java\com\baeldung\jndi\ldap\connection\tool\LdapConnectionTool.java
1
请完成以下Java代码
public void setValueAt(Object aValue, int row, int column) { @SuppressWarnings("rawtypes") final Vector rowVector = (Vector)dataVector.elementAt(row); // Check if value was really changed. If not, do nothing final Object valueOld = rowVector.get(column); if (Check.equals(valueOld, aValue)) { return; ...
rowVector.setElementAt(aValue, column); fireTableCellUpdated(row, column); valueSet = true; } finally { // Rollback changes if (!valueSet) { rowVector.setElementAt(valueOld, column); } } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\minigrid\MiniTableModel.java
1
请完成以下Java代码
public boolean isLimited() { return !isNoLimit(); } public boolean isNoLimit() { return isNoLimit(value); } private static boolean isNoLimit(final int value) { return value <= 0; } public QueryLimit ifNoLimitUse(final int limit) { return isNoLimit() ? ofInt(limit) : this; } @SuppressWarnings("un...
} public boolean isLimitHitOrExceeded(final int count) { return isLimited() && value <= count; } public boolean isBelowLimit(@NonNull final Collection<?> collection) { return isNoLimit() || value > collection.size(); } public QueryLimit minusSizeOf(@NonNull final Collection<?> collection) { if (isNoLim...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\QueryLimit.java
1
请完成以下Java代码
public void logModelHTTLLongerThanGlobalConfiguration(String definitionKey) { logWarn( "017", "definitionKey: {}; " + "The specified Time To Live (TTL) in the model is longer than the global TTL configuration. " + "The historic data related to this model will be cleaned up at later p...
public ProcessEngineException invalidTransactionIsolationLevel(String transactionIsolationLevel) { return new ProcessEngineException(exceptionMessage("019", "The transaction isolation level set for the database is '{}' which differs from the recommended value. " + "Please change the isolation le...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cfg\ConfigurationLogger.java
1
请在Spring Boot框架中完成以下Java代码
public void deleteHistoricTaskLogEntriesByScopeDefinitionId(String scopeType, String scopeDefinitionId) { Map<String, String> params = new HashMap<>(2); params.put("scopeDefinitionId", scopeDefinitionId); params.put("scopeType", scopeType); getDbSqlSession().delete("deleteHistoricTaskLog...
@Override public void deleteHistoricTaskLogEntriesForNonExistingCaseInstances() { getDbSqlSession().delete("bulkDeleteHistoricTaskLogEntriesForNonExistingCaseInstances", null, HistoricTaskLogEntryEntityImpl.class); } @Override public long findHistoricTaskLogEntriesCountByNativeQueryCriteria...
repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\persistence\entity\data\impl\MyBatisHistoricTaskLogEntryDataManager.java
2
请在Spring Boot框架中完成以下Java代码
public String getDepartment() { return department; } /** * Sets the value of the department property. * * @param value * allowed object is * {@link String } * */ public void setDepartment(String value) { this.department = value; } /*...
* {@link String } * */ public void setTown(String value) { this.town = value; } /** * Gets the value of the country property. * * @return * possible object is * {@link String } * */ public String getCountry() { return c...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\DeliveryPointDetails.java
2
请在Spring Boot框架中完成以下Java代码
public void setCreateTime(Date createTime) { this.createTime = createTime; } @ApiModelProperty(example = "node1") public String getLockOwner() { return lockOwner; } public void setLockOwner(String lockOwner) { this.lockOwner = lockOwner; } @ApiModelProperty(exa...
} public void setLockExpirationTime(Date lockExpirationTime) { this.lockExpirationTime = lockExpirationTime; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } @ApiModelProperty(example = "null") public String getTenantId() { return tenantId; ...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\management\JobResponse.java
2
请完成以下Java代码
public Capacity multiply(final int multiplier) { Check.assume(multiplier >= 0, "multiplier = {} needs to be 0", multiplier); // If capacity is infinite, there is no point to multiply it if (infiniteCapacity) { return this; } final BigDecimal capacityNew = capacity.multiply(BigDecimal.valueOf(multiplie...
+ ", product=" + productId + ", uom=" + (uom == null ? "null" : uom.getUOMSymbol()) + ", allowNegativeCapacity=" + allowNegativeCapacity + "]"; } public Quantity computeQtyCUs(final int qtyTUs) { if (qtyTUs < 0) { throw new AdempiereException("@QtyPacks@ < 0"); } return multiply(qtyTUs).toQu...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\quantity\Capacity.java
1
请完成以下Java代码
public class ChatResponse { private List<Choice> choices; public static class Choice { private int index; private Message message; public int getIndex() { return index; } public void setIndex(int index) { this.index = index; } ...
} public void setMessage(Message message) { this.message = message; } } public List<Choice> getChoices() { return choices; } public void setChoices(List<Choice> choices) { this.choices = choices; } }
repos\tutorials-master\spring-boot-modules\spring-boot-libraries-2\src\main\java\com\baeldung\openai\dto\ChatResponse.java
1
请完成以下Java代码
protected AuthenticationDetailsSource<HttpServletRequest, ?> getAuthenticationDetailsSource() { return this.authenticationDetailsSource; } public void setAuthenticationDetailsSource( AuthenticationDetailsSource<HttpServletRequest, ?> authenticationDetailsSource) { Assert.notNull(authenticationDetailsSource, "...
@Override public void setMessageSource(MessageSource messageSource) { Assert.notNull(messageSource, "messageSource cannot be null"); this.messages = new MessageSourceAccessor(messageSource); } /** * Sets the {@link Consumer}, allowing customization of cookie. * @param cookieCustomizer customize for cookie ...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\rememberme\AbstractRememberMeServices.java
1
请完成以下Java代码
public class ProblemDto { protected String message; protected int line; protected int column; protected String mainElementId; protected List<String> еlementIds; // transformer ///////////////////////////// public static ProblemDto fromProblem(Problem problem) { ProblemDto dto = new ProblemDto(); ...
public void setColumn(int column) { this.column = column; } public String getMainElementId() { return mainElementId; } public void setMainElementId(String mainElementId) { this.mainElementId = mainElementId; } public List<String> getЕlementIds() { return еlementIds; } public void set...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\ProblemDto.java
1
请完成以下Java代码
public String getTenantId() { return tenantId; } @Override public void setTenantId(String tenantId) { this.tenantId = tenantId; } @Override public String getExecutionJson() { return executionJson; } @Override public void setExecutionJson(String executionJso...
@Override public String getDecisionName() { return decisionName; } public void setDecisionName(String decisionName) { this.decisionName = decisionName; } @Override public String getDecisionVersion() { return decisionVersion; } public void setDecisionVersion(Str...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\persistence\entity\HistoricDecisionExecutionEntityImpl.java
1
请完成以下Java代码
private static GroupCompensationType extractGroupCompensationType(final I_M_Product product) { return GroupCompensationType.ofAD_Ref_List_Value( StringUtils.trimBlankToOptional(product.getGroupCompensationType()) .orElse(X_C_OrderLine.GROUPCOMPENSATIONTYPE_Discount)); } private static GroupCompensationA...
pricingCtx.setSOTrx(group.getSoTrx()); pricingCtx.setDisallowDiscount(false);// just to be sure pricingCtx.setQty(BigDecimal.ONE); final IPricingResult pricingResult = pricingBL.createInitialResult(pricingCtx); pricingResult.setCalculated(true); // important, else the Discount rule does not react pricingResu...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\compensationGroup\GroupCompensationLineCreateRequestFactory.java
1
请在Spring Boot框架中完成以下Java代码
public MatchResult matcher(HttpServletRequest request) { return this.matcher.matcher(request); } } static final class AuthnRequestParameters { private final HttpServletRequest request; private final RelyingPartyRegistration registration; private final AuthnRequest authnRequest; AuthnRequestParamete...
} HttpServletRequest getRequest() { return this.request; } RelyingPartyRegistration getRelyingPartyRegistration() { return this.registration; } AuthnRequest getAuthnRequest() { return this.authnRequest; } } }
repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\web\authentication\BaseOpenSamlAuthenticationRequestResolver.java
2
请在Spring Boot框架中完成以下Java代码
public class League { @Id private int id; private String name; @OneToMany(mappedBy = "league") private List<Player> players = new ArrayList<>(); public League() { } public League(int id, String name) { this.id = id; this.name = name; } public int getId() { ...
} public void setName(String name) { this.name = name; } public List<Player> getPlayers() { return players; } public void setPlayers(List<Player> players) { this.players = players; } @Override public String toString() { return "League{" + "id=" + id + ...
repos\tutorials-master\persistence-modules\hibernate-queries\src\main\java\com\baeldung\hibernate\joinfetchcriteriaquery\model\League.java
2
请在Spring Boot框架中完成以下Java代码
public int create(List<SmsFlashPromotionProductRelation> relationList) { for (SmsFlashPromotionProductRelation relation : relationList) { relationMapper.insert(relation); } return relationList.size(); } @Override public int update(Long id, SmsFlashPromotionProductRelatio...
public SmsFlashPromotionProductRelation getItem(Long id) { return relationMapper.selectByPrimaryKey(id); } @Override public List<SmsFlashPromotionProduct> list(Long flashPromotionId, Long flashPromotionSessionId, Integer pageSize, Integer pageNum) { PageHelper.startPage(pageNum,pageSize); ...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\service\impl\SmsFlashPromotionProductRelationServiceImpl.java
2
请完成以下Java代码
public String getKey() { return underlyingEntry.getKey(); } public Object getValue() { return underlyingEntry.getValue().getValue(); } public Object setValue(Object value) { TypedValue typedValue = Variables.untypedV...
}; } public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("{\n"); for (Entry<String, TypedValue> variable : variables.entrySet()) { stringBuilder.append(" "); stringBuilder.append(variable.getKey()); stringBuilder.append(" => "); st...
repos\camunda-bpm-platform-master\commons\typed-values\src\main\java\org\camunda\bpm\engine\variable\impl\VariableMapImpl.java
1
请在Spring Boot框架中完成以下Java代码
public boolean await(long packProcessingTimeout, TimeUnit milliseconds) throws InterruptedException { return processingTimeoutLatch.await(packProcessingTimeout, milliseconds); } public void onSuccess(UUID id) { boolean empty = false; T msg = ackMap.remove(id); if (msg != null) {...
} } if (empty) { processingTimeoutLatch.countDown(); } } public ConcurrentMap<UUID, T> getAckMap() { return ackMap; } public ConcurrentMap<UUID, T> getFailedMap() { return failedMap; } }
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\queue\TbPackProcessingContext.java
2
请完成以下Java代码
public NamePair getNullValue() { return getAttributeValuesMap().getNullValue(); } @Override public boolean isHighVolume() { if (_highVolume == null) { _highVolume = attribute.isHighVolumeValuesList(); } return _highVolume; } @Immutable private static final class AttributeValuesMap { @Getter pr...
this.nullValue = nullValue; } @Override public String toString() { return MoreObjects.toStringHelper(this) .add("values", valuesList) .add("nullValue", nullValue) .toString(); } public List<NamePair> getValues() { return valuesList; } public NamePair getValueByKeyOrNull(final S...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\spi\impl\DefaultAttributeValuesProvider.java
1
请完成以下Java代码
public LocatorQRCode getLocatorQRCode(@NonNull final LocatorId locatorId) { final I_M_Locator locator = warehouseDAO.getLocatorById(locatorId); return LocatorQRCode.ofLocator(locator); } @Override @NonNull public ExplainedOptional<LocatorQRCode> getLocatorQRCodeByValue(@NonNull String locatorValue) { final...
} else { final I_M_Locator locator = locators.get(0); return ExplainedOptional.of(LocatorQRCode.ofLocator(locator)); } } @Override public List<I_M_Locator> getActiveLocatorsByValue(final @NotNull String locatorValue) { return warehouseDAO.retrieveActiveLocatorsByValue(locatorValue); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\warehouse\api\impl\WarehouseBL.java
1
请在Spring Boot框架中完成以下Java代码
private static void verifyCandidateType(final Candidate demandCandidate) { final CandidateType candidateType = demandCandidate.getType(); Preconditions.checkArgument(candidateType == CandidateType.DEMAND || candidateType == CandidateType.STOCK_UP, "Given parameter demandCandidate needs to have DEMAND or STOCK_...
@NonNull final Candidate candidate, @NonNull final BigDecimal qty) { final PPOrderRef ppOrderRef = candidate.getBusinessCaseDetail(ProductionDetail.class) .map(ProductionDetail::getPpOrderRef) .orElse(null); return SupplyRequiredDescriptor.builder() .demandCandidateId(candidate.getId().getRepoId())...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\candidatechange\handler\SupplyRequiredEventCreator.java
2
请完成以下Java代码
public void updateHUAttribute(@NonNull final HuId huId, @NonNull final AttributeCode attributeCode, @Nullable final Object attributeValue) { final I_M_Attribute attribute = attributeDAO.retrieveActiveAttributeByValueOrNull(attributeCode); if (attribute == null) { logger.debug("M_Attribute with Value={} does n...
.map(I_M_HU_Attribute::getValue) .orElse(null); } @Override @Nullable public IAttributeValue getAttributeValue(@NonNull final I_M_HU hu, @NonNull final AttributeCode attributeCode) { final IMutableHUContext huContext = handlingUnitsBL .createMutableHUContext(PlainContextAware.newWithThreadInheritedTrx()...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\impl\HUAttributesBL.java
1
请完成以下Java代码
public void setUnitsPerPack (final int UnitsPerPack) { set_Value (COLUMNNAME_UnitsPerPack, UnitsPerPack); } @Override public int getUnitsPerPack() { return get_ValueAsInt(COLUMNNAME_UnitsPerPack); } @Override public void setUnitsPerPallet (final @Nullable BigDecimal UnitsPerPallet) { set_Value (COLUMN...
public void setWarehouse_temperature (final @Nullable java.lang.String Warehouse_temperature) { set_Value (COLUMNNAME_Warehouse_temperature, Warehouse_temperature); } @Override public java.lang.String getWarehouse_temperature() { return get_ValueAsString(COLUMNNAME_Warehouse_temperature); } @Override pub...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product.java
1
请完成以下Java代码
public String getCaseActivityType() { return caseActivityType; } public String getCaseDefinitionId() { return caseDefinitionId; } public String getCaseInstanceId() { return caseInstanceId; } public String getCaseExecutionId() { return caseExecutionId; } public String getTaskId() { ...
return enabled; } public Boolean getDisabled() { return disabled; } public Boolean getActive() { return active; } public Boolean getCompleted() { return completed; } public Boolean getTerminated() { return terminated; } public static HistoricCaseActivityInstanceDto fromHistoricC...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricCaseActivityInstanceDto.java
1
请完成以下Java代码
public String getHelp () { return (String)get_Value(COLUMNNAME_Help); } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ public String get...
set_Value (COLUMNNAME_Value, Value); } /** Get Search Key. @return Search key for the record in the format required - must be unique */ public String getValue () { return (String)get_Value(COLUMNNAME_Value); } /** Set Version. @param Version Version of the table definition */ public void setVer...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_EXP_Format.java
1
请完成以下Java代码
public boolean isUsePosixGroups() { return usePosixGroups; } public void setUsePosixGroups(boolean usePosixGroups) { this.usePosixGroups = usePosixGroups; } public SearchControls getSearchControls() { SearchControls searchControls = new SearchControls(); searchControls.setSearchScope(SearchCon...
public void setAuthorizationCheckEnabled(boolean authorizationCheckEnabled) { this.authorizationCheckEnabled = authorizationCheckEnabled; } public Integer getPageSize() { return pageSize; } public void setPageSize(Integer pageSize) { this.pageSize = pageSize; } public boolean isPasswordCheckC...
repos\camunda-bpm-platform-master\engine-plugins\identity-ldap\src\main\java\org\camunda\bpm\identity\impl\ldap\LdapConfiguration.java
1
请完成以下Java代码
default Instant getClientIdIssuedAt() { return getClaimAsInstant(OAuth2ClientMetadataClaimNames.CLIENT_ID_ISSUED_AT); } /** * Returns the Client Secret {@code (client_secret)}. * @return the Client Secret */ default String getClientSecret() { return getClaimAsString(OAuth2ClientMetadataClaimNames.CLIENT_S...
return getClaimAsString(OAuth2ClientMetadataClaimNames.TOKEN_ENDPOINT_AUTH_METHOD); } /** * Returns the OAuth 2.0 {@code grant_type} values that the Client will restrict * itself to using {@code (grant_types)}. * @return the OAuth 2.0 {@code grant_type} values that the Client will restrict * itself to using ...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\OAuth2ClientMetadataClaimAccessor.java
1
请完成以下Java代码
public DocumentFilterDescriptorsProvider createFiltersProvider(@NonNull final CreateFiltersProviderContext context) { if (!isValidTable(context.getTableName())) { return NullDocumentFilterDescriptorsProvider.instance; } return ImmutableDocumentFilterDescriptorsProvider.of( DocumentFilterDescriptor.buil...
) .addParameter(DocumentFilterParamDescriptor.builder() .mandatory(true) .fieldName(BPartnerExportFilterConverter.PARAM_POSTAL_TO) .displayName(msgBL.translatable(BPartnerExportFilterConverter.PARAM_POSTAL_TO)) .widgetType(DocumentFieldWidgetType.Text) ) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\bpartner\filter\BPartnerExportFilterDescriptionProviderFactory.java
1
请完成以下Java代码
public void setPublished(LocalDate published) { this.published = published; } public Integer getQuantity() { return quantity; } public Book quantity(Integer quantity) { this.quantity = quantity; return this; } public void setQuantity(Integer quantity) { ...
} Book book = (Book) o; if (book.getId() == null || getId() == null) { return false; } return Objects.equals(getId(), book.getId()); } @Override public int hashCode() { return Objects.hashCode(getId()); } @Override public String toString() { ...
repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\domain\Book.java
1
请完成以下Java代码
public class WEBUI_Picking_TU_Label extends PickingSlotViewBasedProcess { private final HULabelService huLabelService = SpringContextHolder.instance.getBean(HULabelService.class); private final IHandlingUnitsDAO handlingUnitsDAO = Services.get(IHandlingUnitsDAO.class); @Override protected ProcessPreconditionsResol...
final PickingSlotRow rowToProcess = getSingleSelectedRow(); printPickingLabel(rowToProcess.getHuId()); return MSG_OK; } protected void printPickingLabel(@NonNull final HuId huId) { huLabelService.print(HULabelPrintRequest.builder() .sourceDocType(HULabelSourceDocType.Picking) .hu(HUToReportWrapper.o...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\process\WEBUI_Picking_TU_Label.java
1
请在Spring Boot框架中完成以下Java代码
public DeviceConfig.Builder setRequestClassnamesSupplier(final IDeviceRequestClassnamesSupplier requestClassnamesSupplier) { this.requestClassnamesSupplier = requestClassnamesSupplier; return this; } private IDeviceRequestClassnamesSupplier getRequestClassnamesSupplier() { Check.assumeNotNull(requestC...
this.beforeHooksClassname = beforeHooksClassname; return this; } @NonNull private ImmutableList<String> getBeforeHooksClassname() { return Optional.ofNullable(beforeHooksClassname).orElseGet(ImmutableList::of); } @NonNull public DeviceConfig.Builder setDeviceConfigParams(@NonNull final Immutable...
repos\metasfresh-new_dawn_uat\backend\de.metas.device.adempiere\src\main\java\de\metas\device\config\DeviceConfig.java
2
请完成以下Java代码
public String toString() { return MoreObjects.toStringHelper(this) .add("entity", entityDescriptor) .add("layout", layout) .add("eTag", eTag) .toString(); } public DocumentLayoutDescriptor getLayout() { return layout; } public ViewLayout getViewLayout(final JSONViewDataType viewDataType) { ...
private Builder() { } public DocumentDescriptor build() { return new DocumentDescriptor(this); } public Builder setLayout(final DocumentLayoutDescriptor layout) { this.layout = layout; return this; } public Builder setEntityDescriptor(final DocumentEntityDescriptor entityDescriptor) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentDescriptor.java
1
请在Spring Boot框架中完成以下Java代码
public void configure(HttpSecurity http) throws Exception { http .authorizeRequests() .antMatchers("/auth/login").permitAll() .antMatchers("/auth/logout").authenticated() .and() .apply(refreshTokenSecurityConfigurerAdapter()); } /** * A S...
* Configure the ResourceServer security by installing a new TokenExtractor. */ @Override public void configure(ResourceServerSecurityConfigurer resources) throws Exception { resources.tokenExtractor(tokenExtractor()); } /** * The new TokenExtractor can extract tokens from Cookies and ...
repos\tutorials-master\jhipster-modules\jhipster-uaa\gateway\src\main\java\com\baeldung\jhipster\gateway\config\oauth2\OAuth2AuthenticationConfiguration.java
2
请完成以下Java代码
public class CallbackServlet extends AbstractServlet { @Inject private Config config; @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String clientId = config.getValue("client.clientId", String.class); Str...
} String code = request.getParameter("code"); Client client = ClientBuilder.newClient(); WebTarget target = client.target(config.getValue("provider.tokenUri", String.class)); Form form = new Form(); form.param("grant_type", "authorization_code"); form.param("code", cod...
repos\tutorials-master\security-modules\oauth2-framework-impl\oauth2-client\src\main\java\com\baeldung\oauth2\client\CallbackServlet.java
1
请在Spring Boot框架中完成以下Java代码
public String uploadStatus() { return "uploadStatus"; } /** * @param multipartFile * @return * @throws IOException */ public String saveFile(MultipartFile multipartFile) throws IOException { String[] fileAbsolutePath={}; String fileName=multipartFile.getOriginalF...
} inputStream.close(); FastDFSFile file = new FastDFSFile(fileName, file_buff, ext); try { fileAbsolutePath = FastDFSClient.upload(file); //upload to fastdfs } catch (Exception e) { logger.error("upload file Exception!",e); } if (fileAbsolutePath=...
repos\spring-boot-leaning-master\2.x_42_courses\第 2-7 课:使用 Spring Boot 上传文件到 FastDFS\spring-boot-fastDFS\src\main\java\com\neo\controller\UploadController.java
2
请完成以下Java代码
public void error(final int WindowNo, final Throwable e) { final String AD_Message = "Error"; final String message = buildErrorMessage(e); // Log the error to console // NOTE: we need to do that because in case something went wrong we need the stacktrace to debug the actual issue // Before removing this pl...
invoke() .setParentComponentByWindowNo(windowNo) .setInvokeLater(true) .setOnFail(OnFail.ThrowException) // backward compatibility .invoke(runnable); } /** * This method does nothing. * * @deprecated please check out the deprecation notice in {@link IClientUIInstance#hideBusyDialog()}. */ @D...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\adempiere\form\AbstractClientUIInstance.java
1
请在Spring Boot框架中完成以下Java代码
public class ConnectionUtil { private final static transient Logger logger = LogManager.getLogger(ConnectionUtil.class); /** * Can set up the database and rabbitmq connection at an early state, from commandline parameters. * It's assumed that if this method does not set up the connection, it is done later (curre...
// RabbitMQ if (Check.isNotBlank(commandLineOptions.getRabbitHost())) { System.setProperty("spring.rabbitmq.host", commandLineOptions.getRabbitHost()); } if (commandLineOptions.getRabbitPort() != null) { System.setProperty("spring.rabbitmq.port", Integer.toString(commandLineOptions.getRabbitPort())); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\de\metas\util\ConnectionUtil.java
2
请完成以下Java代码
private void forEachCostSegmentAndElement( final I_M_Product product, final Consumer<CostSegmentAndElement> consumer) { final ClientId clientId = ClientId.ofRepoId(product.getAD_Client_ID()); final ProductId productId = ProductId.ofRepoId(product.getM_Product_ID()); final OrgId productOrgId = OrgId.ofRepoI...
else { logger.warn("{}'s costing Level {} not supported", product.getName(), costingLevel); } } // accounting schema loop } @Override public void updateCostRecord( @NonNull final CostSegmentAndElement costSegmentAndElement, @NonNull final Consumer<I_M_Cost> updater) { final I_M_Cost costReco...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\impl\CurrentCostsRepository.java
1
请在Spring Boot框架中完成以下Java代码
public void setClock(Clock clock) { Assert.notNull(clock, "clock must not be null"); this.delegate.setClock(clock); } /** * Use this {@link Converter} to compute the RelayState * @param relayStateResolver the {@link Converter} to use * @since 6.1 */ public void setRelayStateResolver(Converter<HttpServle...
public HttpServletRequest getRequest() { return this.request; } public RelyingPartyRegistration getRelyingPartyRegistration() { return this.registration; } public Authentication getAuthentication() { return this.authentication; } public LogoutRequest getLogoutRequest() { return this.logoutReq...
repos\spring-security-main\saml2\saml2-service-provider\src\opensaml5Main\java\org\springframework\security\saml2\provider\service\web\authentication\logout\OpenSaml5LogoutRequestResolver.java
2
请完成以下Java代码
public Resource getById(@NonNull final ResourceId id) { final Resource resource = byId.get(id); if (resource == null) { throw new AdempiereException("Resource not found by ID: " + id); } return resource; } public Stream<Resource> streamAllActive() { return allActive.stream(); } publi...
{ return ids.stream() .map(byId::get) .filter(Objects::nonNull) .collect(ImmutableList.toImmutableList()); } public ImmutableSet<ResourceId> getActivePlantIds() { return streamAllActive() .filter(resource -> resource.isActive() && resource.isPlant()) .map(Resource::getResourceId) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\resource\ResourceRepository.java
1
请在Spring Boot框架中完成以下Java代码
public class SAPGLJournalRepository { @NonNull public SAPGLJournal getById(@NonNull final SAPGLJournalId id) { final SAPGLJournalLoaderAndSaver loader = new SAPGLJournalLoaderAndSaver(); return loader.getById(id); } @NonNull public SAPGLJournal getByRecord(@NonNull final I_SAP_GLJournal record) { final SA...
final SAPGLJournalLoaderAndSaver loaderAndSaver = new SAPGLJournalLoaderAndSaver(); return loaderAndSaver.updateById(glJournalId, processor); } public DocStatus getDocStatus(final SAPGLJournalId glJournalId) { final SAPGLJournalLoaderAndSaver loader = new SAPGLJournalLoaderAndSaver(); return loader.getDocStat...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\gljournal_sap\service\SAPGLJournalRepository.java
2
请在Spring Boot框架中完成以下Java代码
public class HUConsolidationJobRepository { @NonNull private final ITrxManager trxManager = Services.get(ITrxManager.class); // FIXME prototyping private final AtomicInteger nextJobId = new AtomicInteger(1000000); private final ConcurrentHashMap<HUConsolidationJobId, HUConsolidationJob> jobs = new ConcurrentHashMa...
{ return job; } save(jobChanged); return jobChanged; }); } public void save(final HUConsolidationJob job) { jobs.put(job.getId(), job); } public List<HUConsolidationJob> getByNotProcessedAndResponsibleId(final @NonNull UserId userId) { return jobs.values() .stream() .filter(job -> Us...
repos\metasfresh-new_dawn_uat\backend\de.metas.hu_consolidation.mobile\src\main\java\de\metas\hu_consolidation\mobile\job\HUConsolidationJobRepository.java
2