instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public List<org.compiere.model.I_C_BP_BankAccount> getC_BP_BankAccounts() { final PaymentString paymentString = getPaymentString(); final String IBAN = paymentString.getIBAN(); final List<org.compiere.model.I_C_BP_BankAccount> bankAccounts = InterfaceWrapperHelper.createList( esrbpBankAccountDAO.retrieveQR...
final String bPartnerName = bpartnerDAO.getBPartnerNameById(BPartnerId.ofRepoId(bpartnerId)); bpBankAccount.setA_Name(bPartnerName); bpBankAccount.setName(bPartnerName); bpBankAccount.setQR_IBAN(paymentString.getIBAN()); bpBankAccount.setAccountNo(paymentString.getInnerAccountNo()); bpBankAccount.setESR_Rend...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java\de\metas\payment\api\impl\QRPaymentStringDataProvider.java
1
请在Spring Boot框架中完成以下Java代码
void setAuthorizationManager(AuthorizationManager<Message<?>> authorizationManager) { this.authorizationManager = authorizationManager; } @Autowired(required = false) void setMessageAuthorizationManagerPostProcessor( ObjectPostProcessor<AuthorizationManager<Message<?>>> postProcessor) { this.postProcessor = ...
+ "SockJsHttpRequestHandler or a WebSocketHttpRequestHandler but got " + object); } } } private void setHandshakeInterceptors(SockJsHttpRequestHandler handler) { SockJsService sockJsService = handler.getSockJsService(); Assert.state(sockJsService instanceof TransportHandlingSockJsService, () -> "sockJsS...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\socket\WebSocketMessageBrokerSecurityConfiguration.java
2
请完成以下Java代码
private void mapCandidateId2Stock(@NonNull final List<Candidate> candidates) { final Function<Candidate, Candidate> locateMatchingStockCandidate = (candidate) -> candidates.stream() .filter(potentialStockCandidate -> CandidateType.STOCK.equals(potentialStockCandidate.getType())) .filter(potentialStockCandida...
for (final Candidate candidate : candidates) { if (candidate.isSimulated() && candidate.getQuantity().signum() == 0) { continue; } if (CandidateType.STOCK.equals(candidate.getType())) { continue; } onlyRelevantCandidatesCollector.add(candidate); final boolean isEnoughStockToResolveD...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\simulation\ProductionSimulationRowsLoader.java
1
请在Spring Boot框架中完成以下Java代码
public String getHostnameForClients() { return this.hostnameForClients; } public void setHostnameForClients(String hostnameForClients) { this.hostnameForClients = hostnameForClients; } public long getLoadPollInterval() { return this.loadPollInterval; } public void setLoadPollInterval(long loadPollInterva...
public void setSocketBufferSize(int socketBufferSize) { this.socketBufferSize = socketBufferSize; } public int getSubscriptionCapacity() { return this.subscriptionCapacity; } public void setSubscriptionCapacity(int subscriptionCapacity) { this.subscriptionCapacity = subscriptionCapacity; } public String ...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\CacheServerProperties.java
2
请完成以下Java代码
public boolean isDmnReturnBlankTableOutputAsNull() { return dmnReturnBlankTableOutputAsNull; } public ProcessEngineConfigurationImpl setDmnReturnBlankTableOutputAsNull(boolean dmnReturnBlankTableOutputAsNull) { this.dmnReturnBlankTableOutputAsNull = dmnReturnBlankTableOutputAsNull; return this; } ...
/** * @return a exception code interceptor. The interceptor is not registered in case * {@code disableExceptionCode} is configured to {@code true}. */ protected ExceptionCodeInterceptor getExceptionCodeInterceptor() { return new ExceptionCodeInterceptor(builtinExceptionCodeProvider, customExceptionCodePr...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cfg\ProcessEngineConfigurationImpl.java
1
请完成以下Java代码
public void setC_JobRemuneration_ID (int C_JobRemuneration_ID) { if (C_JobRemuneration_ID < 1) set_ValueNoCheck (COLUMNNAME_C_JobRemuneration_ID, null); else set_ValueNoCheck (COLUMNNAME_C_JobRemuneration_ID, Integer.valueOf(C_JobRemuneration_ID)); } /** Get Position Remuneration. @return Remuneration...
/** Set Valid from. @param ValidFrom Valid from including this date (first day) */ public void setValidFrom (Timestamp ValidFrom) { set_Value (COLUMNNAME_ValidFrom, ValidFrom); } /** Get Valid from. @return Valid from including this date (first day) */ public Timestamp getValidFrom () { return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_JobRemuneration.java
1
请完成以下Java代码
public void onMessage(ConsumerRecord<K, V> consumerRecord, Acknowledgment acknowledgment, Consumer<?, ?> consumer) throws KafkaBackoffException { this.kafkaConsumerBackoffManager.backOffIfNecessary(createContext(consumerRecord, consumerRecord.timestamp() + delaysPerTopic.getOrDefault(consumerRecord....
consumer); } @Override public void onMessage(ConsumerRecord<K, V> data) { onMessage(data, null, null); } @Override public void onMessage(ConsumerRecord<K, V> data, Acknowledgment acknowledgment) { onMessage(data, acknowledgment, null); } @Override public void onMes...
repos\tutorials-master\spring-kafka-3\src\main\java\com\baeldung\spring\kafka\delay\DelayedMessageListenerAdapter.java
1
请完成以下Java代码
public class PrimeNumbers extends RecursiveAction { private int lowerBound; private int upperBound; private int granularity; static final List<Integer> GRANULARITIES = Arrays.asList(1, 10, 100, 1000, 10000); private AtomicInteger noOfPrimeNumbers; PrimeNumbers(int lowerBound, int upperBo...
void findPrimeNumbers() { for (int num = lowerBound; num <= upperBound; num++) { if (isPrime(num)) { noOfPrimeNumbers.getAndIncrement(); } } } private boolean isPrime(int number) { if (number == 2) { return true; } if ...
repos\tutorials-master\core-java-modules\core-java-concurrency-advanced-3\src\main\java\com\baeldung\workstealing\PrimeNumbers.java
1
请完成以下Java代码
public boolean isPublic () { Object oo = get_Value(COLUMNNAME_IsPublic); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Public Write. @param IsPublicWrite Public can write entries */ public void se...
/** Get Knowldge Type. @return Knowledge Type */ public int getK_Type_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_K_Type_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { s...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_K_Topic.java
1
请完成以下Java代码
public ITrxConstraints setTrxTimeoutSecs(final int secs, final boolean logOnly) { this.trxTimeoutSecs = secs; this.trxTimeoutLogOnly = logOnly; return this; } @Override public int getTrxTimeoutSecs() { return trxTimeoutSecs; } @Override public boolean isTrxTimeoutLogOnly() { return trxTimeoutLogOnl...
@Override public ITrxConstraints removeAllowedTrxNamePrefix(final String trxNamePrefix) { allowedTrxNamePrefixes.remove(trxNamePrefix); return this; } @Override public Set<String> getAllowedTrxNamePrefixes() { return allowedTrxNamePrefixesRO; } @Override public boolean isAllowTrxAfterThreadEnd() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\util\trxConstraints\api\impl\TrxConstraints.java
1
请在Spring Boot框架中完成以下Java代码
public void setProcessDefinitionId(String processDefinitionId) { this.processDefinitionId = processDefinitionId; } public String getProcessDefinitionKey() { return processDefinitionKey; } public void setProcessDefinitionKey(String processDefinitionKey) { this.processDefinitionK...
} public void setTenantId(String tenantId) { this.tenantId = tenantId; } public String getTenantIdLike() { return tenantIdLike; } public void setTenantIdLike(String tenantIdLike) { this.tenantIdLike = tenantIdLike; } public Boolean getWithoutTenantId() { r...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\process\ExecutionQueryRequest.java
2
请在Spring Boot框架中完成以下Java代码
public JSONObject httpRequestMethodHandler() { return CommonUtil.errorJson(ErrorEnum.E_500); } /** * 本系统自定义错误的拦截器 * 拦截到此错误之后,就返回这个类里面的json给前端 * 常见使用场景是参数校验失败,抛出此错,返回错误信息给前端 */ @ExceptionHandler(CommonJsonException.class) public JSONObject commonJsonExceptionHandler(CommonJso...
* 权限不足报错拦截 */ @ExceptionHandler(UnauthorizedException.class) public JSONObject unauthorizedExceptionHandler() { return CommonUtil.errorJson(ErrorEnum.E_502); } /** * 未登录报错拦截 * 在请求需要权限的接口,而连登录都还没登录的时候,会报此错 */ @ExceptionHandler(UnauthenticatedException.class) public JS...
repos\SpringBoot-Shiro-Vue-master\back\src\main\java\com\heeexy\example\config\exception\GlobalExceptionHandler.java
2
请完成以下Java代码
public void setC_OrderLine(final org.compiere.model.I_C_OrderLine C_OrderLine) { set_ValueFromPO(COLUMNNAME_C_OrderLine_ID, org.compiere.model.I_C_OrderLine.class, C_OrderLine); } @Override public void setC_OrderLine_ID (final int C_OrderLine_ID) { if (C_OrderLine_ID < 1) set_ValueNoCheck (COLUMNNAME_C_Or...
public static final String DOCSTATUS_Closed = "CL"; /** Unknown = ?? */ public static final String DOCSTATUS_Unknown = "??"; /** InProgress = IP */ public static final String DOCSTATUS_InProgress = "IP"; /** WaitingPayment = WP */ public static final String DOCSTATUS_WaitingPayment = "WP"; /** WaitingConfirmatio...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java-gen\de\metas\ordercandidate\model\X_C_Order_Line_Alloc.java
1
请完成以下Java代码
public String translate(@NonNull final String adLanguage) { return trlsCache.computeIfAbsent(adLanguage, this::buildTranslation); } private String buildTranslation(final String adLanguage) { return toTranslatableString().translate(adLanguage); } private String getFieldValue(@NonNull final String field, @Non...
final Function<WorkflowLauncherCaption, Comparable<?>> keyExtractor = caption -> caption.getFieldComparingKey(field, adLanguage); //noinspection unchecked Comparator<Comparable<?>> keyComparator = (Comparator<Comparable<?>>)Comparator.naturalOrder(); if (!orderBy.isAscending()) { keyComparator = keyComparat...
repos\metasfresh-new_dawn_uat\backend\de.metas.workflow.rest-api\src\main\java\de\metas\workflow\rest_api\model\WorkflowLauncherCaption.java
1
请完成以下Java代码
private void enqueueModels(final FTSConfig ftsConfig) { final FTSConfigSourceTablesMap sourceTables = FTSConfigSourceTablesMap.ofList(ftsConfigService.getSourceTables().getByConfigId(ftsConfig.getId())); for (final TableName sourceTableName : sourceTables.getTableNames()) { enqueueModels(sourceTableName, sour...
.flatMap(model -> extractRequests(model, sourceTablesMap).stream()); GuavaCollectors.batchAndStream(requestsStream, 500) .forEach(requests -> { modelsToIndexQueueService.enqueueNow(requests); addLog("Enqueued {} records from {} table", requests.size(), sourceTableName); }); } private List<ModelT...
repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java\de\metas\fulltextsearch\indexer\process\ES_FTS_Config_Sync.java
1
请完成以下Java代码
public static void setDeliveredData(@NonNull final I_C_Invoice_Candidate ic) { // note: we can assume that #setQtyOrdered() was already called ic.setQtyDelivered(ic.getQtyOrdered()); // when changing this, make sure to threat ProductType.Service specially ic.setQtyDeliveredInUOM(ic.getQtyEntered()); ic.setDel...
public static UomId retrieveUomId(@NonNull final I_C_Invoice_Candidate icRecord) { final I_C_Flatrate_Term term = retrieveTerm(icRecord); if (term.getC_UOM_ID() > 0) { return UomId.ofRepoId(term.getC_UOM_ID()); } if (term.getM_Product_ID() > 0) { final IProductBL productBL = Services.get(IProductBL.c...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\invoicecandidate\HandlerTools.java
1
请完成以下Java代码
public void setQty (final @Nullable BigDecimal Qty) { set_ValueNoCheck (COLUMNNAME_Qty, Qty); } @Override public BigDecimal getQty() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQualityInspectionCycle (final @Nullabl...
public java.lang.String getQualityInspectionCycle() { return get_ValueAsString(COLUMNNAME_QualityInspectionCycle); } @Override public void setRV_M_Material_Tracking_HU_Details_ID (final int RV_M_Material_Tracking_HU_Details_ID) { if (RV_M_Material_Tracking_HU_Details_ID < 1) set_ValueNoCheck (COLUMNNAME_...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_RV_M_Material_Tracking_HU_Details.java
1
请完成以下Java代码
public boolean createPeriods() { int sumDays = 0; int C_Calendar_ID = DB.getSQLValueEx(get_TrxName(), "SELECT C_Calendar_ID FROM C_Year WHERE C_Year_ID = ?", getC_Year_ID()); if (C_Calendar_ID <= 0) return false; Timestamp StartDate = null; Timestamp EndDate = null ; MHRPayroll payroll = new M...
+ " WHERE " + " ? BETWEEN p.startdate AND p.endDate" + " AND y.C_Calendar_ID=?", EndDate, C_Calendar_ID); if(C_Period_ID <= 0) return false; MPeriod m_period = MPeriod.get(getCtx(), C_Period_ID); MHRPeriod HR_Period = new MHRPeriod(getCtx(), 0, get_TrxName()); HR_Period.setAD_Org_ID(getA...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.libero.liberoHR\src\main\java\org\eevolution\model\MHRYear.java
1
请完成以下Java代码
private static void performVersionChecks() { performVersionChecks(MIN_SPRING_VERSION); } /** * Perform version checks with specific min Spring Version * @param minSpringVersion */ private static void performVersionChecks(@Nullable String minSpringVersion) { if (minSpringVersion == null) { return; } ...
return Boolean.getBoolean(DISABLE_CHECKS); } /** * Loads the spring version or null if it cannot be found. * @return */ private static @Nullable String getSpringVersion() { Properties properties = new Properties(); try (InputStream is = SpringSecurityCoreVersion.class.getClassLoader() .getResourceAsStr...
repos\spring-security-main\core\src\main\java\org\springframework\security\core\SpringSecurityCoreVersion.java
1
请完成以下Java代码
public int getUser2_ID() { return get_ValueAsInt(COLUMNNAME_User2_ID); } @Override public void setVolume (final @Nullable BigDecimal Volume) { set_Value (COLUMNNAME_Volume, Volume); } @Override public BigDecimal getVolume() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Volume); return bd...
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Weight); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setExternalSystem_ID (final int ExternalSystem_ID) { if (ExternalSystem_ID < 1) set_Value (COLUMNNAME_ExternalSystem_ID, null); else set_Value (COLUMNNAME_ExternalSystem_ID,...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_InOut.java
1
请完成以下Java代码
public Response putAmount(@PathParam("id") String id, @PathParam("amount") Double amount) { Optional<Wallet> wallet = wallets.findById(id); wallet.orElseThrow(IllegalArgumentException::new); if (amount < Wallet.MIN_CHARGE) { throw new InvalidTradeException(Wallet.MIN_CHARGE_MSG); ...
if (!wallet.hasFunds(price)) { RestErrorResponse response = new RestErrorResponse(); response.setSubject(wallet); response.setMessage("insufficient balance"); throw new WebApplicationException(Response.status(Response.Status.NOT_ACCEPTABLE) .entity(respons...
repos\tutorials-master\web-modules\jersey\src\main\java\com\baeldung\jersey\exceptionhandling\rest\WalletsResource.java
1
请完成以下Java代码
public class WeightTareAdjustAttributeValueCallout extends AbstractWeightAttributeValueCallout { /** * Fires WeightGross recalculation based on existing WeightNet & the new WeightTare value */ @Override public void onValueChanged0(final IAttributeValueContext attributeValueContext_IGNORED, final IAttributeSet...
} @Override public BigDecimal generateNumericValue(final Properties ctx, final IAttributeSet attributeSet, final I_M_Attribute attribute) { return BigDecimal.ZERO; } @Override protected boolean isExecuteCallout(final IAttributeValueContext attributeValueContext, final IAttributeSet attributeSet, final I...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\org\adempiere\mm\attributes\spi\impl\WeightTareAdjustAttributeValueCallout.java
1
请完成以下Java代码
public List<Criterion> getEntryCriteria() { return entryCriteria; } public List<Criterion> getExitCriteria() { return exitCriteria; } public List<Sentry> getSentries() { return sentries; } public List<SentryOnPart> getSentryOnParts() { return sentryOnParts; ...
public List<PlanItemDefinition> getPlanItemDefinitions() { return planItemDefinitions; } public List<CmmnDiShape> getDiShapes() { return diShapes; } public List<CmmnDiEdge> getDiEdges() { return diEdges; } public GraphicInfo getCurrentLabelGraphicInfo() { retur...
repos\flowable-engine-main\modules\flowable-cmmn-converter\src\main\java\org\flowable\cmmn\converter\ConversionHelper.java
1
请完成以下Java代码
public BigDecimal toBigDecimal() { return money.toBigDecimal(); } public CurrencyId getCurrencyId() { return money.getCurrencyId(); } public ProductPrice withValueAndUomId(@NonNull final BigDecimal moneyAmount, @NonNull final UomId uomId) { return toBuilder() .money(Money.of(moneyAmount, getCurrencyI...
public boolean isEqualByComparingTo(@Nullable final ProductPrice other) { if (other == null) { return false; } return other.uomId.equals(uomId) && other.money.isEqualByComparingTo(money); } public <T> T transform(@NonNull final Function<ProductPrice, T> mapper) { return mapper.apply(this); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\ProductPrice.java
1
请完成以下Java代码
public class ToolBox { @Tool(description = "Get the current time in a specific timezone.") public String getTimeInTimezone( @ToolArg(description = "Timezone ID (e.g., America/Los_Angeles)") String timezoneId) { try { ZoneId zoneId = ZoneId.of(timezoneId); ZonedDateTi...
systemInfo.append("Available processors (cores): ").append(availableProcessors).append("\n"); // Get free memory long freeMemory = Runtime.getRuntime().freeMemory(); systemInfo.append("Free memory (bytes): ").append(freeMemory).append("\n"); // Get total memory long totalMemory...
repos\tutorials-master\quarkus-modules\quarkus-mcp-langchain\quarkus-mcp-server\src\main\java\com\baeldung\quarkus\mcp\ToolBox.java
1
请完成以下Java代码
public abstract class DocumentSalesRepDescriptor { @Getter @Setter private Beneficiary salesRep; @Getter @Setter private String salesPartnerCode; @Getter @Setter private boolean salesRepRequired; @Getter private SOTrx soTrx; @Getter private Customer customer; @Getter private OrgId orgId; @Getter ...
@Nullable final Beneficiary salesRep, @Nullable final String salesPartnerCode, final boolean salesRepRequired) { this.orgId = orgId; this.soTrx = soTrx; this.customer = customer; this.salesRep = salesRep; this.salesPartnerCode = salesPartnerCode; this.salesRepRequired = salesRepRequired; } public ...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\salesrep\DocumentSalesRepDescriptor.java
1
请完成以下Java代码
public IModelMethodInfo createModelMethodInfo(final Method method) { String methodName = method.getName(); final Class<?>[] parameters = method.getParameterTypes(); final int parametersCount = parameters == null ? 0 : parameters.length; if (methodName.startsWith("set") && parametersCount == 1) { final St...
else { final InvokeParentMethodInfo methodInfo = new InvokeParentMethodInfo(method); return methodInfo; } } private static final String getTableNameOrNull(final Class<?> clazz) { try { final Field field = clazz.getField("Table_Name"); if (!field.isAccessible()) { field.setAccessible(true)...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\persistence\ModelClassIntrospector.java
1
请完成以下Java代码
public class EnvironmentVariableELResolver extends ELResolver { private static final String VAR_PREFIX = "vars"; public static final String VAR_PREFIX_WITH_DOT = VAR_PREFIX + "."; @Override public Object getValue(ELContext context, Object base, Object property) { if (base == null && VAR_PREFIX...
@Override public void setValue(ELContext elContext, Object o, Object o1, Object o2) { throw new UnsupportedOperationException("Environment variables are read-only"); } @Override public boolean isReadOnly(ELContext elContext, Object o, Object o1) { return true; } @Override p...
repos\Activiti-develop\activiti-core\activiti-spring-boot-starter\src\main\java\org\activiti\spring\resolver\EnvironmentVariableELResolver.java
1
请完成以下Java代码
public ModelQuery orderByModelName() { return orderBy(ModelQueryProperty.MODEL_NAME); } @Override public ModelQuery orderByCreateTime() { return orderBy(ModelQueryProperty.MODEL_CREATE_TIME); } @Override public ModelQuery orderByLastUpdateTime() { return orderBy(ModelQu...
public String getKey() { return key; } public boolean isLatest() { return latest; } public String getDeploymentId() { return deploymentId; } public boolean isNotDeployed() { return notDeployed; } public boolean isDeployed() { return deployed; ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\ModelQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public List<HistoryJobEntity> findExpiredJobs(List<String> enabledCategories, Page page) { Map<String, Object> params = new HashMap<>(); params.put("jobExecutionScope", jobServiceConfiguration.getHistoryJobExecutionScope()); Date now = jobServiceConfiguration.getClock().getCurrentTime(); ...
public void bulkUpdateJobLockWithoutRevisionCheck(List<HistoryJobEntity> historyJobs, String lockOwner, Date lockExpirationTime) { Map<String, Object> params = new HashMap<>(3); params.put("lockOwner", lockOwner); params.put("lockExpirationTime", lockExpirationTime); bulkUpdateEntities(...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\persistence\entity\data\impl\MybatisHistoryJobDataManager.java
2
请完成以下Java代码
private int fromBytes(String headerName) { byte[] header = getHeader(headerName, byte[].class); return header == null ? 1 : ByteBuffer.wrap(header).getInt(); } /** * Get a header value with a specific type. * @param <T> the type. * @param key the header name. * @param type the type's {@link Class}. * @...
} @Override protected MessageHeaderAccessor createAccessor(Message<?> message) { return wrap(message); } /** * Create an instance from the payload and headers of the given Message. * @param message the message. * @return the accessor. */ public static KafkaMessageHeaderAccessor wrap(Message<?> message)...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\KafkaMessageHeaderAccessor.java
1
请在Spring Boot框架中完成以下Java代码
public DataResponse<ActivityInstanceResponse> getActivityInstances(@ApiParam(hidden = true) @RequestParam Map<String, String> allRequestParams) { ActivityInstanceQueryRequest query = new ActivityInstanceQueryRequest(); // Populate query based on request if (allRequestParams.get("activityId") !=...
query.setProcessInstanceId(allRequestParams.get("processInstanceId")); } if (allRequestParams.get("processInstanceIds") != null) { query.setProcessInstanceIds(RequestUtil.parseToSet(allRequestParams.get("processInstanceIds"))); } if (allRequestParams.get("processDefinitionI...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\process\ActivityInstanceCollectionResource.java
2
请在Spring Boot框架中完成以下Java代码
public class AccountController { private final EventProducer eventProducer; public AccountController(EventProducer eventProducer) { this.eventProducer = eventProducer; } @PostMapping() public ResponseEntity<AccountId> createAccount(@RequestBody CreateAccountRequest request) { Stri...
@DeleteMapping("/{account-id}") public ResponseEntity<Void> deleteAccount(@PathVariable("account-id") String accountId) { DeleteAccountAsyncEvent deleteAccountAsyncEvent = new DeleteAccountAsyncEvent(UUID.randomUUID().toString(), accountId); eventProducer.sendAccountMessage(deleteAccountAsyncEvent);...
repos\spring-examples-java-17\spring-kafka\kafka-producer\src\main\java\itx\examples\spring\kafka\producer\controller\AccountController.java
2
请完成以下Java代码
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PingResponseDto securedPingResponse = (PingResponseDto) o; return Objects.equals(this.pong, securedPingResponse.pong); ...
sb.append("class PingResponseDto {\n"); sb.append(" pong: ") .append(toIndentedString(pong)) .append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line)...
repos\tutorials-master\spring-boot-modules\spring-boot-springdoc-2\src\main\java\com\baeldung\defaultglobalsecurityscheme\dto\PingResponseDto.java
1
请在Spring Boot框架中完成以下Java代码
public List<QueryVariable> getTaskVariables() { return taskVariables; } public void setTaskVariables(List<QueryVariable> taskVariables) { this.taskVariables = taskVariables; } public void setWithoutDueDate(Boolean withoutDueDate) { this.withoutDueDate = withoutDueDate; } ...
public List<String> getCategoryNotIn() { return categoryNotIn; } public void setCategoryNotIn(List<String> categoryNotIn) { this.categoryNotIn = categoryNotIn; } public Boolean getWithoutCategory() { return withoutCategory; } public void setWithoutCategory(Boolean with...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\task\TaskQueryRequest.java
2
请在Spring Boot框架中完成以下Java代码
public CommonResult delete(@PathVariable Long id) { int count = flashPromotionSessionService.delete(id); if (count > 0) { return CommonResult.success(count); } return CommonResult.failed(); } @ApiOperation("获取场次详情") @RequestMapping(value = "/{id}", method = Reque...
@RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult<List<SmsFlashPromotionSession>> list() { List<SmsFlashPromotionSession> promotionSessionList = flashPromotionSessionService.list(); return CommonResult.success(promotionSessionList); } @ApiOpe...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\controller\SmsFlashPromotionSessionController.java
2
请完成以下Java代码
public Boolean getLanguage() { return this.language; } public void setLanguage(Boolean language) { this.language = language; } public Boolean getConfigurationFileFormat() { return this.configurationFileFormat; } public void setConfigurationFileFormat(Boolean configurationFileFormat) { this.co...
.add("packaging=" + this.packaging) .add("type=" + this.type) .add("dependencies=" + this.dependencies) .add("message='" + this.message + "'") .toString(); } } /** * Invalid dependencies information. */ public static class InvalidDependencyInformation { private boolean invalid = true; p...
repos\initializr-main\initializr-actuator\src\main\java\io\spring\initializr\actuate\stat\ProjectRequestDocument.java
1
请在Spring Boot框架中完成以下Java代码
public class DataLoader implements ApplicationRunner { private static final Logger logger = LoggerFactory.getLogger(DataLoader.class); private static final String[] KEYS = { "name", "abv", "ibu", "description" }; @Value("classpath:/data/beers.json.gz") private Resource data; private final RedisVectorStore vect...
return; } Resource file = data; if (data.getFilename().endsWith(".gz")) { GZIPInputStream inputStream = new GZIPInputStream(data.getInputStream()); file = new InputStreamResource(inputStream, "beers.json.gz"); } logger.info("Creating Embeddings..."); // tag::loader[] // Create a JSON reader with fie...
repos\springboot-demo-master\RedisVectorStore\src\main\java\com\et\config\DataLoader.java
2
请完成以下Java代码
public static FlowableCaseStageEndedEvent createStageEndedEvent(CaseInstance caseInstance, PlanItemInstance stageInstance, String endingState) { return new FlowableCaseStageEndedEventImpl(caseInstance, stageInstance, endingState); } public static FlowableEntityEvent createCaseBusinessStatusUpdatedEvent...
FlowableEntityEventImpl event = new FlowableEntityEventImpl(task, FlowableEngineEventType.TASK_ASSIGNED); event.setScopeId(task.getScopeId()); event.setScopeDefinitionId(task.getScopeDefinitionId()); event.setScopeType(task.getScopeType()); event.setSubScopeId(task.getId()); re...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\event\FlowableCmmnEventBuilder.java
1
请完成以下Java代码
public class Operation extends BaseElement { protected String name; protected String implementationRef; protected String inMessageRef; protected String outMessageRef; protected List<String> errorMessageRef = new ArrayList<String>(); public String getName() { return name; } pub...
public List<String> getErrorMessageRef() { return errorMessageRef; } public void setErrorMessageRef(List<String> errorMessageRef) { this.errorMessageRef = errorMessageRef; } public Operation clone() { Operation clone = new Operation(); clone.setValues(this); ret...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\Operation.java
1
请完成以下Java代码
public boolean isWithIncident() { return withIncident; } public String getIncidentId() { return incidentId; } public String getIncidentType() { return incidentType; } public String getIncidentMessage() { return incidentMessage; } public String getIncidentMessageLike() { return in...
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代码
public static JsonQRCode toJsonQRCode(final PickingSlotIdAndCaption pickingSlotIdAndCaption) { return JsonPickingJobLine.toJsonQRCode(pickingSlotIdAndCaption); } @Override public WFActivityStatus computeActivityState(final WFProcess wfProcess, final WFActivity wfActivity) { final PickingJob pickingJob = getPi...
{ return JsonScannedBarcodeSuggestions.EMPTY; } return pickingSlotSuggestions.stream() .map(SetPickingSlotWFActivityHandler::toJson) .collect(JsonScannedBarcodeSuggestions.collect()); } private static JsonScannedBarcodeSuggestion toJson(final PickingSlotSuggestion pickingSlotSuggestion) { return J...
repos\metasfresh-new_dawn_uat\backend\de.metas.picking.rest-api\src\main\java\de\metas\picking\workflow\handlers\activity_handlers\SetPickingSlotWFActivityHandler.java
1
请完成以下Java代码
public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", brandId=").append(brandId); sb.append(", productCategory...
sb.append(", lowStock=").append(lowStock); sb.append(", unit=").append(unit); sb.append(", weight=").append(weight); sb.append(", previewStatus=").append(previewStatus); sb.append(", serviceIds=").append(serviceIds); sb.append(", keywords=").append(keywords); sb.append(",...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsProduct.java
1
请完成以下Java代码
public Builder addTotalNetAmt(BigDecimal amtToAdd, final boolean approved) { if (approved) { this.totalNetAmtApproved = totalNetAmtApproved.add(amtToAdd); } else { this.totalNetAmtNotApproved = totalNetAmtNotApproved.add(amtToAdd); } return this; } public Builder addCurrencySymbol(fi...
public void addInvoiceCandidate(@NonNull final I_C_Invoice_Candidate ic) { final BigDecimal netAmt = ic.getNetAmtToInvoice(); final boolean isApprovedForInvoicing = ic.isApprovalForInvoicing(); addTotalNetAmt(netAmt, isApprovedForInvoicing); final String currencySymbol = getCurrencySymbolOrNull(ic); a...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\ui\spi\impl\InvoiceCandidatesSelectionSummaryInfo.java
1
请完成以下Java代码
public AlbertaPatient toAlbertaPatient(@NonNull final I_C_BPartner_AlbertaPatient record) { final BPartnerAlbertaPatientId bPartnerAlbertaPatientId = BPartnerAlbertaPatientId.ofRepoId(record.getC_BPartner_AlbertaPatient_ID()); final BPartnerId bPartnerId = BPartnerId.ofRepoId(record.getC_BPartner_ID()); final BP...
.deactivationDate(TimeUtil.asLocalDate(record.getDeactivationDate(), SystemTime.zoneId())) .deactivationComment(record.getDeactivationComment()) .classification(record.getClassification()) .careDegree(record.getCareDegree()) .createdAt(TimeUtil.asInstant(record.getCreatedAt())) .createdById(createdB...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java\de\metas\vertical\healthcare\alberta\bpartner\patient\AlbertaPatientRepository.java
1
请完成以下Java代码
public void addTimeoutTaskListener(String timeoutId, TaskListener taskListener) { timeoutTaskListeners.put(timeoutId, taskListener); } public FormDefinition getFormDefinition() { return formDefinition; } public void setFormDefinition(FormDefinition formDefinition) { this.formDefinition = formDefin...
} public String getCamundaFormDefinitionBinding() { return formDefinition.getCamundaFormDefinitionBinding(); } public Expression getCamundaFormDefinitionVersion() { return formDefinition.getCamundaFormDefinitionVersion(); } // helper methods /////////////////////////////////////////////////////////...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\task\TaskDefinition.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable String getSortParamName() { return this.sortParamName; } public void setSortParamName(@Nullable String sortParamName) { this.sortParamName = sortParamName; } public RepositoryDetectionStrategies getDetectionStrategy() { return this.detectionStrategy; } public void setDetectionStrategy(Re...
} public void setReturnBodyOnUpdate(@Nullable Boolean returnBodyOnUpdate) { this.returnBodyOnUpdate = returnBodyOnUpdate; } public @Nullable Boolean getEnableEnumTranslation() { return this.enableEnumTranslation; } public void setEnableEnumTranslation(@Nullable Boolean enableEnumTranslation) { this.enable...
repos\spring-boot-4.0.1\module\spring-boot-data-rest\src\main\java\org\springframework\boot\data\rest\autoconfigure\DataRestProperties.java
2
请完成以下Java代码
protected Polyline createLine(double dx, double dy, Polyline next) { return new Polyline(dx, dy, next); } /** * */ protected static class TreeNode { /** * */ protected Object cell; /** * */ protected double x, y, width,...
*/ protected Polyline lowerHead, lowerTail, upperHead, upperTail; } /** * */ protected static class Polyline { /** * */ protected double dx, dy; /** * */ protected Polyline next; /** * */ ...
repos\Activiti-develop\activiti-core\activiti-bpmn-layout\src\main\java\org\activiti\bpmn\BPMNLayout.java
1
请完成以下Java代码
public Money calculateTotalNetAmtFromLines() { final List<IInvoiceCandAggregate> lines = getLines(); Check.assume(lines != null && !lines.isEmpty(), "Invoice {} was not aggregated yet", this); Money totalNetAmt = Money.zero(currencyId); for (final IInvoiceCandAggregate lineAgg : lines) { for (final IInvo...
} public void setC_Async_Batch_ID(final int C_Async_Batch_ID) { this.C_Async_Batch_ID = C_Async_Batch_ID; } public String setExternalId(String externalId) { return this.externalId = externalId; } @Override public int getC_Incoterms_ID() { return C_Incoterms_ID; } public void setC_Incoterms_ID(final...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceHeaderImpl.java
1
请在Spring Boot框架中完成以下Java代码
public List<User> retrieveAllUsers() { return service.findAll(); } //http://localhost:8080/users //EntityModel //WebMvcLinkBuilder @GetMapping("/users/{id}") public EntityModel<User> retrieveUser(@PathVariable int id) { User user = service.findOne(id); if(user==null) throw new UserNotFoundExcep...
@PostMapping("/users") public ResponseEntity<User> createUser(@Valid @RequestBody User user) { User savedUser = service.save(user); URI location = ServletUriComponentsBuilder.fromCurrentRequest() .path("/{id}") .buildAndExpand(savedUser.getId()) .toUri(); return ResponseEntity.created...
repos\master-spring-and-spring-boot-main\12-rest-api\src\main\java\com\in28minutes\rest\webservices\restfulwebservices\user\UserResource.java
2
请完成以下Java代码
public class SystemOutboundEventProcessor<T> implements OutboundEventProcessor { protected OutboundEventChannelAdapter<T> outboundEventChannelAdapter; protected OutboundEventProcessingPipeline<T> outboundEventProcessingPipeline; public SystemOutboundEventProcessor(OutboundEventChannelAdapter<T> outboundEv...
return outboundEventChannelAdapter; } public void setOutboundEventChannelAdapter(OutboundEventChannelAdapter<T> outboundEventChannelAdapter) { this.outboundEventChannelAdapter = outboundEventChannelAdapter; } public OutboundEventProcessingPipeline<T> getOutboundEventProcessingPipeline() { ...
repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\SystemOutboundEventProcessor.java
1
请完成以下Java代码
public boolean productMatches(@NonNull final ProductAndCategoryAndManufacturerId product) { return productMatches(product.getProductId()) && productCategoryMatches(product.getProductCategoryId()) && productManufacturerMatches(product.getProductManufacturerId()); } private boolean productMatches(final Prod...
if (this.productManufacturerId == null) { return true; } if (productManufacturerId == null) { return false; } return Objects.equals(this.productManufacturerId, productManufacturerId); } public boolean attributeMatches(@NonNull final ImmutableAttributeSet attributes) { final AttributeValueId br...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\conditions\PricingConditionsBreakMatchCriteria.java
1
请在Spring Boot框架中完成以下Java代码
private void recalculatePartitions(List<ServiceInfo> otherServices, ServiceInfo currentService) { log.info("Recalculating partitions for SNMP transports"); List<ServiceInfo> snmpTransports = Stream.concat(otherServices.stream(), Stream.of(currentService)) .filter(service -> service.getTr...
break; } } snmpTransportsCount = snmpTransports.size(); } if (snmpTransportsCount != previousSnmpTransportsCount || currentTransportPartitionIndex != previousCurrentTransportPartitionIndex) { log.info("SNMP transports partitions have changed: transpor...
repos\thingsboard-master\common\transport\snmp\src\main\java\org\thingsboard\server\transport\snmp\service\SnmpTransportBalancingService.java
2
请完成以下Java代码
public class RabbitOperationsOutboundEventChannelAdapter implements OutboundEventChannelAdapter<String> { protected RabbitOperations rabbitOperations; protected String exchange; protected String routingKey; public RabbitOperationsOutboundEventChannelAdapter(RabbitOperations rabbitOperations, String ex...
} } public RabbitOperations getRabbitOperations() { return rabbitOperations; } public void setRabbitOperations(RabbitOperations rabbitOperations) { this.rabbitOperations = rabbitOperations; } public String getExchange() { return exchange; } public void setExch...
repos\flowable-engine-main\modules\flowable-event-registry-spring\src\main\java\org\flowable\eventregistry\spring\rabbit\RabbitOperationsOutboundEventChannelAdapter.java
1
请在Spring Boot框架中完成以下Java代码
public IntegrationFlow fileMover() { return IntegrationFlow.from(sourceDirectory(), configurer -> configurer.poller(Pollers.fixedDelay(10000))) .filter(onlyJpgs()) .handle(targetDirectory()) .get(); } // @Bean public IntegrationFlow fileMoverWithLambda() { ...
} // @Bean public IntegrationFlow fileReader() { return IntegrationFlow.from(sourceDirectory(), configurer -> configurer.poller(Pollers.fixedDelay(10))) .filter(onlyJpgs()) .channel("holdingTank") .get(); } // @Bean public IntegrationFlow fileWriter(...
repos\tutorials-master\spring-integration\src\main\java\com\baeldung\dsl\JavaDSLFileCopyConfig.java
2
请完成以下Java代码
public class BigIntegerExample { private static final Logger log = LoggerFactory.getLogger(BigIntegerExample.class); public static void main(String[] args) { BigInteger a = new BigInteger("1101001011010101010101010101010101010101010101010101010101010101010", 2); BigInteger b = new BigInteger("...
} public static BigInteger add(BigInteger a, BigInteger b) { return a.add(b); } public static BigInteger subtract(BigInteger a, BigInteger b) { return a.subtract(b); } public static BigInteger multiply(BigInteger a, BigInteger b) { return a.multiply(b); } public s...
repos\tutorials-master\core-java-modules\core-java-numbers-8\src\main\java\com\baeldung\arbitrarylengthbinaryintegers\BigIntegerExample.java
1
请在Spring Boot框架中完成以下Java代码
public class LockExclusiveJobCmd implements Command<Object>, Serializable { private static final long serialVersionUID = 1L; private static final Logger LOGGER = LoggerFactory.getLogger(LockExclusiveJobCmd.class); protected JobServiceConfiguration jobServiceConfiguration; protected Job job; ...
if (LOGGER.isDebugEnabled()) { LOGGER.debug("Executing lock exclusive job {} {}", job.getId(), job.getExecutionId()); } if (job.isExclusive()) { if (job.getExecutionId() != null || job.getScopeId() != null) { InternalJobManager internalJobManager = jobServiceConf...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\cmd\LockExclusiveJobCmd.java
2
请在Spring Boot框架中完成以下Java代码
public class RequestRestController { private static final Logger logger = LogManager.getLogger(RequestRestController.class); @NonNull private final RequestRestService requestRestService; @ApiResponses(value = { @ApiResponse(code = 201, message = "Successfully created or updated request"), @ApiResponse(code =...
try { final RequestId requestId = RequestId.ofRepoId(Integer.parseInt(requestIdStr)); final JsonRRequest response = requestRestService.getByIdOrNull(requestId); return response == null ? ResponseEntity.notFound().build() : ResponseEntity.ok(response); } catch (final NumberFormatException ex) { logg...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\request\RequestRestController.java
2
请完成以下Java代码
public void setItemToSelect(final E itemToSelect) { this.itemToSelect = itemToSelect; this.doSelectItem = true; } public boolean isDoSelectItem() { return doSelectItem; } public E getItemToSelect() { return itemToSelect; } public void setTextToSet(String textToSet) { this.textToSet...
} public String getTextToSet() { return textToSet; } public void setHighlightTextStartPosition(int highlightTextStartPosition) { this.highlightTextStartPosition = highlightTextStartPosition; this.doHighlightText = true; } public boolean isDoHighlightText() { return doHighlightText; } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\ComboBoxAutoCompletion.java
1
请完成以下Java代码
public class BatchListenerFailedException extends KafkaException { private static final long serialVersionUID = 1L; private final int index; private transient @Nullable ConsumerRecord<?, ?> record; /** * Construct an instance with the provided properties. * @param message the message. * @param index the i...
/** * Return the failed record. * @return the record. */ @Nullable public ConsumerRecord<?, ?> getRecord() { return this.record; } /** * Return the index in the batch of the failed record. * @return the index. */ public int getIndex() { return this.index; } @Override public String getMessage(...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\BatchListenerFailedException.java
1
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Set<Post> getPosts() { return posts; } public void s...
public int getAge() { return age; } public void setAge(int age) { this.age = age; } @Override public String toString() { return "Person{" + "id=" + id + ", name='" + name + '\'' + ", age=" + age + '}'; } }
repos\tutorials-master\persistence-modules\blaze-persistence\src\main\java\com\baeldung\model\Person.java
1
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getUrl() { return url; } public void se...
public Date getSubmissionDate() { return submissionDate; } public void setSubmissionDate(Date submissionDate) { this.submissionDate = submissionDate; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = u...
repos\tutorials-master\spring-web-modules\spring-boot-rest\src\main\java\com\baeldung\springpagination\model\Post.java
1
请完成以下Java代码
public class EndpointHandlerMultiMethod extends EndpointHandlerMethod { @Nullable private Method defaultMethod; private List<Method> methods; /** * Construct an instance for the provided bean, defaultMethod and methods. * @param bean the bean. * @param defaultMethod the defaultMethod. * @param methods th...
/** * Return the default method. * @return the default method. */ public @Nullable Method getDefaultMethod() { return this.defaultMethod; } /** * Set the default method. * @param defaultMethod the default method. */ public void setDefaultMethod(Method defaultMethod) { this.defaultMethod = defaultMe...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\EndpointHandlerMultiMethod.java
1
请完成以下Java代码
public String getUserElementString5() { return get_ValueAsString(COLUMNNAME_UserElementString5); } @Override public void setUserElementString6 (final @Nullable String UserElementString6) { set_Value (COLUMNNAME_UserElementString6, UserElementString6); } @Override public String getUserElementString6() {...
@Override public String getUserElementString7() { return get_ValueAsString(COLUMNNAME_UserElementString7); } @Override public void setVendor_ID (final int Vendor_ID) { if (Vendor_ID < 1) set_Value (COLUMNNAME_Vendor_ID, null); else set_Value (COLUMNNAME_Vendor_ID, Vendor_ID); } @Override publi...
repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java-gen\de\metas\purchasecandidate\model\X_C_PurchaseCandidate.java
1
请在Spring Boot框架中完成以下Java代码
public ProductDocument getById(@PathVariable String id){ return esSearchService.getById(id); } /** * 根据获取全部 * @return */ @RequestMapping("get_all") public List<ProductDocument> getAll(){ return esSearchService.getAll(); } /** * 搜索 * @param keyword ...
* @param indexName 索引库名称 * @param fields 搜索字段名称,多个以“,”分割 * @return */ @RequestMapping("query_hit_page") public Page<Map<String,Object>> queryHitByPage(@RequestParam int pageNo,@RequestParam int pageSize ,@RequestParam String keyword, @Request...
repos\springboot-demo-master\elasticsearch\src\main\java\demo\et59\elaticsearch\controller\EsSearchController.java
2
请完成以下Java代码
public void setFailureKeyAttribute(String failureKeyAttribute) { this.failureKeyAttribute = failureKeyAttribute; } @Override protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) throws Exception { // 1、设置验证码是否开启属性,页面可以根据该属性来决定是否显示验证码 request.setAttribute("cap...
String captcha = (String) httpServletRequest.getSession().getAttribute("rcCaptcha"); if (submitCaptcha.equals(captcha)) { return true; } return false; } @Override protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception { // 如果验证码失败了,存储失败key属性 request.setAttri...
repos\roncoo-pay-master\roncoo-pay-web-boss\src\main\java\com\roncoo\pay\permission\shiro\filter\RcCaptchaValidateFilter.java
1
请完成以下Java代码
public void setDatevAcctExport_ID (final int DatevAcctExport_ID) { if (DatevAcctExport_ID < 1) set_ValueNoCheck (COLUMNNAME_DatevAcctExport_ID, null); else set_ValueNoCheck (COLUMNNAME_DatevAcctExport_ID, DatevAcctExport_ID); } @Override public int getDatevAcctExport_ID() { return get_ValueAsInt(CO...
public static final String EXPORTTYPE_SalesInvoice = "SalesInvoice"; /** Credit Memo = CreditMemo */ public static final String EXPORTTYPE_CreditMemo = "CreditMemo"; @Override public void setExportType (final java.lang.String ExportType) { set_Value (COLUMNNAME_ExportType, ExportType); } @Override public jav...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_DatevAcctExport.java
1
请完成以下Java代码
public ExternalSystemOutboundEndpoint getById(@NonNull final ExternalSystemOutboundEndpointId id) { return endpointsCache.getOrLoad(id, this::retrieveById); } @NonNull private ExternalSystemOutboundEndpoint retrieveById(@NonNull final ExternalSystemOutboundEndpointId id) { final I_ExternalSystem_Outbound_Endp...
private static ExternalSystemOutboundEndpoint fromRecord(@NonNull final I_ExternalSystem_Outbound_Endpoint endpointRecord) { return ExternalSystemOutboundEndpoint.builder() .id(ExternalSystemOutboundEndpointId.ofRepoId(endpointRecord.getExternalSystem_Outbound_Endpoint_ID())) .value(endpointRecord.getValue()...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\outboundendpoint\ExternalSystemOutboundEndpointRepository.java
1
请在Spring Boot框架中完成以下Java代码
public class ProductController { private static final Logger LOGGER = LoggerFactory.getLogger(ProductController.class); private final Map<Long, Product> productMap = new HashMap<>(); @Operation(summary = "Get a product by its id") @ApiResponses(value = { @ApiResponse(responseCode = "200", des...
Product product3 = getProduct(100003, "banana"); productMap.put(100003L, product3); Product product4 = getProduct(100004, "mango"); productMap.put(100004L, product4); } private static Product getProduct(int id, String name) { Product product = new Product(); product.set...
repos\tutorials-master\spring-cloud-modules\spring-cloud-gateway-3\spring-backend-service\src\main\java\com\baeldung\productservice\controller\ProductController.java
2
请完成以下Java代码
public Integer getKeepAliveSeconds() { return keepAliveSeconds; } public void setKeepAliveSeconds(Integer keepAliveSeconds) { this.keepAliveSeconds = keepAliveSeconds; } public int getQueueCapacity() { return queueCapacity; } public void setQueueCapacity(int queueCapacity) { this.queueCap...
} public void setMaxBackoff(Long maxBackoff) { this.maxBackoff = maxBackoff; } public Integer getBackoffDecreaseThreshold() { return backoffDecreaseThreshold; } public void setBackoffDecreaseThreshold(Integer backoffDecreaseThreshold) { this.backoffDecreaseThreshold = backoffDecreaseThreshold; ...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\JobExecutionProperty.java
1
请在Spring Boot框架中完成以下Java代码
public class UserAccessServiceImpl implements UserAccessService { private static final Logger LOG = LoggerFactory.getLogger(UserAccessServiceImpl.class); private final Map<SessionId, UserData> sessions; private final Map<UserId, UserData> users; public UserAccessServiceImpl() { this.sessions ...
return Optional.empty(); } @Override public Optional<UserData> isAuthenticated(SessionId sessionId) { return Optional.ofNullable(sessions.get(sessionId)); } @Override public void logout(SessionId sessionId) { LOG.info("logout: {}", sessionId); sessions.remove(sessionId)...
repos\spring-examples-java-17\spring-security\src\main\java\itx\examples\springboot\security\springsecurity\services\UserAccessServiceImpl.java
2
请在Spring Boot框架中完成以下Java代码
public boolean isMeterNameEventTypeEnabled() { return this.meterNameEventTypeEnabled; } public void setMeterNameEventTypeEnabled(boolean meterNameEventTypeEnabled) { this.meterNameEventTypeEnabled = meterNameEventTypeEnabled; } public String getEventType() { return this.eventType; } public void setEventT...
public void setApiKey(@Nullable String apiKey) { this.apiKey = apiKey; } public @Nullable String getAccountId() { return this.accountId; } public void setAccountId(@Nullable String accountId) { this.accountId = accountId; } public String getUri() { return this.uri; } public void setUri(String uri) {...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\newrelic\NewRelicProperties.java
2
请完成以下Java代码
public String get_ValueOldAsString(final String variableName) { throw new UnsupportedOperationException("not implemented"); } }; } public IModelInternalAccessor getModelInternalAccessor() { if (_modelInternalAccessor == null) { _modelInternalAccessor = new POJOModelInternalAccessor(this); } r...
public static IModelInternalAccessor getModelInternalAccessor(final Object model) { final POJOWrapper wrapper = getWrapper(model); if (wrapper == null) { return null; } return wrapper.getModelInternalAccessor(); } public boolean isProcessed() { return hasColumnName("Processed") ? StringUtils.toB...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\wrapper\POJOWrapper.java
1
请在Spring Boot框架中完成以下Java代码
public List<User> getByMap(Map<String, Object> map) { return userDao.getByMap(map); } @Override public User getById(Integer id) { return userDao.getById(id); } @Override public User create(User user) { userDao.create(user); return user; } @Override
public User update(User user) { userDao.update(user); return user; } @Override public int delete(Integer id) { return userDao.delete(id); } @Override public User getByUserName(String userName) { return userDao.getByUserName(userName); } }
repos\springBoot-master\springboot-dubbo\abel-user-provider\src\main\java\cn\abel\user\service\impl\UserServiceImpl.java
2
请完成以下Java代码
public static HUType ofCodeOrNull(@Nullable final String code) { if (isEmpty(code, true)) { return null; } return ofCode(code); } public static HUType ofCode(@NonNull final String code) { HUType type = typesByCode.get(code); if (type == null) { throw new AdempiereException("No " + HUType.class ...
private static final ImmutableMap<String, HUType> typesByCode = ReferenceListAwareEnums.indexByCode(values()); public boolean isLU() { return this == LoadLogistiqueUnit; } public boolean isTU() { return this == TransportUnit; } public boolean isVHU() { return this == VirtualPI; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\generichumodel\HUType.java
1
请完成以下Java代码
public List<String> getDeploymentResourceNames(String deploymentId) { return commandExecutor.execute(new GetDeploymentResourceNamesCmd(deploymentId)); } @Override public InputStream getResourceAsStream(String deploymentId, String resourceName) { return commandExecutor.execute(new GetDeploym...
@Override public DmnDefinition getDmnDefinition(String decisionId) { return commandExecutor.execute(new GetDmnDefinitionCmd(decisionId)); } @Override public InputStream getDmnResource(String decisionId) { return commandExecutor.execute(new GetDeploymentDmnResourceCmd(decisionId)); }...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\DmnRepositoryServiceImpl.java
1
请完成以下Java代码
public void setColumnName (java.lang.String ColumnName) { throw new IllegalArgumentException ("ColumnName is virtual column"); } /** Get Spaltenname. @return Name der Spalte in der Datenbank */ @Override public java.lang.String getColumnName () { return (java.lang.String)get_Value(COLUMNNAME_ColumnName)...
@Override public java.lang.String getEntityType () { return (java.lang.String)get_Value(COLUMNNAME_EntityType); } /** Set Sequence. @param SeqNo Method of ordering records; lowest number comes first */ @Override public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo))...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ColumnCallout.java
1
请在Spring Boot框架中完成以下Java代码
class AlreadyShippedHUsInPreviousSystemRepository { private static final Logger logger = LogManager.getLogger(AlreadyShippedHUsInPreviousSystemRepository.class); private final IQueryBL queryBL = Services.get(IQueryBL.class); public Optional<AlreadyShippedHUsInPreviousSystem> getBySerialNo(@Nullable final String ser...
} else { logger.debug("More than result found for {}: {} => returning empty", serialNo, rows); return Optional.empty(); } } catch (final Exception ex) { logger.debug("Failed fetching for {}. Returning empty.", serialNo, ex); return Optional.empty(); } } private static AlreadyShippedHUs...
repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\customerreturns\AlreadyShippedHUsInPreviousSystemRepository.java
2
请在Spring Boot框架中完成以下Java代码
public void setCharset(Charset charset) { this.charset = charset; } /** * Set the name of the charset to use. * @param charset the charset * @deprecated since 4.1.0 for removal in 4.3.0 in favor of * {@link #setCharset(Charset)} */ @Deprecated(since = "4.1.0", forRemoval = true) public void setCharset(...
* Set the resource loader. * @param resourceLoader the resource loader */ @Override public void setResourceLoader(ResourceLoader resourceLoader) { this.resourceLoader = resourceLoader; } @Override public Reader getTemplate(String name) throws Exception { return new InputStreamReader(this.resourceLoader.ge...
repos\spring-boot-main\module\spring-boot-mustache\src\main\java\org\springframework\boot\mustache\autoconfigure\MustacheResourceTemplateLoader.java
2
请完成以下Java代码
public final class OidcClientMetadataClaimNames extends OAuth2ClientMetadataClaimNames { /** * {@code post_logout_redirect_uris} - the post logout redirection {@code URI} values * used by the Client. The {@code post_logout_redirect_uri} parameter is used by the * client when requesting that the End-User's User ...
* required for signing the {@link OidcIdToken ID Token} issued to the Client */ public static final String ID_TOKEN_SIGNED_RESPONSE_ALG = "id_token_signed_response_alg"; /** * {@code registration_access_token} - the Registration Access Token that can be used * at the Client Configuration Endpoint */ public ...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\oidc\OidcClientMetadataClaimNames.java
1
请完成以下Java代码
public basefont setSize(int size) { addAttribute("size",Integer.toString(size)); return(this); } /** sets the size="" attribute. @param size sets the size="" attribute. */ public basefont setSize(String size) { addAttribute("size",size); ...
addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public basefont addElement(Element element) { addElementToRegistry(element); return(this); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\basefont.java
1
请完成以下Java代码
/* package */ final IncludedDetailInfo includedDetailInfo(final DetailId detailId) { Check.assumeNotNull(detailId, "Parameter detailId is not null"); return includedDetailInfos.computeIfAbsent(detailId, IncludedDetailInfo::new); } /* package */final Optional<IncludedDetailInfo> includedDetailInfoIfExists(final ...
return this; } public boolean isStale() { return stale; } public LogicExpressionResult getAllowNew() { return allowNew; } IncludedDetailInfo setAllowNew(final LogicExpressionResult allowNew) { this.allowNew = allowNew; return this; } public LogicExpressionResult getAllowDelete() ...
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 IValidationContext createValidationContext(final Properties ctx, final String tableName, final GridTab gridTab, final int rowIndex) { final GridRowCtx ctxToUse = new GridRowCtx(ctx, gridTab, rowIndex); final int windowNo = gridTab.getWindowNo(); final int tabNo = gridTab.getTabNo(); return createValida...
if (tableName == null) { return IValidationContext.DISABLED; } // // Check if is a Process Parameter/Form field final GridFieldVO gridFieldVO = gridField.getVO(); if (gridFieldVO.isProcessParameter() || gridFieldVO.isFormField()) { return createValidationContext(ctx, gridField.getWindowNo(), Env.TA...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\validationRule\impl\ValidationRuleFactory.java
1
请完成以下Java代码
public void setAD_UI_Column_ID (int AD_UI_Column_ID) { if (AD_UI_Column_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_UI_Column_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_UI_Column_ID, Integer.valueOf(AD_UI_Column_ID)); } /** Get UI Column. @return UI Column */ @Override public int getAD_UI_Column_...
return ii.intValue(); } /** Set Reihenfolge. @param SeqNo Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst */ @Override public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Reihenfolge. @return Zur Bestimmung der Reihenfolge d...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_UI_Column.java
1
请完成以下Java代码
public void completeBackwardDDOrders(final I_M_Forecast forecast) { // // Retrive backward DD Orders final List<I_DD_Order> ddOrders = ddOrderLowLevelDAO.retrieveBackwardDDOrderLinesQuery(forecast) // // Not already processed lines // NOTE: to avoid recursions, we relly on the fact that current DD O...
public List<I_DD_OrderLine> retrieveLines(final I_DD_Order order) { return ddOrderLowLevelDAO.retrieveLines(order); } public List<I_DD_OrderLine_Alternative> retrieveAllAlternatives(final I_DD_OrderLine ddOrderLine) { return ddOrderLowLevelDAO.retrieveAllAlternatives(ddOrderLine); } public void updateUomFro...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddorder\lowlevel\DDOrderLowLevelService.java
1
请完成以下Java代码
public HistoricProcessInstanceQueryDto getHistoricProcessInstanceQuery() { return historicProcessInstanceQuery; } public void setHistoricProcessInstanceQuery(HistoricProcessInstanceQueryDto historicProcessInstanceQuery) { this.historicProcessInstanceQuery = historicProcessInstanceQuery; } public boole...
public void setSkipIoMappings(boolean skipIoMappings) { this.skipIoMappings = skipIoMappings; } public boolean isWithoutBusinessKey() { return withoutBusinessKey; } public void setWithoutBusinessKey(boolean withoutBusinessKey) { this.withoutBusinessKey = withoutBusinessKey; } public void appl...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\RestartProcessInstanceDto.java
1
请完成以下Java代码
public BigDecimal getAssetMarketValueAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_AssetMarketValueAmt); if (bd == null) return Env.ZERO; return bd; } /** Set Asset value. @param AssetValueAmt Book Value of the asset */ public void setAssetValueAmt (BigDecimal AssetValueAmt) { set...
public I_C_InvoiceLine getC_InvoiceLine() throws RuntimeException { return (I_C_InvoiceLine)MTable.get(getCtx(), I_C_InvoiceLine.Table_Name) .getPO(getC_InvoiceLine_ID(), get_TrxName()); } /** Set Invoice Line. @param C_InvoiceLine_ID Invoice Detail Line */ public void setC_InvoiceLine_ID (int C_Inv...
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代码
public class X_Carrier_ShipmentOrder_Log extends org.compiere.model.PO implements I_Carrier_ShipmentOrder_Log, org.compiere.model.I_Persistent { private static final long serialVersionUID = 115259953L; /** Standard Constructor */ public X_Carrier_ShipmentOrder_Log (final Properties ctx, final int Carrier_Sh...
return get_ValueAsBoolean(COLUMNNAME_IsError); } @Override public void setRequestID (final java.lang.String RequestID) { set_Value (COLUMNNAME_RequestID, RequestID); } @Override public java.lang.String getRequestID() { return get_ValueAsString(COLUMNNAME_RequestID); } @Override public void setRequest...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Carrier_ShipmentOrder_Log.java
1
请完成以下Java代码
public Icon getIcon() { final I_AD_Process adProcess = adProcessSupplier.get(); final String iconName; if (adProcess.getAD_Form_ID() > 0) { iconName = MTreeNode.getIconName(MTreeNode.TYPE_WINDOW); } else if (adProcess.getAD_Workflow_ID() > 0) { iconName = MTreeNode.getIconName(MTreeNode.TYPE_WORKF...
} public boolean isEnabled() { return getPreconditionsResolution().isAccepted(); } public boolean isSilentRejection() { return getPreconditionsResolution().isInternal(); } public boolean isDisabled() { return getPreconditionsResolution().isRejected(); } public String getDisabledReason(final String a...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ui\SwingRelatedProcessDescriptor.java
1
请完成以下Java代码
public org.compiere.model.I_AD_User getTo_User() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_To_User_ID, org.compiere.model.I_AD_User.class); } @Override public void setTo_User(org.compiere.model.I_AD_User To_User) { set_ValueFromPO(COLUMNNAME_To_User_ID, org.compiere.model.I_AD_User.class, To_U...
else set_Value (COLUMNNAME_To_User_ID, Integer.valueOf(To_User_ID)); } /** Get To User. @return To User */ @Override public int getTo_User_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_To_User_ID); if (ii == null) return 0; return ii.intValue(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Mail.java
1
请在Spring Boot框架中完成以下Java代码
public static class DingTalkNotifierConfiguration { @Bean @ConditionalOnMissingBean @ConfigurationProperties("spring.boot.admin.notify.dingtalk") public DingTalkNotifier dingTalkNotifier(InstanceRepository repository, NotifierProxyProperties proxyProperties) { return new DingTalkNotifier(repository, cre...
return new FeiShuNotifier(repository, createNotifierRestTemplate(proxyProperties)); } } @Configuration(proxyBeanMethods = false) @ConditionalOnProperty(prefix = "spring.boot.admin.notify.webex", name = "auth-token") @AutoConfigureBefore({ NotifierTriggerConfiguration.class, CompositeNotifierConfiguration.class ...
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\config\AdminServerNotifierAutoConfiguration.java
2
请完成以下Java代码
public static CookieServerCsrfTokenRepository withHttpOnlyFalse() { CookieServerCsrfTokenRepository result = new CookieServerCsrfTokenRepository(); result.cookieHttpOnly = false; return result; } @Override public Mono<CsrfToken> generateToken(ServerWebExchange exchange) { return Mono.fromCallable(this::crea...
/** * Sets the parameter name * @param parameterName The parameter name */ public void setParameterName(String parameterName) { Assert.hasLength(parameterName, "parameterName can't be null"); this.parameterName = parameterName; } /** * Sets the header name * @param headerName The header name */ pub...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\csrf\CookieServerCsrfTokenRepository.java
1
请在Spring Boot框架中完成以下Java代码
public Flux<User> getUserByAge(Integer from, Integer to) { return this.userDao.findByAgeBetween(from, to); } public Flux<User> getUserByName(String name) { return this.userDao.findByNameEquals(name); } public Flux<User> getUserByDescription(String description) { return this.use...
/** * 返回 count,配合 getUserByCondition使用 */ public Mono<Long> getUserByConditionCount(User user) { Query query = getQuery(user); return template.count(query, User.class); } private Query getQuery(User user) { Query query = new Query(); Criteria criteria = new Criteri...
repos\SpringAll-master\58.Spring-Boot-WebFlux-crud\src\main\java\com\example\webflux\service\UserService.java
2
请完成以下Java代码
public void setShowHelp (final @Nullable java.lang.String ShowHelp) { set_Value (COLUMNNAME_ShowHelp, ShowHelp); } @Override public java.lang.String getShowHelp() { return get_ValueAsString(COLUMNNAME_ShowHelp); } /** * SpreadsheetFormat AD_Reference_ID=541369 * Reference name: SpreadsheetFormat */...
/** PostgREST = PostgREST */ public static final String TYPE_PostgREST = "PostgREST"; @Override public void setType (final java.lang.String Type) { set_Value (COLUMNNAME_Type, Type); } @Override public java.lang.String getType() { return get_ValueAsString(COLUMNNAME_Type); } @Override public void setV...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Process.java
1
请完成以下Java代码
public static HURow toHURowOrNull(final IViewRow viewRow) { if (viewRow instanceof HUEditorRow) { final HUEditorRow huRow = HUEditorRow.cast(viewRow); return HURow.builder() .huId(huRow.getHuId()) .topLevelHU(huRow.isTopLevel()) .huStatusActive(huRow.isHUStatusActive()) .build(); } el...
.filter(row -> isEligibleHU(row)) .collect(ImmutableList.toImmutableList()); } public static void pickAndProcessSingleHU(@NonNull final PickRequest pickRequest, @NonNull final ProcessPickingRequest processRequest) { pickHU(pickRequest); processHUs(processRequest); } public static void pickHU(@NonNull fi...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pporder\util\WEBUI_PP_Order_ProcessHelper.java
1
请完成以下Java代码
public Criteria andParamCountNotIn(List<Integer> values) { addCriterion("param_count not in", values, "paramCount"); return (Criteria) this; } public Criteria andParamCountBetween(Integer value1, Integer value2) { addCriterion("param_count between", value1, value2, "...
} public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; ...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsProductAttributeCategoryExample.java
1
请完成以下Java代码
public void setDeliveredData(@NonNull final I_C_Invoice_Candidate ic) { ic.setQtyDelivered(ic.getQtyOrdered()); // when changing this, make sure to threat ProductType.Service specially ic.setQtyDeliveredInUOM(ic.getQtyEntered()); ic.setDeliveryDate(ic.getDateOrdered()); } @Override public PriceAndTax calcul...
.priceUOMId(pricingResult.getPriceUomId()) .priceActual(pricingResult.getPriceStd()) .taxIncluded(pricingResult.isTaxIncluded()) .invoicableQtyBasedOn(pricingResult.getInvoicableQtyBasedOn()) .build(); } @Override public void setBPartnerData(@NonNull final I_C_Invoice_Candidate ic) { final I_C_OL...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\invoicecandidate\spi\impl\C_OLCand_Handler.java
1
请完成以下Java代码
public void onBeforeComplete(final I_C_RfQ rfq) { for (final IRfQEventListener listener : listeners) { listener.onBeforeComplete(rfq); } } @Override public void onAfterComplete(final I_C_RfQ rfq) { for (final IRfQEventListener listener : listeners) { listener.onAfterComplete(rfq); } } @Overri...
{ listener.onBeforeClose(rfqResponse); } } @Override public void onAfterClose(final I_C_RfQResponse rfqResponse) { for (final IRfQEventListener listener : listeners) { listener.onAfterClose(rfqResponse); } } @Override public void onBeforeUnClose(final I_C_RfQ rfq) { for (final IRfQEventListene...
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\event\impl\CompositeRfQEventListener.java
1
请在Spring Boot框架中完成以下Java代码
public class Student implements Serializable { /** * */ private static final long serialVersionUID = 1L; public Student() { } public Student(long id, String name, String gender, Integer age) { super(); this.id = id; this.name = name; this.gender = gender...
public String getName() { return name; } public void setName(String name) { this.name = name; } public String getGender() { return gender; } public void setGender(String gender) { this.gender = gender; } public Integer getAge() { return age; ...
repos\tutorials-master\spring-web-modules\spring-rest-angular\src\main\java\com\baeldung\web\entity\Student.java
2
请完成以下Java代码
public void addBundleRegisterHandler(BiConsumer<String, SslBundle> registerHandler) { this.registerHandlers.add(registerHandler); } @Override public List<String> getBundleNames() { List<String> names = new ArrayList<>(this.registeredBundles.keySet()); Collections.sort(names); return Collections.unmodifiable...
this.name)); } this.updateHandlers.forEach((handler) -> handler.accept(updatedBundle)); } SslBundle getBundle() { return this.bundle; } void addUpdateHandler(Consumer<SslBundle> updateHandler) { Assert.notNull(updateHandler, "'updateHandler' must not be null"); this.updateHandlers.add(updateHan...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\ssl\DefaultSslBundleRegistry.java
1