instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getProductCode() { return productCode; } public void setProductCode(String productCode) { this.productCode = productCode; } public int getQuantity()
{ return quantity; } public void setQuantity(int quantity) { this.quantity = quantity; } public Order getOrder() { return order; } public void setOrder(Order order) { this.order = order; } }
repos\Spring-Boot-Advanced-Projects-main\springboot-multiple-datasources\src\main\java\net\alanbinu\springboot\springbootmultipledatasources\orders\entities\OrderItem.java
1
请完成以下Java代码
public CamundaExecutionListener newInstance(ModelTypeInstanceContext instanceContext) { return new CamundaExecutionListenerImpl(instanceContext); } }); camundaEventAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_EVENT) .namespace(CAMUNDA_NS) .build(); camundaClass...
return camundaClassAttribute.getValue(this); } public void setCamundaClass(String camundaClass) { camundaClassAttribute.setValue(this, camundaClass); } public String getCamundaExpression() { return camundaExpressionAttribute.getValue(this); } public void setCamundaExpression(String camundaExpress...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\camunda\CamundaExecutionListenerImpl.java
1
请完成以下Java代码
protected Properties getCtx() { return migrationExecutorContext.getCtx(); } /** * Log error messages as WARNING and normal ones as INFO. * * @param msg * @param resolution * @param isError */ protected final void log(final String msg, final String resolution, final boolean isError) { final String...
{ sb.append(": ").append(msg.trim()); } if (resolution != null) { sb.append(" [").append(resolution).append("]"); } if(isError) { logger.error(sb.toString()); } else { logger.info(sb.toString()); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\executor\impl\AbstractMigrationStepExecutor.java
1
请在Spring Boot框架中完成以下Java代码
public Integer getRetries() { return retries; } public void setRetries(Integer retries) { this.retries = retries; } public String getExceptionMessage() { return exceptionMessage; } public void setExceptionMessage(String exceptionMessage) { this.exceptionMessage...
public String getLockOwner() { return lockOwner; } public void setLockOwner(String lockOwner) { this.lockOwner = lockOwner; } public Date getLockExpirationTime() { return lockExpirationTime; } public void setLockExpirationTime(Date lockExpirationTime) { this.lo...
repos\flowable-engine-main\modules\flowable-external-job-rest\src\main\java\org\flowable\external\job\rest\service\api\query\ExternalWorkerJobResponse.java
2
请完成以下Java代码
public <T> T decodeStream(final InputStream in, final Class<T> clazz) { if (in == null) { throw new IllegalArgumentException("'in' input stream is null"); } String str = null; try { str = Util.toString(in); return mapper.readValue(str, clazz); } catch (final Exception e) { throw new Runt...
{ try { return mapper.writeValueAsBytes(object); } catch (final Exception e) { throw new RuntimeException(e); } } @Override public String getContentType() { return "application/json"; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.printing.client\src\main\java\de\metas\printing\client\encoder\JsonBeanEncoder.java
1
请完成以下Java代码
public BigDecimal getQtyToAllocate() { return BigDecimal.ZERO; } @Override public BigDecimal getQtyAllocated() { return BigDecimal.ZERO; } @Override public boolean isZeroAllocated() { return true; } /** * @return true always */ @Override public boolean isCompleted()
{ return true; } @Override public List<IHUTransactionCandidate> getTransactions() { return Collections.emptyList(); } @Override public List<IHUTransactionAttribute> getAttributeTransactions() { return Collections.emptyList(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\NullAllocationResult.java
1
请在Spring Boot框架中完成以下Java代码
public String get(String key) { return stringRedisTemplate.opsForValue().get(key); } private static String name_sex = ""; public static int getNum(int start,int end) { return (int)(Math.random()*(end-start+1)+start); } private static String getChineseName() { int index=ge...
}else { name_sex="男"; } index=getNum(0,length-1); String second=str.substring(index, index+1); int hasThird=getNum(0,1); String third=""; if(hasThird==1){ index=getNum(0,length-1); third=str.substring(index, index+1); } ...
repos\spring-boot-quick-master\quick-redies\src\main\java\com\quick\redis\service\impl\CompanyServiceImpl.java
2
请完成以下Java代码
public static Builder builder() { return new DefaultBuilder(); } /** * Builder for {@link HttpRequestHeaderInterceptor}. */ public interface Builder { /** * Add names of HTTP headers to copy to the GraphQL context, using keys * identical to the header names. Only the first value is copied. * @par...
initMapper(header, contextKey); return this; } private void initMapper(String header, @Nullable String key) { this.mappers.add((headers, target) -> { Object value = headers.getFirst(header); if (value != null) { target.put((key != null) ? key : header, value); } }); } @Override pub...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\server\support\HttpRequestHeaderInterceptor.java
1
请完成以下Java代码
public class PaymentView_Launcher_From_BPartnerView extends ViewBasedProcessTemplate implements IProcessPrecondition { private final IViewsRepository viewsFactory = SpringContextHolder.instance.getBean(IViewsRepository.class); @Override protected ProcessPreconditionsResolution checkPreconditionsApplicable() { if...
.setParameter(PaymentsViewFactory.PARAMETER_TYPE_BPARTNER_ID, bPartnerId) .build()) .getViewId(); getResult().setWebuiViewToOpen(WebuiViewToOpen.builder() .viewId(viewId.getViewId()) .target(ViewOpenTarget.ModalOverlay) .build()); return MSG_OK; } private Optional<BPartnerId> getSingleSelec...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\payment_allocation\process\PaymentView_Launcher_From_BPartnerView.java
1
请完成以下Java代码
public Layout<? extends Serializable> getLayout() { return layout; } public Builder setLayout(Layout<? extends Serializable> layout) { this.layout = layout; return this; } public Filter getFilter() { return filter; } publ...
return topic; } public Builder setTopic(String topic) { this.topic = topic; return this; } public String getPartition() { return partition; } public Builder setPartition(String partition) { this.partition = partition; ...
repos\tutorials-master\logging-modules\log4j2\src\main\java\com\baeldung\logging\log4j2\plugins\KafkaAppender.java
1
请完成以下Java代码
public class Attributes { private static final Attributes EMPTY = new Attributes(ImmutableList.of()); @NonNull private final ImmutableList<Attribute> list; @NonNull private final ImmutableMap<AttributeCode, Attribute> byCode; private Attributes(@NonNull final List<Attribute> list) { this.list = ImmutableList.c...
throw new AdempiereException("No attribute `" + attributeCode + "` found in " + byCode.keySet()); } return attribute; } public List<Attribute> getAttributes() {return list;} public Attributes retainOnly(@NonNull final Set<AttributeCode> attributeCodes, @NonNull final Attributes fallback) { Check.assumeNotEm...
repos\metasfresh-new_dawn_uat\backend\de.metas.inventory.mobileui\src\main\java\de\metas\inventory\mobileui\deps\products\Attributes.java
1
请完成以下Java代码
public String getActiveActivityId() { return activeActivityId; } public void setActiveActivityId(String activeActivityId) { this.activeActivityId = activeActivityId; } public Set<String> getActiveActivityIds() { return activeActivityIds; } public void setActiveActivity...
public String getCallbackId() { return callbackId; } public Set<String> getCallBackIds() { return callbackIds; } public String getCallbackType() { return callbackType; } public String getParentCaseInstanceId() { return parentCaseInstanceId; } publ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\ExecutionQueryImpl.java
1
请完成以下Java代码
public Duration getFirstBackoff() { return firstBackoff; } public void setFirstBackoff(Duration firstBackoff) { this.firstBackoff = firstBackoff; } public @Nullable Duration getMaxBackoff() { return maxBackoff; } public void setMaxBackoff(Duration maxBackoff) { this.maxBackoff = maxBackoff; ...
} public JitterConfig() { } public JitterConfig(double randomFactor) { this.randomFactor = randomFactor; } public double getRandomFactor() { return randomFactor; } public void setRandomFactor(double randomFactor) { this.randomFactor = randomFactor; } @Override public String toString() ...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RetryGatewayFilterFactory.java
1
请在Spring Boot框架中完成以下Java代码
public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter() { MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); ...
initServlet.setInitParameter("sex", "man"); }; } @Bean public RestTemplate defaultRestTemplate(RestTemplateBuilder restTemplateBuilder) { return restTemplateBuilder .setConnectTimeout(Duration.ofSeconds(5)) .setReadTimeout(Duration.ofSeconds(5)) ...
repos\spring-boot-best-practice-master\spring-boot-web\src\main\java\cn\javastack\springboot\web\config\WebConfig.java
2
请在Spring Boot框架中完成以下Java代码
private void fireSupplyRequiredEventIfNeeded(@NonNull final Candidate demandCandidate, @NonNull final Candidate stockCandidate) { if (demandCandidate.isSimulated()) { fireSimulatedSupplyRequiredEvent(demandCandidate, stockCandidate); } else { fireSupplyRequiredEventIfQtyBelowZero(demandCandidate); } ...
final Candidate supplyCandidate = Candidate.builderForClientAndOrgId(demandCandidateWithId.getClientAndOrgId()) .type(CandidateType.SUPPLY) .businessCase(null) .businessCaseDetail(null) .materialDescriptor(demandCandidateWithId.getMaterialDescriptor().withQuantity(requiredQty)) //.groupId() // don't...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\candidatechange\handler\DemandCandiateHandler.java
2
请在Spring Boot框架中完成以下Java代码
public List<Candidate> retrieveOrderedByDateAndSeqNo(@NonNull final CandidatesQuery query) { final IQueryBuilder<I_MD_Candidate> queryBuilderWithoutOrdering = RepositoryCommons.mkQueryBuilder(query); return retrieveForQueryBuilder(queryBuilderWithoutOrdering); } /** * Only use this method in testing */ @Vi...
.orderBy() .addColumnAscending(I_MD_Candidate.COLUMNNAME_DateProjected) .addColumnAscending(I_MD_Candidate.COLUMNNAME_SeqNo) .addColumnAscending(I_MD_Candidate.COLUMNNAME_MD_Candidate_ID) .endOrderBy(); } public List<Candidate> retrieveCandidatesForPPOrderId(@NonNull final PPOrderId ppOrderId) { f...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\repository\CandidateRepositoryRetrieval.java
2
请完成以下Java代码
public String toString() { StringBuffer sb = new StringBuffer ("X_CM_Ad_Cat[") .append(get_ID()).append("]"); return sb.toString(); } /** Set Advertisement Category. @param CM_Ad_Cat_ID Advertisement Category like Banner Homepage */ public void setCM_Ad_Cat_ID (int CM_Ad_Cat_ID) ...
/** Get Description. @return Optional short description of the record */ public String getDescription () { return (String)get_Value(COLUMNNAME_Description); } /** Set Comment/Help. @param Help Comment or Hint */ public void setHelp (String Help) { set_Value (COLUMNNAME_Help, Help); } /** Get...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_Ad_Cat.java
1
请完成以下Java代码
public Stream<DocumentId> stream() { assertNotAll(); return documentIds.stream(); } public void forEach(final Consumer<DocumentId> action) { assertNotAll(); documentIds.forEach(action); } public int size() { assertNotAll(); return documentIds.size(); } public boolean contains(final DocumentId do...
*/ public <ID extends RepoIdAware> ImmutableList<ID> toIdsList(@NonNull final Function<Integer, ID> idMapper) { return toImmutableList(idMapper.compose(DocumentId::toInt)); } public Set<String> toJsonSet() { if (all) { return ALL_StringSet; } return toSet(DocumentId::toJson); } public SelectionSi...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\DocumentIdsSelection.java
1
请完成以下Java代码
public static boolean checkUsingIsDigitMethod(String str) { if (str == null || str.length() == 0) { return false; } return Character.isDigit(str.charAt(0)); } public static boolean checkUsingPatternClass(String str) { if (str == null || str.length() == 0) { ...
} return CharMatcher.inRange('0', '9') .matches(str.charAt(0)); } public static boolean checkUsingCharMatcherForPredicateMethod(String str) { if (str == null || str.length() == 0) { return false; } return CharMatcher.forPredicate(Character::isDigit) ...
repos\tutorials-master\core-java-modules\core-java-string-operations-5\src\main\java\com\baeldung\firstchardigit\FirstCharDigit.java
1
请完成以下Java代码
public String getBPartnerAddress() { return address; } @Override public void setBPartnerAddress(String address) { this.address = address; } @Override public void setRenderedAddressAndCapturedLocation(final @NonNull RenderedAddressAndCapturedLocation from) { IDocumentLocationAdapter.super.setRenderedAdd...
{ return documentLocationBL.toPlainDocumentLocation(this); } @Override public BPartnerLocationAdapter toOldValues() { InterfaceWrapperHelper.assertNotOldValues(delegate); return new BPartnerLocationAdapter(InterfaceWrapperHelper.createOld(delegate, I_C_OLCand.class)); } @Override public I_C_OLCand getWra...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\location\adapter\BPartnerLocationAdapter.java
1
请完成以下Java代码
public void setMessageSource(MessageSource messageSource) { Assert.notNull(messageSource, "messageSource cannot be null"); this.messages = new MessageSourceAccessor(messageSource); } /** * Sets if the principal name should be extracted from the emailAddress or CN * attribute (default). * * By default, th...
* RFC1779</a>. * @param extractPrincipalNameFromEmail whether to extract the principal from the * emailAddress (default false) * @see <a href="https://datatracker.ietf.org/doc/html/rfc2253">RFC2253</a> * @see <a href="https://datatracker.ietf.org/doc/html/rfC1779">RFC1779</a> */ public void setExtractPrincip...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\preauth\x509\SubjectX500PrincipalExtractor.java
1
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getCity() { return city;
} public void setCity(String city) { this.city = city; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } }
repos\Hibernate-SpringBoot-master\Java EE\AMPCandBMT\src\main\java\com\sample\model\Player.java
1
请完成以下Java代码
private boolean isEligible(final I_C_OrderLine orderLine) { // Skip if given line is currently changed by the repository (to avoid race conditions) if (OrderGroupRepository.isRepositoryUpdate(orderLine)) { return false; } // Skip if not a group line if (!OrderGroupCompensationUtils.isInGroup(orderLine)...
else { group.updateAllCompensationLines(); groupsRepo.saveGroup(group); } } public void updateCompensationLineNoSave(final I_C_OrderLine orderLine) { final Group group = groupsRepo.createPartialGroupFromCompensationLine(orderLine); group.updateAllCompensationLines(); final OrderLinesStorage orderLi...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\compensationGroup\OrderGroupCompensationChangesHandler.java
1
请完成以下Java代码
public class AD_PrintPaper_Default extends JavaProcess { /** The Client */ private int p_AD_Client_ID = -1; /** The Record */ private int p_Record_ID = 0; /** * Prepare - e.g., get Parameters. */ protected void prepare() { ProcessInfoParameter[] para = getParametersAsArray(); for (int i =...
{ sql.append("UPDATE AD_PrintFormat pf " + "SET AD_PrintPaper_ID = " + p_Record_ID + " " + "WHERE EXISTS (SELECT * FROM AD_PrintPaper pp " + "WHERE pf.AD_PrintPaper_ID=pp.AD_PrintPaper_ID " + "AND IsLandscape = (SELECT IsLandscape FROM AD_PrintPaper...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\process\AD_PrintPaper_Default.java
1
请完成以下Java代码
public I_C_ValidCombination getCB_Differences_A() throws RuntimeException { return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) .getPO(getCB_Differences_Acct(), get_TrxName()); } /** Set Cash Book Differences. @param CB_Differences_Acct Cash Book Differences Account */ ...
set_Value (COLUMNNAME_CB_Receipt_Acct, Integer.valueOf(CB_Receipt_Acct)); } /** Get Cash Book Receipt. @return Cash Book Receipts Account */ public int getCB_Receipt_Acct () { Integer ii = (Integer)get_Value(COLUMNNAME_CB_Receipt_Acct); if (ii == null) return 0; return ii.intValue(); } public I_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_CashBook_Acct.java
1
请完成以下Java代码
public class DeliveryAccuracy extends SLACriteria { /** * DeliveryAccuracy */ public DeliveryAccuracy () { super (); } // DeliveryAccuracy /** Logger */ protected Logger log = LogManager.getLogger(getClass()); /** * Create new Measures for the Goal * @param goal the goal * @return number cr...
} // createMeasures /************************************************************************** * Calculate Goal Actual from unprocessed Measures * @return goal actual measure */ @Override public BigDecimal calculateMeasure (MSLAGoal goal) { // Average BigDecimal retValue = Env.ZERO; BigDecimal total...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\sla\DeliveryAccuracy.java
1
请完成以下Java代码
public Builder addColumn(final DocumentLayoutColumnDescriptor.Builder columnBuilder) { Check.assumeNotNull(columnBuilder, "Parameter columnBuilder is not null"); columnsBuilders.add(columnBuilder); return this; } public Builder addColumn(final List<DocumentLayoutElementDescriptor.Builder> elementsBuilde...
{ return invalidReason == null; } public boolean isInvalid() { return invalidReason != null; } public boolean isNotEmpty() { return streamElementBuilders().findAny().isPresent(); } private Stream<DocumentLayoutElementDescriptor.Builder> streamElementBuilders() { return columnsBuilders.s...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentLayoutSectionDescriptor.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setAD_Issue_ID (final int AD_Issue_ID) { if (AD_Issue_ID < 1) set_Value (COLUMNNAME_AD_Issue_ID, null); else set_Value (COLUMNNAME_AD_Issue_ID, AD_Issue_...
if (C_BankStatement_Import_File_Log_ID < 1) set_ValueNoCheck (COLUMNNAME_C_BankStatement_Import_File_Log_ID, null); else set_ValueNoCheck (COLUMNNAME_C_BankStatement_Import_File_Log_ID, C_BankStatement_Import_File_Log_ID); } @Override public int getC_BankStatement_Import_File_Log_ID() { return get_Val...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\org\adempiere\banking\model\X_C_BankStatement_Import_File_Log.java
1
请完成以下Java代码
public void setSeqNo (final int SeqNo) { set_Value (COLUMNNAME_SeqNo, SeqNo); } @Override public int getSeqNo() { return get_ValueAsInt(COLUMNNAME_SeqNo); } @Override public void setSplitterStrategy_JavaClass_ID (final int SplitterStrategy_JavaClass_ID) { if (SplitterStrategy_JavaClass_ID < 1) set...
{ return get_ValueAsInt(COLUMNNAME_SplitterStrategy_JavaClass_ID); } @Override public void setUseInASI (final boolean UseInASI) { set_Value (COLUMNNAME_UseInASI, UseInASI); } @Override public boolean isUseInASI() { return get_ValueAsBoolean(COLUMNNAME_UseInASI); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_PI_Attribute.java
1
请完成以下Java代码
public BigDecimal getOrderQtyReserved() { return getSalesOrderLine().getQtyReserved(); } public BigDecimal getOrderPriceActual() { return getSalesOrderLine().getPriceActual(); } public DocStatus getOrderDocStatus() { return DocStatus.ofCode(getSalesOrderLine().getC_Order().getDocStatus()); } public I_...
public String getSalesOrderPORef() { return salesOrder.map(I_C_Order::getPOReference).orElse(null); } @Nullable public InputDataSourceId getSalesOrderADInputDatasourceID() { if(!salesOrder.isPresent()) { return null; } final I_C_Order orderRecord = salesOrder.get(); return InputDataSourceId.ofRep...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\api\OlAndSched.java
1
请完成以下Java代码
public HttpHeaders getResponseHeaders() { return this.responseHeaders; } /** * Transform the underlying {@link ExecutionResult} through a {@link Builder} * and return a new instance with the modified values. * @param consumer callback to transform the result * @return the new response instance with the mut...
*/ public static final class Builder extends DefaultExecutionGraphQlResponse.Builder<Builder, WebGraphQlResponse> { private Builder(WebGraphQlResponse original) { super(original); } @Override protected WebGraphQlResponse build(WebGraphQlResponse original, ExecutionResult newResult) { return new WebGrap...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\server\WebGraphQlResponse.java
1
请完成以下Java代码
public String getAsString() { return attributesKeyString; } public boolean isNone() { return NONE.equals(this); } public boolean isAll() { return ALL.equals(this); } public boolean isOther() { return OTHER.equals(this); } public void assertNotAllOrOther() { Check.errorIf(isOther() || isAll(),...
{ return parts.containsAll(attributesKey.parts); } public AttributesKey getIntersection(@NonNull final AttributesKey attributesKey) { final HashSet<AttributesKeyPart> ownMutableParts = new HashSet<>(parts); ownMutableParts.retainAll(attributesKey.parts); return AttributesKey.ofParts(ownMutableParts); } /...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\commons\AttributesKey.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable List<String> getSupported() { return this.supported; } public void setSupported(@Nullable List<String> supported) { this.supported = supported; } public @Nullable Boolean getDetectSupported() { return this.detectSupported; } public void setDetectSupported(@Nullable Boolean detec...
private Map<MediaType, String> mediaTypeParameter = new LinkedHashMap<>(); public @Nullable String getHeader() { return this.header; } public void setHeader(@Nullable String header) { this.header = header; } public @Nullable String getQueryParameter() { return this.queryParameter; } ...
repos\spring-boot-4.0.1\module\spring-boot-webflux\src\main\java\org\springframework\boot\webflux\autoconfigure\WebFluxProperties.java
2
请完成以下Java代码
public Balance toSingleSide() { final Money min = debit.min(credit); if (min.isZero()) { return this; } return new Balance(this.debit.subtract(min), this.credit.subtract(min)); } public Balance computeDiffToBalance() { final Money diff = toMoney(); if (isReversal()) { return diff.signum() < ...
public void add(@NonNull Balance balance) { add(balance.getDebit(), balance.getCredit()); } public BalanceBuilder combine(@NonNull BalanceBuilder balanceBuilder) { add(balanceBuilder.debit, balanceBuilder.credit); return this; } public void add(@Nullable Money debitToAdd, @Nullable Money creditTo...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\Balance.java
1
请完成以下Java代码
public List<MessageEventSubscriptionEntity> findMessageStartEventSubscriptions() { return toMessageEventSubscriptionEntityList(getList("selectMessageStartEventSubscriptions", null, null, true)); } @Override public void updateEventSubscriptionTenantId(String oldTenantId, String newTenantId) { ...
signalEventSubscriptionEntities.add((SignalEventSubscriptionEntity) eventSubscriptionEntity); } return signalEventSubscriptionEntities; } protected List<MessageEventSubscriptionEntity> toMessageEventSubscriptionEntityList( List<EventSubscriptionEntity> result ) { List<Messag...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\data\impl\MybatisEventSubscriptionDataManager.java
1
请完成以下Java代码
public Long getTimestamp() { return this.timestamp; } public void setTimestamp(Long timestamp) { this.timestamp = timestamp; } public Player getCreator() { return this.creator; } public void setCreator(Player creator) { this.creator = creator; addPlayer...
public void addPlayer(Player player) { this.players.add(player); } public List<Player> getPlayers() { return Collections.unmodifiableList(this.players); } public GameSettings getSettings() { return this.settings; } public void setSettings(GameSettings settings) { ...
repos\tutorials-master\libraries-data\src\main\java\com\baeldung\modelmapper\domain\Game.java
1
请完成以下Java代码
public void setBeanFactory(BeanFactory beanFactory) throws BeansException { this.beanFactory = beanFactory; if (beanFactory instanceof ConfigurableListableBeanFactory) { this.embeddedValueResolver = new EmbeddedValueResolver((ConfigurableBeanFactory) beanFactory); this.resolver =...
public String getContainerFactoryBeanName() { return containerFactoryBeanName; } public void setContainerFactoryBeanName(String containerFactoryBeanName) { this.containerFactoryBeanName = containerFactoryBeanName; } public RabbitListenerContainerFactory<?> getContainerFactory() { ...
repos\flowable-engine-main\modules\flowable-event-registry-spring\src\main\java\org\flowable\eventregistry\spring\rabbit\RabbitChannelDefinitionProcessor.java
1
请完成以下Java代码
public final PPOrderUserNotificationsProducer notifyGenerated(@NonNull final I_PP_Order ppOrder) { notifyGenerated(ImmutableList.of(ppOrder)); return this; } private UserNotificationRequest createUserNotification(@NonNull final I_PP_Order ppOrder) { final UserId recipientUserId = getNotificationRecipientUser...
private UserNotificationRequest.UserNotificationRequestBuilder newUserNotificationRequest() { return UserNotificationRequest.builder() .topic(USER_NOTIFICATIONS_TOPIC); } private UserId getNotificationRecipientUserId(final I_PP_Order ppOrder) { return UserId.ofRepoId(ppOrder.getCreatedBy()); } private v...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\manufacturing\event\PPOrderUserNotificationsProducer.java
1
请完成以下Java代码
public int getM_HU_Item_ID() { return get_ValueAsInt(COLUMNNAME_M_HU_Item_ID); } @Override public de.metas.handlingunits.model.I_M_HU_PackingMaterial getM_HU_PackingMaterial() { return get_ValueAsPO(COLUMNNAME_M_HU_PackingMaterial_ID, de.metas.handlingunits.model.I_M_HU_PackingMaterial.class); } @Override...
set_ValueNoCheck (COLUMNNAME_M_HU_PI_Item_ID, M_HU_PI_Item_ID); } @Override public int getM_HU_PI_Item_ID() { return get_ValueAsInt(COLUMNNAME_M_HU_PI_Item_ID); } @Override public void setQty (final @Nullable BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } @Override public BigDecimal getQty() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Item.java
1
请完成以下Java代码
public BigDecimal getQtyOrdered() { return deliverRequest.getQtyOrdered(); } public boolean hasSalesOrderLine() { return salesOrderLine.isPresent(); } private I_C_OrderLine getSalesOrderLine() { return salesOrderLine.get(); } public ProductId getProductId() { return ProductId.ofRepoId(shipmentSched...
{ return ShipmentScheduleId.ofRepoId(shipmentSchedule.getM_ShipmentSchedule_ID()); } /** * @return shipment schedule's QtyToDeliver_Override or <code>null</code> */ public BigDecimal getQtyOverride() { return InterfaceWrapperHelper.getValueOrNull(shipmentSchedule, I_M_ShipmentSchedule.COLUMNNAME_QtyToDeliv...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\api\OlAndSched.java
1
请完成以下Java代码
private static Frame getParentFrame(Component c) { Frame parent = null; Container e = c.getParent(); while (e != null) { if (e instanceof Frame) { parent = (Frame)e; break; } e = e.getParent(); } return parent; } private static JTextComponent getTextComponent(Object c) { if (c ==...
return getTextComponent(cc); } } } return null; } public static boolean isAdvancedText(GridField gridField) { if (gridField == null) { log.warn("gridField is null"); return false; } final GridTab gridTab = gridField.getGridTab(); if (gridTab == null) return false; final MColumn co...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\BoilerPlateMenu.java
1
请完成以下Java代码
public Optional<PickingSlotRow> findRowMatching(@NonNull final Predicate<PickingSlotRow> predicate) { return streamThisRowAndIncludedRowsRecursivelly() .filter(predicate) .findFirst(); } public boolean thereIsAnOpenPickingForOrderId(@NonNull final OrderId orderId) { final HuId huId = getHuId(); if (...
{ return findRowMatching(row -> !row.isLU() && row.thereIsAnOpenPickingForOrderId(orderId)) .isPresent(); } return false; } @NonNull private ImmutableSet<OrderId> getPickingOrderIdsForHUId(@NonNull final HuId huId) { return Optional.ofNullable(huId2OpenPickingOrderIds.get(huId)) .orElse(Immutabl...
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 getName() { return TYPE_NAME; } public TypedValue convertValue(TypedValue propertyValue) { if(propertyValue instanceof BooleanValue) { return propertyValue; } else { Object value = propertyValue.getValue(); if(value == null) { return Variables.booleanValue(nu...
return Boolean.valueOf(propertyValue.toString()); } public String convertModelValueToFormValue(Object modelValue) { if (modelValue==null) { return null; } if(Boolean.class.isAssignableFrom(modelValue.getClass()) || boolean.class.isAssignableFrom(modelValue.getClass())) { retur...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\form\type\BooleanFormType.java
1
请完成以下Java代码
static boolean hasAnotherScheme(URI uri) { return schemePattern.matcher(uri.getSchemeSpecificPart()).matches() && uri.getHost() == null && uri.getRawPath() == null; } @Override public int getOrder() { return ROUTE_TO_URL_FILTER_ORDER; } @Override public Mono<Void> filter(ServerWebExchange exchange, Gate...
if ("lb".equalsIgnoreCase(routeUri.getScheme()) && routeUri.getHost() == null) { // Load balanced URIs should always have a host. If the host is null it is // most likely because the host name was invalid (for example included an // underscore) throw new IllegalStateException("Invalid host: " + routeUri.toS...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\RouteToRequestUrlFilter.java
1
请完成以下Java代码
private int appendUnit() { _isIntersections.append(); _units.add(0); _labels.add((byte) 0); return _isIntersections.size() - 1; } private int appendNode() { int id; if (_recycleBin.empty()) { id = _nodes.size(); _nodes.add...
{ key = ~key + (key << 15); // key = (key << 15) - key - 1; key = key ^ (key >>> 12); key = key + (key << 2); key = key ^ (key >>> 4); key = key * 2057; // key = (key + (key << 3)) + (key << 11); key = key ^ (key >>> 16); return key; } private static fi...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\dartsclone\details\DawgBuilder.java
1
请完成以下Java代码
public ESRPaymentInfo provideCustomPayload(@NonNull final InvoiceToExport invoiceWithoutEsrInfo) { final InvoiceId invoiceId = invoiceWithoutEsrInfo.getId(); final I_C_BPartner bpartnerRecord = loadOutOfTrx(invoiceWithoutEsrInfo.getBiller().getId(), I_C_BPartner.class); final String companyName = CoalesceUtil....
final Bank esrBank = bankRepo.getById(esrBankId); if(esrBank.getLocationId() == null) { return null; } final I_C_Location bankLocation = locationDAO.getById(esrBank.getLocationId()); if(bankLocation == null) { return null; } return AddressInfo .builder() .street(bankLocation.getAddr...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java\de\metas\payment\esr\invoice_gateway\ESRInfoProviderImpl.java
1
请完成以下Java代码
public Object getRenderedTaskForm(String taskId, String engineName) { return commandExecutor.execute(new GetRenderedTaskFormCmd(taskId, engineName)); } @Override public StartFormData getStartFormData(String processDefinitionId) { return commandExecutor.execute(new GetStartFormCmd(processDef...
commandExecutor.execute(new SubmitTaskFormCmd(taskId, properties, true)); } @Override public String getStartFormKey(String processDefinitionId) { return commandExecutor.execute(new GetFormKeyCmd(processDefinitionId)); } @Override public String getTaskFormKey(String processDefinitionId,...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\FormServiceImpl.java
1
请在Spring Boot框架中完成以下Java代码
public OrderLineItems itemId(String itemId) { this.itemId = itemId; return this; } /** * The unique identifier of the eBay listing associated with the order. * * @return itemId **/ @javax.annotation.Nullable @ApiModelProperty(value = "The unique identifier of the eBay listing associated with the ord...
if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OrderLineItems orderLineItems = (OrderLineItems)o; return Objects.equals(this.itemId, orderLineItems.itemId) && Objects.equals(this.lineItemId, orderLineItems.lineItemId); } @Override public int ha...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\OrderLineItems.java
2
请完成以下Java代码
public class InfoWindowGridRowBuilders implements IInfoWindowGridRowBuilders { private final Map<Integer, CompositeGridTabRowBuilder> builders = new HashMap<Integer, CompositeGridTabRowBuilder>(); public InfoWindowGridRowBuilders() { } @Override public void addGridTabRowBuilder(final int recordId, final IGridT...
} public void saveToContext(final Properties ctx, final int windowNo) { final String ctxName = createContextName(windowNo); Env.put(ctx, ctxName, this); } /** * Gets the builders from context and then it clears the context * * @param ctx * @param windowNo * @return builders or null */ public sta...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\apps\search\impl\InfoWindowGridRowBuilders.java
1
请完成以下Java代码
public final class ResidentKeyRequirement { /** * The <a href= * "https://www.w3.org/TR/webauthn-3/#dom-residentkeyrequirement-discouraged">discouraged</a> * requirement indicates that the Relying Party prefers creating a server-side * credential, but will accept a client-side discoverable credential. */ p...
private ResidentKeyRequirement(String value) { this.value = value; } /** * Gets the value. * @return the value */ public String getValue() { return this.value; } public static ResidentKeyRequirement valueOf(String value) { if (DISCOURAGED.getValue().equals(value)) { return DISCOURAGED; } if (P...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\api\ResidentKeyRequirement.java
1
请完成以下Java代码
public ProcessEngineConfiguration setDatabaseSchema(String databaseSchema) { this.databaseSchema = databaseSchema; return this; } public String getXmlEncoding() { return xmlEncoding; } public ProcessEngineConfiguration setXmlEncoding(String xmlEncoding) { this.xmlEncodi...
return defaultFailedJobWaitTime; } public ProcessEngineConfiguration setDefaultFailedJobWaitTime(int defaultFailedJobWaitTime) { this.defaultFailedJobWaitTime = defaultFailedJobWaitTime; return this; } public int getAsyncFailedJobWaitTime() { return asyncFailedJobWaitTime; ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\ProcessEngineConfiguration.java
1
请完成以下Java代码
static boolean hasZeroInFirstRow(int[][] matrix, int cols) { for (int j = 0; j < cols; j++) { if (matrix[0][j] == 0) { return true; } } return false; } static boolean hasZeroInFirstCol(int[][] matrix, int rows) { for (int i = 0; i < rows; ...
static void setZeroesInFirstRow(int[][] matrix, int cols) { for (int j = 0; j < cols; j++) { matrix[0][j] = 0; } } static void setZeroesInFirstCol(int[][] matrix, int rows) { for (int i = 0; i < rows; i++) { matrix[i][0] = 0; } } static void setZ...
repos\tutorials-master\core-java-modules\core-java-arrays-operations-advanced-2\src\main\java\com\baeldung\matrixtozero\SetMatrixToZero.java
1
请完成以下Java代码
public final class BoardDescriptor { private final int boardId; @NonNull private final ITranslatableString caption; @NonNull private final WebsocketTopicName websocketEndpoint; @Singular private final ImmutableMap<Integer, BoardLaneDescriptor> lanes; @Singular("cardFieldByFieldName") final ImmutableMap<Strin...
public void assertLaneIdExists(final int laneId) { if (lanes.get(laneId) == null) { throw new AdempiereException("Lane ID=" + laneId + " found for board ID=" + getBoardId()) .setParameter("board", this) .setParameter("laneId", laneId); } } public Collection<BoardCardFieldDescriptor> getCardFields...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\board\BoardDescriptor.java
1
请完成以下Java代码
public void setArticleList(List<BaeldungArticle> articleList) { this.articleList = articleList; } public List<BaeldungArticle> getArticleList() { return this.articleList; } } public static class BaeldungArticle { private String title; private Str...
} public String getTitle() { return this.title; } public void setContent(String content) { this.content = content; } public String getContent() { return this.content; } } }
repos\tutorials-master\xml-modules\xml\src\main\java\com\baeldung\sax\SaxParserMain.java
1
请在Spring Boot框架中完成以下Java代码
public class DictDetailServiceImpl implements DictDetailService { private final DictRepository dictRepository; private final DictDetailRepository dictDetailRepository; private final DictDetailMapper dictDetailMapper; private final RedisUtils redisUtils; @Override public PageResult<DictDetailDt...
// 清理缓存 delCaches(resources); } @Override public List<DictDetailDto> getDictByName(String name) { String key = CacheKey.DICT_NAME + name; List<DictDetail> dictDetails = redisUtils.getList(key, DictDetail.class); if(CollUtil.isEmpty(dictDetails)){ dictDetails = di...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\service\impl\DictDetailServiceImpl.java
2
请完成以下Java代码
class StructuredLoggingJsonPropertiesBeanFactoryInitializationAotProcessor implements BeanFactoryInitializationAotProcessor { private static final String ENVIRONMENT_BEAN_NAME = "environment"; @Override public @Nullable BeanFactoryInitializationAotContribution processAheadOfTime( ConfigurableListableBeanFacto...
private final Set<Class<? extends StructuredLoggingJsonMembersCustomizer<?>>> customizers; private final @Nullable String stackTracePrinter; private AotContribution(@Nullable ClassLoader classLoader, Set<Class<? extends StructuredLoggingJsonMembersCustomizer<?>>> customizers, @Nullable String stackTracePr...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\logging\structured\StructuredLoggingJsonPropertiesBeanFactoryInitializationAotProcessor.java
1
请完成以下Java代码
public class GraphQlContextAccessor implements ContextAccessor<GraphQLContext, GraphQLContext> { @Override public Class<? extends GraphQLContext> readableType() { return GraphQLContext.class; } @Override public void readValues(GraphQLContext context, Predicate<Object> keyPredicate, Map<Object, Object> readValu...
public <T> T readValue(GraphQLContext context, Object key) { return context.get(key); } @Override public Class<? extends GraphQLContext> writeableType() { return GraphQLContext.class; } @Override public GraphQLContext writeValues(Map<Object, Object> valuesToWrite, GraphQLContext targetContext) { return ta...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\execution\GraphQlContextAccessor.java
1
请完成以下Java代码
public int getBill_User_ID() { return delegate.getBill_User_ID(); } @Override public void setBill_User_ID(final int Bill_User_ID) { delegate.setBill_User_ID(Bill_User_ID); } @Override public void setRenderedAddressAndCapturedLocation(final @NonNull RenderedAddressAndCapturedLocation from) { IDocumentBi...
@Override public Optional<DocumentLocation> toPlainDocumentLocation(final IDocumentLocationBL documentLocationBL) { return documentLocationBL.toPlainDocumentLocation(this); } @Override public DocumentBillLocationAdapter toOldValues() { return new DocumentBillLocationAdapter(InterfaceWrapperHelper.createOld(d...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\location\adapter\DocumentBillLocationAdapter.java
1
请完成以下Java代码
public void setEventModelValidator (java.lang.String EventModelValidator) { set_Value (COLUMNNAME_EventModelValidator, EventModelValidator); } /** Get Event Model Validator. @return Event Model Validator */ @Override public java.lang.String getEventModelValidator () { return (java.lang.String)get_Value...
@Override public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Reihenfolge. @return Method of ordering records; lowest number comes first */ @Override public int getSeqNo () { Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); if (ii == null) return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Table_ScriptValidator.java
1
请完成以下Java代码
public int getXmlColumnNumber() { return xmlColumnNumber; } public void setXmlColumnNumber(int xmlColumnNumber) { this.xmlColumnNumber = xmlColumnNumber; } public double getRotation() { return rotation; } public void setRotation(double rotation) { this.rotation...
return false; } // check for zero value in case we are comparing model value to BPMN DI value // model values do not have xml location information if (0 != this.getXmlColumnNumber() && 0 != ginfo.getXmlColumnNumber() && this.getXmlColumnNumber() != ginfo.getXmlColumnNumber()) { return fals...
repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\GraphicInfo.java
1
请完成以下Java代码
public SqlSelect getMainSqlSelect() { return sqlSelects.get(mainSqlIndex); } /** * Transform the key words WHERE, FROM and ON in lowercase. * TODO: Delete this logic when we get rid of the workaround in org.compiere.model.AccessSqlParser.getTableInfo(String) * * @param whereClause * @return */ public...
public boolean isTrlTable() { return tableName.toUpperCase().endsWith("_TRL"); } } @Value public static final class SqlSelect { private final String sql; private final ImmutableList<TableNameAndAlias> tableNameAndAliases; @Builder private SqlSelect( @NonNull final String sql, @NonNull @Sing...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\impl\ParsedSql.java
1
请完成以下Java代码
public static int toIntByHashCode(String value) { return value.hashCode(); } public static int toIntByCR32(String value) { CRC32 crc32 = new CRC32(); crc32.update(value.getBytes()); return (int) crc32.getValue(); } public static int toIntByCharFormula(String value) { ...
return ((hash[0] & 0xFF) << 24) | ((hash[1] & 0xFF) << 16) | ((hash[2] & 0xFF) << 8) | (hash[3] & 0xFF); } catch (NoSuchAlgorithmException e) { throw new RuntimeException("MD5 not supported", e); } } public static int toIntByLookup(String value) { Integer found = lookupMap.g...
repos\tutorials-master\core-java-modules\core-java-string-algorithms-5\src\main\java\com\baeldung\uniqueint\StringToUniqueInt.java
1
请完成以下Java代码
public void attachState(MigratingScopeInstance owningInstance) { ExecutionEntity representativeExecution = owningInstance.resolveRepresentativeExecution(); representativeExecution.addTask(userTask); for (VariableInstanceEntity variable : userTask.getVariablesInternal()) { variable.setExecution(repres...
migrateHistory(); } protected void migrateHistory() { HistoryLevel historyLevel = Context.getProcessEngineConfiguration().getHistoryLevel(); if (historyLevel.isHistoryEventProduced(HistoryEventTypes.TASK_INSTANCE_MIGRATE, this)) { HistoryEventProcessor.processHistoryEvents(new HistoryEventProcessor....
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingUserTaskInstance.java
1
请在Spring Boot框架中完成以下Java代码
public boolean hasCodecFor(Class<?> type) { return this.delegate.hasCodecFor(type); } @Override public Mono<MongoDatabase> getMongoDatabase() throws DataAccessException { String gridFsDatabase = getGridFsDatabase(); if (StringUtils.hasText(gridFsDatabase)) { return this.delegate.getMongoDatabase(gri...
return this.delegate.getExceptionTranslator(); } @Override public CodecRegistry getCodecRegistry() { return this.delegate.getCodecRegistry(); } @Override public Mono<ClientSession> getSession(ClientSessionOptions options) { return this.delegate.getSession(options); } @Override public Reactive...
repos\spring-boot-4.0.1\module\spring-boot-data-mongodb\src\main\java\org\springframework\boot\data\mongodb\autoconfigure\DataMongoReactiveAutoConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public class PutProductSuppliesRequest extends RequestToMetasfresh { public static PutProductSuppliesRequest of(@NonNull final SyncProductSupply syncProductSupply) { return PutProductSuppliesRequest.builder() .productSupply(syncProductSupply) .build(); } public static PutProductSuppliesRequest of(final C...
} String eventId; List<SyncProductSupply> productSupplies; @Builder @JsonCreator public PutProductSuppliesRequest( @JsonProperty("eventId") final String eventId, @JsonProperty("productSupplies") @Singular final List<SyncProductSupply> productSupplies) { this.eventId = eventId != null ? eventId : UUID.ra...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-procurement\src\main\java\de\metas\common\procurement\sync\protocol\request_to_metasfresh\PutProductSuppliesRequest.java
2
请完成以下Java代码
public int getM_Inventory_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Inventory_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Verarbeitet. @param Processed Checkbox sagt aus, ob der Beleg verarbeitet wurde. */ @Override public void setProcessed (boolean Processed) { ...
@Override public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Verarbeiten. @return Verarbeiten */ @Override public boolean isProcessing () { Object oo = get_Value(COLUMNNAME_Processing); if (oo != null) { if (oo instanceof ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_InOutConfirm.java
1
请完成以下Java代码
public int compareTo(ImmutablePair<L, R> o) { if (o == null) { throw new IllegalArgumentException("Pair to compare to must not be null"); } try { int leftComparison = compare((Comparable<L>) getLeft(), (Comparable<L>) o.getLeft()); return leftComparison == 0 ? compare((Comparable<R>) getRi...
return Objects.equals(this.getKey(), other.getKey()) && Objects.equals(this.getValue(), other.getValue()); } } @Override public int hashCode() { return (this.getKey() == null ? 0 : this.getKey().hashCode()) ^ (this.getValue() == null ? 0 : this.getValue().hashCode()); } @Override ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\util\ImmutablePair.java
1
请在Spring Boot框架中完成以下Java代码
public class ActualImportRecordsResult { /** * target table name, where the records were imported (e.g. C_BPartner) */ @NonNull String targetTableName; /** * import table name, FROM where the records are imported (e.g. I_BPartner) */ @NonNull String importTableName; @NonNull OptionalInt countImportRecords...
private static String counterToString(final OptionalInt counter) { return counter.isPresent() ? String.valueOf(counter.getAsInt()) : "N/A"; } public boolean hasErrors() { return !getErrors().isEmpty(); } public int getCountErrors() { return getErrors().size(); } @Value @Builder public static class E...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\ActualImportRecordsResult.java
2
请完成以下Java代码
public void updateProcessDefinitionInfo(ProcessDefinitionInfoEntity updatedProcessDefinitionInfo) { update(updatedProcessDefinitionInfo, true); } @Override public void deleteProcessDefinitionInfo(String processDefinitionId) { ProcessDefinitionInfoEntity processDefinitionInfo = findProcessDe...
ByteArrayRef ref = new ByteArrayRef(processDefinitionInfo.getInfoJsonId(), null); ref.delete(engineConfiguration.getEngineCfgKey()); } } @Override public ProcessDefinitionInfoEntity findProcessDefinitionInfoByProcessDefinitionId(String processDefinitionId) { return dataManager.f...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\ProcessDefinitionInfoEntityManagerImpl.java
1
请完成以下Java代码
private static DistributionFacetId ofLocalDate(@NonNull DistributionFacetGroupType groupType, @NonNull LocalDate localDate) { final WorkflowLaunchersFacetId workflowLaunchersFacetId = WorkflowLaunchersFacetId.ofLocalDate(groupType.toWorkflowLaunchersFacetGroupId(), localDate); return ofWorkflowLaunchersFacetId(wor...
} public static DistributionFacetId ofPlantId(@NonNull final ResourceId plantId) { return ofRepoId(DistributionFacetGroupType.PLANT_RESOURCE_ID, plantId); } private static Quantity getAsQuantity(final @NonNull WorkflowLaunchersFacetId workflowLaunchersFacetId) { final ImmutablePair<BigDecimal, Integer> parts...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\launchers\facets\DistributionFacetId.java
1
请完成以下Java代码
public AdTableId getTableId() { return adTableId; } private void executeInvokeScriptedExportConversionAction( @NonNull final ExternalSystemScriptedExportConversionConfig config, final int recordId) { final int configTableId = tableDAO.retrieveTableId(I_ExternalSystem_Config_ScriptedExportConversion.Table...
.buildAndPrepareExecution() .executeSync(); }); } catch (final Exception e) { log.warn(InvokeScriptedExportConversionAction.class.getName() + " process failed for Config ID {}, Record ID: {}", config.getId(), recordId, e); } } private String getTableName() { return tableName; } private...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\scriptedexportconversion\interceptor\ExternalSystemScriptedExportConversionInterceptor.java
1
请完成以下Java代码
public int hashCode() { return Objects.hash(slug, title, description, body, tagList, favorited, favoritesCount, author); } Boolean favorited; Integer favoritesCount; ProfileView author; public static ArticleView toArticleView(Article article, ProfileView author, boolean favorited) { ...
.setAuthor(author); } public static ArticleView ofOwnArticle(Article article, User articleOwner) { return toArticleViewForViewer(article, ProfileView.toOwnProfile(articleOwner), articleOwner); } public static ArticleView toArticleViewForViewer(Article article, ProfileView author, User user) { ...
repos\realworld-spring-webflux-master\src\main\java\com\realworld\springmongo\article\dto\ArticleView.java
1
请在Spring Boot框架中完成以下Java代码
public R save(@Valid @RequestBody AuthClient authClient) { return R.status(clientService.save(authClient)); } /** * 修改 */ @PostMapping("/update") @ApiOperationSupport(order = 4) @Operation(summary = "修改", description = "传入client") public R update(@Valid @RequestBody AuthClient authClient) { return R.status...
return R.status(clientService.saveOrUpdate(authClient)); } /** * 删除 */ @PostMapping("/remove") @ApiOperationSupport(order = 6) @Operation(summary = "逻辑删除", description = "传入ids") public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { return R.status(clientService.delet...
repos\SpringBlade-master\blade-service\blade-system\src\main\java\org\springblade\system\controller\AuthClientController.java
2
请完成以下Java代码
public class Tag { @JsonProperty("id") private Long id = null; @JsonProperty("name") private String name = null; public Tag id(Long id) { this.id = id; return this; } /** * Get id * @return id **/ @ApiModelProperty(value = "") public Long getId() { return id; } public void...
return Objects.hash(id, name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}");...
repos\tutorials-master\spring-swagger-codegen-modules\spring-swagger-codegen-api-client\src\main\java\com\baeldung\petstore\client\model\Tag.java
1
请完成以下Java代码
protected BusinessProcessEvent createEvent(DelegateTask task) { ProcessEngineConfigurationImpl engineConfiguration = org.flowable.engine.impl.context.Context.getProcessEngineConfiguration(); ProcessDefinition processDefinition = engineConfiguration.getProcessDefinitionCache().get(task.getProcessDefiniti...
if (type == BusinessProcessEventType.CREATE_TASK) { return new Annotation[] { businessProcessQualifier, new CreateTaskLiteral(activityId) }; } if (type == BusinessProcessEventType.ASSIGN_TASK) { return new Annotation[] { businessProcessQualifier, new AssignTaskLiteral(activityId)...
repos\flowable-engine-main\modules\flowable-cdi\src\main\java\org\flowable\cdi\impl\event\CdiTaskListener.java
1
请完成以下Java代码
public List<ForeignKey<ArticleRecord, ?>> getReferences() { return Arrays.<ForeignKey<ArticleRecord, ?>>asList(Keys.ARTICLE__XXX); } public Author author() { return new Author(this, Keys.ARTICLE__XXX); } @Override public Article as(String alias) { return new Article(DSL.nam...
/** * Rename this table */ @Override public Article rename(Name name) { return new Article(name, null); } // ------------------------------------------------------------------------- // Row4 type methods // ----------------------------------------------------------------------...
repos\tutorials-master\persistence-modules\jooq\src\main\java\com\baeldung\jooq\model\tables\Article.java
1
请完成以下Java代码
private SocketAddress getOwnAddress() { final String address = this.properties.getAddress(); final int port = this.properties.getPort(); final SocketAddress target; if (GrpcServerProperties.ANY_IP_ADDRESS.equals(address)) { target = new InetSocketAddress(port); } else...
Resolve(final Listener2 listener) { this.savedListener = requireNonNull(listener, "listener"); } @Override public void run() { try { this.savedListener.onResult(ResolutionResult.newBuilder() .setAddresses(ImmutableList.of( ...
repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\nameresolver\SelfNameResolver.java
1
请在Spring Boot框架中完成以下Java代码
public class TaskExecutorConfiguration { @Bean("receiveTextChannelThreadPool") public TaskExecutor receiveTextChannelThreadPool() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(1); executor.setMaxPoolSize(5); executor.setThreadNamePref...
executor.initialize(); return executor; } @Bean("countWordsChannelThreadPool") public TaskExecutor countWordsChannelThreadPool() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(1); executor.setMaxPoolSize(5); executor.setThr...
repos\tutorials-master\patterns-modules\design-patterns-architectural\src\main\java\com\baeldung\seda\springintegration\TaskExecutorConfiguration.java
2
请完成以下Java代码
public Boolean getWaitFlag() { return waitFlag; } public void setWaitFlag(Boolean waitFlag) { this.waitFlag = waitFlag; } public Boolean getCleanEnvBoolean() { return cleanEnvBoolean; } public Boolean getRedirectErrorFlag() { return redirectErrorFlag; } ...
return directoryStr; } public String getResultVariableStr() { return resultVariableStr; } public String getErrorCodeVariableStr() { return errorCodeVariableStr; } public List<String> getArgList() { return argList; } }
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\util\ShellCommandExecutor.java
1
请完成以下Java代码
public abstract class ReflectUtil { public static InputStream getResourceAsStream(String name) { // Try the current Thread context class loader ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); InputStream resourceStream = classLoader.getResourceAsStream(name); if (resourceStr...
* @param parameters the parameters to pass to the constructor * @return the created instance */ public static <T> T createInstance(Class<T> type, Object... parameters) { // get types for parameters Class<?>[] parameterTypes = new Class<?>[parameters.length]; for (int i = 0; i < parameters.length; i...
repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\util\ReflectUtil.java
1
请完成以下Java代码
public String getSysDate() { return DateUtils.formatDate(); } public String getSysTime() { return DateUtils.now(); } public String getSysUserCode() { return sysUserCode; } public void setSysUserCode(String sysUserCode) { this.sysUserCode = sysUserCode; } public String getSysUserName() { return sys...
public void setSysUserId(String sysUserId) { this.sysUserId = sysUserId; } public String getSysOrgId() { return sysOrgId; } public void setSysOrgId(String sysOrgId) { this.sysOrgId = sysOrgId; } public String getSysRoleCode() { return sysRoleCode; } public void setSysRoleCode(String sysRoleCode) { ...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\system\vo\SysUserCacheInfo.java
1
请完成以下Java代码
public org.compiere.model.I_C_ValidCombination getPr() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_Price, org.compiere.model.I_C_ValidCombination.class); } @Override public void setPr(org.compiere.model.I_C_ValidCombination Pr) { set_ValueFromPO(COLUMNNAME_Price, org.compiere.model.I_C_ValidComb...
return BigDecimal.ZERO; return bd; } /** Set Symbol. @param UOMSymbol Symbol for a Unit of Measure */ @Override public void setUOMSymbol (java.lang.String UOMSymbol) { set_ValueNoCheck (COLUMNNAME_UOMSymbol, UOMSymbol); } /** Get Symbol. @return Symbol for a Unit of Measure */ @Override publ...
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java-gen\de\metas\rfq\model\X_C_RfQResponseLineQty_v.java
1
请完成以下Java代码
private static HUReservationDocRef extractDocumentRef(@NonNull final I_M_HU_Reservation record) { return HUReservationDocRef.builder() .salesOrderLineId(OrderLineId.ofRepoIdOrNull(record.getC_OrderLineSO_ID())) .projectId(ProjectId.ofRepoIdOrNull(record.getC_Project_ID())) .pickingJobStepId(PickingJobSte...
return; } final List<I_M_HU_Reservation> records = retrieveRecordsByDocumentRef(from, onlyVHUIds); if (records.isEmpty()) { return; } for (final I_M_HU_Reservation record : records) { updateRecordFromDocumentRef(record, to); saveRecord(record); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\reservation\HUReservationRepository.java
1
请完成以下Spring Boot application配置
spring: # datasource 数据源配置内容 datasource: url: jdbc:mysql://47.112.193.81:3306/testb5f4?useSSL=false&useUnicode=true&characterEncoding=UTF-8 driver-class-name: com.mysql.jdbc.Driver username: testb5f4 password: F4df4db0ed86@11 # mybatis 配置内容 mybatis: config-location: classpath:mybatis-config.xml #...
# mapper-locations: classpath:mapper/*.xml # 配置 Mapper XML 地址 type-aliases-package: cn.iocoder.springboot.lab12.mybatis.dataobject # 配置数据库实体包路径
repos\SpringBoot-Labs-master\lab-12-mybatis\lab-12-mybatis-annotation\src\main\resources\application.yaml
2
请在Spring Boot框架中完成以下Java代码
public class UserDao extends BaseDao<User, Long> { @Autowired public UserDao(JdbcTemplate jdbcTemplate) { super(jdbcTemplate); } /** * 保存用户 * * @param user 用户对象 * @return 操作影响行数 */ public Integer insert(User user) { return super.insert(user, true); } ...
return super.updateById(user, id, true); } /** * 根据主键获取用户 * * @param id 主键id * @return id对应的用户 */ public User selectById(Long id) { return super.findOneById(id); } /** * 根据查询条件获取用户列表 * * @param user 用户查询条件 * @return 用户列表 */ public List<...
repos\spring-boot-demo-master\demo-orm-jdbctemplate\src\main\java\com\xkcoding\orm\jdbctemplate\dao\UserDao.java
2
请完成以下Java代码
public TransactionDescriptor ofRecord(@NonNull final I_M_Transaction record) { final WarehouseId warehouseId = warehousesRepo.getWarehouseIdByLocatorRepoId(record.getM_Locator_ID()); return TransactionDescriptor.builder() .eventDescriptor(EventDescriptor.ofClientAndOrg(record.getAD_Client_ID(), record.getAD_O...
final boolean movementDateContainsTime = !movementDate.equals(movementDateDay); if (movementDateContainsTime) { return asInstant(movementDate); } // try to fall back to the M_Transaction's created or update date, to get the actual movement date *and time*. final Timestamp created = record.getCreated(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\material\interceptor\transactionevent\TransactionDescriptorFactory.java
1
请完成以下Java代码
public void setAD_PrinterHW_ID (final int AD_PrinterHW_ID) { if (AD_PrinterHW_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_PrinterHW_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_PrinterHW_ID, AD_PrinterHW_ID); } @Override public int getAD_PrinterHW_ID() { return get_ValueAsInt(COLUMNNAME_AD_PrinterHW...
@Override public void setName (final java.lang.String Name) { set_ValueNoCheck (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } /** * OutputType AD_Reference_ID=540632 * Reference name: OutputType */ public static final int OUTP...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_AD_PrinterHW.java
1
请完成以下Java代码
public byte[] getAvatar() { return avatar; } public void setAvatar(byte[] avatar) { this.avatar = avatar; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getGenre() { return...
public void setGenre(String genre) { this.genre = genre; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } @Override public String toString() { return "Author{" + "name=" + name + "}"; } }
repos\Hibernate-SpringBoot-master\HibernateSpringBootAttributeLazyLoadingBasic\src\main\java\com\bookstore\entity\Author.java
1
请完成以下Java代码
public boolean isActive() { return active; } public void setActive(boolean active) { this.active = active; } @Override public boolean isApplyClientSecurity() { return applyClientSecurity; } public void setApplyClientSecurity(boolean applyClientSecurity) { this.applyClientSecurity = applyClientSecu...
return writeOff; } public void setWriteOff(Boolean writeOff) { this.writeOff = writeOff; } @Override public String getAdditionalWhere() { return additionalWhere; } public void setAdditionalWhere(String additionalWhere) { this.additionalWhere = additionalWhere; } @Override public ApplyAccessFilter...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\api\impl\DunningCandidateQuery.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonHUQtyChangeRequest { @Nullable ScannedCode huQRCode; @Nullable HuId huId; @NonNull JsonQuantity qty; @Nullable String description; boolean splitOneIfAggregated; @Nullable String locatorQRCode; boolean setBestBeforeDate; @Nullable @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM...
{ if (!HuId.equals(this.huId, huId)) { throw new AdempiereException("Overriding request huId with `" + huId + "` is not allowed for request " + this); } else { return this; } } else { return toBuilder().huId(huId).build(); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.mobileui\src\main\java\de\metas\handlingunits\rest_api\JsonHUQtyChangeRequest.java
2
请在Spring Boot框架中完成以下Java代码
public String getTAXAMOUNT() { return taxamount; } /** * Sets the value of the taxamount property. * * @param value * allowed object is * {@link String } * */ public void setTAXAMOUNT(String value) { this.taxamount = value; } /** ...
/** * Sets the value of the linesamount property. * * @param value * allowed object is * {@link String } * */ public void setLINESAMOUNT(String value) { this.linesamount = value; } /** * Gets the value of the chargesamount property. * ...
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\TTAXI1.java
2
请完成以下Java代码
public Long getBlockQps() { return blockQps; } public void setBlockQps(Long blockQps) { this.blockQps = blockQps; } public Long getExceptionQps() { return exceptionQps; } public void setExceptionQps(Long exceptionQps) { this.exceptionQps = exceptionQps; } ...
@Override public String toString() { return "MetricEntity{" + "id=" + id + ", gmtCreate=" + gmtCreate + ", gmtModified=" + gmtModified + ", app='" + app + '\'' + ", timestamp=" + timestamp + ", resource='" + resource + '\'' + ...
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\datasource\entity\MetricEntity.java
1
请完成以下Java代码
public String getName() { return name; } public void setName(String name) { this.name = name; } public String[] getRoles() { return roles; } public void setRoles(String[] roles) { this.roles = roles; } public Integer[] getLocations() { return l...
} public void setLocations(Integer[] locations) { this.locations = locations; } public String[] getPhoneNumbers() { return phoneNumbers; } public void setPhoneNumbers(String[] phoneNumbers) { this.phoneNumbers = phoneNumbers; } }
repos\tutorials-master\persistence-modules\hibernate-mapping\src\main\java\com\baeldung\hibernate\arraymapping\User.java
1
请完成以下Java代码
public com.baeldung.protobuf.AddressBookProtos.AddressBook getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_protobuf_Person_descriptor; private static final com.google.protobuf.GeneratedMessage.FieldAcce...
internal_static_protobuf_Person_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_protobuf_Person_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_protobuf_Person_descriptor, new java.lang.String[] { "Name", "Id", "Ema...
repos\tutorials-master\google-protocol-buffer\src\main\java\com\baeldung\protobuf\AddressBookProtos.java
1
请完成以下Java代码
public IReturnsInOutProducer setC_BPartner_Location(final I_C_BPartner_Location bpLocation) { assertConfigurable(); Check.assumeNotNull(bpLocation, "bpLocation not null"); _bpartnerLocationId = bpLocation.getC_BPartner_Location_ID(); return this; } @Override public IReturnsInOutProducer setMovementType(fin...
inoutLinesBuilder.addSources(sources); inoutLinesBuilder.create(); } @Override protected int getReturnsDocTypeId(final String docBaseType, final boolean isSOTrx, final int adClientId, final int adOrgId) { final I_C_DocType docType = getEmptiesDocType(docBaseType, adClientId, adOrgId, isSOTrx); DocTypeId d...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\empties\impl\EmptiesInOutProducer.java
1
请在Spring Boot框架中完成以下Java代码
public String audit(HttpServletRequest request, Model model, DwzAjax dwz) { String settId = request.getParameter("settId"); String settStatus = request.getParameter("settStatus"); String remark = request.getParameter("remark"); rpSettHandleService.audit(settId, settStatus, remark); dwz.setStatusCode(DWZ.SUCCE...
model.addAttribute("dwz", dwz); return DWZ.AJAX_DONE; } /** * 函数功能说明 :查看 * * @参数: @return * @return String * @throws */ @RequestMapping(value = "/view", method = RequestMethod.GET) public String view(Model model, @RequestParam("id") String id) { RpSettRecord settRecord = rpSettQueryService.getDat...
repos\roncoo-pay-master\roncoo-pay-web-boss\src\main\java\com\roncoo\pay\controller\sett\SettController.java
2
请在Spring Boot框架中完成以下Java代码
public class PersistenceConfig { @Autowired private Environment env; public PersistenceConfig() { super(); } @Bean public AnnotationSessionFactoryBean sessionFactory() { final AnnotationSessionFactoryBean sessionFactory = new AnnotationSessionFactoryBean(); sessionFact...
@Bean @Autowired public HibernateTransactionManager transactionManager(final SessionFactory sessionFactory) { final HibernateTransactionManager txManager = new HibernateTransactionManager(); txManager.setSessionFactory(sessionFactory); return txManager; } @Bean public Persi...
repos\tutorials-master\persistence-modules\spring-hibernate-3\src\main\java\com\baeldung\spring\PersistenceConfig.java
2
请完成以下Java代码
public DmnDeploymentHelper getDmnDeploymentHelper() { return dmnDeploymentHelper; } public void setDmnDeploymentHelper(DmnDeploymentHelper dmnDeploymentHelper) { this.dmnDeploymentHelper = dmnDeploymentHelper; } public CachingAndArtifactsManager getCachingAndArtifcatsManager() { ...
public boolean isUsePrefixId() { return usePrefixId; } public void setUsePrefixId(boolean usePrefixId) { this.usePrefixId = usePrefixId; } public DecisionRequirementsDiagramHelper getDecisionRequirementsDiagramHelper() { return decisionRequirementsDiagramHelper; } publ...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\deployer\DmnDeployer.java
1
请在Spring Boot框架中完成以下Java代码
private boolean isLineLevelPickTarget(final PickingJob pickingJob) {return pickingJob.isLineLevelPickTarget();} @Nullable private LUPickingTarget reinitializeLUPickingTarget(@Nullable final LUPickingTarget luPickingTarget) { if (luPickingTarget == null) { return null; } final HuId luId = luPickingTarget...
return LUPickingTarget.ofPackingInstructions(luPI); } // // // @Value @Builder private static class StepUnpickInstructions { @NonNull PickingJobStepId stepId; @NonNull PickingJobStepPickFromKey pickFromKey; } }
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 List<Integer> copyListByCopyMethod(List<Integer> source, List<Integer> dest) { Collections.copy(dest, source); return dest; } public List<Flower> copyListByStream(List<Flower> source) { return source.stream().collect(Collectors.toList()); } public List<Flower> copyListBy...
public List<Flower> copyListByStreamWithOptional(List<Flower> source) { return Optional.ofNullable(source) .map(List::stream) .orElseGet(Stream::empty) .collect(Collectors.toList()); } public List<Flower> copyListByStreamWithOptionalAndSkip(List<Flower...
repos\tutorials-master\core-java-modules\core-java-collections-list-3\src\main\java\com\baeldung\java\list\CopyListService.java
1