instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public void saveInventoryLineHURecords(final InventoryLine inventoryLine, final @NonNull InventoryId inventoryId) { inventoryRepository.saveInventoryLineHURecords(inventoryLine, inventoryId); } public Stream<InventoryReference> streamReferences(@NonNull final InventoryQuery query) { return inventoryRepository....
{ return DraftInventoryLinesCreateCommand.builder() .inventoryRepository(inventoryRepository) .huForInventoryLineFactory(huForInventoryLineFactory) .request(request) .build() .execute(); } public void setQtyCountToQtyBookForInventory(@NonNull final InventoryId inventoryId) { inventoryReposit...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\InventoryService.java
1
请完成以下Java代码
public abstract class Vehicle { private String vehicleName; private String vehicleModel; private Long makeYear; public Vehicle(String vehicleName) { this.vehicleName = vehicleName; } public Vehicle(String vehicleName, String vehicleModel) { this(vehicleName); this.vehi...
public Long getMakeYear() { return makeYear; } public void setMakeYear(Long makeYear) { this.makeYear = makeYear; } protected abstract void start(); protected abstract void stop(); protected abstract void drive(); protected abstract void changeGear(); protected abst...
repos\tutorials-master\core-java-modules\core-java-lang-oop-patterns-2\src\main\java\com\baeldung\interfacevsabstractclass\Vehicle.java
1
请完成以下Java代码
public OptimisticLockingResult failedOperation(DbOperation operation) { if (operation instanceof DbEntityOperation) { DbEntityOperation dbEntityOperation = (DbEntityOperation) operation; DbEntity dbEntity = dbEntityOperation.getEntity(); boolean failedOperationEntityInList = fals...
EnsureUtil.ensureNotNull("workerId", workerId); EnsureUtil.ensureGreaterThanOrEqual("maxResults", maxResults, 0); for (TopicFetchInstruction instruction : fetchInstructions.values()) { EnsureUtil.ensureNotNull("topicName", instruction.getTopicName()); EnsureUtil.ensurePositive("lockTime", instructi...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\FetchExternalTasksCmd.java
1
请完成以下Java代码
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((count == null) ? 0 : count.hashCode()); result = prime * result + ((gender == null) ? 0 : gender.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result...
if (other.gender != null) return false; } else if (!gender.equals(other.gender)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (probability ...
repos\tutorials-master\spring-web-modules\spring-thymeleaf-attributes\accessing-session-attributes\src\main\java\com\baeldung\accesing_session_attributes\business\entities\NameGenderEntity.java
1
请完成以下Java代码
protected boolean isEligibleForScheduling(final Object model) { return Services.get(ICounterDocBL.class).isCreateCounterDocument(model); }; @Override protected Properties extractCtxFromItem(final Object item) { return InterfaceWrapperHelper.getCtx(item); } @Override protected String extractTrxNa...
private final transient ICounterDocBL counterDocumentBL = Services.get(ICounterDocBL.class); @Override public Result processWorkPackage(final I_C_Queue_WorkPackage workpackage, final String localTrxName) { final List<Object> models = queueDAO.retrieveAllItemsSkipMissing(workpackage, Object.class); for (final Ob...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\document\async\spi\impl\CreateCounterDocPP.java
1
请完成以下Java代码
public ManufacturingJob withChangedReceiveLine( @NonNull final FinishedGoodsReceiveLineId id, @NonNull UnaryOperator<FinishedGoodsReceiveLine> mapper) { final ImmutableList<ManufacturingJobActivity> activitiesNew = CollectionUtils.map(activities, activity -> activity.withChangedReceiveLine(id, mapper)); retu...
{ return dateStartSchedule.toLocalDate(); } @NonNull public ManufacturingJob withChangedRawMaterialIssue(@NonNull final UnaryOperator<RawMaterialsIssue> mapper) { final ImmutableList<ManufacturingJobActivity> updatedActivities = activities .stream() .map(activity -> activity.withChangedRawMaterialsIssu...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\model\ManufacturingJob.java
1
请完成以下Java代码
private LookupValuesPage getShipmentScheduleValues(final LookupDataSourceContext context) { return createNewDefaultParametersFiller().getShipmentScheduleValues(context); } private WEBUI_M_HU_Pick_ParametersFiller createNewDefaultParametersFiller() { final HURow row = getSingleHURow(); return WEBUI_M_HU_Pick_...
// invalidate view in order to be refreshed getView().invalidateAll(); return MSG_OK; } private void pickHU(@NonNull final HURow row) { final HuId huId = row.getHuId(); final PickRequest pickRequest = PickRequest.builder() .shipmentScheduleId(shipmentScheduleId) .pickFrom(PickFrom.ofHuId(huId)) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_HU_Pick.java
1
请在Spring Boot框架中完成以下Java代码
public Date getFromDate() { return fromDate; } public Date getToDate() { return toDate; } public String getTenantId() { return tenantId; } public long getFromLogNumber() { return fromLogNumber; } public long getToLogNumber() { return toLogNumbe...
@Override public long executeCount(CommandContext commandContext) { return taskServiceConfiguration.getHistoricTaskLogEntryEntityManager().findHistoricTaskLogEntriesCountByQueryCriteria(this); } @Override public List<HistoricTaskLogEntry> executeList(CommandContext commandContext) { ret...
repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\HistoricTaskLogEntryQueryImpl.java
2
请完成以下Java代码
public class DmnDecisionRuleResult { protected List<Map<String, Object>> ruleResults = new ArrayList<>(); public DmnDecisionRuleResult(List<Map<String, Object>> ruleResults) { this.ruleResults = ruleResults; } public List<Map<String, Object>> getRuleResults() { return ruleResults; ...
} else { return null; } } public Map<String, Object> getSingleRuleResult() { if (ruleResults.isEmpty()) { return null; } else if (ruleResults.size() > 1) { throw new FlowableException("Decision has multiple results"); } else { retu...
repos\flowable-engine-main\modules\flowable-dmn-api\src\main\java\org\flowable\dmn\api\DmnDecisionRuleResult.java
1
请完成以下Java代码
public class SaveCommentCmd implements Command<Void>, Serializable { private static final long serialVersionUID = 1L; protected CommentEntity comment; public SaveCommentCmd(CommentEntity comment) { this.comment = comment; } @Override public Void execute(CommandContext commandContext) ...
} CommentEntityManager commentEntityManager = CommandContextUtil.getCommentEntityManager(commandContext); String eventMessage = comment.getFullMessage().replaceAll("\\s+", " "); if (eventMessage.length() > 163) { eventMessage = eventMessage.substring(0, 160) + "......
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cmd\SaveCommentCmd.java
1
请完成以下Java代码
public class Demo07Message implements Serializable { public static final String QUEUE = "QUEUE_DEMO_07"; // 正常队列 public static final String DEAD_QUEUE = "DEAD_QUEUE_DEMO_07"; // 死信队列 public static final String EXCHANGE = "EXCHANGE_DEMO_07"; public static final String ROUTING_KEY = "ROUTING_KEY_07"; /...
this.id = id; return this; } public Integer getId() { return id; } @Override public String toString() { return "Demo07Message{" + "id=" + id + '}'; } }
repos\SpringBoot-Labs-master\lab-04-rabbitmq\lab-04-rabbitmq-consume-retry\src\main\java\cn\iocoder\springboot\lab04\rabbitmqdemo\message\Demo07Message.java
1
请完成以下Java代码
private WebuiLetter changeLetter(final WebuiLetter letter, final List<JSONDocumentChangedEvent> events) { final WebuiLetterBuilder letterBuilder = letter.toBuilder(); events.forEach(event -> changeLetter(letter, letterBuilder, event)); return letterBuilder.build(); } private void changeLetter(final WebuiLette...
.collect(JSONLookupValuesList.collect()) .setDefaultId(defaultBoilerPlateId == null ? null : String.valueOf(defaultBoilerPlateId.getRepoId())); } private void applyTemplate(final WebuiLetter letter, final WebuiLetterBuilder newLetterBuilder, final LookupValue templateLookupValue) { final Properties ctx = Env....
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\letter\LetterRestController.java
1
请完成以下Java代码
public class ItemDefinition extends NamedElement { protected String typeRef; protected UnaryTests allowedValues; protected List<ItemDefinition> itemComponents = new ArrayList<>(); protected String typeLanguage; protected boolean isCollection; public String getTypeRef() { return typeRef...
this.itemComponents.add(itemComponent); } public String getTypeLanguage() { return typeLanguage; } public void setTypeLanguage(String typeLanguage) { this.typeLanguage = typeLanguage; } public boolean isCollection() { return isCollection; } public void setCollecti...
repos\flowable-engine-main\modules\flowable-dmn-model\src\main\java\org\flowable\dmn\model\ItemDefinition.java
1
请完成以下Java代码
private List<Object> getNextRawDataRow() { try { final List<Object> row = new ArrayList<>(); for (int col = 1; col <= getColumnCount(); col++) { final Object o = m_resultSet.getObject(col); row.add(o); } noDataAddedYet = false; return row; } catch (final SQLException e) { throw D...
} } @Override protected boolean hasNextRow() { try { return m_resultSet.next(); } catch (SQLException e) { throw DBException.wrapIfNeeded(e); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\spreadsheet\excel\JdbcExcelExporter.java
1
请在Spring Boot框架中完成以下Java代码
public Map<String, Object> pageList(@RequestParam(required = false, defaultValue = "0") int start, @RequestParam(required = false, defaultValue = "10") int length, int jobGroup, int triggerStatus, String jobDesc, String executorHandler, String author) { return xxlJobService.pageList(start, length, jobGroup...
XxlJobInfo paramXxlJobInfo = new XxlJobInfo(); paramXxlJobInfo.setScheduleType(scheduleType); paramXxlJobInfo.setScheduleConf(scheduleConf); List<String> result = new ArrayList<>(); try { Date lastTime = new Date(); for (int i = 0; i < 5; i++) { lastTime = JobScheduleHelper.generateNextValidTime(para...
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\controller\JobInfoController.java
2
请完成以下Java代码
public boolean isProcessing () { Object oo = get_Value(COLUMNNAME_Processing); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Usable Life - Months. @param UseLifeMonths Months of the usable life of the...
/** Set Usable Life - Years. @param UseLifeYears Years of the usable life of the asset */ public void setUseLifeYears (int UseLifeYears) { set_Value (COLUMNNAME_UseLifeYears, Integer.valueOf(UseLifeYears)); } /** Get Usable Life - Years. @return Years of the usable life of the asset */ public int g...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Group_Acct.java
1
请完成以下Java代码
public ArrayList<Object> getData(boolean mandatory, boolean onlyValidated, boolean onlyActive, boolean temporary) { // create list final Collection<MLocator> collection = getData(); final ArrayList<Object> list = new ArrayList<>(collection.size()); Iterator<MLocator> it = collection.iterator(); while (it.has...
{ m_loader.join(); } catch (InterruptedException ie) { } log.info("#" + m_lookup.size()); return m_lookup.size(); } // refresh @Override public String getTableName() { return I_M_Locator.Table_Name; } /** * Get underlying fully qualified Table.Column Name * * @return Table.ColumnName *...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MLocatorLookup.java
1
请完成以下Java代码
public String getCaseInstanceId() { return caseInstanceId; } public void setCaseInstanceId(String caseInstanceId) { this.caseInstanceId = caseInstanceId; } public List<ProcessInstanceModificationInstructionDto> getStartInstructions() { return startInstructions; } public void setStartInstructi...
public void setSkipCustomListeners(boolean skipCustomListeners) { this.skipCustomListeners = skipCustomListeners; } public boolean isSkipIoMappings() { return skipIoMappings; } public void setSkipIoMappings(boolean skipIoMappings) { this.skipIoMappings = skipIoMappings; } public boolean isWit...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\StartProcessInstanceDto.java
1
请完成以下Java代码
private void assertNotBuilt() { Check.assume(!built.get(), "not already built"); } private void markAsBuilt() { final boolean wasAlreadyBuilt = built.getAndSet(true); Check.assume(!wasAlreadyBuilt, "not already built"); } @Override public IWorkPackageBuilder end() { return _parentBuilder; } /* pack...
{ final String parameterName = param.getKey(); Check.assumeNotEmpty(parameterName, "parameterName not empty"); final Object parameterValue = param.getValue(); parameterName2valueMap.put(parameterName, parameterValue); } return this; } @Override public IWorkPackageParamsBuilder setParameters(@Null...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\api\impl\WorkPackageParamsBuilder.java
1
请完成以下Java代码
public Object getPersistentState() { Map<String, Object> persistentState = new HashMap<>(); persistentState.put("name", name); persistentState.put("description", description); return persistentState; } @Override public String getName() { return name; } @Over...
} @Override public String getContentId() { return contentId; } @Override public void setContentId(String contentId) { this.contentId = contentId; } @Override public ByteArrayEntity getContent() { return content; } @Override public void setContent(B...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\AttachmentEntityImpl.java
1
请完成以下Java代码
public ParsedDeploymentBuilderFactory getExParsedDeploymentBuilderFactory() { return parsedDeploymentBuilderFactory; } public void setParsedDeploymentBuilderFactory(ParsedDeploymentBuilderFactory parsedDeploymentBuilderFactory) { this.parsedDeploymentBuilderFactory = parsedDeploymentBuilderFact...
} public CachingAndArtifactsManager getCachingAndArtifcatsManager() { return cachingAndArtifactsManager; } public void setCachingAndArtifactsManager(CachingAndArtifactsManager manager) { this.cachingAndArtifactsManager = manager; } public boolean isUsePrefixId() { return u...
repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\deployer\EventDefinitionDeployer.java
1
请完成以下Java代码
public class ESR_Import_LoadFromAttachmentEntry extends JavaProcess { @Param(mandatory = true, parameterName = "AD_AttachmentEntry_ID") private int p_AD_AttachmentEntry_ID; @Param(mandatory = true, parameterName = I_C_Async_Batch.COLUMNNAME_Name) private final String p_AsyncBatchName = ESR_ASYNC_BATCH_NAME; @P...
final RunESRImportRequest runESRImportRequest = RunESRImportRequest.builder() .esrImport(esrImport) .attachmentEntryId(attachmentEntryId) .asyncBatchDescription(p_AsyncBatchDesc) .asyncBatchName(p_AsyncBatchName) .loggable(this) .build(); esrImportBL.scheduleESRImportFor(runESRImportRequest);...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java\de\metas\payment\esr\process\ESR_Import_LoadFromAttachmentEntry.java
1
请在Spring Boot框架中完成以下Java代码
public String showForm() { return "user.jsp"; } /** * The method handles the form submits * Handles HTTP POST and is CSRF protected. The client invoking this controller should provide a CSRF token. * @param user The user details that has to be stored * @return Returns a view name ...
*/ @GET @Controller @Path("success") public String saveUserSuccess() { return "success.jsp"; } /** * The REST API that returns all the user details in the JSON format * @return The list of users that are saved. The List<User> is converted into Json Array. * If no user is...
repos\tutorials-master\web-modules\jakarta-ee\src\main\java\com\baeldung\eclipse\krazo\UserController.java
2
请完成以下Java代码
public void setPastDueAmt (BigDecimal PastDueAmt) { set_Value (COLUMNNAME_PastDueAmt, PastDueAmt); } /** Get Past Due. @return Past Due */ public BigDecimal getPastDueAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDueAmt); if (bd == null) return Env.ZERO; return bd; } /** Set St...
Date of the statement */ public void setStatementDate (Timestamp StatementDate) { set_Value (COLUMNNAME_StatementDate, StatementDate); } /** Get Statement date. @return Date of the statement */ public Timestamp getStatementDate () { return (Timestamp)get_Value(COLUMNNAME_StatementDate); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_T_Aging.java
1
请完成以下Java代码
public void setPayAmt (BigDecimal PayAmt) { set_Value (COLUMNNAME_PayAmt, PayAmt); } /** Get Zahlungsbetrag. @return Gezahlter Betrag */ @Override public BigDecimal getPayAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PayAmt); if (bd == null) return BigDecimal.ZERO; return bd; } /...
{ set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Process Now. @return Process Now */ @Override public boolean isProcessing () { Object oo = get_Value(COLUMNNAME_Processing); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java-gen\de\metas\banking\model\X_I_Datev_Payment.java
1
请完成以下Java代码
public static InvoiceCandidateHeaderAggregationId ofRepoId(final int repoId) { return new InvoiceCandidateHeaderAggregationId(repoId); } @Nullable public static InvoiceCandidateHeaderAggregationId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? ofRepoId(repoId) : null; } int repoId; private Invoic...
this.repoId = Check.assumeGreaterThanZero(repoId, "C_Invoice_Candidate_HeaderAggregation_ID"); } @Override @JsonValue public int getRepoId() { return repoId; } public static int toRepoId(@Nullable final InvoiceCandidateHeaderAggregationId id) { return id != null ? id.getRepoId() : -1; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\InvoiceCandidateHeaderAggregationId.java
1
请完成以下Java代码
public InvoiceCandRecomputeTagger setLockedBy(final ILock lockedBy) { this._lockedBy = lockedBy; return this; } /* package */ILock getLockedBy() { return _lockedBy; } @Override public InvoiceCandRecomputeTagger setTaggedWith(@Nullable final InvoiceCandRecomputeTag tag) { _taggedWith = tag; return th...
{ this._limit = limit; return this; } /* package */int getLimit() { return _limit; } @Override public void setOnlyInvoiceCandidateIds(@NonNull final InvoiceCandidateIdsSelection onlyInvoiceCandidateIds) { this.onlyInvoiceCandidateIds = onlyInvoiceCandidateIds; } @Override @Nullable public final In...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceCandRecomputeTagger.java
1
请完成以下Java代码
public class RemoteServerJsch { private static final Logger LOGGER = LoggerFactory.getLogger(RemoteServerJsch.class); private static final String HOST = "HOST"; private static final String USER = "USERNAME"; private static final String PRIVATE_KEY = "PATH TO PRIVATE KEY"; private static final int P...
ChannelSftp channelSftp = (ChannelSftp) session.openChannel("sftp"); channelSftp.connect(); return channelSftp; } public static void readFileLineByLine(ChannelSftp channelSftp, String filePath) throws SftpException, IOException { InputStream stream = channelSftp.get(filePath); t...
repos\tutorials-master\libraries-files\src\main\java\com\baeldung\readfileremotely\RemoteServerJsch.java
1
请完成以下Java代码
public Boolean getInitial() { return initial; } public int getRevision() { return revision; } public String getErrorMessage() { return errorMessage; } public Map<String, Object> getValueInfo() { return valueInfo; } public static HistoricVariableUpdateDto fromHistoricVariableUpdate(Hi...
dto.initial = historicVariableUpdate.isInitial(); if (historicVariableUpdate.getErrorMessage() == null) { try { VariableValueDto variableValueDto = VariableValueDto.fromTypedValue(historicVariableUpdate.getTypedValue()); dto.value = variableValueDto.getValue(); dto.variableType = vari...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricVariableUpdateDto.java
1
请在Spring Boot框架中完成以下Java代码
public class ExternalWorkerJobFailCmd extends AbstractExternalWorkerJobCmd { protected int retries; protected Duration retryTimeout; protected String errorMessage; protected String errorDetails; public ExternalWorkerJobFailCmd(String externalJobId, String workerId, int retries, Duration retryTimeo...
newRetries = retries; } else { newRetries = externalWorkerJob.getRetries() - 1; } if (newRetries > 0) { externalWorkerJob.setRetries(newRetries); externalWorkerJob.setLockOwner(null); if (retryTimeout == null) { externalWorkerJob.s...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\cmd\ExternalWorkerJobFailCmd.java
2
请完成以下Java代码
public Object[] toArray() { return getElements().toArray(); } public <T1> T1[] toArray(T1[] a) { return getElements().toArray(a); } public boolean add(T t) { getDomElement().appendChild(t.getDomElement()); return true; } public boolean remove(Object...
return true; } public boolean removeAll(Collection<?> c) { boolean result = false; for (Object o : c) { result |= remove(o); } return result; } public boolean retainAll(Collection<?> c) { throw new UnsupportedModelOperationException("retainAll(...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\camunda\CamundaListImpl.java
1
请完成以下Java代码
public String getAuthor() { return author; } /** * Sets the {@link #author}. * * @param author * the new {@link #author} */ public void setAuthor(String author) { this.author = author; } /** * Gets the {@link #tags}. * * @return the {@link #tags} */ public List<String> getTags()...
/* * (non-Javadoc) * * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Post other = (Post) obj; if (author == null) { if (other.au...
repos\tutorials-master\persistence-modules\java-mongodb-3\src\main\java\com\baeldung\mongo\tagging\Post.java
1
请完成以下Java代码
default <T> T getRequiredAttribute(String name) { T result = getAttribute(name); if (result == null) { throw new IllegalArgumentException("Required attribute '" + name + "' is missing."); } return result; } /** * Return the session attribute value, or a default, fallback value. * @param name the attri...
Instant getCreationTime(); /** * Sets the last accessed time. * @param lastAccessedTime the last accessed time */ void setLastAccessedTime(Instant lastAccessedTime); /** * Gets the last time this {@link Session} was accessed. * @return the last time the client sent a request associated with the session ...
repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\Session.java
1
请完成以下Java代码
public void deleteAllSpecAttributeValues(final I_DIM_Dimension_Spec_Attribute specAttr) { Services.get(IQueryBL.class).createQueryBuilder(I_DIM_Dimension_Spec_AttributeValue.class, specAttr) .addEqualsFilter(I_DIM_Dimension_Spec_AttributeValue.COLUMN_DIM_Dimension_Spec_Attribute_ID, specAttr.getDIM_Dimension_Spe...
.create() .firstOnly(I_DIM_Dimension_Spec.class); if(record == null) { return null; } return DimensionSpec.ofRecord(record); } @Override public List<String> retrieveAttributeValueForGroup(final String dimensionSpectInternalName, final String groupName, final IContextAware ctxAware) { final K...
repos\metasfresh-new_dawn_uat\backend\de.metas.dimension\src\main\java\de\metas\dimension\impl\DimensionspecDAO.java
1
请完成以下Java代码
public void setBeanName(String name) { this.beanName = name; } protected abstract @Nullable D addRegistration(String description, ServletContext servletContext); protected void configure(D registration) { registration.setAsyncSupported(this.asyncSupported); if (!this.initParameters.isEmpty()) { registrati...
* @param value the object used for convention based names * @return the deduced name */ protected final String getOrDeduceName(@Nullable Object value) { if (this.name != null) { return this.name; } if (this.beanName != null) { return this.beanName; } if (value == null) { return "null"; } ret...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\web\servlet\DynamicRegistrationBean.java
1
请在Spring Boot框架中完成以下Java代码
public void setQUANTITYQUAL(String value) { this.quantityqual = value; } /** * Gets the value of the quantity property. * * @return * possible object is * {@link String } * */ public String getQUANTITY() { return quantity; } /** ...
public DPLDQ1 getDPLDQ1() { return dpldq1; } /** * Sets the value of the dpldq1 property. * * @param value * allowed object is * {@link DPLDQ1 } * */ public void setDPLDQ1(DPLDQ1 value) { this.dpldq1 = value; } /** * Gets the va...
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\DQUAN1.java
2
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setM_Attribute_ID (final int M_Attribute_ID) { if (M_Attribute_ID < 1) set_Value (COLUMNNAME_M_Attribute_ID, null); else set_Value (COLUMNNAME_M_Attribut...
@Override public void setM_ShipmentSchedule_AttributeConfig_ID (final int M_ShipmentSchedule_AttributeConfig_ID) { if (M_ShipmentSchedule_AttributeConfig_ID < 1) set_ValueNoCheck (COLUMNNAME_M_ShipmentSchedule_AttributeConfig_ID, null); else set_ValueNoCheck (COLUMNNAME_M_ShipmentSchedule_AttributeConfig_...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inoutcandidate\model\X_M_ShipmentSchedule_AttributeConfig.java
1
请完成以下Java代码
public static void main(String[] args) throws IOException, GitAPIException { // prepare test-repository try (Repository repository = Helper.openJGitRepository()) { try (Git git = new Git(repository)) { // remove the tag before creating it git.tagDelete().setTa...
tag = git.tag().setObjectId(commit).setName("tag_for_testing").call(); logger.debug("Created/moved tag " + tag + " to repository at " + repository.getDirectory()); // remove the tag again git.tagDelete().setTags("tag_for_testing").call(); ...
repos\tutorials-master\jgit\src\main\java\com\baeldung\jgit\porcelain\CreateAndDeleteTag.java
1
请在Spring Boot框架中完成以下Java代码
public void deleteHistoricTaskLogEntriesForNonExistingCaseInstances() { if (this.configuration.isEnableHistoricTaskLogging()) { getHistoricTaskLogEntryEntityManager().deleteHistoricTaskLogEntriesForNonExistingCaseInstances(); } } @Override public void deleteHistoricTaskInsta...
return configuration.getHistoricTaskLogEntryEntityManager(); } protected void createHistoricIdentityLink(String taskId, String type, String userId, AbstractEngineConfiguration engineConfiguration) { HistoricIdentityLinkService historicIdentityLinkService = getIdentityLinkServiceConfiguration(engineConf...
repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\HistoricTaskServiceImpl.java
2
请完成以下Java代码
public static SqlParamsCollector notCollecting() { return NOT_COLLECTING; } private static final SqlParamsCollector NOT_COLLECTING = new SqlParamsCollector(null); private final List<Object> params; private final List<Object> paramsRO; private SqlParamsCollector(final List<Object> params) { this.params = p...
/** * Collects given SQL value and returns an SQL placeholder, i.e. "?" * * In case this is in non-collecting mode, the given SQL value will be converted to SQL code and it will be returned. * The internal list won't be affected, because it does not exist. */ public String placeholder(@Nullable final Object...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\sql\SqlParamsCollector.java
1
请在Spring Boot框架中完成以下Java代码
public void clearRedis() { redisTemplate.opsForValue().set(CacheConstant.GATEWAY_ROUTES, null); } /** * 还原逻辑删除 * @param ids */ @Override public void revertLogicDeleted(List<String> ids) { this.baseMapper.revertLogicDeleted(ids); resreshRouter(null); } /**...
targetRoute.setId(null); targetRoute.setName(copyRouteName); targetRoute.setCreateTime(new Date()); targetRoute.setStatus(0); targetRoute.setDelFlag(CommonConstant.DEL_FLAG_0); this.baseMapper.insert(targetRoute); //2.刷新路由 resreshRouter...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\service\impl\SysGatewayRouteServiceImpl.java
2
请完成以下Java代码
public int getA_Asset_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID); if (ii == null) return 0; return ii.intValue(); } public I_AD_WF_Node getAD_WF_Node() throws RuntimeException { return (I_AD_WF_Node)MTable.get(getCtx(), I_AD_WF_Node.Table_Name) .getPO(getAD_WF_Node_ID(), get_...
@return Workflow Node Asset */ public int getPP_WF_Node_Asset_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_PP_WF_Node_Asset_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Sequence. @param SeqNo Method of ordering records; lowest number comes first */ public void setSeqNo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_WF_Node_Asset.java
1
请完成以下Java代码
public boolean isExclusive() { return isExclusive; } public void setExclusive(boolean isExclusive) { this.isExclusive = isExclusive; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; ...
AcquirableJobEntity other = (AcquirableJobEntity) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; } @Override public String toString() { return this.getClass().getSimpleName() + "[id=" + id ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\AcquirableJobEntity.java
1
请在Spring Boot框架中完成以下Java代码
public Duration getLwcStep() { return this.lwcStep; } public void setLwcStep(Duration lwcStep) { this.lwcStep = lwcStep; } public boolean isLwcIgnorePublishStep() { return this.lwcIgnorePublishStep; } public void setLwcIgnorePublishStep(boolean lwcIgnorePublishStep) { this.lwcIgnorePublishStep = lwcIgn...
public void setConfigTimeToLive(Duration configTimeToLive) { this.configTimeToLive = configTimeToLive; } public String getConfigUri() { return this.configUri; } public void setConfigUri(String configUri) { this.configUri = configUri; } public String getEvalUri() { return this.evalUri; } public void ...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\atlas\AtlasProperties.java
2
请完成以下Java代码
public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } @Override public Date getTime() { return getStartTime(); } @Override public Long getWorkTimeInMillis() { if (endTime == null || claim...
if (queryVariables == null && Context.getCommandContext() != null) { queryVariables = new HistoricVariableInitializingList(); } return queryVariables; } public void setQueryVariables(List<HistoricVariableInstanceEntity> queryVariables) { this.queryVariables = queryVariables;...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\HistoricTaskInstanceEntity.java
1
请完成以下Java代码
public ModelElementInstance getModelElementInstance() { synchronized(document) { return (ModelElementInstance) element.getUserData(MODEL_ELEMENT_KEY); } } public void setModelElementInstance(ModelElementInstance modelElementInstance) { synchronized(document) { element.setUserData(MODEL_ELEM...
} } public String lookupPrefix(String namespaceUri) { synchronized(document) { return element.lookupPrefix(namespaceUri); } } public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DomEleme...
repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\instance\DomElementImpl.java
1
请完成以下Java代码
public Codec<ISeq<SpringsteenRecord>, BitGene> codec() { return codecs.ofSubSet(records); } public static void main(String[] args) { double maxPricePerUniqueSong = 2.5; SpringsteenProblem springsteen = new SpringsteenProblem( ISeq.of(new SpringsteenRecord("SpringsteenRecord...
double cost = result.stream() .mapToDouble(r -> r.price) .sum(); int uniqueSongCount = result.stream() .flatMap(r -> r.songs.stream()) .collect(Collectors.toSet()) .size(); double pricePerUniqueSong = cost / uniqueSongCount; System.o...
repos\tutorials-master\algorithms-modules\algorithms-genetic\src\main\java\com\baeldung\algorithms\ga\jenetics\SpringsteenProblem.java
1
请完成以下Java代码
public static double ChisquareInverseCdf(double p, int df) { final double CHI_EPSILON = 0.000001; /* Accuracy of critchi approximation */ final double CHI_MAX = 99999.0; /* Maximum chi-square value */ double minchisq = 0.0; double maxchisq = CHI_MAX; double chisqval ...
while ((maxchisq - minchisq) > CHI_EPSILON) { if (1 - ChisquareCdf(chisqval, df) < p) { maxchisq = chisqval; } else { minchisq = chisqval; } chisqval = (maxchisq + minchisq) * 0.5; } ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\classification\statistics\ContinuousDistributions.java
1
请完成以下Java代码
public Builder withConfiguration(String configuration) { this.configuration = configuration; return this; } /** * Builder method for activityId parameter. * @param activityId field to set * @return builder */ public Builder withActivit...
* @param created field to set * @return builder */ public Builder withCreated(Date created) { this.created = created; return this; } /** * Builder method of the builder. * @return built class */ public StartMessageSubs...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\StartMessageSubscriptionImpl.java
1
请完成以下Java代码
public void setPP_Order_ID (int PP_Order_ID) { if (PP_Order_ID < 1) set_Value (COLUMNNAME_PP_Order_ID, null); else set_Value (COLUMNNAME_PP_Order_ID, Integer.valueOf(PP_Order_ID)); } /** Get Produktionsauftrag. @return Produktionsauftrag */ @Override public int getPP_Order_ID () { Integer ii =...
{ set_Value (COLUMNNAME_Qty, Qty); } /** Get Menge. @return Menge */ @Override public java.math.BigDecimal getQty () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty); if (bd == null) return Env.ZERO; return bd; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_MRP_Alternative.java
1
请完成以下Java代码
private static WFActivityStatus computeStatusFromSteps(final @NonNull List<DistributionJobStep> steps) { return steps.isEmpty() ? WFActivityStatus.NOT_STARTED : WFActivityStatus.computeStatusFromLines(steps, DistributionJobStep::getStatus); } public DDOrderLineId getDdOrderLineId() {return id.toDDOrderLin...
return changed ? toBuilder().steps(ImmutableList.copyOf(changedSteps)).build() : this; } public DistributionJobLine withChangedSteps(@NonNull final UnaryOperator<DistributionJobStep> stepMapper) { final ImmutableList<DistributionJobStep> changedSteps = CollectionUtils.map(steps, stepMapper); return chan...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\job\model\DistributionJobLine.java
1
请完成以下Java代码
public class EdgeConnectionNotificationInfo implements RuleOriginatedNotificationInfo { private String eventType; private TenantId tenantId; private CustomerId customerId; private EdgeId edgeId; private String edgeName; @Override public Map<String, String> getTemplateData() { retur...
@Override public TenantId getAffectedTenantId() { return tenantId; } @Override public CustomerId getAffectedCustomerId() { return customerId; } @Override public EntityId getStateEntityId() { return edgeId; } }
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\notification\info\EdgeConnectionNotificationInfo.java
1
请完成以下Java代码
public PartyIdentification32 getTradgPty() { return tradgPty; } /** * Sets the value of the tradgPty property. * * @param value * allowed object is * {@link PartyIdentification32 } * */ public void setTradgPty(PartyIdentification32 value) { t...
* This is why there is not a <CODE>set</CODE> method for the prtry property. * * <p> * For example, to add a new item, do as follows: * <pre> * getPrtry().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Pro...
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\TransactionParty2.java
1
请完成以下Java代码
public String getMessageRef() { return messageRef; } public void setMessageRef(String messageRef) { this.messageRef = messageRef; } public String getMessageExpression() { return messageExpression; } public void setMessageExpression(String messageExpression) { t...
this.correlationKey = correlationKey; } public MessageEventDefinition clone() { MessageEventDefinition clone = new MessageEventDefinition(); clone.setValues(this); return clone; } public void setValues(MessageEventDefinition otherDefinition) { super.setValues(otherDefin...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\MessageEventDefinition.java
1
请在Spring Boot框架中完成以下Java代码
public String getChannelDefinitionId() { return channelDefinitionId; } public void setChannelDefinitionId(String channelDefinitionId) { this.channelDefinitionId = channelDefinitionId; } @ApiModelProperty(example = "myChannel") public String getChannelDefinitionKey() { retur...
return tenantId; } public ObjectNode getEventPayload() { return eventPayload; } public void setEventPayload(ObjectNode eventPayload) { this.eventPayload = eventPayload; } @JsonIgnore public boolean isTenantSet() { return tenantId != null && !StringUtils.isEmpty(ten...
repos\flowable-engine-main\modules\flowable-event-registry-rest\src\main\java\org\flowable\eventregistry\rest\service\api\runtime\EventInstanceCreateRequest.java
2
请完成以下Java代码
public int getC_Channel_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_Channel_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Description. @param Description Optional short description of the record */ public void setDescription (String Description) { set_Value (COLUMNNA...
@param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Channel.java
1
请完成以下Java代码
private IAllocationRequest createAllocationRequest( @NonNull final PickingCandidate candidate, @NonNull final Quantity qtyToRemove) { final IMutableHUContext huContext = huContextFactory.createMutableHUContextForProcessing(); return AllocationUtils.builder() .setHUContext(huContext) .setProduct(prod...
{ final I_M_HU hu = load(huId, I_M_HU.class); // we made sure that if the target HU is active, so the source HU also needs to be active. Otherwise, goods would just seem to vanish if (!X_M_HU.HUSTATUS_Active.equals(hu.getHUStatus())) { throw new AdempiereException("not an active HU").setParameter("hu", hu);...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\candidate\commands\RemoveQtyFromHUCommand.java
1
请完成以下Java代码
public List<String> getUstrd() { if (ustrd == null) { ustrd = new ArrayList<String>(); } return this.ustrd; } /** * Gets the value of the strd property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore...
* </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link StructuredRemittanceInformation7 } * * */ public List<StructuredRemittanceInformation7> getStrd() { if (strd == null) { strd = new ArrayList<StructuredRemittanceInfo...
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\RemittanceInformation5.java
1
请完成以下Java代码
public void setESR_Import_ID (final int ESR_Import_ID) { if (ESR_Import_ID < 1) set_ValueNoCheck (COLUMNNAME_ESR_Import_ID, null); else set_ValueNoCheck (COLUMNNAME_ESR_Import_ID, ESR_Import_ID); } @Override public int getESR_Import_ID() { return get_ValueAsInt(COLUMNNAME_ESR_Import_ID); } @Over...
@Override public boolean isReceipt() { return get_ValueAsBoolean(COLUMNNAME_IsReceipt); } @Override public void setIsReconciled (final boolean IsReconciled) { set_Value (COLUMNNAME_IsReconciled, IsReconciled); } @Override public boolean isReconciled() { return get_ValueAsBoolean(COLUMNNAME_IsReconci...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-gen\de\metas\payment\esr\model\X_ESR_Import.java
1
请完成以下Java代码
public org.compiere.model.I_M_CostRevaluation getM_CostRevaluation() { return get_ValueAsPO(COLUMNNAME_M_CostRevaluation_ID, org.compiere.model.I_M_CostRevaluation.class); } @Override public void setM_CostRevaluation(final org.compiere.model.I_M_CostRevaluation M_CostRevaluation) { set_ValueFromPO(COLUMNNAME_...
} @Override public int getM_CostType_ID() { return get_ValueAsInt(COLUMNNAME_M_CostType_ID); } @Override public void setM_Product_ID (final int M_Product_ID) { if (M_Product_ID < 1) set_Value (COLUMNNAME_M_Product_ID, null); else set_Value (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_CostRevaluationLine.java
1
请完成以下Java代码
public int getOverallNumberOfInvoicings() { return overallNumberOfInvoicings; } public static void setQualityAdjustmentActive(final boolean qualityAdjustmentOn) { HardCodedQualityBasedConfig.qualityAdjustmentsActive = qualityAdjustmentOn; } @Override public I_M_Product getRegularPPOrderProduct() { final...
true, // throwExIfProductNotFound ctxAware.getTrxName()); } /** * @return the date that was set with {@link #setValidToDate(Timestamp)}, or falls back to "now plus 2 months". Never returns <code>null</code>. */ @Override public Timestamp getValidToDate() { if (validToDate == null) { return T...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\ch\lagerkonf\impl\HardCodedQualityBasedConfig.java
1
请在Spring Boot框架中完成以下Java代码
private IssueId getIssueIdByExternalId(@Nullable final ExternalId externalId, @NonNull final OrgId orgId) { if (externalId == null) { return null; } final Integer issueId = externalReferenceRepository.getReferencedRecordIdOrNullBy( ExternalReferenceQuery.builder() .orgId(orgId) .external...
{ issueLabels.stream() .filter(label -> adReferenceService.retrieveListItemOrNull(LABEL_AD_Reference_ID, label.getValue()) == null) .map(this::buildRefList) .forEach(adReferenceService::saveRefList); } private ADRefListItemCreateRequest buildRefList(@NonNull final IssueLabel issueLabel) { return ADR...
repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java\de\metas\serviceprovider\issue\importer\IssueImporterService.java
2
请完成以下Java代码
public class CreateUserTaskAfterContext { protected UserTask userTask; protected TaskEntity taskEntity; protected DelegateExecution execution; public CreateUserTaskAfterContext() { } public CreateUserTaskAfterContext(UserTask userTask, TaskEntity taskEntity, DelegateExecution...
public void setUserTask(UserTask userTask) { this.userTask = userTask; } public TaskEntity getTaskEntity() { return taskEntity; } public void setTaskEntity(TaskEntity taskEntity) { this.taskEntity = taskEntity; } public DelegateExecution getExecution() { return...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\interceptor\CreateUserTaskAfterContext.java
1
请完成以下Java代码
protected Date getLastDunningDateEffective(final List<I_C_Dunning_Candidate> candidates) { Date lastDunningDateEffective = null; for (final I_C_Dunning_Candidate candidate : candidates) { // When we are calculating the effective date, we consider only candidates that have processed dunning docs if (!candid...
return lastDunningDateEffective; } /** * Gets Days after last DunningDateEffective * * @param dunningDate * @param candidates * @return days after DunningDateEffective or {@link #DAYS_NotAvailable} if not available */ protected int getDaysAfterLastDunningEffective(final Date dunningDate, final List<I_C_...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\api\impl\DefaultDunningCandidateProducer.java
1
请完成以下Java代码
public BigDecimal getActualAllocation() { if (getQty().compareTo(getMinQty()) > 0) return getQty(); else return getMinQty(); } // getActualAllocation /** * Adjust the Quantity maintaining UOM precision * @param difference difference * @return remaining difference (because under Min or rounding) ...
else setQty(qty.add(diff)); log.debug("Qty=" + qty + ", Min=" + getMinQty() + ", Max=" + max + ", Diff=" + diff + ", newQty=" + getQty() + ", Remaining=" + remaining); return remaining; } // adjustQty /** * String Representation * @return info */ public String toString () { StringBuffer sb...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MDistributionRunDetail.java
1
请完成以下Java代码
public void put(String s, Scriptable scriptable, Object o) { } @Override public void put(int i, Scriptable scriptable, Object o) { } @Override public void delete(String s) { } @Override public void delete(int i) { } @Override public Scriptable getPrototype() { ...
return null; } @Override public void setParentScope(Scriptable scriptable) { } @Override public Object[] getIds() { return null; } @Override public Object getDefaultValue(Class<?> aClass) { return null; } @Override public boolean hasInstance(Scriptable...
repos\flowable-engine-main\modules\flowable-secure-javascript\src\main\java\org\flowable\scripting\secure\impl\SecureScriptScope.java
1
请完成以下Java代码
public String getName() { return innerPlanItemInstance.getName(); } @Override public String getCaseInstanceId() { return innerPlanItemInstance.getCaseInstanceId(); } @Override public String getCaseDefinitionId() { return innerPlanItemInstance.getCaseDefinitionId(); ...
@Override public String getState() { return innerPlanItemInstance.getState(); } @Override public String toString() { return "SignalEventListenerInstanceImpl{" + "id='" + getId() + '\'' + ", name='" + getName() + '\'' + ", caseInstanceId='"...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\SignalEventListenerInstanceImpl.java
1
请完成以下Java代码
public long getMaxScriptExecutionTime() { return maxScriptExecutionTime; } public void setMaxScriptExecutionTime(long maxScriptExecutionTime) { this.maxScriptExecutionTime = maxScriptExecutionTime; } public long getMaxMemoryUsed() { return maxMemoryUsed; } public void ...
public int getMaxStackDepth() { return maxStackDepth; } public void setMaxStackDepth(int maxStackDepth) { this.maxStackDepth = maxStackDepth; } public boolean isEnableAccessToBeans() { return enableAccessToBeans; } public void setEnableAccessToBeans(boolean enableAcces...
repos\flowable-engine-main\modules\flowable-secure-javascript\src\main\java\org\flowable\scripting\secure\impl\SecureScriptContextFactory.java
1
请完成以下Java代码
public void onPostingSign(final I_SAP_GLJournalLine glJournalLine) { updateAmtAcct(glJournalLine); } @CalloutMethod(columnNames = I_SAP_GLJournalLine.COLUMNNAME_C_ValidCombination_ID) public void onC_ValidCombination_ID(final I_SAP_GLJournalLine glJournalLine) { glJournalService.updateTrxInfo(glJournalLine); ...
private void updateAmtAcct(final I_SAP_GLJournalLine glJournalLine) { final SAPGLJournalCurrencyConversionCtx conversionCtx = getConversionCtx(glJournalLine); final Money amtAcct = glJournalService.getCurrencyConverter().convertToAcctCurrency(glJournalLine.getAmount(), conversionCtx); glJournalLine.setAmtAcct(am...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\gljournal_sap\callout\SAP_GLJournalLine.java
1
请完成以下Java代码
public String getPOReference() { return params.getParameterAsString(PARA_POReference); } @Override public BigDecimal getCheck_NetAmtToInvoice() { return params.getParameterAsBigDecimal(PARA_Check_NetAmtToInvoice); } /** * Always returns {@code false}. */ @Override public boolean isAssumeOneInvoice() ...
@Override public boolean isCompleteInvoices() { return params.getParameterAsBoolean(PARA_IsCompleteInvoices, true /*true for backwards-compatibility*/); } /** * Always returns {@code false}. */ @Override public boolean isStoreInvoicesInResult() { return false; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoicingParams.java
1
请完成以下Java代码
public void setEntityType (java.lang.String EntityType) { set_Value (COLUMNNAME_EntityType, EntityType); } /** Get Entitäts-Art. @return Dictionary Entity Type; Determines ownership and synchronization */ @Override public java.lang.String getEntityType () { return (java.lang.String)get_Value(COLUMNNAM...
public void setShowInactiveValues (boolean ShowInactiveValues) { set_Value (COLUMNNAME_ShowInactiveValues, Boolean.valueOf(ShowInactiveValues)); } /** Get Inaktive Werte anzeigen. @return Inaktive Werte anzeigen */ @Override public boolean isShowInactiveValues () { Object oo = get_Value(COLUMNNAME_ShowI...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Ref_Table.java
1
请在Spring Boot框架中完成以下Java代码
public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Document document = (Document) o; return Objects.equals(this._id, document._id) && Objects.equals(this.name, document.name) && Ob...
StringBuilder sb = new StringBuilder(); sb.append("class Document {\n"); sb.append(" _id: ").append(toIndentedString(_id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" patientId: ").append(toIndentedString(patientId)).append("\n"); sb.appe...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-document-api\src\main\java\io\swagger\client\model\Document.java
2
请完成以下Java代码
public Paragraph createWatermarkParagraph(String watermark) throws IOException { PdfFont font = PdfFontFactory.createFont(StandardFonts.HELVETICA); Text text = new Text(watermark); text.setFont(font); text.setFontSize(56); text.setOpacity(0.5f); return new Paragraph(text...
} public void addWatermarkToExistingPage(Document document, int pageIndex, Paragraph paragraph, PdfExtGState graphicState, float verticalOffset) { PdfDocument pdfDoc = document.getPdfDocument(); PdfPage pdfPage = pdfDoc.getPage(pageIndex); PageSize pageSize = (PageSize) pdfPage.getPageSizeW...
repos\tutorials-master\libraries-files\src\main\java\com\baeldung\iTextPDF\StoryTime.java
1
请完成以下Java代码
public Long getGmtCreate() { return gmtCreate; } public void setGmtCreate(Long gmtCreate) { this.gmtCreate = gmtCreate; } public String getResource() { return resource; } public void setResource(String resource) { this.resource = resource; } public Lon...
public void setSuccessQps(Long successQps) { this.successQps = successQps; } public Long getExceptionQps() { return exceptionQps; } public void setExceptionQps(Long exceptionQps) { this.exceptionQps = exceptionQps; } public Double getRt() { return rt; } ...
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\domain\vo\MetricVo.java
1
请完成以下Java代码
public void addError(String errorMessage, Element element) { errors.add(new ProblemImpl(errorMessage, element)); } public void addError(String errorMessage, Element element, String... elementIds) { errors.add(new ProblemImpl(errorMessage, element, elementIds)); } public void addError(BpmnParseExcept...
public boolean hasWarnings() { return warnings != null && !warnings.isEmpty(); } public void logWarnings() { StringBuilder builder = new StringBuilder(); for (Problem warning : warnings) { builder.append("\n* "); builder.append(warning.getMessage()); builder.append(" | resource " + na...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\util\xml\Parse.java
1
请完成以下Java代码
public void reset() { startDate = new Date(); hitCount.set(0); hitInTrxCount.set(0); missCount.set(0); missInTrxCount.set(0); } @Override public String getTableName() { return tableName; } @Override public Date getStartDate() { return startDate; } @Override public long getHitCount() { re...
@Override public void incrementMissCount() { missCount.incrementAndGet(); } @Override public long getMissInTrxCount() { return missInTrxCount.longValue(); } @Override public void incrementMissInTrxCount() { missInTrxCount.incrementAndGet(); } @Override public boolean isCacheEnabled() { if (cach...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\model\impl\TableCacheStatistics.java
1
请在Spring Boot框架中完成以下Java代码
public int hashCode() { return Objects.hash(outcomeReason, status); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PostSaleAuthenticationProgram {\n"); sb.append(" outcomeReason: ").append(toIndentedString(outcomeReason)).append("\n"); sb.append(" s...
/** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\PostSaleAuthenticationProgram.java
2
请完成以下Java代码
public Optional<I_C_PaySelectionLine> retrievePaySelectionLineForPayment( @NonNull final I_C_PaySelection paySelection, @NonNull final PaymentId paymentId) { final I_C_PaySelectionLine paySelectionLine = queryPaySelectionLines(paySelection) .addEqualsFilter(I_C_PaySelectionLine.COLUMNNAME_C_Payment_ID, pay...
.addOnlyActiveRecordsFilter() .create(); } @Override public void updatePaySelectionTotalAmt(@NonNull final PaySelectionId paySelectionId) { final String sql = "UPDATE C_PaySelection ps " + "SET TotalAmt = (SELECT COALESCE(SUM(psl.PayAmt),0) " + "FROM C_PaySelectionLine psl " + "WHERE ps.C_PaySele...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\impl\PaySelectionDAO.java
1
请完成以下Java代码
public void send(@NonNull final UserNotificationRequest request) { try { newNotificationSender().sendNow(request); } catch (final Exception ex) { logger.warn("Failed sending notification: {}", request, ex); } } @Override public void addCtxProvider(final IRecordTextProvider ctxProvider) { ctxPr...
} @Override public @NonNull UserNotificationsConfig getUserNotificationsConfig(final UserId adUserId) { return Services.get(IUserNotificationsConfigRepository.class).getByUserId(adUserId); } @Override public RoleNotificationsConfig getRoleNotificationsConfig(final RoleId adRoleId) { return Services.get(IRo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\notification\impl\NotificationBL.java
1
请在Spring Boot框架中完成以下Java代码
public String getPlanItemInstanceId() { return planItemInstanceId; } public void setPlanItemInstanceId(String planItemInstanceId) { this.planItemInstanceId = planItemInstanceId; } public String getPlanItemInstanceUrl() { return planItemInstanceUrl; } public void setPla...
} public void setScopeType(String scopeType) { this.scopeType = scopeType; } public Date getCreated() { return created; } public void setCreated(Date created) { this.created = created; } public String getConfiguration() { return configuration; } p...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\caze\EventSubscriptionResponse.java
2
请完成以下Java代码
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(DecisionTask.class, CMMN_ELEMENT_DECISION_TASK) .namespaceUri(CMMN11_NS) .extendsType(Task.class) .instanceProvider(new ModelTypeInstanceProvider<DecisionTask>() { ...
camundaDecisionTenantIdAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_DECISION_TENANT_ID) .namespace(CAMUNDA_NS) .build(); camundaMapDecisionResultAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_MAP_DECISION_RESULT) .namespace(CAMUNDA_NS) .build(); SequenceBuil...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\DecisionTaskImpl.java
1
请在Spring Boot框架中完成以下Java代码
public B recoverer(MessageRecoverer recoverer) { this.messageRecoverer = recoverer; return _this(); } protected void applyCommonSettings(AbstractRetryOperationsInterceptorFactoryBean factoryBean) { if (this.messageRecoverer != null) { factoryBean.setMessageRecoverer(this.messageRecoverer); } RetryPolicy...
public StatefulRetryInterceptorBuilder newMessageIdentifier(NewMessageIdentifier newMessageIdentifier) { this.newMessageIdentifier = newMessageIdentifier; return this; } @Override public StatefulRetryOperationsInterceptor build() { this.applyCommonSettings(this.factoryBean); if (this.messageKeyGenera...
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\config\RetryInterceptorBuilder.java
2
请完成以下Java代码
public String getEntityType () { return (String)get_Value(COLUMNNAME_EntityType); } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ publi...
@return Fully qualified ORDER BY clause */ public String getOrderByClause () { return (String)get_Value(COLUMNNAME_OrderByClause); } /** Set Sql WHERE. @param WhereClause Fully qualified SQL WHERE clause */ public void setWhereClause (String WhereClause) { set_Value (COLUMNNAME_WhereClause, Where...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ReportView.java
1
请在Spring Boot框架中完成以下Java代码
public Boolean sIsMember(String key, Object value) { return redisTemplate.opsForSet().isMember(key, value); } @Override public Long sSize(String key) { return redisTemplate.opsForSet().size(key); } @Override public Long sRemove(String key, Object... values) { return red...
@Override public Long lPushAll(String key, Object... values) { return redisTemplate.opsForList().rightPushAll(key, values); } @Override public Long lPushAll(String key, Long time, Object... values) { Long count = redisTemplate.opsForList().rightPushAll(key, values); expire(key, ...
repos\mall-master\mall-common\src\main\java\com\macro\mall\common\service\impl\RedisServiceImpl.java
2
请完成以下Java代码
public class C_DunningDoc_JasperWithInvoicePDFsStrategy implements ExecuteReportStrategy { private static final Logger logger = LogManager.getLogger(C_DunningDoc_JasperWithInvoicePDFsStrategy.class); private final transient IArchiveBL archiveBL = Services.get(IArchiveBL.class); private final transient int dunningDo...
final List<PdfDataProvider> additionalDataItemsToAttach = retrieveAdditionalDataItems(dunnedInvoices); final Resource data = ExecuteReportStrategyUtil.concatenatePDF(dunningDocData, additionalDataItemsToAttach); return ExecuteReportResult.of(outputType, data); } private List<PdfDataProvider> retrieveAdditionalD...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\process\C_DunningDoc_JasperWithInvoicePDFsStrategy.java
1
请在Spring Boot框架中完成以下Java代码
ServletRegistrationBean<JakartaWebServlet> h2Console() { String path = this.properties.getPath(); String urlMapping = path + (path.endsWith("/") ? "*" : "/*"); ServletRegistrationBean<JakartaWebServlet> registration = new ServletRegistrationBean<>(new JakartaWebServlet(), urlMapping); configureH2ConsoleSett...
} private List<String> getConnectionUrls(ObjectProvider<DataSource> dataSources) { return dataSources.orderedStream(ObjectProvider.UNFILTERED) .map(this::getConnectionUrl) .filter(Objects::nonNull) .toList(); } private @Nullable String getConnectionUrl(DataSource dataSource) { try (Connection ...
repos\spring-boot-4.0.1\module\spring-boot-h2console\src\main\java\org\springframework\boot\h2console\autoconfigure\H2ConsoleAutoConfiguration.java
2
请完成以下Java代码
private void push(JSONObject jo) throws JSONException { if (this.top >= maxdepth) { throw new JSONException("Nesting too deep."); } this.stack[this.top] = jo; this.mode = jo == null ? 'a' : 'k'; this.top += 1; } /** * Append either the value <code>true</...
* @return this * @throws JSONException */ public JSONWriter value(long l) throws JSONException { return this.append(Long.toString(l)); } /** * Append an object value. * * @param o * The object to append. It can be null, or a Boolean, Number, String, JSONObject...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\util\json\JSONWriter.java
1
请在Spring Boot框架中完成以下Java代码
private static List<String> retrieveStringList(final String sql, final String trxName) { final List<String> result = new ArrayList<>(); PreparedStatement pstmt = null; ResultSet rs = null; try { pstmt = DB.prepareStatement(sql, trxName); rs = pstmt.executeQuery(); while (rs.next()) { Strin...
} return result; } catch (DBException e) { logMsg(sweepCtx, "DBException while trying to retrieve Ids for " + refInfoStr + ". \nMsg=[" + e.getMessage() + "] \nSQL=[" + e.getSQL() + "]"); logger.warn(e.getLocalizedMessage(), e); throw e; } } private int m_storage_recalculate(String trxN...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\service\impl\SweepTableBL.java
2
请完成以下Java代码
public boolean isCompleted() { return completed; } public JSONLookupValuesList getFieldDropdownValues(final String fieldName, final String adLanguage) { return getQuickInputDocument() .getFieldLookupValues(fieldName) .transform(lookupValuesList -> JSONLookupValuesList.ofLookupValuesList(lookupValuesLis...
return this; } private DocumentPath getRootDocumentPath() { Check.assumeNotNull(_rootDocumentPath, "Parameter rootDocumentPath is not null"); return _rootDocumentPath; } public Builder setQuickInputDescriptor(final QuickInputDescriptor quickInputDescriptor) { _quickInputDescriptor = quickInputDes...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\quickinput\QuickInput.java
1
请完成以下Java代码
protected EntityView toEntityView() { EntityView entityView = new EntityView(new EntityViewId(getUuid())); entityView.setCreatedTime(createdTime); entityView.setVersion(version); if (entityId != null) { entityView.setEntityId(EntityIdFactory.getByTypeAndUuid(entityType.name(...
try { entityView.setKeys(JacksonUtil.fromString(keys, TelemetryEntityView.class)); } catch (IllegalArgumentException e) { log.error("Unable to read entity view keys!", e); } entityView.setStartTimeMs(startTs); entityView.setEndTimeMs(endTs); entityView.set...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\sql\AbstractEntityViewEntity.java
1
请完成以下Java代码
public Response createCustomer(Customer customer, @Context UriInfo uriInfo){ customer = customerService.save(customer); long id = customer.getId(); URI createURi = uriInfo.getAbsolutePathBuilder().path(Long.toString(id)).build(); return Response.created(createURi).build(); } // ...
// return Response.noContent().build(); // } // @DELETE // @Path("/{id}") // public Response deleteCustomer(@PathParam("id") long id) { // Customer inDB = customerService.findOne(id); // if(inDB==null){ // throw new WebApplicationException(javax.ws.rs.core.Response.Status.NO...
repos\SpringBoot-Projects-FullStack-master\Part-4 Spring Boot REST API\SpringJerseySimple\src\main\java\spring\jersey\resource\CustomerResource.java
1
请在Spring Boot框架中完成以下Java代码
public class Main { @Autowired static KafkaMessageConsumer kafkaMessageConsumer; @Bean public KafkaTemplate<String, String> kafkaTemplate() { return new KafkaTemplate<>(producerFactory()); } @Bean public ProducerFactory<String, String> producerFactory() { Map<String, Objec...
} public static void main(String[] args) { ConfigurableApplicationContext context = SpringApplication.run(Main.class, args); // Get the KafkaTemplate bean from the application context KafkaTemplate<String, String> kafkaTemplate = context.getBean(KafkaTemplate.class); // Send a mes...
repos\tutorials-master\spring-kafka-3\src\main\java\com\baeldung\spring\kafka\viewheaders\Main.java
2
请完成以下Java代码
public String getSummaryTranslated(final Properties ctx) { final IMsgBL msgBL = Services.get(IMsgBL.class); final int countWorkpackages = getWorkpackageEnqueuedCount(); final int countUnprocessedWorkPackages = getWorkpackageQueueSizeBeforeEnqueueing(); return msgBL.getMsg(ctx, MSG_INVOICE_CANDIDATE_ENQUEUE, ne...
{ return workpackageQueueSizeBeforeEnqueueing; } @Override public BigDecimal getTotalNetAmtToInvoiceChecksum() { return totalNetAmtToInvoiceChecksum; } @Override public ILock getLock() { return lock; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceCandidateEnqueueResult.java
1
请完成以下Java代码
protected String doIt() throws Exception { if (p_EXP_Format_ID <= 0) throw new FillMandatoryException("EXP_Format_ID"); I_EXP_Format format = InterfaceWrapperHelper.create(new MEXPFormat(getCtx(), p_EXP_Format_ID, get_TrxName()), I_EXP_Format.class); MTable table = (MTable)format.getAD_Table(); for (MColum...
else { final String whereClause = I_EXP_FormatLine.COLUMNNAME_EXP_Format_ID + "=?"; int newPosition = new Query(getCtx(), I_EXP_FormatLine.Table_Name, whereClause, get_TrxName()) .setParameters(format.getEXP_Format_ID()) .aggregate(I_EXP_FormatLine.COLUMNNAME_Position, Query.Aggregate.MAX, Integer.cla...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\esb\process\EXPFormatUpdateFromTable.java
1
请完成以下Java代码
public static void removeSession(WebSocketSession session) { // 从 SESSION_USER_MAP 中移除 String user = SESSION_USER_MAP.remove(session); // 从 USER_SESSION_MAP 中移除 if (user != null && user.length() > 0) { USER_SESSION_MAP.remove(user); } } // ========== 消息相关 ===...
} /** * 构建完整的消息 * * @param type 消息类型 * @param message 消息体 * @param <T> 消息类型 * @return 消息 */ private static <T extends Message> TextMessage buildTextMessage(String type, T message) { JSONObject messageObject = new JSONObject(); messageObject.put("type", type); ...
repos\SpringBoot-Labs-master\lab-25\lab-websocket-25-02\src\main\java\cn\iocoder\springboot\lab25\springwebsocket\util\WebSocketUtil.java
1
请在Spring Boot框架中完成以下Java代码
public List<HistoricTaskInstance> findHistoricTaskInstancesByNativeQuery(Map<String, Object> parameterMap) { return getDbSqlSession().selectListWithRawParameter("selectHistoricTaskInstanceByNativeQuery", parameterMap); } @Override public long findHistoricTaskInstanceCountByNativeQuery(Map<String, O...
@Override protected IdGenerator getIdGenerator() { return taskServiceConfiguration.getIdGenerator(); } protected void setSafeInValueLists(HistoricTaskInstanceQueryImpl historicTaskInstanceQuery) { if (historicTaskInstanceQuery.getCandidateGroups() != null) { historicTaskInst...
repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\persistence\entity\data\impl\MybatisHistoricTaskInstanceDataManager.java
2
请完成以下Java代码
public static BOMComponentType ofCodeOrName(@NonNull final String code) {return index.ofCodeOrName(code);} public static Optional<BOMComponentType> optionalOfNullableCode(@Nullable final String code) { return index.optionalOfNullableCode(code); } private static final ReferenceListAwareEnums.ValuesIndex<BOMCompo...
{ return isByProduct() || isCoProduct(); } public boolean isVariant() { return this == Variant; } public boolean isPhantom() { return this == Phantom; } public boolean isTools() { return this == Tools; } // public boolean isReceipt() { return isByOrCoProduct(); } public boolean isIssue() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\eevolution\api\BOMComponentType.java
1
请完成以下Java代码
public void setBusyTimer (int time) { m_glassPane.setBusyTimer (time); } // setBusyTimer /** * Window Events * @param e event */ @Override protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); // System.out.println(">> Apps WE_" + e.getID() // + " Frames=" + getFrames...
// System.gc(); } // dispose /** * Get Window No of Panel * @return window no */ public int getWindowNo() { if (m_APanel != null) { return m_APanel.getWindowNo(); } return 0; } // getWindowNo /** * String Representation * @return Name */ @Override public String toString() { retu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\AWindow.java
1
请完成以下Java代码
public String logout(HttpServletRequest request) throws Exception { request.logout(); return "redirect:/"; } @GetMapping(path = "/customers") public String customers(Principal principal, Model model) { addCustomers(); Iterable<Customer> customers = customerDAO.findAll(); ...
customer1.setAddress("1111 foo blvd"); customer1.setName("Foo Industries"); customer1.setServiceRendered("Important services"); customerDAO.save(customer1); Customer customer2 = new Customer(); customer2.setAddress("2222 bar street"); customer2.setName("Bar LLP"); ...
repos\tutorials-master\spring-boot-modules\spring-boot-keycloak-adapters\src\main\java\com\baeldung\keycloak\WebController.java
1
请在Spring Boot框架中完成以下Java代码
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) { registerBeanDefinitions(importingClassMetadata, registry, null); } private AnnotationRepositoryConfigurationSource getConfigurationSource(BeanDefinitionRegistry registry, @Nullable BeanNameGenerator...
@Override public void setEnvironment(Environment environment) { this.environment = environment; } /** * An auto-configured {@link AnnotationRepositoryConfigurationSource}. */ private class AutoConfiguredAnnotationRepositoryConfigurationSource extends AnnotationRepositoryConfigurationSource { AutoConfig...
repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\data\AbstractRepositoryConfigurationSourceSupport.java
2