instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public Integer getDepartmentId() { return departmentId; } public void setDepartmentId(Integer departmentId) { this.departmentId = departmentId; } public Integer getLoginCount() { return loginCount; } public void setLoginCount(Integer loginCount) { this.loginCount = loginCount; } public List<Role> getRo...
@Override public String toString() { return "User{" + "id=" + id + ", cnname=" + cnname + ", username=" + username + ", password=" + password + ", email=" + email + ", telephone=" + telephone + ", mobilePhone=" + mobilePhone + ", wechatId=" + wechatId + ", skill=" + skill + ", departmen...
repos\springBoot-master\springboot-shiro\src\main\java\com\us\bean\User.java
1
请完成以下Java代码
public class Domain extends BaseData<DomainId> implements HasTenantId, HasName { @Schema(description = "JSON object with Tenant Id") private TenantId tenantId; @Schema(description = "Domain name. Cannot be empty", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank @Length(fieldName = "name") ...
} public Domain(DomainId id) { super(id); } public Domain(Domain domain) { super(domain); this.tenantId = domain.tenantId; this.name = domain.name; this.oauth2Enabled = domain.oauth2Enabled; this.propagateToEdge = domain.propagateToEdge; } }
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\domain\Domain.java
1
请完成以下Java代码
public class Media { private int id; private String title; private String artist; public void printTitle() { System.out.println("Media Title"); } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getTitle() ...
public void setTitle(String title) { this.title = title; } public String getArtist() { return artist; } public void setArtist(String artist) { this.artist = artist; } @Override public String toString() { return "Media{" + "id=" + id + ...
repos\tutorials-master\core-java-modules\core-java-lang-4\src\main\java\com\baeldung\implementsvsextends\media\model\Media.java
1
请完成以下Java代码
public String getCode () { return (String)get_Value(COLUMNNAME_Code); } /** 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 getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName()); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Error.java
1
请在Spring Boot框架中完成以下Java代码
public HistoricTaskInstanceResponse getTaskInstance(@ApiParam(name = "taskId") @PathVariable String taskId) { return restResponseFactory.createHistoricTaskInstanceResponse(getHistoricTaskInstanceFromRequest(taskId)); } @ApiOperation(value = "Delete a historic task instance", tags = { "History Task" }, ...
@GetMapping(value = "/cmmn-history/historic-task-instances/{taskId}/form", produces = "application/json") public String getTaskForm(@ApiParam(name = "taskId") @PathVariable String taskId) { HistoricTaskInstance task = getHistoricTaskInstanceFromRequest(taskId); if (StringUtils.isEmpty(task.getFormKe...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\task\HistoricTaskInstanceResource.java
2
请在Spring Boot框架中完成以下Java代码
private static JsonPayload toJson(@NonNull final ExternalSystemConfigQRCode qrCode) { final IExternalSystemChildConfigId childConfigId = qrCode.getChildConfigId(); return JsonPayload.builder() .externalSystemType(childConfigId.getType().getValue()) .childConfigId(childConfigId.getRepoId()) .build(); ...
{ return ExternalSystemGRSSignumConfigId.ofRepoId(repoId); } else if (externalSystemType.isLeichUndMehl()) { return ExternalSystemLeichMehlConfigId.ofRepoId(repoId); } throw new AdempiereException("Unsupported externalSystemType: " + externalSystemType); } // // // @Value @Builder @Jacksonized ...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\config\qrcode\v1\JsonConverterV1.java
2
请完成以下Java代码
private void loadState() { schedule = ddOrderMoveScheduleRepository.getById(scheduleId); } private void validateState() { if (!schedule.isPickedFrom()) { throw new AdempiereException("Not picked"); } if (schedule.isDropTo()) { throw new AdempiereException("Already dropped!"); } } private vo...
schedule.removePickedHUs(); ddOrderMoveScheduleRepository.save(schedule); ddOrderMoveScheduleRepository.deleteNotStarted(schedule.getId()); } private ScannedCode getTargetQRCode() { if (unpickToTargetQRCode != null) { return unpickToTargetQRCode.toScannedCode(); } else { return warehouseBL.getLo...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\distribution\ddorder\movement\schedule\commands\unpick\DDOrderUnpickCommand.java
1
请完成以下Java代码
public int getR_IssueRecommendation_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_R_IssueRecommendation_ID); if (ii == null) return 0; return ii.intValue(); } public I_R_IssueStatus getR_IssueStatus() throws RuntimeException { return (I_R_IssueStatus)MTable.get(getCtx(), I_R_IssueStatus.Table_...
else set_Value (COLUMNNAME_R_Request_ID, Integer.valueOf(R_Request_ID)); } /** Get Request. @return Request from a Business Partner or Prospect */ public int getR_Request_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_R_Request_ID); if (ii == null) return 0; return ii.intValue(); } /** S...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_IssueKnown.java
1
请完成以下Java代码
public void setRenderedAddressAndCapturedLocation(final @NonNull RenderedAddressAndCapturedLocation from) { IDocumentLocationAdapter.super.setRenderedAddressAndCapturedLocation(from); } @Override public void setRenderedAddress(final @NonNull RenderedAddressAndCapturedLocation from) { IDocumentLocationAdapter....
setFrom(fromDocumentLocationAdapter); } } @Override public I_C_Invoice getWrappedRecord() { return delegate; } @Override public Optional<DocumentLocation> toPlainDocumentLocation(final IDocumentLocationBL documentLocationBL) { return documentLocationBL.toPlainDocumentLocation(this); } @Override publ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\location\adapter\InvoiceDocumentLocationAdapter.java
1
请完成以下Java代码
public void dispose() { setActionListener(null); if (additionalComponentsPanel != null) { additionalComponentsPanel.removeAll(); additionalComponentsPanel = null; } removeAll(); } /** * {@link ConfirmPanel} builder. * * NOTE: by default, ALL flags are false, so you will get no buttons and no...
public Builder withResetButton(final boolean withResetButton) { this.withResetButton = withResetButton; return this; } public Builder withCustomizeButton(final boolean withCustomizeButton) { this.withCustomizeButton = withCustomizeButton; return this; } public Builder withHistoryButton(final b...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\ConfirmPanel.java
1
请完成以下Java代码
private CarrierGoodsType getCachedGoodsTypeByShipperExternalId(@NonNull final ShipperId shipperId, @Nullable final String externalId) { if (externalId == null) { return null; } return carrierGoodsTypesByExternalId.getOrLoad(shipperId + externalId, () -> queryBL.createQueryBuilder(I_Carrier_Goods_Type.cl...
queryBL.createQueryBuilder(I_Carrier_Goods_Type.class) .addEqualsFilter(I_Carrier_Goods_Type.COLUMNNAME_Carrier_Goods_Type_ID, goodsTypeId) .firstOptional() .map(CarrierGoodsTypeRepository::fromRecord) .orElse(null)); } private static CarrierGoodsType fromRecord(@NotNull final I_Carrier_Goods...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.commons\src\main\java\de\metas\shipper\gateway\commons\model\CarrierGoodsTypeRepository.java
1
请完成以下Java代码
private static EAN13 parseVariableWeight(@NonNull final String barcode, @NonNull final EAN13Prefix prefix, final int checksum) { final EAN13ProductCode productNo = EAN13ProductCode.ofString(barcode.substring(2, 7)); // 5 digits for article code (AAAAA) final String weightStr = barcode.substring(7, 12); // 5 digit...
.productNo(productNo) .weightInKg(weightInKg) .checksum(checksum) .build(); } private static EAN13 parseStandardProduct(@NonNull final String barcode, @NonNull final EAN13Prefix prefix, final int checksum) { final String manufacturerAndProductCode = barcode.substring(3, 12); final EAN13ProductCode p...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\gs1\ean13\EAN13Parser.java
1
请在Spring Boot框架中完成以下Java代码
public int hashCode() { return Objects.hash(unit, quantity, pcn, defaultPackagingUnit, archived); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PackagingUnit {\n"); sb.append(" unit: ").append(toIndentedString(unit)).append("\n"); sb....
sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\model\PackagingUnit.java
2
请完成以下Java代码
final class OAuth2AuthorizationResponseUtils { private OAuth2AuthorizationResponseUtils() { } static MultiValueMap<String, String> toMultiMap(Map<String, String[]> map) { MultiValueMap<String, String> params = new LinkedMultiValueMap<>(map.size()); map.forEach((key, values) -> { if (values.length > 0) { ...
static OAuth2AuthorizationResponse convert(MultiValueMap<String, String> request, String redirectUri) { String code = request.getFirst(OAuth2ParameterNames.CODE); String errorCode = request.getFirst(OAuth2ParameterNames.ERROR); String state = request.getFirst(OAuth2ParameterNames.STATE); if (StringUtils.hasText...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\web\OAuth2AuthorizationResponseUtils.java
1
请完成以下Java代码
public class DynamicObjectFactory { private final Object objectFactory; private final Map<Class<?>, Method> factoryMethods = new HashMap<>(); public DynamicObjectFactory(final Object objectFactory) { super(); Check.assumeNotNull(objectFactory, "objectFactory not null"); this.objectFactory = objectFactory; ...
} catch (Exception e) { throw new JAXBException("Cannot convert object " + obj + " to JAXBElement by using method " + method, e); } } private Method getFactoryMethod(final Class<?> objClass) throws JAXBException { Method method = factoryMethods.get(objClass); if (method == null) { method = findFac...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing.common\de.metas.printing.esb.base\src\main\java\de\metas\printing\esb\base\util\jaxb\DynamicObjectFactory.java
1
请完成以下Java代码
public ImmutableSet<PickingSlotId> getInUsePickingSlotIds() { return jobRepository.getInUsePickingSlotIds(); } public HUConsolidationJob startJob( @NonNull final HUConsolidationJobReference reference, @NonNull final UserId responsibleId) { return jobRepository.create(reference, responsibleId); } publi...
return jobRepository.updateById(jobId, job -> { job.assertUserCanEdit(callerId); return targetCloser.closeTarget(job); }); } public void printTargetLabel(@NonNull final HUConsolidationJobId jobId, @NotNull final UserId callerId) { final HUConsolidationJob job = jobRepository.getById(jobId); final HUCons...
repos\metasfresh-new_dawn_uat\backend\de.metas.hu_consolidation.mobile\src\main\java\de\metas\hu_consolidation\mobile\job\HUConsolidationJobService.java
1
请完成以下Java代码
public class br extends SinglePartElement implements Printable { /** * */ private static final long serialVersionUID = 2453784396275762602L; /** Private initialization routine. */ { setElementType("br"); setCase(LOWERCASE); setAttributeQuote(true); se...
{ addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public br addElement(String hashcode,String element) {...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\br.java
1
请完成以下Java代码
public String getHelp () { return (String)get_Value(COLUMNNAME_Help); } /** Set Host. @param Host Host */ public void setHost (String Host) { set_Value (COLUMNNAME_Host, Host); } /** Get Host. @return Host */ public String getHost () { return (String)get_Value(COLUMNNAME_Host); } /** Set N...
/** Get Port. @return Port */ public int getPort () { Integer ii = (Integer)get_Value(COLUMNNAME_Port); if (ii == null) return 0; return ii.intValue(); } /** Set Search Key. @param Value Search key for the record in the format required - must be unique */ public void setValue (String Value)...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_EXP_Processor.java
1
请完成以下Java代码
public void checkCompleteContractIfWinner(I_C_RfQResponseLine rfqResponseLine) { if (!rfqResponseLine.isSelectedWinner()) { // TODO: make sure the is no contract return; } final I_C_Flatrate_Term contract = rfqResponseLine.getC_Flatrate_Term(); if (contract == null) { throw new AdempiereException...
{ final IFlatrateBL flatrateBL = Services.get(IFlatrateBL.class); flatrateBL.complete(contract); } else if (docActionBL.isDocumentCompleted(contract)) { // already completed => nothing to do } else { throw new AdempiereException("@Invalid@ @DocStatus@: " + contract); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\impl\PMM_RfQ_BL.java
1
请完成以下Java代码
public final class Position { private final int x; private final int y; public Position(int x, int y) { this.x = x; this.y = y; } public int getX() { return x; } public int getY() { return y; } @Override public int hashCode() { final i...
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Position other = (Position) obj; if (x != other.x) return false; if (y != other...
repos\tutorials-master\patterns-modules\design-patterns-creational-2\src\main\java\com\baeldung\prototype\Position.java
1
请完成以下Java代码
public legend removeElement (String hashcode) { removeElementFromRegistry (hashcode); return (this); } /** * The onclick event occurs when the pointing device button is clicked over * an element. This attribute may be used with most elements. * * @param script The script */ public voi...
{ addAttribute ("onmousemove", script); } /** * The onmouseout event occurs when the pointing device is moved away from * an element. This attribute may be used with most elements. * * @param script The script */ public void setOnMouseOut (String script) { addAttribute ("onmouseout", ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\legend.java
1
请完成以下Java代码
public BigDecimal getQualityDiscountPercent() { final IAttributeStorage attributeStorage = getAttributeStorage(); if (!attributeStorage.hasAttribute(attr_QualityDiscountPercent)) { return BigDecimal.ZERO; } final BigDecimal qualityDiscountPercent = attributeStorage.getValueAsBigDecimal(attr_QualityDisco...
} public Optional<Quantity> getWeight() { final IWeightable weightable = Weightables.wrap(getAttributeStorage()); if (weightable == null) { return Optional.empty(); } final BigDecimal weightNetOrNull = weightable.getWeightNetOrNull(); if (weightNetOrNull == null) { return Optional.empty(); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\inoutcandidate\spi\impl\HUReceiptLinePartAttributes.java
1
请在Spring Boot框架中完成以下Java代码
public class OrderStatus { @SerializedName("_id") private String _id = null; @SerializedName("salesId") private String salesId = null; @SerializedName("status") private BigDecimal status = null; public OrderStatus _id(String _id) { this._id = _id; return this; } /** * Alberta-Id der Be...
**/ @Schema(example = "3", required = true, description = "-3 = Ausstehend, 0 = Angelegt, 1 = Übermittelt, 2 = Übermittlung fehlgeschlagen, 3 = Verarbeitet, 4 = Versandt, 5 = Ausgeliefert, 6 = Gelöscht, 7 = Storniert, 8 = Gestoppte Serienbestellung") public BigDecimal getStatus() { return status; } public ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-orders-api\src\main\java\io\swagger\client\model\OrderStatus.java
2
请完成以下Java代码
private @Nullable List<Filter> getFilters(HttpServletRequest request) { for (SecurityFilterChain chain : this.filterChainProxy.getFilterChains()) { if (chain.matches(request)) { return chain.getFilters(); } } return null; } @Override public void init(FilterConfig filterConfig) { } @Override pub...
public HttpSession getSession() { boolean sessionExists = super.getSession(false) != null; HttpSession session = super.getSession(); if (!sessionExists) { DebugRequestWrapper.logger.info("New HTTP session created: " + session.getId(), true); } return session; } @Override public HttpSession get...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\debug\DebugFilter.java
1
请完成以下Java代码
public void linkMaterialTrackings(@NonNull final List<I_C_Invoice_Candidate> candidate, @NonNull final MaterialTrackingId materialTrackingId) { final I_M_Material_Tracking materialTracking = materialTrackingDAO.getById(materialTrackingId); if (materialTracking.isProcessed()) { //target material tracking is pr...
return; } candidate.setM_Material_Tracking_ID(materialTracking.getM_Material_Tracking_ID()); if (existingICForMT != null) { final InvoiceCandidateHeaderAggregationId effectiveHeaderAggregationKeyId = IAggregationBL.getEffectiveHeaderAggregationKeyId(existingICForMT); candidate.setC_Invoice_Candidate_Hea...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\impl\MaterialTrackingInvoiceCandService.java
1
请在Spring Boot框架中完成以下Java代码
public RepositoryService repositoryServiceBean(ProcessEngine processEngine) { return super.repositoryServiceBean(processEngine); } @Bean @ConditionalOnMissingBean @Override public TaskService taskServiceBean(ProcessEngine processEngine) { return super.taskServiceBean(processEngine);...
@Bean @ConditionalOnMissingBean public TaskExecutor taskExecutor() { return new SimpleAsyncTaskExecutor(); } @Bean @ConditionalOnMissingBean @Override public IntegrationContextManager integrationContextManagerBean(ProcessEngine processEngine) { return super.integrationContex...
repos\Activiti-develop\activiti-core\activiti-spring-boot-starter\src\main\java\org\activiti\spring\boot\AbstractProcessEngineAutoConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public class BPPurchaseScheduleService { private final BPPurchaseScheduleRepository bpPurchaseScheduleRepo; public BPPurchaseScheduleService(final BPPurchaseScheduleRepository bpPurchaseScheduleRepo) { this.bpPurchaseScheduleRepo = bpPurchaseScheduleRepo; } public Optional<BPPurchaseSchedule> getBPPurchaseSche...
final IDateShifter dateShifter = BusinessDayShifter.builder() .businessDayMatcher(businessDayMatcher) .onNonBussinessDay(OnNonBussinessDay.MoveToClosestBusinessDay) .build(); final Optional<LocalDate> purchaseDayPromised = DateSequenceGenerator.builder() .dateFrom(LocalDate.MIN) .dateTo(LocalDate...
repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\BPPurchaseScheduleService.java
2
请完成以下Java代码
public int copyTasksFrom (final MProjectPhase fromPhase) { if (fromPhase == null) return 0; int count = 0; // final List<I_C_ProjectTask> myTasks = getTasks(); final List<I_C_ProjectTask> fromTasks = fromPhase.getTasks(); // Copy Project Tasks for (final I_C_ProjectTask fromTask : fromTasks) { //...
getAD_Org_ID()); toTask.setC_ProjectPhase_ID(getC_ProjectPhase_ID()); InterfaceWrapperHelper.save(toTask); count++; } } if (fromTasks.size() != count) log.warn("Count difference - ProjectPhase=" + fromTasks.size() + " <> Saved=" + count); return count; } @Override public String toString () ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MProjectPhase.java
1
请在Spring Boot框架中完成以下Java代码
public class AuthStateRedisCache implements AuthStateCache { @Autowired private RedisTemplate<String, String> redisTemplate; private ValueOperations<String, String> valueOperations; @PostConstruct public void init() { valueOperations = redisTemplate.opsForValue(); } /** * 存入...
valueOperations.set(key, value, timeout, TimeUnit.MILLISECONDS); } /** * 获取缓存内容 * * @param key 缓存key * @return 缓存内容 */ @Override public String get(String key) { return valueOperations.get(key); } /** * 是否存在key,如果对应key的value值已过期,也返回false * * @para...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\cache\AuthStateRedisCache.java
2
请在Spring Boot框架中完成以下Java代码
public class CacheService extends CachingConfigurerSupport { @Autowired private RedisConn redisConn; /** * 生产key的策略 * * @return */ @Bean @Override public KeyGenerator keyGenerator() { return new KeyGenerator() { @Override public Object gener...
rcm.setExpires(map); return rcm; } /** * redis 数据库连接池 * @return */ @Bean public JedisConnectionFactory redisConnectionFactory() { JedisConnectionFactory factory = new JedisConnectionFactory(); factory.setHostName(redisConn.getHost()); factory.setPort(redi...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Order\src\main\java\com\gaoxi\order\redis\CacheService.java
2
请在Spring Boot框架中完成以下Java代码
private static List<BeanMetadataElement> toManagedList(BeanMetadataElement... elements) { List<BeanMetadataElement> managedList = new ManagedList<>(); managedList.addAll(Arrays.asList(elements)); return managedList; } BeanDefinition getLogoutRequestFilter() { return this.logoutRequestFilter; } BeanDefinit...
return true; } if (authentication.getCredentials() instanceof Saml2ResponseAssertionAccessor) { return true; } return authentication instanceof Saml2Authentication; } public void setSecurityContextHolderStrategy(SecurityContextHolderStrategy securityContextHolderStrategy) { this.securityContextH...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\http\Saml2LogoutBeanDefinitionParser.java
2
请完成以下Java代码
public Callable<String> getWithMvcRequestTimeout(@RequestParam String title) { return () -> getAuthor(title); } @GetMapping("/author/webclient") public String getWithWebClient(@RequestParam String title) { return webClient.get() .uri(uriBuilder -> uriBuilder.path("/author/transa...
public String getWithRestClient(@RequestParam String title) { return restClient.get() .uri(uriBuilder -> uriBuilder.path("/author/transactional") .queryParam("title", title) .build()) .retrieve() .body(String.class); } private String g...
repos\tutorials-master\spring-web-modules\spring-rest-http\src\main\java\com\baeldung\requesttimeout\RequestTimeoutRestController.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setC_BPartner_ID (final int C_BPartner_ID) { if (C_BPartner_ID < 1) set_ValueNoCheck (COLUMNNAME_C_BPartner_ID, null); else set_ValueNoCheck (COLUMNNAME_...
public void setM_Product_ID (final int M_Product_ID) { if (M_Product_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Product_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override pu...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_C_BPartner_Product_v.java
1
请在Spring Boot框架中完成以下Java代码
public void setExternalSystem_ID (final int ExternalSystem_ID) { if (ExternalSystem_ID < 1) set_Value (COLUMNNAME_ExternalSystem_ID, null); else set_Value (COLUMNNAME_ExternalSystem_ID, ExternalSystem_ID); } @Override public int getExternalSystem_ID() { return get_ValueAsInt(COLUMNNAME_ExternalSyst...
public java.lang.String getJSONValue() { return get_ValueAsString(COLUMNNAME_JSONValue); } @Override public void setS_FailedTimeBooking_ID (final int S_FailedTimeBooking_ID) { if (S_FailedTimeBooking_ID < 1) set_ValueNoCheck (COLUMNNAME_S_FailedTimeBooking_ID, null); else set_ValueNoCheck (COLUMNNA...
repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java-gen\de\metas\serviceprovider\model\X_S_FailedTimeBooking.java
2
请在Spring Boot框架中完成以下Java代码
public Set<ShipmentScheduleId> getShipmentScheduleIdsWithAllJobSchedulesProcessedOrMissing(@NonNull final Set<ShipmentScheduleId> shipmentScheduleIds) { if (shipmentScheduleIds.isEmpty()) {return ImmutableSet.of();} final Map<ShipmentScheduleId, PickingJobScheduleCollection> jobSchedulesByShipmentScheduleId = str...
} public void autoAssign(@NonNull final PickingJobScheduleAutoAssignRequest request) { PickingJobScheduleAutoAssignCommand.builder() .workplaceRepository(workplaceRepository) .pickingJobScheduleRepository(pickingJobScheduleRepository) .pickingJobShipmentScheduleService(pickingJobShipmentScheduleService...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job_schedule\service\PickingJobScheduleService.java
2
请完成以下Java代码
public int getC_InvoiceLine_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_InvoiceLine_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Rechnungsdatum. @param DateInvoiced Datum auf der Rechnung */ @Override public void setDateInvoiced (java.sql.Timestamp DateInvoiced) { ...
} /** Get Produkt. @return Produkt, Leistung, Artikel */ @Override public int getM_Product_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Einzelpreis. @param PriceActual Effektiver Preis */ @Override public vo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_Product_Stats_Invoice_Online_V.java
1
请完成以下Java代码
public class ReactiveSessionInformation implements Serializable { @Serial private static final long serialVersionUID = 620L; private Instant lastAccessTime; private final Object principal; private final String sessionId; private boolean expired = false; public ReactiveSessionInformation(Object principal, S...
public Mono<Void> refreshLastRequest() { this.lastAccessTime = Instant.now(); return Mono.empty(); } public Instant getLastAccessTime() { return this.lastAccessTime; } public Object getPrincipal() { return this.principal; } public String getSessionId() { return this.sessionId; } public boolean isE...
repos\spring-security-main\core\src\main\java\org\springframework\security\core\session\ReactiveSessionInformation.java
1
请在Spring Boot框架中完成以下Java代码
public class HUStockInfo { HuId huId; LocatorId locatorId; ProductId productId; BPartnerId bPartnerId; Quantity qty; AttributeId attributeId; String attributeValue; int huStorageRepoId; int huAttributeRepoId; private ITranslatableString huStatus; @Builder private HUStockInfo( @NonNull final HuI...
@Nullable final String attributeValue, int huStorageRepoId, int huAttributeRepoId) { this.huStatus = huStatus; this.bPartnerId = bPartnerId; this.huId = huId; this.locatorId = locatorId; this.productId = productId; this.qty = qty; this.attributeId = attributeId; this.attributeValue = attributeVal...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\stock\HUStockInfo.java
2
请完成以下Java代码
public int[] extract(int[] numbers, int offset, int length) { final int defect = numbers.length - (offset + length); final int s = defect < 0 ? length + defect : length; int[] result = new int[s]; for (int index = 0; index < s; index++) { result[index] = numbers[index + offse...
.mapToObj(number -> "" + number) .collect(Collectors.joining()); return Integer.parseInt(merged, 10); } /** * Convert the string into its characters' ASCII codes. * @param str input string * @return */ private int[] toAsciiCodes(String str) { return str.chars...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-3\src\main\java\com\baeldung\folding\FoldingHash.java
1
请完成以下Java代码
public void setParams(@NonNull final IReplicationIssueSolverParams params) { this.params = params; } public void setReplicationIssueSolver(final IReplicationIssueSolver<? extends IReplicationIssueAware> issueSolver) { this.issueSolver = issueSolver; } @Override public void setTrxItemProcessorCtx(final ITrx...
currentTrxLines.add(item); result.addReplicationIssueAware(issueAware); } @Override public void completeChunk() { for (final I_EXP_ReplicationTrxLine line : currentTrxLines) { line.setReplicationTrxStatus(X_EXP_ReplicationTrxLine.REPLICATIONTRXSTATUS_Vollstaendig); InterfaceWrapperHelper.save(line); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\server\rpl\trx\api\impl\ReplicationTrxLinesProcessor.java
1
请完成以下Java代码
private void addStockRowsToResult( @NonNull final DimensionSpec dimensionSpec, @NonNull final Map<MainRowBucketId, MainRowWithSubRows> result) { for (final I_MD_Stock stockRecord : request.getStockRecords()) { final MainRowBucketId mainRowBucketId = MainRowBucketId.createInstanceForStockRecord(stock...
return MainRowWithSubRows.builder() .cache(cache) .rowLookups(rowLookups) .productIdAndDate(mainRowBucketId) .procurementStatusColor(procurementStatusColor) .maxPurchasePrice(maxPurchasePrice) .build(); } private Optional<MFColor> getProcurementStatusColor(@NonNull fina...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\rowfactory\MaterialCockpitRowFactory.java
1
请完成以下Java代码
public class InvokeScriptedImportConversionAction extends AlterExternalSystemServiceStatusAction { private final ExternalSystemScriptedImportConversionService externalSystemScriptedImportConversionService = SpringContextHolder.instance .getBean(ExternalSystemScriptedImportConversionService.class); @Override prot...
{ return ExternalSystemType.ScriptedImportConversion.getValue(); } @Override protected ExternalSystemType getExternalSystemType() { return ExternalSystemType.ScriptedImportConversion; } @Override protected long getSelectedRecordCount(final IProcessPreconditionsContext context) { return context.getSelect...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\process\InvokeScriptedImportConversionAction.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isEnabled() { return enabled; } public void setEnabled(boolean enabled) { this.enabled = enabled; } public String getPrefix() { return prefix; } public void setPrefix(String prefix) { this.prefix = prefix; } public Map<String, String> getTags() {
return tags; } public void setTags(Map<String, String> tags) { this.tags = tags; } @Override public String toString() { return new ToStringCreator(this).append("enabled", enabled) .append("prefix", prefix) .append("tags", tags) .toString(); } }
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\config\GatewayMetricsProperties.java
2
请完成以下Java代码
public class ResourceParameterImpl extends BaseElementImpl implements ResourceParameter { protected static Attribute<String> nameAttribute; protected static AttributeReference<ItemDefinition> typeAttribute; protected static Attribute<Boolean> isRequiredAttribute; public static void registerType(ModelBuilder m...
public void setName(String name) { nameAttribute.setValue(this, name); } public ItemDefinition getType() { return typeAttribute.getReferenceTargetElement(this); } public void setType(ItemDefinition type) { typeAttribute.setReferenceTargetElement(this, type); } public boolean isRequired() { ...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\ResourceParameterImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class IndicatorsType { @XmlElement(name = "ProcessingIndicator") protected String processingIndicator; @XmlElement(name = "CriticalStockCode") protected String criticalStockCode; /** * Gets the value of the processingIndicator property. * * @return * possible object...
this.processingIndicator = value; } /** * Gets the value of the criticalStockCode property. * * @return * possible object is * {@link String } * */ public String getCriticalStockCode() { return criticalStockCode; } /** * Sets the value ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\IndicatorsType.java
2
请完成以下Java代码
private void consolidateFromLUs(@NonNull final List<I_M_HU> fromLUs) { if (fromLUs.isEmpty()) { return; } getCurrentTarget().apply(new HUConsolidationTarget.CaseConsumer() { @Override public void newLU(final HuPackingInstructionsId luPackingInstructionsId) {consolidate_FromLUs_ToNewLU(fromLUs, luPa...
private void consolidate_FromTUs_ToNewLU(@NonNull final List<I_M_HU> fromTUs, @NonNull final HuPackingInstructionsId luPackingInstructionsId) { if (fromTUs.isEmpty()) { return; } final I_M_HU firstTU = fromTUs.get(0); final I_M_HU lu = huTransformService.tuToNewLU(firstTU, QtyTU.ONE, luPackingInstruction...
repos\metasfresh-new_dawn_uat\backend\de.metas.hu_consolidation.mobile\src\main\java\de\metas\hu_consolidation\mobile\job\commands\consolidate\ConsolidateCommand.java
1
请完成以下Java代码
public boolean isFinished() { return body.available() <= 0; } @Override public boolean isReady() { return true; } @Override public void setReadListener(ReadListener listener) { } @Override public int read() { return body.read(); } } private static class FormContentRequestWrapper ext...
@Override public Map<String, String[]> getParameterMap() { Map<String, String[]> result = new LinkedHashMap<>(); Enumeration<String> names = getParameterNames(); while (names.hasMoreElements()) { String name = names.nextElement(); result.put(name, getParameterValues(name)); } return result; }...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\filter\FormFilter.java
1
请完成以下Spring Boot application配置
# \u8BBE\u7F6E\u6FC0\u6D3B\u7684\u73AF\u5883 spring.profiles.active=dev # \u89C6\u56FE\u76F8\u5173 spring.mvc.view.prefix=/templates/ spring.mvc.view.suffix=.ftl spring.freemarker.cache=false spring.freemarker.request-context-attribute=request # mybatis \u914D\u7F6E mybatis.type-aliases-package=tk.mybatis.springboot.m...
mpty=false mapper.identity=MYSQL # \u5206\u9875\u63D2\u4EF6\u914D\u7F6E pagehelper.helperDialect=mysql pagehelper.reasonable=true pagehelper.supportMethodsArguments=true pagehelper.params=count=countSql
repos\MyBatis-Spring-Boot-master\src\main\resources\application.properties
2
请完成以下Java代码
public static Workbook openWorkbook(String filePath) throws IOException { try (FileInputStream fis = new FileInputStream(filePath)) { return WorkbookFactory.create(fis); } } /** * Iterates over rows and columns to output them as a list of string arrays. * * @param fil...
int lastCellNum = row.getLastCellNum(); if (lastCellNum < 0) { continue; // Skip empty rows or rows with invalid data } String[] rowData = new String[lastCellNum]; // Iterate through each cell in the row for (int cn = 0; cn < lastCellNum; cn++)...
repos\tutorials-master\core-java-modules\core-java-io-conversions-3\src\main\java\com\baeldung\xlsxtocsv\XLSXReader.java
1
请完成以下Java代码
public boolean isPickedHURow() { return pickingSlotRowId.isPickedHURow(); } public boolean isTopLevelHU() { return huTopLevel; } public boolean isTopLevelTU() { return isTU() && isTopLevelHU(); } public boolean isLU() { return isPickedHURow() && getType().isLU(); } public boolean isTU() { ret...
return pickingSlotBPartner != null ? pickingSlotBPartner.getIdAsInt() : -1; } public int getBPartnerLocationId() { return pickingSlotBPLocation != null ? pickingSlotBPLocation.getIdAsInt() : -1; } @NonNull public Optional<PickingSlotRow> findRowMatching(@NonNull final Predicate<PickingSlotRow> predicate) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\PickingSlotRow.java
1
请完成以下Java代码
public String getVFormat () { return this.m_VFormat; } // getVFormat /** * Focus Gained. * Enabled with Obscure * @param e event */ @Override public void focusGained (FocusEvent e) { m_infocus = true; setText(getText()); // clear } // focusGained /** * Focus Lost * Enabled with Obscure...
@Override public void focusLost (FocusEvent e) { m_infocus = false; setText(getText()); // obscure } // focus Lost @Override public void setFont(Font f) { super.setFont(f); m_stdFont = f; m_obscureFont = new Font("SansSerif", Font.ITALIC, m_stdFont.getSize()); } // metas @Override public boolean i...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VString.java
1
请在Spring Boot框架中完成以下Java代码
public class EverhourClient { private final RestService restService; public EverhourClient(final RestService restService) { this.restService = restService; } @NonNull public ImmutableList<TimeRecord> getTeamTimeRecords(@NonNull final GetTeamTimeRecordsRequest getTeamTimeRecordsRequest) { final List<String>...
final GetRequest getRequest = GetRequest.builder() .baseURL(BASE_URL) .pathVariables(pathVariables) .queryParameters(queryParams) .apiKey(getTeamTimeRecordsRequest.getApiKey()) .build(); return ImmutableList.copyOf( restService.performGet(getRequest, TimeRecord[].class).getBody() ); } @NonNull...
repos\metasfresh-new_dawn_uat\backend\de.metas.issue.tracking.everhour\src\main\java\de\metas\issue\tracking\everhour\api\EverhourClient.java
2
请完成以下Java代码
public void onDelete(VariableInstanceEntity variable, AbstractVariableScope sourceScope) { handleEvent(new VariableEvent(variable, VariableListener.DELETE, sourceScope)); } protected void handleEvent(VariableEvent event) { AbstractVariableScope sourceScope = event.getSourceScope(); if (sourceScope ins...
} else { throw new ProcessEngineException("BPMN execution scope expected"); } } protected void addEventToScopeExecution(ExecutionEntity sourceScope, VariableEvent event) { // ignore events of variables that are not set in an execution ExecutionEntity sourceExecution = sourceScope; Execut...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\core\variable\scope\VariableListenerInvocationListener.java
1
请完成以下Java代码
public Integer[] nullSafeGet(ResultSet rs, int position, SharedSessionContractImplementor session, Object owner) throws SQLException { Array array = rs.getArray(position); return array != null ? (Integer[]) array.getArray() : null; } @Override public void nullSafeSet(PreparedStatement st, I...
@Override public boolean isMutable() { return false; } @Override public Serializable disassemble(Integer[] value) { return value; } @Override public Integer[] assemble(Serializable cached, Object owner) { return (Integer[]) cached; } @Override public In...
repos\tutorials-master\persistence-modules\hibernate-mapping\src\main\java\com\baeldung\hibernate\arraymapping\CustomIntegerArrayType.java
1
请完成以下Java代码
public void setExternalSystemValue (final String ExternalSystemValue) { set_Value (COLUMNNAME_ExternalSystemValue, ExternalSystemValue); } @Override public String getExternalSystemValue() { return get_ValueAsString(COLUMNNAME_ExternalSystemValue); } @Override public void setScriptIdentifier (final String...
{ return get_ValueAsInt(COLUMNNAME_SeqNo); } @Override public void setWhereClause (final String WhereClause) { set_Value (COLUMNNAME_WhereClause, WhereClause); } @Override public String getWhereClause() { return get_ValueAsString(COLUMNNAME_WhereClause); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_ScriptedExportConversion.java
1
请完成以下Java代码
public final class CreateReceiptCandidateRequest { @NonNull private final PPOrderId orderId; /** * BY/CO-Product order BOM line */ @Nullable private final PPOrderBOMLineId orderBOMLineId; @NonNull private final OrgId orgId; @NonNull private final ZonedDateTime date; @NonNull private final LocatorId loc...
private Quantity qtyToReceive; @Nullable private final PickingCandidateId pickingCandidateId; private final boolean alreadyProcessed; public static class CreateReceiptCandidateRequestBuilder { public CreateReceiptCandidateRequestBuilder addQtyToReceive(@NonNull final Quantity qtyToAdd) { final Quantity q...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pporder\api\CreateReceiptCandidateRequest.java
1
请完成以下Java代码
public int getM_Ingredients_ID() { return get_ValueAsInt(COLUMNNAME_M_Ingredients_ID); } @Override public void setM_Product_ID (final int M_Product_ID) { if (M_Product_ID < 1) set_Value (COLUMNNAME_M_Product_ID, null); else set_Value (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public i...
return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Ingredients.java
1
请完成以下Java代码
public ExtensionElements getExtensionElements() { return extensionElementsChild.getChild(this); } public void setExtensionElements(ExtensionElements extensionElements) { extensionElementsChild.setChild(this, extensionElements); } protected boolean isCmmn11() { return CmmnModelConstants.CMMN11_NS.e...
.idAttribute() .build(); descriptionAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_DESCRIPTION) .namespace(CMMN10_NS) .build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); documentationCollection = sequenceBuilder.elementCollection(Documentation.class) ...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\CmmnElementImpl.java
1
请在Spring Boot框架中完成以下Java代码
public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public String getPayType() { return payType; } public void setPayType(String payType) { this.payType = payType; } public String getOpenId() { ...
} public void setNotifyUrl(String notifyUrl) { this.notifyUrl = notifyUrl; } @Override public String toString() { return "ProgramPayRequestBo{" + "payKey='" + payKey + '\'' + ", openId='" + openId + '\'' + ", productName='" + productName ...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\bo\ProgramPayRequestBo.java
2
请完成以下Java代码
public DmnEngineException decisionTypeNotSupported(DmnDecision decision) { return new DmnEngineException(exceptionMessage( "004", "Decision type '{}' not supported by DMN engine.", decision.getClass()) ); } public DmnEngineException invalidValueForTypeDefinition(String typeName, Object value) {...
"Unable to find any decision table in model.") ); } public DmnDecisionResultException decisionOutputHasMoreThanOneValue(DmnDecisionResultEntries result) { return new DmnDecisionResultException(exceptionMessage( "010", "Unable to get single decision result entry as it has more than one entry '{}...
repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DmnEngineLogger.java
1
请完成以下Java代码
static int[] usingGetNumericValueMethod(char[] chars) { if (chars == null) { return null; } int[] ints = new int[chars.length]; for (int i = 0; i < chars.length; i++) { ints[i] = Character.getNumericValue(chars[i]); } return ints; } stat...
} static int[] usingParseIntMethod(char[] chars) { if (chars == null) { return null; } int[] ints = new int[chars.length]; for (int i = 0; i < chars.length; i++) { ints[i] = Integer.parseInt(String.valueOf(chars[i])); } return ints; } ...
repos\tutorials-master\core-java-modules\core-java-arrays-convert\src\main\java\com\baeldung\array\conversions\CharArrayToIntArrayUtils.java
1
请完成以下Java代码
public class CaseInstanceStartEventSubscriptionDeletionBuilderImpl implements CaseInstanceStartEventSubscriptionDeletionBuilder { protected final CmmnRuntimeServiceImpl cmmnRuntimeService; protected String caseDefinitionId; protected String tenantId; protected final Map<String, Object> correlationP...
public String getTenantId() { return tenantId; } public boolean hasCorrelationParameterValues() { return correlationParameterValues.size() > 0; } public Map<String, Object> getCorrelationParameterValues() { return correlationParameterValues; } @Override public void...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\CaseInstanceStartEventSubscriptionDeletionBuilderImpl.java
1
请完成以下Java代码
public Variable getVariable() { return variableChild.getChild(this); } public void setVariable(Variable variable) { variableChild.setChild(this, variable); } public Collection<KnowledgeRequirement> getKnowledgeRequirement() { return knowledgeRequirementCollection.get(this); } public Collectio...
SequenceBuilder sequenceBuilder = typeBuilder.sequence(); encapsulatedLogicChild = sequenceBuilder.element(EncapsulatedLogic.class) .build(); variableChild = sequenceBuilder.element(Variable.class) .build(); knowledgeRequirementCollection = sequenceBuilder.elementCollection(KnowledgeRequireme...
repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\BusinessKnowledgeModelImpl.java
1
请完成以下Java代码
public List<Exception> doExport() { final IEDIDocumentBL ediDocumentBL = Services.get(IEDIDocumentBL.class); final I_EDI_Document document = getDocument(); final I_EDI_Desadv desadv = InterfaceWrapperHelper.create(document, I_EDI_Desadv.class); final List<Exception> feedback = ediDocumentBL.isValidDesAdv(de...
exportEDI(I_EDI_Desadv.class, EDI_DESADVExport.CST_DESADV_EXP_FORMAT, I_EDI_Desadv.Table_Name, I_EDI_Desadv.COLUMNNAME_EDI_Desadv_ID); } catch (final Exception e) { document.setEDI_ExportStatus(I_EDI_Document_Extension.EDI_EXPORTSTATUS_Error); final ITranslatableString errorMsgTrl = TranslatableStrings.par...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\process\export\impl\EDI_DESADVExport.java
1
请完成以下Java代码
private Node mostLeftChild(Node node) { Node current = node; /* loop down to find the leftmost leaf */ while (current.left != null) { current = current.left; } return current; } private Node rebalance(Node z) { updateHeight(z); int balance = g...
private Node rotateLeft(Node y) { Node x = y.right; Node z = x.left; x.left = y; y.right = z; updateHeight(y); updateHeight(x); return x; } private void updateHeight(Node n) { n.height = 1 + Math.max(height(n.left), height(n.right)); } pr...
repos\tutorials-master\data-structures-2\src\main\java\com\baeldung\avltree\AVLTree.java
1
请完成以下Java代码
public Integer getStatus() { return status; } /** * Whether this status code is in the HTTP series * {@link HttpStatus.Series#INFORMATIONAL}. * @return <code>true</code> if status code is in the INFORMATIONAL http series */ public boolean is1xxInformational() { return HttpStatus.Series.INFORMATIONAL.equ...
} /** * Whether this status code is in the HTTP series * {@link HttpStatus.Series#SERVER_ERROR}. * @return <code>true</code> if status code is in the SERVER_ERROR http series */ public boolean is5xxServerError() { return HttpStatus.Series.SERVER_ERROR.equals(getSeries()); } public HttpStatus.Series getS...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\common\HttpStatusHolder.java
1
请完成以下Java代码
private void mitigateAgainstTimingAttack(UsernamePasswordAuthenticationToken authentication) { if (authentication.getCredentials() != null) { Assert.notNull(this.userNotFoundEncodedPassword, "userNotFoundEncodedPassword cannot be null"); String presentedPassword = authentication.getCredentials().toString(); ...
} protected UserDetailsService getUserDetailsService() { return this.userDetailsService; } public void setUserDetailsPasswordService(UserDetailsPasswordService userDetailsPasswordService) { Assert.notNull(userDetailsPasswordService, "userDetailsPasswordService cannot be null"); this.userDetailsPasswordServic...
repos\spring-security-main\core\src\main\java\org\springframework\security\authentication\dao\DaoAuthenticationProvider.java
1
请在Spring Boot框架中完成以下Java代码
public Date getCompletedAfter() { return completedAfter; } public void setCompletedAfter(Date completedAfter) { this.completedAfter = completedAfter; } public Date getTerminatedBefore() { return terminatedBefore; } public void setTerminatedBefore(Date terminatedBefore)...
public String getReferenceId() { return referenceId; } public void setReferenceId(String referenceId) { this.referenceId = referenceId; } public String getReferenceType() { return referenceType; } public void setReferenceType(String referenceType) { this.refere...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\planitem\HistoricPlanItemInstanceQueryRequest.java
2
请完成以下Java代码
public class UsageInfo { private long devices; private long maxDevices; private long assets; private long maxAssets; private long customers; private long maxCustomers; private long users; private long maxUsers; private long dashboards; private long maxDashboards; private lon...
private long transportMessages; private long maxTransportMessages; private long jsExecutions; private long tbelExecutions; private long maxJsExecutions; private long maxTbelExecutions; private long emails; private long maxEmails; private long sms; private long maxSms; private Boo...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\UsageInfo.java
1
请完成以下Java代码
public Comment writeCommentToArticle(Article article, String body) { return article.addComment(this, body); } public Article favoriteArticle(Article articleToFavorite) { articleFavorited.add(articleToFavorite); return articleToFavorite.afterUserFavoritesArticle(this); } public ...
void changeBio(String bio) { profile.changeBio(bio); } void changeImage(Image image) { profile.changeImage(image); } public Long getId() { return id; } public Email getEmail() { return email; } public UserName getName() { return profile.getUser...
repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\domain\user\User.java
1
请在Spring Boot框架中完成以下Java代码
public void setDeploymentId(String deploymentId) { this.deploymentId = deploymentId; } @ApiModelProperty(example = "http://localhost:8081/repository/deployments/2") public String getDeploymentUrl() { return deploymentUrl; } public void setDeploymentUrl(String deploymentUrl) { ...
@ApiModelProperty(example = "http://localhost:8182/repository/deployments/2/resources/testProcess.png", value = "Contains a graphical representation of the process, null when no diagram is available.") public String getDiagramResource() { return diagramResource; } public void setGraphicalNotationDe...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\repository\ProcessDefinitionResponse.java
2
请完成以下Java代码
public static Integer findFirstNonRepeatedElementUsingIndex(List<Integer> list) { for (int i = 0; i < list.size(); i++) { if (list.indexOf(list.get(i)) == list.lastIndexOf(list.get(i))) { return list.get(i); } } return null; } public static Intege...
return null; } public static Integer findFirstNonRepeatingUsingArray(List<Integer> list) { int maxElement = Collections.max(list); int[] frequency = new int[maxElement + 1]; for (int num : list) { frequency[num]++; } for (int num : list) { if (fre...
repos\tutorials-master\algorithms-modules\algorithms-searching\src\main\java\com\baeldung\algorithms\firstnonrepeating\FirstNonRepeatingElement.java
1
请完成以下Java代码
public void init(TbContext ctx, TbNodeConfiguration configuration) {} @Override public void onMsg(TbContext ctx, TbMsg msg) throws ExecutionException, InterruptedException, TbNodeException { JsonNode jsonNode = JacksonUtil.toJsonNode(msg.getData()); if (jsonNode.isArray()) { ArrayNo...
} }); data.forEach(msgNode -> { TbMsg outMsg = msg.transform() .data(JacksonUtil.toString(msgNode)) .build(); ctx.enqueueForTellNext(outMsg, TbNodeConnectionType.SUCCESS, wrapper::onSuccess, w...
repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\transform\TbSplitArrayMsgNode.java
1
请完成以下Java代码
class NotificationGroupMap { @NonNull public static final NotificationGroupMap EMPTY = new NotificationGroupMap(ImmutableList.of()); @NonNull private final ImmutableMap<NotificationGroupId, NotificationGroup> byId; @NonNull private final ImmutableMap<NotificationGroupName, NotificationGroup> byName; private Notif...
} public Optional<NotificationGroupName> getNameById(@NonNull final NotificationGroupId notificationGroupId) { return Optional.ofNullable(byId.get(notificationGroupId)).map(NotificationGroup::getName); } public Optional<NotificationGroupId> getIdByName(final NotificationGroupName name) { return getByName(nam...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\notification\impl\NotificationGroupMap.java
1
请完成以下Java代码
private int addTableTranslations(final String trlTableName, final String adLanguage) { final String baseTableName = trlTableName.substring(0, trlTableName.length() - 4); final POInfo poInfo = POInfo.getPOInfo(baseTableName); if (poInfo == null) { logger.error("No POInfo found for {}", baseTableName); ret...
.append(", UpdatedBy") .append(", IsActive") .append(", " + keyColumn) .append(cols) .append(")") .append("\n SELECT ") .append(DB.TO_STRING(adLanguage)) // AD_Language .append(", ").append(DB.TO_BOOLEAN(false)) // IsTranslated .append(", " + tblAlias + ".AD_Client_ID") // AD_Client_ID .append(...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\impl\LanguageDAO.java
1
请完成以下Java代码
public static ExecutorService newWorkStealingPool(int parallelism, String namePrefix) { return new ForkJoinPool(parallelism, new ThingsBoardForkJoinWorkerThreadFactory(namePrefix), null, true); } public static ExecutorService newWorkStealingPool(int parallelism, Class cl...
ThingsBoardThreadFactory.forName(name), new ThreadPoolExecutor.CallerRunsPolicy()); executor.allowCoreThreadTimeOut(true); return executor; } public static ScheduledExecutorService newSingleThreadScheduledExecutor(String name) { return Executors.unconfigurableScheduledEx...
repos\thingsboard-master\common\util\src\main\java\org\thingsboard\common\util\ThingsBoardExecutors.java
1
请完成以下Java代码
public String toString() { return MoreObjects.toStringHelper(this) .add("size", byId.size()) .toString(); } public Collection<KPI> toCollection() { return byId.values(); } @Nullable public KPI getByIdOrNull(@NonNull final KPIId kpiId) { return byId.get(kpiId); } } @Builder
@ToString private static class KPILoadingContext { @NonNull private final ImmutableListMultimap<KPIId, I_WEBUI_KPI_Field> kpiFieldDefsMap; @NonNull private final HashMap<Integer, I_AD_Element> adElementsById = new HashMap<>(); public ImmutableList<I_WEBUI_KPI_Field> getFields(@NonNull final KPIId kpiId) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\kpi\descriptor\KPIRepository.java
1
请完成以下Java代码
private static final class BigDecimalValueConverter implements ValueConverter<BigDecimal, BigDecimalStringExpression> { @Override public BigDecimal convertFrom(final Object valueObj, final ExpressionContext options) { if (valueObj == null) { return null; } else if (valueObj instanceof BigDecimal...
{ public SingleParameterExpression(final ExpressionContext context, final Compiler<BigDecimal, BigDecimalStringExpression> compiler, final String expressionStr, final CtxName parameter) { super(context, compiler, expressionStr, parameter); } @Override protected Object extractParameterValue(final Evaluatee...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\impl\BigDecimalStringExpressionSupport.java
1
请在Spring Boot框架中完成以下Java代码
public String getHandlerType() { return handlerType; } @ApiModelProperty(example = "3") public Integer getRetries() { return retries; } public void setRetries(Integer retries) { this.retries = retries; } @ApiModelProperty(example = "null") public String getExce...
public void setLockOwner(String lockOwner) { this.lockOwner = lockOwner; } @ApiModelProperty(example = "2023-06-03T22:05:05.474+0000") public Date getLockExpirationTime() { return lockExpirationTime; } public void setLockExpirationTime(Date lockExpirationTime) { this.lockEx...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\management\JobResponse.java
2
请在Spring Boot框架中完成以下Java代码
public class OLCandAggregationColumn { String columnName; AdColumnId adColumnId; int orderBySeqNo; boolean splitOrderDiscriminator; boolean groupByColumn; Granularity granularity; public enum Granularity { Day, Week, Month } @Builder private OLCandAggregationColumn( @NonNull final String columnName, ...
Check.assumeNotEmpty(columnName, "columnName is not empty"); this.columnName = columnName; this.adColumnId = adColumnId; this.orderBySeqNo = orderBySeqNo > 0 ? orderBySeqNo : -1; this.splitOrderDiscriminator = splitOrderDiscriminator; this.groupByColumn = groupByColumn; this.granularity = granularity; } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\api\OLCandAggregationColumn.java
2
请完成以下Java代码
public ImmutableList<I_AD_Process_Para> getProcessParamsByProcessIds(@NonNull final Set<Integer> processIDs) { return queryBL.createQueryBuilder(I_AD_Process_Para.class) .addOnlyActiveRecordsFilter() .addInArrayFilter(I_AD_Process_Para.COLUMNNAME_AD_Process_ID, processIDs) .create() .list() .stre...
{ return queryBL.createQueryBuilderOutOfTrx(I_AD_Process.class) .addOnlyActiveRecordsFilter() .orderBy(I_AD_Process.COLUMNNAME_AD_Process_ID) .create() .idsAsSet(AdProcessId::ofRepoId); } @NonNull @Override public List<I_AD_Process> retrieveProcessRecordsByValRule(@NonNull final AdValRuleId valRu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\impl\ADProcessDAO.java
1
请完成以下Java代码
void addHeader(ServerWebExchange exchange, NameValueConfig config) { // if response has been commited, no more response headers will bee added. if (!exchange.getResponse().isCommitted()) { String name = Objects.requireNonNull(config.getName(), "name must not be null"); String rawValue = Objects.requireNonNull...
public static class Config extends AbstractNameValueGatewayFilterFactory.NameValueConfig { private boolean override = true; public boolean isOverride() { return override; } public Config setOverride(boolean override) { this.override = override; return this; } @Override public String toString(...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\AddResponseHeaderGatewayFilterFactory.java
1
请完成以下Java代码
public void consume(final I_AD_UI_Element uiElement, final I_AD_UI_ElementGroup parent) { logger.debug("Generated in memory {} for {}", uiElement, parent); elementGroup2elements.put(parent, uiElement); } @Override public List<I_AD_UI_Element> getUIElements(final I_AD_UI_ElementGroup uiElementGroup) { return...
.collect(ImmutableList.toImmutableList()); } @Override public void consume(final I_AD_UI_ElementField uiElementField, final I_AD_UI_Element parent) { logger.debug("Generated in memory {} for {}", uiElementField, parent); element2elementFields.put(parent, uiElementField); } @Override public List<I_AD_UI_Ele...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\factory\standard\InMemoryUIElementsProvider.java
1
请完成以下Java代码
private IndexedHUProcessDescriptors getIndexedHUProcessDescriptors() { return huProcessDescriptors.getOrLoad(0, this::retrieveIndexedHUProcessDescriptors); } private IndexedHUProcessDescriptors retrieveIndexedHUProcessDescriptors() { final ImmutableList<HUProcessDescriptor> huProcessDescriptors = Services.get(...
builder.provideAsUserAction(huProcessRecord.isProvideAsUserAction()); builder.acceptOnlyTopLevelHUs(huProcessRecord.isApplyToTopLevelHUsOnly()); return builder.build(); } private static final class IndexedHUProcessDescriptors { private final ImmutableMap<AdProcessId, HUProcessDescriptor> huProcessDescriptors...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\process\api\impl\MHUProcessDAO.java
1
请完成以下Java代码
private boolean isRowLoading() { if (m_mField == null) { return false; } final String rowLoadingStr = Env.getContext(Env.getCtx(), m_mField.getWindowNo(), m_mField.getVO().TabNo, GridTab.CTX_RowLoading); return "Y".equals(rowLoadingStr); } /* package */IValidationContext getValidationContext() { fin...
public void addFocusListener(final FocusListener l) { getEditorComponent().addFocusListener(l); } @Override public void removeFocusListener(FocusListener l) { getEditorComponent().removeFocusListener(l); } public void setInfoWindowEnabled(final boolean enabled) { this.infoWindowEnabled = enabled; if ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VLookup.java
1
请完成以下Java代码
public String getName() { return name; } public void setName(String name) { this.name = name; } public Long getAuthorId() { return authorId; } public void setAuthorId(Long authorId) { this.authorId = authorId; } public int getAge() { re...
public void setGenre(String genre) { this.genre = genre; } public List<Book> getBooks() { return books; } public void setBooks(List<Book> books) { this.books = books; } @Override public String toString() { return "Author{" + "name=" + name + ", authorId=" +...
repos\Hibernate-SpringBoot-master\HibernateSpringBootCompositeKeySeqIdClass\src\main\java\com\bookstore\entity\Author.java
1
请完成以下Java代码
public class UploadMediaResponse extends BaseResponse { private String type; @JSONField(name = "media_id") private String mediaId; @JSONField(name = "created_at") private Date createdAt; public String getType() { return type; } public void setType(String type) { this.t...
return mediaId; } public void setMediaId(String mediaId) { this.mediaId = mediaId; } public Date getCreatedAt() { return createdAt; } public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; } }
repos\spring-boot-quick-master\quick-wx-public\src\main\java\com\wx\pn\api\response\UploadMediaResponse.java
1
请完成以下Java代码
public static double getDistance( Double longitude1, Double latitude1, Double longitude2, Double latitude2) { double radiansLongitude1 = toRadians(longitude1); double radiansLatitude1 = toRadians(latitude1); double radiansLongitude2 = toRadians(longitude2); double radiansLatitude2 = Math.toRadians...
.multiply(BigDecimal.valueOf(Math.sin(radiansLatitude2)))) .doubleValue(); double acos = Math.acos(cos); return BigDecimal.valueOf(EARTH_RADIUS).multiply(BigDecimal.valueOf(acos)).doubleValue(); } /** * refer:{@link Math#toRadians(double)} * * @param value value * @return {double} ...
repos\springboot-demo-master\geodesy\src\main\java\com\et\geodesy\util\MathDistanceUtil.java
1
请完成以下Java代码
public String modelChange(final PO po, int type) { onNewAndChangeAndDelete(po, type); return null; } private void onNewAndChangeAndDelete(final PO po, int type) { if (!(type == TYPE_AFTER_NEW || type == TYPE_AFTER_CHANGE || type == TYPE_AFTER_DELETE)) { return; } final I_C_OrderLine ol = InterfaceW...
final boolean newOrDelete = type == TYPE_AFTER_NEW || type == TYPE_AFTER_DELETE; final boolean lineNetAmtChanged = po.is_ValueChanged(I_C_OrderLine.COLUMNNAME_LineNetAmt); final FreightCostRule freightCostRule = FreightCostRule.ofCode(orderPO.getFreightCostRule()); final boolean isCopy = InterfaceWrapp...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\modelvalidator\OrderLine.java
1
请完成以下Java代码
public void setPP_WF_Node_Asset_ID (int PP_WF_Node_Asset_ID) { if (PP_WF_Node_Asset_ID < 1) set_ValueNoCheck (COLUMNNAME_PP_WF_Node_Asset_ID, null); else set_ValueNoCheck (COLUMNNAME_PP_WF_Node_Asset_ID, Integer.valueOf(PP_WF_Node_Asset_ID)); } /** Get Workflow Node Asset. @return Workflow Node Asset ...
Method of ordering records; lowest number comes first */ public void setSeqNo (int SeqNo) { set_ValueNoCheck (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Sequence. @return Method of ordering records; lowest number comes first */ public int getSeqNo () { Integer ii = (Integer)get_Value(COLUM...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_WF_Node_Asset.java
1
请完成以下Java代码
public DiagnosticsCollector getDiagnosticsCollector() { return diagnosticsCollector; } public void setDiagnosticsCollector(DiagnosticsCollector diagnosticsCollector) { this.diagnosticsCollector = diagnosticsCollector; } public TelemetryDataImpl getTelemetryData() { return telemetryData; } publ...
return new ExceptionCodeInterceptor(builtinExceptionCodeProvider, customExceptionCodeProvider); } public DiagnosticsRegistry getDiagnosticsRegistry() { return diagnosticsRegistry; } public ProcessEngineConfiguration setDiagnosticsRegistry(DiagnosticsRegistry diagnosticsRegistry) { this.diagnosticsRegi...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cfg\ProcessEngineConfigurationImpl.java
1
请完成以下Spring Boot application配置
spring: # Kafka 配置项,对应 KafkaProperties 配置类 kafka: bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔 # Kafka Producer 配置项 producer: acks: 1 # 0-不应答。1-leader 应答。all-所有 leader 和 follower 应答。 retries: 3 # 发送失败时,重试发送的次数 key-serializer: org.apache.kafka.common.serialization...
packages: cn.iocoder.springboot.lab03.kafkademo.message # Kafka Consumer Listener 监听器配置 listener: missing-topics-fatal: false # 消费监听接口监听的主题不存在时,默认会报错。所以通过设置为 false ,解决报错 logging: level: org: springframework: kafka: ERROR # spring-kafka INFO 日志太多了,所以我们限制只打印 ERROR 级别 apache: ...
repos\SpringBoot-Labs-master\lab-03-kafka\lab-03-kafka-demo\src\main\resources\application.yaml
2
请完成以下Java代码
private static final class CacheKey { private static final Class<?>[] CACHEABLE_TYPES = new Class<?>[] { ApiVersion.class, SecurityContext.class, WebServerNamespace.class }; private final ApiVersion apiVersion; private final @Nullable Principal principal; private final @Nullable WebServerNamespace serve...
return true; } if (obj == null || getClass() != obj.getClass()) { return false; } CacheKey other = (CacheKey) obj; return this.apiVersion.equals(other.apiVersion) && ObjectUtils.nullSafeEquals(this.principal, other.principal) && ObjectUtils.nullSafeEquals(this.serverNamespace, other.serverN...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\invoker\cache\CachingOperationInvoker.java
1
请完成以下Java代码
public class SignaturePropertiesType { @XmlElement(name = "SignatureProperty", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true) protected List<SignaturePropertyType> signatureProperty; @XmlAttribute(name = "Id") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlID @XmlSche...
* Gets the value of the id property. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link Stri...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\SignaturePropertiesType.java
1
请完成以下Java代码
public String getPassword() { return password; } @Override public String getUsername() { return username; } @Override public boolean isAccountNonExpired() { return true; } @Override public boolean isAccountNonLocked() { return true; } @Over...
} @Override public boolean isEnabled() { return true; } @Override public int hashCode() { return super.hashCode(); } @Override public boolean equals(Object obj) { return super.equals(obj); } }
repos\SpringBoot-Projects-FullStack-master\Part-9.SpringBoot-React-Projects\Project-2.SpringBoot-React-ShoppingMall\fullstack\backend\src\main\java\com\urunov\security\UserPrincipal.java
1
请完成以下Java代码
public final class MutableBigDecimal extends Number implements IMutable<BigDecimal> { /** * */ private static final long serialVersionUID = -171154938877066205L; private BigDecimal value; public MutableBigDecimal(final BigDecimal value) { super(); Check.assumeNotNull(value, "value not null"); this.valu...
@Override public short shortValue() { return value.shortValue(); } public void add(final BigDecimal augend) { value = value.add(augend); } public void subtract(final BigDecimal subtrahend) { value = value.subtract(subtrahend); } public void multiply(final BigDecimal multiplicand) { value = value.m...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\lang\MutableBigDecimal.java
1
请完成以下Java代码
protected String getLineDescription(@NonNull final String delimiter) { return getLineDescriptionList().stream() .filter(Check::isNotBlank) .collect(Collectors.joining(delimiter)); } @Override @NonNull protected List<String> getLineDescriptionList() { final List<String> lineDesc = new ArrayList<>(); ...
@Nullable protected String getCcy() { return entry.getAmt().getCcy(); } @Override @Nullable protected BigDecimal getAmtValue() { return entry.getAmt().getValue(); } public boolean isBatchTransaction() {return getEntryTransaction().size() > 1;} @Override public List<ITransactionDtlsWrapper> getTransact...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java\de\metas\banking\camt53\wrapper\v02\BatchReportEntry2Wrapper.java
1
请完成以下Java代码
public BPartnerGroupAccounts getAccounts(@NonNull final BPGroupId bpGroupId, @NonNull final AcctSchemaId acctSchemaId) { final ImmutableMap<AcctSchemaId, BPartnerGroupAccounts> map = cache.getOrLoad(bpGroupId, this::retrieveAccounts); final BPartnerGroupAccounts accounts = map.get(acctSchemaId); if (accounts == ...
.collect(ImmutableMap.toImmutableMap(BPartnerGroupAccounts::getAcctSchemaId, accounts -> accounts)); } @NonNull private static BPartnerGroupAccounts fromRecord(@NonNull final I_C_BP_Group_Acct record) { return BPartnerGroupAccounts.builder() .acctSchemaId(AcctSchemaId.ofRepoId(record.getC_AcctSchema_ID())) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\accounts\BPartnerGroupAccountsRepository.java
1
请在Spring Boot框架中完成以下Java代码
public class BookstoreService { private final AuthorRepository authorRepository; public BookstoreService(AuthorRepository authorRepository) { this.authorRepository = authorRepository; } public AuthorView fetchNextPage(long id, int limit) { List<Author> authors = authorRepository.fetch...
return new AuthorViewDto(authors, true); } // Or, like this (rely on Author.toString() method): /* public Map<List<Author>, Boolean> fetchNextPage(long id, int limit) { List<Author> authors = authorRepository.fetchAll(id, limit + 1); if (authors.size() == (limit + 1)) { aut...
repos\Hibernate-SpringBoot-master\HibernateSpringBootKeysetPaginationNextPage\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
public String getTitle() { return title; } public String getLanguage() { return language; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((language == null) ? 0 : language.hashCode()); result = pri...
return false; if (getClass() != obj.getClass()) return false; BookId other = (BookId) obj; if (language == null) { if (other.language != null) return false; } else if (!language.equals(other.language)) return false; if (title ==...
repos\tutorials-master\persistence-modules\java-jpa\src\main\java\com\baeldung\jpa\primarykeys\BookId.java
1