instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
class Order implements AutoCloseable { private final Cleaner cleaner; private Cleaner.Cleanable cleanable; public Order(Cleaner cleaner) { this.cleaner = cleaner; } public void register(Product product, int id) { this.cleanable = cleaner.register(product, new CleaningAction(id)); ...
static class CleaningAction implements Runnable { private final int id; public CleaningAction(int id) { this.id = id; } @Override public void run() { System.out.printf("Object with id %s is garbage collected. %n", id); } } }
repos\tutorials-master\core-java-modules\core-java-9\src\main\java\com\baeldung\java9\finalizers\Order.java
1
请在Spring Boot框架中完成以下Java代码
public class Employee { @Id @GeneratedValue private Long id; private String lastName; private String department; public Long getId() { return id; } public void setId(Long id) { this.id = id; }
public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getDepartment() { return department; } public void setDepartment(String department) { this.department = department; } }
repos\tutorials-master\persistence-modules\hibernate-queries-2\src\main\java\com\baeldung\hibernate\listentity\entity\Employee.java
2
请完成以下Java代码
public static CostDetailCreateResultsList ofList(@NonNull final List<CostDetailCreateResult> list) { if (list.isEmpty()) { return EMPTY; } return new CostDetailCreateResultsList(list); } public static CostDetailCreateResultsList ofNullable(@Nullable final CostDetailCreateResult result) { return result...
public AggregatedCostAmount toAggregatedCostAmount() { final CostSegment costSegment = CollectionUtils.extractSingleElement(list, CostDetailCreateResult::getCostSegment); final Map<CostElement, CostAmountDetailed> amountsByCostElement = list.stream() .collect(Collectors.toMap( CostDetailCreateResult::ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\CostDetailCreateResultsList.java
1
请完成以下Java代码
public final class QtyRejectedReasonCode { public static final ReferenceId REFERENCE_ID = ReferenceId.ofRepoId(X_M_Picking_Candidate.REJECTREASON_AD_Reference_ID); public static QtyRejectedReasonCode ofCode(@NonNull final String code) { return interner.intern(new QtyRejectedReasonCode(code)); } public static O...
{ Check.assumeNotEmpty(code, "code not empty"); this.code = code; } @Override @Deprecated public String toString() { return getCode(); } @JsonValue public String toJson() { return getCode(); } @Nullable public static String toCode(@Nullable QtyRejectedReasonCode reasonCode) {return reasonCode != ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\QtyRejectedReasonCode.java
1
请完成以下Java代码
public final ResultSet getGeneratedKeys() throws SQLException { return delegate.getGeneratedKeys(); } @Override public final int executeUpdate(final String sql, final int autoGeneratedKeys) throws SQLException { return trace(sql, () -> delegate.executeUpdate(sql, autoGeneratedKeys)); } @Override public fi...
public final int getResultSetHoldability() throws SQLException { return delegate.getResultSetHoldability(); } @Override public final boolean isClosed() throws SQLException { return delegate.isClosed(); } @Override public final void setPoolable(final boolean poolable) throws SQLException { delegate.setP...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\sql\impl\TracingStatement.java
1
请在Spring Boot框架中完成以下Java代码
public void closed(CommandContext commandContext) { execute(commandContext); } public void execute(CommandContext commandContext) { asyncExecutor.executeAsyncJob(job); } @Override public void closing(CommandContext commandContext) { } @Override public void afterSession...
@Override public void closeFailure(CommandContext commandContext) { } @Override public Integer order() { return 10; } @Override public boolean multipleAllowed() { return true; } }
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\asyncexecutor\AsyncJobAddedNotification.java
2
请完成以下Java代码
protected String doIt() throws Exception { if ( posKeyLayoutId == 0 ) throw new FillMandatoryException("C_POSKeyLayout_ID"); int count = 0; String where = ""; Object [] params = new Object[] {}; if ( productCategoryId > 0 ) { where = "M_Product_Category_ID = ? "; params = new Object[] {productC...
{ final I_C_POSKey key = InterfaceWrapperHelper.newInstance(I_C_POSKey.class, this); key.setName(product.getName()); key.setM_Product_ID(product.getM_Product_ID()); key.setC_POSKeyLayout_ID(posKeyLayoutId); key.setSeqNo(count*10); key.setQty(Env.ONE); InterfaceWrapperHelper.save(key); count++; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\process\PosKeyGenerate.java
1
请完成以下Java代码
public ProcessCaptionMapper getProcessCaptionMapperForNetAmountsFromQuery(final IQuery<I_C_Invoice_Candidate> query) { final List<Amount> netAmountsToInvoiceList = computeNetAmountsToInvoiceForQuery(query); if (netAmountsToInvoiceList.isEmpty()) { return null; } final ITranslatableString netAmountsToInvo...
Check.assumeNotEmpty(amounts, "amounts is not empty"); final TranslatableStringBuilder builder = TranslatableStrings.builder(); for (final Amount amt : amounts) { if (!builder.isEmpty()) { builder.append(" "); } builder.append(amt); } return builder.build(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\process\C_Invoice_Candidate_ProcessCaptionMapperHelper.java
1
请完成以下Spring Boot application配置
remoteservice.command.group.key=RemoteServiceGroup remoteservice.command.key=RemoteServiceKey remoteservice.command.execution.timeout=10000 remoteservice.command.threadpool.coresize=5 remoteservice.command.threadpool.maxsize=10 remot
eservice.command.task.queue.size=5 remoteservice.command.sleepwindow=5000 remoteservice.timeout=15000
repos\tutorials-master\hystrix\src\main\resources\application.properties
2
请完成以下Java代码
public CanonicalizationMethodType getCanonicalizationMethod() { return canonicalizationMethod; } /** * Sets the value of the canonicalizationMethod property. * * @param value * allowed object is * {@link CanonicalizationMethodType } * */ public void ...
* * */ public List<ReferenceType2> getReference() { if (reference == null) { reference = new ArrayList<ReferenceType2>(); } return this.reference; } /** * Gets the value of the id property. * * @return * possible object is * ...
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\SignedInfoType.java
1
请在Spring Boot框架中完成以下Java代码
public String getDeptIds(String tenantId, String deptNames) { return deptService.getDeptIds(tenantId, deptNames); } @Override public List<String> getDeptNames(String deptIds) { return deptService.getDeptNames(deptIds); } @Override public String getPostIds(String tenantId, String postNames) { return postSe...
@GetMapping(API_PREFIX + "/getRoleName") public String getRoleName(Long id) { return roleService.getById(id).getRoleName(); } @Override public List<String> getRoleNames(String roleIds) { return roleService.getRoleNames(roleIds); } @Override @GetMapping(API_PREFIX + "/getRoleAlias") public String getRoleAl...
repos\SpringBlade-master\blade-service\blade-system\src\main\java\org\springblade\system\feign\SysClient.java
2
请完成以下Java代码
public void setExecutionListeners(List<ActivitiListener> executionListeners) { this.executionListeners = executionListeners; } @JsonIgnore public FlowElementsContainer getParentContainer() { return parentContainer; } @JsonIgnore public SubProcess getSubProcess() { SubPr...
} public abstract FlowElement clone(); public void setValues(FlowElement otherElement) { super.setValues(otherElement); setName(otherElement.getName()); setDocumentation(otherElement.getDocumentation()); executionListeners = new ArrayList<ActivitiListener>(); if (other...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\FlowElement.java
1
请完成以下Java代码
private boolean isVaryWildcard(ServerHttpResponse response) { HttpHeaders headers = response.getHeaders(); List<String> varyValues = headers.getOrEmpty(HttpHeaders.VARY); return varyValues.stream().anyMatch(VARY_WILDCARD::equals); } private boolean isCacheControlAllowed(HttpMessage request) { HttpHeaders he...
cache.put(cacheKey, cachedResponse); } catch (RuntimeException anyException) { LOGGER.error("Error writing into cache. Data will not be cached", anyException); } } private void saveMetadataInCache(String metadataKey, CachedResponseMetadata metadata) { try { cache.put(metadataKey, metadata); } catch...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\cache\ResponseCacheManager.java
1
请在Spring Boot框架中完成以下Java代码
public AuthenticationManager getObject() throws Exception { this.delegate.setAuthenticationEventPublisher(this.authenticationEventPublisher); this.delegate.setEraseCredentialsAfterAuthentication(this.eraseCredentialsAfterAuthentication); if (!this.observationRegistry.isNoop()) { return new ObservationAuthe...
} } public static final class FilterChainDecoratorFactory implements FactoryBean<FilterChainProxy.FilterChainDecorator> { private ObservationRegistry observationRegistry = ObservationRegistry.NOOP; @Override public FilterChainProxy.FilterChainDecorator getObject() throws Exception { if (this.observati...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\http\HttpSecurityBeanDefinitionParser.java
2
请完成以下Java代码
public UpdateProcessInstancesSuspensionStateBuilder byProcessInstanceQuery(ProcessInstanceQuery processInstanceQuery) { this.processInstanceQuery = processInstanceQuery; return this; } @Override public UpdateProcessInstancesSuspensionStateBuilder byHistoricProcessInstanceQuery(HistoricProcessInstanceQuer...
return commandExecutor.execute(new UpdateProcessInstancesSuspendStateBatchCmd(commandExecutor, this, true)); } @Override public Batch activateAsync() { return commandExecutor.execute(new UpdateProcessInstancesSuspendStateBatchCmd(commandExecutor, this, false)); } public List<String> getProcessInstanceId...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\UpdateProcessInstancesSuspensionStateBuilderImpl.java
1
请完成以下Java代码
protected Map<URL, ProcessesXml> parseProcessesXmlFiles(final AbstractProcessApplication processApplication) { String[] deploymentDescriptors = getDeploymentDescriptorLocations(processApplication); List<URL> processesXmlUrls = getProcessesXmlUrls(deploymentDescriptors, processApplication); Map<URL, Proces...
ProcessApplication annotation = processApplication.getClass().getAnnotation(ProcessApplication.class); if(annotation == null) { return new String[] {ProcessApplication.DEFAULT_META_INF_PROCESSES_XML}; } else { return annotation.deploymentDescriptors(); } } protected boolean isEmptyFile(UR...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\deployment\ParseProcessesXmlStep.java
1
请完成以下Java代码
public List<HistoricActivityInstance> findHistoricActivityInstancesByNativeQuery(Map<String, Object> parameterMap) { return getDbSqlSession().selectListWithRawParameter("selectHistoricActivityInstanceByNativeQuery", parameterMap); } @Override public long findHistoricActivityInstanceCountByNativeQue...
} @Override public void deleteHistoricActivityInstancesForNonExistingProcessInstances() { getDbSqlSession().delete("bulkDeleteHistoricActivityInstancesForNonExistingProcessInstances", null, HistoricActivityInstanceEntityImpl.class); } protected void setSafeInValueLists(HistoricActivityInstance...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\data\impl\MybatisHistoricActivityInstanceDataManager.java
1
请完成以下Java代码
public OrgId getOrgId() {return getClientAndOrgId().getOrgId();} public DDOrderCandidate withForwardPPOrderId(@Nullable final PPOrderId newPPOrderId) { final PPOrderRef forwardPPOrderRefNew = PPOrderRef.withPPOrderId(forwardPPOrderRef, newPPOrderId); if (Objects.equals(this.forwardPPOrderRef, forwardPPOrderRefNe...
updateProcessed(); } @Nullable public OrderId getSalesOrderId() { return salesOrderLineId != null ? salesOrderLineId.getOrderId() : null; } private void updateProcessed() { this.processed = getQtyToProcess().signum() == 0; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddordercandidate\DDOrderCandidate.java
1
请在Spring Boot框架中完成以下Java代码
public class SimulatedCandidateService { @NonNull private final CandidateRepositoryWriteService candidateService; @NonNull private final List<SimulatedCleanUpService> simulatedCleanUpServiceList; public SimulatedCandidateService( final @NonNull CandidateRepositoryWriteService candidateService, final @NonNu...
return candidateService.deleteCandidatesAndDetailsByQuery(deleteCandidatesQuery); } public void deactivateAllSimulatedCandidates() { candidateService.deactivateSimulatedCandidates(); } private void cleanUpSimulatedRelatedRecords() { for (final SimulatedCleanUpService cleanUpService : simulatedCleanUpService...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\SimulatedCandidateService.java
2
请完成以下Java代码
public void setComponentsCostPrice( @NonNull final CostAmount costPrice, @NonNull final CostElementId costElementId) { pricesByElementId.computeIfAbsent(costElementId, k -> BOMCostElementPrice.zero(costElementId, costPrice.getCurrencyId(), uomId)) .setComponentsCostPrice(costPrice); } public void clearC...
} ImmutableList<BOMCostElementPrice> getElementPrices() { return ImmutableList.copyOf(pricesByElementId.values()); } <T extends RepoIdAware> Stream<T> streamIds(@NonNull final Class<T> idType) { return getElementPrices() .stream() .map(elementCostPrice -> elementCostPrice.getId(idType)) .filter(O...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\costing\BOMCostPrice.java
1
请完成以下Java代码
public int getAD_Role_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_Role_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Lesen und Schreiben. @param IsReadWrite Field is read / write */ @Override public void setIsReadWrite (boolean IsReadWrite) { set_Value (COLUMNNAME_...
/** Get Lesen und Schreiben. @return Field is read / write */ @Override public boolean isReadWrite () { Object oo = get_Value(COLUMNNAME_IsReadWrite); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Form_Access.java
1
请完成以下Java代码
public void setRemoteAddr (final @Nullable java.lang.String RemoteAddr) { set_Value (COLUMNNAME_RemoteAddr, RemoteAddr); } @Override public java.lang.String getRemoteAddr() { return get_ValueAsString(COLUMNNAME_RemoteAddr); } @Override public void setRemoteHost (final @Nullable java.lang.String RemoteHos...
{ return get_ValueAsString(COLUMNNAME_Status); } @Override public void setTime (final java.sql.Timestamp Time) { set_Value (COLUMNNAME_Time, Time); } @Override public java.sql.Timestamp getTime() { return get_ValueAsTimestamp(COLUMNNAME_Time); } @Override public void setUI_Trace_ExternalId (final @...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_API_Request_Audit.java
1
请完成以下Java代码
public String getMeta_Content () { return (String)get_Value(COLUMNNAME_Meta_Content); } /** Set Meta Copyright. @param Meta_Copyright Contains Copyright information for the content */ public void setMeta_Copyright (String Meta_Copyright) { set_Value (COLUMNNAME_Meta_Copyright, Meta_Copyright); } /...
public void setMeta_RobotsTag (String Meta_RobotsTag) { set_Value (COLUMNNAME_Meta_RobotsTag, Meta_RobotsTag); } /** Get Meta RobotsTag. @return RobotsTag defines how search robots should handle this content */ public String getMeta_RobotsTag () { return (String)get_Value(COLUMNNAME_Meta_RobotsTag); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_WebProject.java
1
请完成以下Java代码
public class ReturnedMessage { private final Message message; private final int replyCode; private final String replyText; private final String exchange; private final String routingKey; public ReturnedMessage(Message message, int replyCode, String replyText, String exchange, String routingKey) { this.mes...
* Get the reply text. * @return the reply text. */ public String getReplyText() { return this.replyText; } /** * Get the exchange. * @return the exchange name. */ public String getExchange() { return this.exchange; } /** * Get the routing key. * @return the routing key. */ public String get...
repos\spring-amqp-main\spring-amqp\src\main\java\org\springframework\amqp\core\ReturnedMessage.java
1
请完成以下Java代码
public void deleteDeploymentAndRelatedData(String deploymentId, boolean cascade) { AppDefinitionEntityManager appDefinitionEntityManager = getAppDefinitionEntityManager(); List<AppDefinition> appDefinitions = appDefinitionEntityManager.createAppDefinitionQuery().deploymentId(deploymentId).list(); ...
public AppDeploymentQuery createDeploymentQuery() { return new AppDeploymentQueryImpl(engineConfiguration.getCommandExecutor()); } @Override public List<AppDeployment> findDeploymentsByQueryCriteria(AppDeploymentQuery deploymentQuery) { return dataManager.findDeploymentsByQueryCriteria(...
repos\flowable-engine-main\modules\flowable-app-engine\src\main\java\org\flowable\app\engine\impl\persistence\entity\AppDeploymentEntityManagerImpl.java
1
请完成以下Java代码
public void attachURL( @PathVariable("windowId") final String windowIdStr, @PathVariable("documentId") final String documentId, @RequestBody @NonNull final JSONAttachURLRequest request) { userSession.assertLoggedIn(); getDocumentAttachments(windowIdStr, documentId) .addURLEntry(request.getName(), req...
{ case Data: return DocumentAttachmentRestControllerHelper.extractResponseEntryFromData(entry); case URL: return DocumentAttachmentRestControllerHelper.extractResponseEntryFromURL(entry); case LocalFileURL: return DocumentAttachmentRestControllerHelper.extractResponseEntryFromLocalFileURL(entry); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\attachments\DocumentAttachmentsRestController.java
1
请完成以下Java代码
public @NonNull String getSourceTableName() { return I_C_Order_Line_Alloc.Table_Name; } @Override public List<String> getSourceColumnNames() { return Collections.emptyList(); } /** * Updates the ASI of the <code>C_Order_Line_Alloc</code>'s <code>C_OrderLine</code> with the BPartner's ADR attribute, <b>if...
final boolean forceApply = false; // task 08803 ...as of now, EDI-order lines shall have the same attribute values that manually created order lines have. new BPartnerAwareAttributeUpdater() .setBPartnerAwareFactory(OrderLineBPartnerAware.factory) .setBPartnerAwareAttributeService(Services.get(IADRAttributeB...
repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\org\adempiere\mm\attributes\listeners\adr\OrderLineAllocADRModelAttributeSetInstanceListener.java
1
请完成以下Java代码
public class WidgetTypeStandardNumberPrecision { public static final WidgetTypeStandardNumberPrecision DEFAULT = builder() .amountPrecision(OptionalInt.of(2)) .costPricePrecision(OptionalInt.of(2)) .build(); @NonNull private final OptionalInt amountPrecision; @NonNull private final OptionalInt costPricePrec...
public WidgetTypeStandardNumberPrecision fallbackTo(@NonNull WidgetTypeStandardNumberPrecision other) { return builder() .amountPrecision(firstPresent(this.amountPrecision, other.amountPrecision)) .costPricePrecision(firstPresent(this.costPricePrecision, other.costPricePrecision)) .quantityPrecision(firs...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\WidgetTypeStandardNumberPrecision.java
1
请完成以下Java代码
protected final void closeAllViewsAndShowInitialView() { closeAllViewsExcludingInitialView(); afterCloseOpenView(getInitialViewId()); } private final void closeAllViewsExcludingInitialView() { IView currentView = getView(); while (currentView != null && currentView.getParentViewId() != null) { try ...
} final ViewId viewId = currentView.getParentViewId(); currentView = viewsRepo.getViewIfExists(viewId); } } protected final void afterCloseOpenView(final ViewId viewId) { getResult().setWebuiViewToOpen(WebuiViewToOpen.builder() .viewId(viewId.toJson()) .target(ViewOpenTarget.ModalOverlay) .bu...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\products_proposal\process\ProductsProposalViewBasedProcess.java
1
请完成以下Java代码
private String getAuthenticationType(AuthorizationObservationContext<?> context) { if (context.getAuthentication() == null) { return "n/a"; } return context.getAuthentication().getClass().getSimpleName(); } private String getObjectType(AuthorizationObservationContext<?> context) { if (context.getObject() ...
if (context.getAuthorizationResult() == null) { return "unknown"; } return String.valueOf(context.getAuthorizationResult().isGranted()); } private String getAuthorities(AuthorizationObservationContext<?> context) { if (context.getAuthentication() == null) { return "n/a"; } return String.valueOf(conte...
repos\spring-security-main\core\src\main\java\org\springframework\security\authorization\AuthorizationObservationConvention.java
1
请在Spring Boot框架中完成以下Java代码
public Optional<SecurPharmConfig> getDefaultConfig() { return getDefaultConfigId().map(this::getById); } private Optional<SecurPharmConfigId> getDefaultConfigId() { return defaultConfigIdCache.getOrLoad(0, this::retrieveDefaultConfigId); } private Optional<SecurPharmConfigId> retrieveDefaultConfigId() { ...
public SecurPharmConfig getById(@NonNull final SecurPharmConfigId configId) { return configsCache.getOrLoad(configId, this::retrieveById); } private SecurPharmConfig retrieveById(@NonNull final SecurPharmConfigId configId) { final I_M_Securpharm_Config record = loadOutOfTrx(configId, I_M_Securpharm_Config.clas...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java\de\metas\vertical\pharma\securpharm\config\DatabaseBackedSecurPharmConfigRespository.java
2
请完成以下Java代码
protected void prepare() { final IRangeAwareParams params = getParameterAsIParams(); warehouseFromId = getWarehouseId(params, "M_Warehouse_ID"); warehouseToId = getWarehouseId(params, "M_Warehouse_Dest_ID"); // make sure user selected different warehouses if (WarehouseId.equals(warehouseFromId, warehouseToI...
} private Iterator<HUToDistribute> retrieveHUs() { return handlingUnitsDAO.createHUQueryBuilder() .setContext(getCtx(), ITrx.TRXNAME_ThreadInherited) .setOnlyTopLevelHUs() .addOnlyInWarehouseId(warehouseFromId) .addOnlyWithAttribute(IHUMaterialTrackingBL.ATTRIBUTENAME_IsQualityInspection, IHUMateri...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\materialtracking\process\DD_Order_GenerateForQualityInspectionFlaggedHUs.java
1
请在Spring Boot框架中完成以下Java代码
public void restoreBook() { bookRepository.restoreById(1L); } @Transactional public void restoreAuthor() { authorRepository.restoreById(1L); bookRepository.restoreByAuthorId(1L); } public void displayAllExceptDeletedAuthors() { List<Author> authors = authorR...
List<Book> books = bookRepository.findAll(); System.out.println("\nAll books except deleted:"); books.forEach(b -> System.out.println("Book title: " + b.getTitle())); System.out.println(); } public void displayAllIncludeDeletedBooks() { List<Book> books = bookRepository.findAll...
repos\Hibernate-SpringBoot-master\HibernateSpringBootSoftDeletes\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
public boolean isAlreadyPacked(@NonNull final ProductId productId, @NonNull final Quantity qty, @Nullable final HuPackingInstructionsId packingInstructionsId) { return isSingleProductWithQtyEqualsTo(productId, qty) && HuPackingInstructionsId.equals(packingInstructionsId, getPackingInstructionsId()); } pu...
} else { return false; } } } // // // ------------------------------------ // // @Value(staticConstructor = "of") @EqualsAndHashCode(doNotUseGetters = true) private static class HuPackingInstructionsIdAndCaptionAndCapacity { @NonNull HuPackingInstructionsId huPackingInstructionsId; @NonNul...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\candidate\commands\PackToHUsProducer.java
1
请完成以下Java代码
public ShipmentScheduleSegmentBuilder productId(final int productId) { productIds.add(productId); return this; } public ShipmentScheduleSegmentBuilder bpartnerId(final int bpartnerId) { bpartnerIds.add(bpartnerId); return this; } public ShipmentScheduleSegmentBuilder locatorId(final int locatorId) { ...
public ShipmentScheduleSegmentBuilder warehouseIdIfNotNull(final @Nullable WarehouseId warehouseId) { if (warehouseId == null) { return this; } return warehouseId(warehouseId); } public ShipmentScheduleSegmentBuilder attributeSetInstanceId(final int M_AttributeSetInstance_ID) { final AttributeSetInsta...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\invalidation\segments\ShipmentScheduleSegmentBuilder.java
1
请完成以下Java代码
public List<Map.Entry<Integer, Float>> nearest(String query) { return queryNearest(query, 10); } /** * 查询最相似的前n个文档 * * @param query 查询语句(或者说一个文档的内容) * @return */ public List<Map.Entry<Integer, Float>> nearest(String query, int n) { return queryNearest(query,...
{ Vector A = query(what); if (A == null) return -1f; Vector B = query(with); if (B == null) return -1f; return A.cosineForUnitVector(B); } public Segment getSegment() { return segment; } public void setSegment(Segment segment) { this.segm...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\DocVectorModel.java
1
请在Spring Boot框架中完成以下Java代码
public List<String> getName() { if (name == null) { name = new ArrayList<String>(); } return this.name; } /** * Gets the value of the department property. * * @return * possible object is * {@link String } * */ public Stri...
*/ public String getTown() { return town; } /** * Sets the value of the town property. * * @param value * allowed object is * {@link String } * */ public void setTown(String value) { this.town = value; } /** * Gets 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\extensions\edifact\DeliveryPointDetails.java
2
请在Spring Boot框架中完成以下Java代码
public class TenantAwareAcquireTimerJobsRunnable extends AcquireTimerJobsRunnable { protected TenantInfoHolder tenantInfoHolder; protected String tenantId; public TenantAwareAcquireTimerJobsRunnable(AsyncExecutor asyncExecutor, TenantInfoHolder tenantInfoHolder, String tenantId, int moveExecutorPoolSize) ...
} @Override public synchronized void run() { tenantInfoHolder.setCurrentTenantId(tenantId); super.run(); tenantInfoHolder.clearCurrentTenantId(); } @Override protected void executeMoveTimerJobsToExecutableJobs(List<TimerJobEntity> timerJobs) { try { tena...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\asyncexecutor\multitenant\TenantAwareAcquireTimerJobsRunnable.java
2
请在Spring Boot框架中完成以下Java代码
public void saveData(RpUserPayInfo rpUserPayInfo) { rpUserPayInfoDao.insert(rpUserPayInfo); } @Override public void updateData(RpUserPayInfo rpUserPayInfo) { rpUserPayInfoDao.update(rpUserPayInfo); } @Override public RpUserPayInfo getDataById(String id) { return rpUserPayInfoDao.getById(id); } @Overrid...
public PageBean listPage(PageParam pageParam, RpUserPayInfo rpUserPayInfo) { Map<String, Object> paramMap = new HashMap<String, Object>(); return rpUserPayInfoDao.listPage(pageParam, paramMap); } /** * 通过商户编号获取商户支付配置信息 * * @param userNO * @return */ @Override public RpUserPayInfo getByUserNo(String u...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\user\service\impl\RpUserPayInfoServiceImpl.java
2
请完成以下Java代码
public class ChildrenImpl extends CmmnElementImpl implements Children { protected static ChildElementCollection<CaseFileItem> caseFileItemCollection; public ChildrenImpl(ModelTypeInstanceContext instanceContext) { super(instanceContext); } public Collection<CaseFileItem> getCaseFileItems() { return c...
.instanceProvider(new ModelTypeInstanceProvider<Children>() { public Children newInstance(ModelTypeInstanceContext instanceContext) { return new ChildrenImpl(instanceContext); } }); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); caseFileItemCollection = seque...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\ChildrenImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class User { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String name; @Column(unique = true) private String email; private boolean activated; public Long getId() { return id; } public String getName() { return name...
} public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public boolean isActivated() { return activated; } public void setActivated(boolean activated) { this.activated = activated; } }
repos\tutorials-master\persistence-modules\spring-boot-persistence-5\src\main\java\com\baeldung\detachentity\domain\User.java
2
请完成以下Java代码
public abstract class SpringCamelBehavior extends CamelBehavior { private static final long serialVersionUID = 1L; protected final Object contextLock = new Object(); @Override protected CamelContext getCamelContext(DelegateExecution execution, boolean isV5Execution) { // Get the appropriate ...
// Convert it to a SpringProcessEngineConfiguration. If this doesn't work, throw a RuntimeException. try { SpringProcessEngineConfiguration springConfiguration = (SpringProcessEngineConfiguration) engineConfiguration; if (StringUtils.isEmpty(camelContextValue)) { ...
repos\flowable-engine-main\modules\flowable-camel\src\main\java\org\flowable\camel\SpringCamelBehavior.java
1
请完成以下Java代码
public String getBookName() { return bookName; } public void setBookName(String bookName) { this.bookName = bookName; } public String getAuthorName() { return authorName; } public void setAuthorName(String authorName) { this.authorName = authorName; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Book book = (Book) o; return Objects.equals(id, book.id); } @Override public int hashCode() { return Objects...
repos\tutorials-master\persistence-modules\spring-boot-persistence-mongodb\src\main\java\com\baeldung\logging\model\Book.java
1
请完成以下Java代码
public Optional<Amount> getServiceFeeInREMADVCurrency(@NonNull final RemittanceAdviceLine remittanceAdviceLine) { if (remittanceAdviceLine.getServiceFeeAmount() == null || remittanceAdviceLine.getServiceFeeAmount().isZero()) { return Optional.empty(); } final Amount serviceFeeAmount = remittanceAdviceL...
Env.getClientId(), remittanceAdviceLine.getOrgId()); final Currency serviceFeeCurrency = currencyDAO.getByCurrencyCode(serviceFeeAmount.getCurrencyCode()); final Currency remittedCurrency = currencyDAO.getByCurrencyCode(remittanceAdviceLine.getRemittedAmount().getCurrencyCode()); final Money serviceFeeMon...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\remittanceadvice\RemittanceAdviceService.java
1
请完成以下Java代码
public static <T> Set<T> asHashSet(T... elements) { Set<T> set = new HashSet<>(); Collections.addAll(set, elements); return set; } public static <S, T> void addToMapOfLists(Map<S, List<T>> map, S key, T value) { List<T> list = map.get(key); if (list == null) { list = new ArrayList<>(); ...
List<List<T>> parts = new ArrayList<>(); final int listSize = list.size(); if (listSize <= partitionSize) { // no need for partitioning parts.add(list); } else { for (int i = 0; i < listSize; i += partitionSize) { parts.add(new ArrayList<>(list.subList(i, Math.min(listSize, i + p...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\util\CollectionUtil.java
1
请完成以下Java代码
public boolean isPrintoutForOtherUser() { return get_ValueAsBoolean(COLUMNNAME_IsPrintoutForOtherUser); } /** * ItemName AD_Reference_ID=540735 * Reference name: ItemName */ public static final int ITEMNAME_AD_Reference_ID=540735; /** Rechnung = Rechnung */ public static final String ITEMNAME_Rechnung = ...
@Override public java.lang.String getPrintingQueueAggregationKey() { return get_ValueAsString(COLUMNNAME_PrintingQueueAggregationKey); } @Override public void setProcessed (final boolean Processed) { set_Value (COLUMNNAME_Processed, Processed); } @Override public boolean isProcessed() { return get_Val...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_C_Printing_Queue.java
1
请完成以下Java代码
public HUEditorViewBuilder setFilters(final DocumentFilterList filters) { this.filters = filters; return this; } DocumentFilterList getFilters() { return filters != null ? filters : DocumentFilterList.EMPTY; } public HUEditorViewBuilder orderBy(@NonNull final DocumentQueryOrderBy orderBy) { if (orderBy...
{ return parameters != null ? ImmutableMap.copyOf(parameters) : ImmutableMap.of(); } @Nullable public <T> T getParameter(@NonNull final String name) { if (parameters == null) { return null; } @SuppressWarnings("unchecked") final T value = (T)parameters.get(name); return value; } public void asse...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorViewBuilder.java
1
请在Spring Boot框架中完成以下Java代码
public class X_C_Project_Repair_Consumption_Summary extends org.compiere.model.PO implements I_C_Project_Repair_Consumption_Summary, org.compiere.model.I_Persistent { private static final long serialVersionUID = 866752045L; /** Standard Constructor */ public X_C_Project_Repair_Consumption_Summary (final Pro...
else set_Value (COLUMNNAME_C_UOM_ID, C_UOM_ID); } @Override public int getC_UOM_ID() { return get_ValueAsInt(COLUMNNAME_C_UOM_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...
repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java-gen\de\metas\servicerepair\repository\model\X_C_Project_Repair_Consumption_Summary.java
2
请在Spring Boot框架中完成以下Java代码
public class BookReview extends AbstractAggregateRoot<BookReview> implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String content; private String email; @Enumerated(EnumType.STRING)...
public void setEmail(String email) { this.email = email; } public ReviewStatus getStatus() { return status; } public void setStatus(ReviewStatus status) { this.status = status; } @Override public boolean equals(Object obj) { if (obj == null) { ...
repos\Hibernate-SpringBoot-master\HibernateSpringBootDomainEvents\src\main\java\com\bookstore\entity\BookReview.java
2
请完成以下Java代码
public class MeterLogEntity implements DbEntity, HasDbReferences, Serializable { private static final long serialVersionUID = 1L; protected String id; protected Date timestamp; protected Long milliseconds; protected String name; protected String reporter; protected long value; public MeterLogEnti...
return name; } public void setName(String name) { this.name = name; } public long getValue() { return value; } public void setValue(long value) { this.value = value; } public String getReporter() { return reporter; } public void setReporter(String reporter) { this.reporter =...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\MeterLogEntity.java
1
请完成以下Java代码
public DocumentType3Code getCd() { return cd; } /** * Sets the value of the cd property. * * @param value * allowed object is * {@link DocumentType3Code } * */ public void setCd(DocumentType3Code value) { this.cd = value; } /** ...
return prtry; } /** * Sets the value of the prtry property. * * @param value * allowed object is * {@link String } * */ public void setPrtry(String value) { this.prtry = value; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\CreditorReferenceType1Choice.java
1
请完成以下Java代码
public void completeNonScopeEventSubprocess() { logDebug( "039", "Destroy non-socpe event subprocess"); } public void endConcurrentExecutionInEventSubprocess() { logDebug( "040", "End concurrent execution in event subprocess"); } public ProcessEngineException missingDelegateVariableMap...
"042", "Execution with id '{}' throws an error event with errorCode '{}' and errorMessage '{}', but no error handler was defined. ", executionId, errorCode, errorMessage)); } public ProcessEngineException missingBoundaryCatchEventEscalation(String executionId, String escalationCode...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\behavior\BpmnBehaviorLogger.java
1
请在Spring Boot框架中完成以下Java代码
private LUPickingTarget reinitializeLUPickingTarget(@Nullable final LUPickingTarget luPickingTarget) { if (luPickingTarget == null) { return null; } final HuId luId = luPickingTarget.getLuId(); if (luId == null) { return luPickingTarget; } final I_M_HU lu = huService.getById(luId); if (!huSer...
final HuPackingInstructionsIdAndCaption luPI = huService.getEffectivePackingInstructionsIdAndCaption(lu); return LUPickingTarget.ofPackingInstructions(luPI); } // // // @Value @Builder private static class StepUnpickInstructions { @NonNull PickingJobStepId stepId; @NonNull PickingJobStepPickFromKey pick...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\service\commands\PickingJobUnPickCommand.java
2
请完成以下Java代码
public void setPA_SLA_Criteria_ID (int PA_SLA_Criteria_ID) { if (PA_SLA_Criteria_ID < 1) set_Value (COLUMNNAME_PA_SLA_Criteria_ID, null); else set_Value (COLUMNNAME_PA_SLA_Criteria_ID, Integer.valueOf(PA_SLA_Criteria_ID)); } /** Get SLA Criteria. @return Service Level Agreement Criteria */ public ...
/** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Process Now. @return Process Now */ public boolean isProcessing () { Object oo = get_Value(COLUMNNAME_Processing); if (oo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_SLA_Goal.java
1
请完成以下Java代码
public void addLUId(@NonNull final HuId luId) { allTopLevelHUIds.add(luId); luIds.add(luId); } public void addTopLevelTUId(@NonNull final HuId tuId) { allTopLevelHUIds.add(tuId); topLevelTUIds.add(tuId); } public boolean isEmpty() { return allTopLevelHUIds.isEmpty(); }
public ImmutableSet<HuId> getAllTopLevelHUIds() { return ImmutableSet.copyOf(allTopLevelHUIds); } public ImmutableSet<HuId> getLUIds() { return ImmutableSet.copyOf(luIds); } public ImmutableSet<HuId> getTopLevelTUIds() { return ImmutableSet.copyOf(topLevelTUIds); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\LUIdsAndTopLevelTUIdsCollector.java
1
请完成以下Java代码
public class CaseCallActivityBehavior extends CallableElementActivityBehavior implements MigrationObserverBehavior { protected void startInstance(ActivityExecution execution, VariableMap variables, String businessKey) { ExecutionEntity executionEntity = (ExecutionEntity) execution; CmmnCaseDefinition defini...
public void onParseMigratingInstance(MigratingInstanceParseContext parseContext, MigratingActivityInstance migratingInstance) { ActivityImpl callActivity = (ActivityImpl) migratingInstance.getSourceScope(); // A call activity is typically scope and since we guarantee stability of scope executions during migrat...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\behavior\CaseCallActivityBehavior.java
1
请完成以下Java代码
protected I_C_RfQResponseLine createRfqResponseLine(final Supplier<I_C_RfQResponse> responseSupplier, final I_C_RfQLine rfqLine) { final I_C_RfQResponse rfqResponse = responseSupplier.get(); final Properties ctx = InterfaceWrapperHelper.getCtx(rfqResponse); final I_C_RfQResponseLine rfqResponseLine = InterfaceW...
// From RfQ Line rfqResponseLine.setC_RfQLine(rfqLine); rfqResponseLine.setLine(rfqLine.getLine()); rfqResponseLine.setM_Product_ID(rfqLine.getM_Product_ID()); rfqResponseLine.setC_UOM_ID(rfqLine.getC_UOM_ID()); rfqResponseLine.setQtyRequiered(rfqLine.getQty()); rfqResponseLine.setDescription(rfqLine.getDes...
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\impl\DefaultRfQResponseProducer.java
1
请完成以下Java代码
public boolean canGenerateValue(final Properties ctx, final IAttributeSet attributeSet, final I_M_Attribute attribute) { return false; } /** * Creates an ADR attribute value for the C_BPartner which is specified by <code>tableId</code> and <code>recordId</code>. */ @Override public AttributeListValue genera...
final String adrRegionValue = Services.get(IADRAttributeBL.class).getADRForBPartner(partner, isSOTrx); if (Check.isEmpty(adrRegionValue, true)) { return null; } // // Fetched AD_Ref_List record final ADRefListItem adRefList = ADReferenceService.get().retrieveListItemOrNull(I_C_BPartner.ADRZertifizierung...
repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\org\adempiere\mm\attributes\spi\impl\ADRAttributeGenerator.java
1
请完成以下Java代码
public class MongoReactiveHealthIndicator extends AbstractReactiveHealthIndicator { private static final Document HELLO_COMMAND = Document.parse("{ hello: 1 }"); private final MongoClient mongoClient; public MongoReactiveHealthIndicator(MongoClient mongoClient) { super("Mongo health check failed"); Assert.not...
List<String> databases = new ArrayList<>(); databaseDetails.put("databases", databases); for (HelloResponse response : responses) { databases.add(response.database()); databaseDetails.putIfAbsent("maxWireVersion", response.document().getInteger("maxWireVersion")); } return databaseDetails; ...
repos\spring-boot-4.0.1\module\spring-boot-mongodb\src\main\java\org\springframework\boot\mongodb\health\MongoReactiveHealthIndicator.java
1
请完成以下Java代码
public int getId() { return id; } public void setId(int id) { this.id = id; } public String getSellerName() { return sellerName; } public void setSellerName(String sellerName) { this.sellerName = sellerName; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Seller seller = (Seller) o; return Objects.equals(sellerName, seller.sellerName); } @Override public int hashCode() { return Object...
repos\tutorials-master\persistence-modules\hibernate-mapping-2\src\main\java\com\baeldung\hibernate\persistmaps\mapkeyjoincolumn\Seller.java
1
请完成以下Java代码
public DocumentFieldDependencyMap build() { if (type2name2dependencies.isEmpty()) { return EMPTY; } return new DocumentFieldDependencyMap(this); } private ImmutableMap<DependencyType, Multimap<String, String>> getType2Name2DependenciesMap() { final ImmutableMap.Builder<DependencyType, Multim...
for (final String dependsOnFieldName : dependsOnFieldNames) { fieldName2dependsOnFieldNames.put(dependsOnFieldName, fieldName); } return this; } public Builder add(@Nullable final DocumentFieldDependencyMap dependencies) { if (dependencies == null || dependencies == EMPTY) { return this; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentFieldDependencyMap.java
1
请完成以下Java代码
public Response getPojoResponse() { Person person = new Person("Abh", "Nepal"); return Response .status(Response.Status.OK) .entity(person) .build(); } @GET @Path("/json") public Response getJsonResponse() { String message = "{\"hello\": \"This i...
.type(MediaType.APPLICATION_JSON) .build(); } @GET @Path("/xml") @Produces(MediaType.TEXT_XML) public String sayXMLHello() { return "<?xml version=\"1.0\"?>" + "<hello> This is a xml response </hello>"; } @GET @Path("/html") @Produces(MediaType.TEXT_HTML) publ...
repos\tutorials-master\web-modules\jersey\src\main\java\com\baeldung\jersey\server\Responder.java
1
请在Spring Boot框架中完成以下Java代码
public CacheManager cacheManager() { return new ConcurrentMapCacheManager("books"); } // tag::customization-instance-exchange-filter-function[] @Bean public InstanceExchangeFilterFunction auditLog() { return (instance, request, next) -> next.exchange(request).doOnSubscribe((s) -> { if (HttpMethod.DELETE.equ...
public HttpHeadersProvider customHttpHeadersProvider() { return (instance) -> { HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.add("X-CUSTOM", "My Custom Value"); return httpHeaders; }; } // end::customization-http-headers-providers[] @Bean public HttpExchangeRepository httpTraceRepository()...
repos\spring-boot-admin-master\spring-boot-admin-samples\spring-boot-admin-sample-servlet\src\main\java\de\codecentric\boot\admin\sample\SpringBootAdminServletApplication.java
2
请在Spring Boot框架中完成以下Java代码
public class XmlServiceEx implements XmlService { @Nullable XmlXtraServiceExType xtraServiceExType; @NonNull Integer recordId; @NonNull String tariffType; @NonNull String code; @Nullable String refCode; @NonNull String name; @Nullable Integer session; @NonNull BigDecimal quantity; @NonNull XML...
*/ @NonNull BigDecimal amountTt; @NonNull BigDecimal amount; /** * expecting default = 0 */ @NonNull BigDecimal vatRate; /** * expecting default = false */ @Nullable Boolean validate; /** * expecting default = true */ @NonNull Boolean obligation; @Nullable String sectionCode; @Nullable...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_xversion\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_xversion\request\model\payload\body\service\XmlServiceEx.java
2
请完成以下Java代码
private LookupValue convertRawFieldValueToLookupValue(final Object fieldValue) { if (fieldValue == null) { return null; } else if (fieldValue instanceof LookupValue) { return (LookupValue)fieldValue; } else if (fieldValue instanceof LocalDate) { final LocalDate date = (LocalDate)fieldValue; ...
DisplayType.toBooleanString(booleanValue), msgBL.getTranslatableMsgText(booleanValue)); } else if (fieldValue instanceof String) { final String stringValue = (String)fieldValue; return StringLookupValue.of(stringValue, stringValue); } else { throw new AdempiereException("Value not supported: "...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\provider\standard\FacetsFilterLookupDescriptor.java
1
请在Spring Boot框架中完成以下Java代码
public class BookstoreService { private final BookRepository bookRepository; public BookstoreService(BookRepository bookRepository) { this.bookRepository = bookRepository; } @Transactional public void persistTwoBooks() { Book ar = new Book(); ar.setIsbn("001-AR"); ...
rh.setPrice(31); bookRepository.save(ar); bookRepository.save(rh); } // cache entities in SLC public void fetchBook() { Book book = bookRepository.findById(1L).orElseThrow(); } // cache query results in SLC public void fetchBookByPrice() { List<Book...
repos\Hibernate-SpringBoot-master\HibernateSpringBootHibernateSLCEhCacheKickoff\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
protected void marshalNonRootElement(Object parameter, Marshaller marshaller, DOMResult domResult) throws JAXBException { Class<?> parameterClass = parameter.getClass(); String simpleName = Introspector.decapitalize(parameterClass.getSimpleName()); JAXBElement<?> root = new JAXBElement(new QName(simpleName...
throw new SpinRuntimeException("The class '" + className + "' is not whitelisted for deserialization."); } } } } @Override public <T> T mapInternalToJava(Object parameter, String classIdentifier) { return mapInternalToJava(parameter, classIdentifier, null); } @SuppressWarnings("uncheck...
repos\camunda-bpm-platform-master\spin\dataformat-xml-dom\src\main\java\org\camunda\spin\impl\xml\dom\format\DomXmlDataFormatMapper.java
1
请完成以下Java代码
public void movePlanItemInstanceState(ChangePlanItemStateBuilderImpl changePlanItemStateBuilder, CommandContext commandContext) { String caseInstanceId = changePlanItemStateBuilder.getCaseInstanceId(); if (caseInstanceId == null) { throw new FlowableException("Could not resolve case...
.setChangePlanItemDefinitionsToAvailable(changePlanItemStateBuilder.getChangeToAvailableStatePlanItemDefinitions()) .setWaitingForRepetitionPlanItemDefinitions(changePlanItemStateBuilder.getWaitingForRepetitionPlanItemDefinitions()) .setRemoveWaitingForRepetitionPlanItemDefinitions(changePlanIte...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\DefaultCmmnDynamicStateManager.java
1
请完成以下Java代码
public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = autho...
public BigDecimal getPrice() { return price; } public void setPrice(BigDecimal price) { this.price = price; } @Override public String toString() { return "Book{" + "id=" + id + ", name='" + name + '\'' + ", author='" + author ...
repos\spring-boot-master\spring-rest-error-handling\src\main\java\com\mkyong\Book.java
1
请完成以下Java代码
public String getStrokeValue() { return "#585858"; } @Override public String getDValue() { return " M21.820839 10.171502 L18.36734 23.58992 L12.541380000000002 13.281818999999999 L8.338651200000001 19.071607 L12.048949000000002 5.832305699999999 L17.996148000000005 15.132659 L21.82083...
@Override public String getStyleValue() { return "fill:none;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10"; } @Override public Integer getWidth() { return 17; } @Override public Integer getHeight() { return 22; } @Override ...
repos\Activiti-develop\activiti-core\activiti-image-generator\src\main\java\org\activiti\image\impl\icon\ErrorIconType.java
1
请完成以下Java代码
public void close() throws IOException { inputStream.close(); } @Override public synchronized void mark(int readlimit) { inputStream.mark(readlimit); } @Override public synchronized void reset() throws IOException { inputS...
return inputStream.markSupported(); } }; } @Override public BufferedReader getReader() throws IOException { return EmptyBodyFilter.this.getReader(this.getInputStream()); } }; } }
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\filter\EmptyBodyFilter.java
1
请完成以下Java代码
public GatewayFilter apply(Config config) { return (exchange, chain) -> { if (exchange.getRequest() .getHeaders() .getAcceptLanguage() .isEmpty()) { String queryParamLocale = exchange.getRequest() .getQueryParams() ...
.replaceQueryParams(new LinkedMultiValueMap<String, String>()) .build() .toUri())) .build(); logger.info("Removed all query params: {}", modifiedExchange.getRequest() .getURI()); return chain.filter(modifiedExchange); ...
repos\tutorials-master\spring-cloud-modules\spring-cloud-gateway\src\main\java\com\baeldung\springcloudgateway\customfilters\gatewayapp\filters\factories\ModifyRequestGatewayFilterFactory.java
1
请完成以下Java代码
public void bulkMove(@RequestBody @NonNull final JsonBulkMoveHURequest request) { assertActionAccess(HUManagerAction.BulkActions); handlingUnitsService.bulkMove( BulkMoveHURequest.builder() .huQrCodes(request.getHuQRCodes().stream() .map(HUQRCode::fromGlobalQRCodeJsonString) .collect(Imm...
{ handlingUnitsService.printHULabels(request); final FrontendPrinterData printData = frontendPrinter.getDataAndClear(); return JsonPrintHULabelResponse.builder() .printData(JsonPrintHULabelResponse.JsonPrintDataItem.of(printData)) .build(); } } @GetMapping("/huLabels/printingOptions") public L...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.mobileui\src\main\java\de\metas\handlingunits\mobileui\HUManagerRestController.java
1
请完成以下Spring Boot application配置
spring: datasource: # dynamic-datasource-spring-boot-starter 动态数据源的配置内容 dynamic: primary: users # 设置默认的数据源或者数据源组,默认值即为 master datasource: # 订单 orders 数据源配置 orders: url: jdbc:mysql://127.0.0.1:3306/test_orders?useSSL=false&useUnicode=true&characterEncoding=UTF-8 ...
t password: # mybatis 配置内容 mybatis: config-location: classpath:mybatis-config.xml # 配置 MyBatis 配置文件路径 mapper-locations: classpath:mapper/*.xml # 配置 Mapper XML 地址 type-aliases-package: cn.iocoder.springboot.lab17.dynamicdatasource.dataobject # 配置数据库实体包路径
repos\SpringBoot-Labs-master\lab-17\lab-17-dynamic-datasource-baomidou-01\src\main\resources\application.yaml
2
请完成以下Java代码
public java.math.BigDecimal getPrev_CumulatedAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Prev_CumulatedAmt); if (bd == null) return BigDecimal.ZERO; return bd; } /** Set Previous Cumulated Quantity. @param Prev_CumulatedQty Previous Cumulated Quantity */ @Override public void setPrev_...
@Override public java.math.BigDecimal getPrev_CurrentCostPriceLL () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Prev_CurrentCostPriceLL); if (bd == null) return BigDecimal.ZERO; return bd; } /** Set Previous Current Qty. @param Prev_CurrentQty Previous Current Qty */ @Override public void s...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Cost_Collector_CostDetailAdjust.java
1
请在Spring Boot框架中完成以下Java代码
private static class ParameterNameFQ { @Nullable DetailId tabId; @Nullable String includedFilterId; @NonNull String parameterName; private static final Splitter SPLITTER = Splitter.on("."); public static ParameterNameFQ ofParameterNameFQ(@NonNull String parameterNameFQ) { final List<String> parts = SP...
} public String getAsString() { if (tabId == null) { return parameterName; } else { return tabId.toJson() + "." + includedFilterId + "." + parameterName; } } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\sql\SqlDefaultDocumentFilterConverter.java
2
请完成以下Java代码
public Timestamp getDateReval () { return (Timestamp)get_Value(COLUMNNAME_DateReval); } /** Set Accounting Fact. @param Fact_Acct_ID Accounting Fact */ public void setFact_Acct_ID (int Fact_Acct_ID) { if (Fact_Acct_ID < 1) set_ValueNoCheck (COLUMNNAME_Fact_Acct_ID, null); else set_ValueNoCheck ...
Open item amount */ public void setOpenAmt (BigDecimal OpenAmt) { set_Value (COLUMNNAME_OpenAmt, OpenAmt); } /** Get Open Amount. @return Open item amount */ public BigDecimal getOpenAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_OpenAmt); if (bd == null) return Env.ZERO; return b...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_T_InvoiceGL.java
1
请在Spring Boot框架中完成以下Java代码
private static final String extractUserName(final UserSession userSession) { final String userName = userSession.getUserName(); if (!Check.isEmpty(userName, true)) { return userName; } final UserId loggedUserId = userSession.getLoggedUserIdIfExists().orElse(null); if (loggedUserId != null) { retur...
{ final String userAgent = httpRequest.getHeader("User-Agent"); return userAgent; } catch (final Exception e) { e.printStackTrace(); return "?"; } } private static final String extractLoggedUserAndRemoteAddr(final String loggedUser, final String remoteAddr) { // NOTE: guard against null parame...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\config\ServletLoggingFilter.java
2
请完成以下Java代码
public Timestamp getValidTo () { return (Timestamp)get_Value(COLUMNNAME_ValidTo); } /** Set Search Key. @param Value Search key for the record in the format required - must be unique */ public void setValue (String Value) { set_Value (COLUMNNAME_Value, Value); } /** Get Search Key.
@return Search key for the record in the format required - must be unique */ public String getValue () { return (String)get_Value(COLUMNNAME_Value); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_Concept.java
1
请完成以下Java代码
public class FootballPlayer implements Comparable<FootballPlayer> { private final String name; private final int goalsScored; public FootballPlayer(String name, int goalsScored) { this.name = name; this.goalsScored = goalsScored; } public String getName() { return name; ...
public int compareTo(FootballPlayer anotherPlayer) { return Integer.compare(this.goalsScored, anotherPlayer.goalsScored); } @Override public boolean equals(Object object) { if (this == object) return true; if (object == null || getClass() != object.getClass()) ...
repos\tutorials-master\core-java-modules\core-java-lang-3\src\main\java\com\baeldung\compareto\FootballPlayer.java
1
请在Spring Boot框架中完成以下Java代码
public class OAuth2AuthorizationServerConfig extends AuthorizationServerConfigurerAdapter { /** * 用户认证 Manager */ @Autowired private AuthenticationManager authenticationManager; /** * Redis 连接的工厂 */ @Autowired private RedisConnectionFactory redisConnectionFactory; @Bea...
@Override public void configure(AuthorizationServerSecurityConfigurer oauthServer) throws Exception { oauthServer.checkTokenAccess("isAuthenticated()"); // oauthServer.tokenKeyAccess("isAuthenticated()") // .checkTokenAccess("isAuthenticated()"); // oauthServer.tokenKeyAccess("p...
repos\SpringBoot-Labs-master\lab-68-spring-security-oauth\lab-68-demo11-authorization-server-by-redis-store\src\main\java\cn\iocoder\springboot\lab68\authorizationserverdemo\config\OAuth2AuthorizationServerConfig.java
2
请完成以下Java代码
public static void setContext(SecurityContext context) { strategy.setContext(context); } /** * Sets a {@link Supplier} that will return the current context. Implementations can * override the default to avoid invoking {@link Supplier#get()}. * @param deferredContext a {@link Supplier} that returns the {@link...
SecurityContextHolder.strategy = strategy; initialize(); } /** * Allows retrieval of the context strategy. See SEC-1188. * @return the configured strategy for storing the security context. */ public static SecurityContextHolderStrategy getContextHolderStrategy() { return strategy; } /** * Delegates t...
repos\spring-security-main\core\src\main\java\org\springframework\security\core\context\SecurityContextHolder.java
1
请在Spring Boot框架中完成以下Java代码
public String getBankAccountAddress() { return bankAccountAddress; } /** * 开户行全称 * * @param bankAccountAddress */ public void setBankAccountAddress(String bankAccountAddress) { this.bankAccountAddress = bankAccountAddress == null ? null : bankAccountAddress.trim(); } /** * 结算金额 * * @return ...
/** * 打款确认时间 * * @param remitConfirmTime */ public void setRemitConfirmTime(Date remitConfirmTime) { this.remitConfirmTime = remitConfirmTime; } /** * 打款备注 * * @return */ public String getRemitRemark() { return remitRemark; } /** * 打款备注 * * @param remitRemark */ public void setRe...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\account\entity\RpSettRecord.java
2
请完成以下Java代码
public int getType() { return type; } public void setType(int type) { this.type = type; } public String getTemplatePath() { return templatePath; } public void setTemplatePath(String templatePath) { this.templatePath = templatePath; } public String getS...
* @return */ public static CgformEnum getCgformEnumByConfig(String code) { for (CgformEnum e : CgformEnum.values()) { if (e.code.equals(code)) { return e; } } return null; } /** * 根据类型找所有 * * @param type * @return ...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\constant\enums\CgformEnum.java
1
请完成以下Java代码
public String getTariffType() { return tariffType; } /** * Sets the value of the tariffType property. * * @param value * allowed object is * {@link String } * */ public void setTariffType(String value) { this.tariffType = value; } /*...
} /** * Gets the value of the dateEnd property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDateEnd() { return dateEnd; } /** * Sets the value of the dateEnd property. * * ...
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\CaseDetailType.java
1
请完成以下Java代码
public class SetDeploymentCategoryCmd implements Command<Void> { protected String deploymentId; protected String category; public SetDeploymentCategoryCmd(String deploymentId, String category) { this.deploymentId = deploymentId; this.category = category; } @Override public Voi...
return null; } public String getDeploymentId() { return deploymentId; } public void setDeploymentId(String deploymentId) { this.deploymentId = deploymentId; } public String getCategory() { return category; } public void setCategory(String category) { t...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\cmd\SetDeploymentCategoryCmd.java
1
请完成以下Java代码
private boolean selectedRowIsNotATopHU() { return getView(HUEditorView.class) .streamByIds(getSelectedRowIds()) .noneMatch(HUEditorRow::isTopLevel); } @Override public Object getParameterDefaultValue(final IProcessDefaultParameter parameter) { final I_DD_OrderLine ddOrderLine = getViewSelectedDDOrderL...
@NonNull private DDOrderLineId getViewSelectedDDOrderLineId() { final ViewId parentViewId = getView().getParentViewId(); final DocumentIdsSelection selectedParentRow = DocumentIdsSelection.of(ImmutableList.of(getView().getParentRowId())); final int selectedOrderLineId = viewsRepository.getView(parentViewId) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\ddorder\process\WEBUI_DD_OrderLine_MoveSelected_HU.java
1
请在Spring Boot框架中完成以下Java代码
public String getDATEFROM() { return datefrom; } /** * Sets the value of the datefrom property. * * @param value * allowed object is * {@link String } * */ public void setDATEFROM(String value) { this.datefrom = value; } /** * G...
*/ public void setDATETO(String value) { this.dateto = value; } /** * Gets the value of the days property. * * @return * possible object is * {@link String } * */ public String getDAYS() { return days; } /** * Sets the value...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\DDATE1.java
2
请完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getAuthor() { return author; ...
return datePublished; } public void setDatePublished(String datePublished) { this.datePublished = datePublished; } public int getWordCount() { return wordCount; } public void setWordCount(int wordCount) { this.wordCount = wordCount; } }
repos\tutorials-master\vertx-modules\vertx\src\main\java\com\baeldung\model\Article.java
1
请完成以下Java代码
public class Person { @Id @GeneratedValue Long id; private String name; private int born; @Relationship(type = "ACTED_IN") private List<Movie> movies; public Person() { } public String getName() { return name; } public int getBorn() { return born;
} public List<Movie> getMovies() { return movies; } public void setName(String name) { this.name = name; } public void setBorn(int born) { this.born = born; } public void setMovies(List<Movie> movies) { this.movies = movies; } }
repos\tutorials-master\persistence-modules\neo4j\src\main\java\com\baeldung\neo4j\domain\Person.java
1
请在Spring Boot框架中完成以下Java代码
private ShipmentScheduleInfo fromRecord(final I_M_ShipmentSchedule shipmentSchedule) { return ShipmentScheduleInfo.builder() .clientAndOrgId(ClientAndOrgId.ofClientAndOrg(shipmentSchedule.getAD_Client_ID(), shipmentSchedule.getAD_Org_ID())) .warehouseId(shipmentScheduleBL.getWarehouseId(shipmentSchedule)) ...
public Stream<Packageable> stream(@NonNull final PackageableQuery query) { return packagingDAO.stream(query); } public Quantity getQtyRemainingToScheduleForPicking(@NonNull final I_M_ShipmentSchedule shipmentScheduleRecord) { return huShipmentScheduleBL.getQtyRemainingToScheduleForPicking(shipmentScheduleRecor...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\service\external\shipmentschedule\PickingJobShipmentScheduleService.java
2
请在Spring Boot框架中完成以下Java代码
public Result<SysDictItem> deleteBatch(@RequestParam(name="ids",required=true) String ids) { Result<SysDictItem> result = new Result<SysDictItem>(); if(ids==null || "".equals(ids.trim())) { result.error500("参数不识别!"); }else { this.sysDictItemService.removeByIds(Arrays.asList(ids.split(","))); result.succe...
LambdaQueryWrapper<SysDictItem> queryWrapper = new LambdaQueryWrapper<SysDictItem>(); queryWrapper.eq(SysDictItem::getItemValue,sysDictItem.getItemValue()); queryWrapper.eq(SysDictItem::getDictId,sysDictItem.getDictId()); if (StringUtils.isNotBlank(sysDictItem.getId())) { // 编辑页面校验 queryWrapper.ne(SysDictIt...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\controller\SysDictItemController.java
2
请完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Gender getGender() { return gender; } public voi...
} public int getGrade() { return grade; } public void setGrade(int grade) { this.grade = grade; } @Override public String toString() { return "Student{" + "id='" + id + '\'' + ", name='" + name + '\'' + ", gender=" + gender + ", grade=" + grade + '}'; } }
repos\tutorials-master\persistence-modules\spring-data-redis\src\main\java\com\baeldung\spring\data\redis\model\Student.java
1
请在Spring Boot框架中完成以下Java代码
public class XxlJobConfig { @Value("${xxl.job.admin.addresses}") private String adminAddresses; @Value("${xxl.job.accessToken}") private String accessToken; @Value("${xxl.job.executor.appname}") private String appname; @Value("${xxl.job.executor.address}") private String address; @V...
@Bean public XxlJobSpringExecutor xxlJobExecutor() { log.info(">>>>>>>>>>> start xxl-job config init"); XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor(); xxlJobSpringExecutor.setAdminAddresses(adminAddresses); xxlJobSpringExecutor.setAppname(appname); x...
repos\springboot-demo-master\xxl-job\src\main\java\com\et\xxljob\config\XxlJobConfig.java
2
请完成以下Java代码
public Optional<DistributedMember> getDistributedMember() { return Optional.ofNullable(this.distributedMember); } /** * Returns an {@link Optional} reference to the {@link DistributedSystem} (cluster) to which the {@literal peer} * {@link Cache} is connected. * * @return an {@link Optional} reference to th...
* @see #getDistributedMember() */ @SuppressWarnings("unchecked") public T withMember(DistributedMember distributedMember) { this.distributedMember = distributedMember; return (T) this; } /** * An {@link Enum enumeration} of different type of {@link MembershipEvent MembershipEvents}. */ public enum Typ...
repos\spring-boot-data-geode-main\spring-geode-project\apache-geode-extensions\src\main\java\org\springframework\geode\distributed\event\MembershipEvent.java
1
请在Spring Boot框架中完成以下Java代码
public class FlatrateDataEntryId implements RepoIdAware { FlatrateTermId flatrateTermId; int repoId; @JsonCreator public static FlatrateDataEntryId ofRepoId(@NonNull final FlatrateTermId flatrateTermId, final int repoId) { return new FlatrateDataEntryId(flatrateTermId, repoId); } @Nullable public static Fla...
} private FlatrateDataEntryId(@NonNull final FlatrateTermId flatrateTermId, final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "repoId"); this.flatrateTermId = flatrateTermId; } @Override @JsonValue public int getRepoId() { return repoId; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\flatrate\dataEntry\FlatrateDataEntryId.java
2
请完成以下Java代码
public boolean supports(Class<? extends Object> auth) { return KerberosServiceRequestToken.class.isAssignableFrom(auth); } @Override public void afterPropertiesSet() throws Exception { Assert.notNull(this.ticketValidator, "ticketValidator must be specified"); Assert.notNull(this.userDetailsService, "userDetai...
this.ticketValidator = ticketValidator; } /** * Allows subclasses to perform any additional checks of a returned * <code>UserDetails</code> for a given authentication request. * @param userDetails as retrieved from the {@link UserDetailsService} * @param authentication validated {@link KerberosServiceRequest...
repos\spring-security-main\kerberos\kerberos-core\src\main\java\org\springframework\security\kerberos\authentication\KerberosServiceAuthenticationProvider.java
1
请完成以下Java代码
public String getParameter_ToAsString(final String parameterName) { return valuesTo.getParameterAsString(parameterName); } @Override public int getParameter_ToAsInt(final String parameterName, final int defaultValue) { return valuesTo.getParameterAsInt(parameterName, defaultValue); } @Override public bool...
public LocalDate getParameter_ToAsLocalDate(String parameterName) { return valuesTo.getParameterAsLocalDate(parameterName); } @Override public ZonedDateTime getParameterAsZonedDateTime(String parameterName) { return values.getParameterAsZonedDateTime(parameterName); } @Nullable @Override public Instant g...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\api\RangeAwareParams.java
1
请完成以下Java代码
public void add(final PurchaseCandidate candidate) { final BigDecimal qty = candidate.getQtyToOrder(); if (qty.signum() == 0) { return; } if (orderLine == null) { orderLine = createOrderLine(candidate); } orderLine.setQtyEntered(orderLine.getQtyEntered().add(qty)); // NOTE: we are not touchin...
final I_M_AttributeSetInstance asi; if (contractASI != null) { asi = attributeSetInstanceBL.copy(contractASI); } else { asi = null; } orderLine.setPMM_Contract_ASI(contractASI); orderLine.setM_AttributeSetInstance(asi); // // Quantities orderLine.setQtyEntered(BigDecimal.ZERO); orderLine....
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\order\impl\OrderLineAggregation.java
1
请完成以下Java代码
public class Movie { private String name; private String year; private String director; private Double rating; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getYear() { return year; }
public void setYear(String year) { this.year = year; } public String getDirector() { return director; } public void setDirector(String director) { this.director = director; } public Double getRating() { return rating; } public void setRating(Double rat...
repos\tutorials-master\web-modules\ratpack\src\main\java\com\baeldung\model\Movie.java
1