instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public List<HistoricVariableInstanceEntity> findHistoricalVariableInstancesByScopeIdAndScopeType(String scopeId, String scopeType, Collection<String> variableNames) { return dataManager.findHistoricalVariableInstancesByScopeIdAndScopeType(scopeId, scopeType, variableNames); } @Override ...
@Override public void deleteHistoricVariableInstancesForNonExistingCaseInstances() { dataManager.deleteHistoricVariableInstancesForNonExistingCaseInstances(); } @Override public List<HistoricVariableInstance> findHistoricVariableInstancesByNativeQuery(Map<String, Object> parameterMap) { ...
repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\persistence\entity\HistoricVariableInstanceEntityManagerImpl.java
2
请完成以下Java代码
public String getReferenceId() { return referenceId; } public void setReferenceId(String referenceId) { this.referenceId = referenceId; } public String getReferenceType() { return referenceType; } public void setReferenceType(String referenceType) { this.refere...
return assigneeId; } public void setAssigneeId(String assigneeId) { this.assigneeId = assigneeId; } public String getInitiatorVariableName() { return initiatorVariableName; } public void setInitiatorVariableName(String initiatorVariableName) { this.initiatorVariableNam...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\interceptor\StartProcessInstanceBeforeContext.java
1
请在Spring Boot框架中完成以下Java代码
public static class App2ConfigurationAdapter { @Bean public UserDetailsService userDetailsServiceApp2() { UserDetails user = User.withUsername("user") .password(encoder().encode("user")) .roles("USER") .build(); return new InMemory...
.failureUrl("/loginUser?error=loginError") .defaultSuccessUrl("/userPage")) // logout .logout(httpSecurityLogoutConfigurer -> httpSecurityLogoutConfigurer.logoutUrl("/user_logout") .logoutSuccessUrl("...
repos\tutorials-master\spring-security-modules\spring-security-web-boot-2\src\main\java\com\baeldung\multiplelogin\MultipleLoginSecurityConfig.java
2
请完成以下Java代码
private String getParseExceptionInfo(SAXParseException spe) { return "URI=" + spe.getSystemId() + " Line=" + spe.getLineNumber() + ": " + spe.getMessage(); } public void warning(SAXParseException spe) { LOGGER.warning(getParseExceptionInfo(spe)); } public void error(SAXParseExcepti...
* @param documentBuilderFactory the factory to build to DOM document * @param inputStream the input stream to parse * @return the new DOM document * @throws ModelParseException if a parsing or IO error is triggered */ public static DomDocument parseInputStream(DocumentBuilderFactory documentBuilderFactory...
repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\util\DomUtil.java
1
请完成以下Java代码
public String getTaskId() { return taskId; } @Override public void setTaskId(String taskId) { this.taskId = taskId; } @Override public String getExecutionId() { return executionId; } @Override public void setExecutionId(String executionId) { this.ex...
public void setTime(Date time) { this.time = time; } @Override public String getDetailType() { return detailType; } @Override public void setDetailType(String detailType) { this.detailType = detailType; } }
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\HistoricDetailEntityImpl.java
1
请完成以下Java代码
public String getCase() { return caseRefAttribute.getValue(this); } public void setCase(String caseInstance) { caseRefAttribute.setValue(this, caseInstance); } public CaseRefExpression getCaseExpression() { return caseRefExpressionChild.getChild(this); } public void setCaseExpression(CaseRefE...
} public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CaseTask.class, CMMN_ELEMENT_CASE_TASK) .extendsType(Task.class) .namespaceUri(CMMN11_NS) .instanceProvider(new ModelTypeInstanceProvider<CaseTask>() { pu...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\CaseTaskImpl.java
1
请完成以下Java代码
public boolean accept(@NonNull final T model) { final Range<Instant> range1 = closedOpenRange( TimeUtil.asInstant(lowerBoundColumnName.getValue(model)), TimeUtil.asInstant(upperBoundColumnName.getValue(model))); final Range<Instant> range2 = closedOpenRange(lowerBoundValue, upperBoundValue); return isO...
public List<Object> getSqlParams(final Properties ctx_NOTUSED) { return getSqlParams(); } public List<Object> getSqlParams() { buildSqlIfNeeded(); return sqlParams; } private void buildSqlIfNeeded() { if (sqlWhereClause != null) { return; } if (isConstantTrue()) { final ConstantQueryFilt...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\DateIntervalIntersectionQueryFilter.java
1
请完成以下Java代码
public Quantity calculateQtyEntered(@NonNull final I_C_Invoice_Candidate invoiceCandidateRecord) { final UomId uomId = HandlerTools.retrieveUomId(invoiceCandidateRecord); final I_C_UOM uomRecord = loadOutOfTrx(uomId, I_C_UOM.class); return Quantity.of(ONE, uomRecord); } /** * @return {@link PriceAndTax#NON...
final RefundContractRepository refundContractRepository = SpringContextHolder.instance.getBean(RefundContractRepository.class); final RefundContract refundContract = refundContractRepository.getById(flatrateTermId); final NextInvoiceDate nextInvoiceDate = refundContract.computeNextInvoiceDate(asLocalDate(ic.getDe...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\refund\invoicecandidatehandler\FlatrateTermRefund_Handler.java
1
请完成以下Java代码
private FilterRegistration registerFilter(final String filterName, final Class<? extends Filter> filterClass, final String... urlPatterns) { return registerFilter(filterName, filterClass, null, urlPatterns); } private FilterRegistration registerFilter(final String filterName, final Class<? extends Filter> filt...
return filterRegistration; } private ServletRegistration registerServlet(final String servletName, final Class<?> applicationClass, final String... urlPatterns) { ServletRegistration servletRegistration = servletContext.getServletRegistration(servletName); if (servletRegistration == null) { servletR...
repos\camunda-bpm-platform-master\spring-boot-starter\starter-webapp-core\src\main\java\org\camunda\bpm\spring\boot\starter\webapp\CamundaBpmWebappInitializer.java
1
请完成以下Java代码
public TypeRef getTypeRef() { return typeRefChild.getChild(this); } public void setTypeRef(TypeRef typeRef) { typeRefChild.setChild(this, typeRef); } public AllowedValues getAllowedValues() { return allowedValuesChild.getChild(this); } public void setAllowedValues(AllowedValues allowedValues)...
}); typeLanguageAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_TYPE_LANGUAGE) .build(); isCollectionAttribute = typeBuilder.booleanAttribute(DMN_ATTRIBUTE_IS_COLLECTION) .defaultValue(false) .build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); typeRefChild = s...
repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\ItemDefinitionImpl.java
1
请完成以下Java代码
public class DLM_FindPathBetweenRecords extends JavaProcess { @Param(mandatory = true, parameterName = I_DLM_Partition_Config.COLUMNNAME_DLM_Partition_Config_ID) private I_DLM_Partition_Config configDB; @Param(mandatory = true, parameterName = "AD_Table_Start_ID") private I_AD_Table adTableStart; @Param(mandator...
// new GraphUI().showGraph(findPathIterateResult); if (!findPathIterateResult.isFoundGoalRecord()) { addLog("Upable to reach the goal record from the given start using DLM_Partition_Config= {}", config.getName()); return MSG_OK; } final List<ITableRecordReference> path = findPathIterateResult.getPath();...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\partitioner\process\DLM_FindPathBetweenRecords.java
1
请完成以下Java代码
public int getColumnDisplayLength() { return columnDisplayLength; } public void setColumnDisplayLength(final int columnDisplayLength) { this.columnDisplayLength = columnDisplayLength; } public boolean isSameLine() { return sameLine; } public void setSameLine(final boolean sameLine) { this.sameLine ...
public GridFieldLayoutConstraints build() { return new GridFieldLayoutConstraints(this); } public Builder setDisplayLength(final int displayLength) { this.displayLength = displayLength; return this; } public Builder setColumnDisplayLength(final int columnDisplayLength) { this.columnDisplayLe...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\GridFieldLayoutConstraints.java
1
请在Spring Boot框架中完成以下Java代码
public AttachmentMetadata createdAt(OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } /** * Der Zeitstempel des Erstellens * @return createdAt **/ @Schema(description = "Der Zeitstempel des Erstellens") public OffsetDateTime getCreatedAt() { return createdAt; } pu...
Objects.equals(this.therapyId, attachmentMetadata.therapyId) && Objects.equals(this.therapyTypeId, attachmentMetadata.therapyTypeId) && Objects.equals(this.woundLocation, attachmentMetadata.woundLocation) && Objects.equals(this.patientId, attachmentMetadata.patientId) && Objects.equals(t...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-document-api\src\main\java\io\swagger\client\model\AttachmentMetadata.java
2
请完成以下Java代码
public void invalidateByOrder(final I_C_Order order) { // Consider only purchase orders if (order.isSOTrx()) { return; } final LocalDate date = extractDate(order); final ImmutableSet<ProductId> productIds = getProductIds(order); invalidateByProducts(productIds, date); } private static LocalDate ex...
if (productIds.isEmpty()) { return; } final ArrayList<Object> sqlValuesParams = new ArrayList<>(); final StringBuilder sqlValues = new StringBuilder(); for (final ProductId productId : productIds) { if (sqlValues.length() > 0) { sqlValues.append(","); } sqlValues.append("(?,?)"); sql...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\stats\purchase_max_price\PurchaseLastMaxPriceService.java
1
请完成以下Java代码
public final class HttpsRedirectFilter extends OncePerRequestFilter { private PortMapper portMapper = new PortMapperImpl(); private RequestMatcher requestMatcher = AnyRequestMatcher.INSTANCE; private final RedirectStrategy redirectStrategy = new DefaultRedirectStrategy(); @Override protected void doFilterInter...
/** * Use this {@link RequestMatcher} to narrow which requests are redirected to HTTPS. * * The filter already first checks for HTTPS in the uri scheme, so it is not necessary * to include that check in this matcher. * @param requestMatcher the {@link RequestMatcher} to use */ public void setRequestMatcher...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\transport\HttpsRedirectFilter.java
1
请完成以下Java代码
protected void prepare() { // nothing to prepare here } @Override protected String doIt() throws Exception { final IQueryFilter<I_C_Printing_Queue> queryFilter = getProcessInfo().getQueryFilterOrElseFalse(); final Iterator<I_C_Printing_Queue> iterator = Services.get(IQueryBL.class) .createQueryBuilder(...
.create() .setOption(IQuery.OPTION_GuaranteedIteratorRequired, false) .setOption(IQuery.OPTION_IteratorBufferSize, 1000) .iterate(I_C_Printing_Queue.class); final IPrintingQueueBL printingQueueBL = Services.get(IPrintingQueueBL.class); for(final I_C_Printing_Queue item: IteratorUtils.asIterable(iterat...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\process\C_Printing_Queue_ResetAggregationKeys.java
1
请完成以下Java代码
public static AlarmStatusFilter from(AlarmStatus alarmStatus) { switch (alarmStatus) { case ACTIVE_UNACK: return new AlarmStatusFilter(Optional.of(false), Optional.of(false)); case ACTIVE_ACK: return new AlarmStatusFilter(Optional.of(false), Optional.of(tr...
public static AlarmStatusFilter from(Collection<AlarmSearchStatus> statuses) { if (statuses == null || statuses.isEmpty() || statuses.contains(AlarmSearchStatus.ANY)) { return EMPTY; } boolean clearFilter = statuses.contains(AlarmSearchStatus.CLEARED); boolean activeFilter = ...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\alarm\AlarmStatusFilter.java
1
请完成以下Java代码
public Object getValue(ELContext context, Object base, Object property) { return decoratedResolver.getValue(context, base, property); } @Override public Class<?> getType(ELContext context, Object base, Object property) { return decoratedResolver.getType(context, base, property); } ...
@Override public boolean isReadOnly(ELContext context, Object base, Object property) { return decoratedResolver.isReadOnly(context, base, property); } @Override public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) { return decoratedResolver.getFeature...
repos\Activiti-develop\activiti-core-common\activiti-expression-language\src\main\java\org\activiti\core\el\ELResolverDecorator.java
1
请完成以下Java代码
public Map<String, Object> getEntryMap() { Map<String, Object> valueMap = new HashMap<String, Object>(); for (String key : outputValues.keySet()) { valueMap.put(key, get(key)); } return valueMap; } public Map<String, TypedValue> getEntryMapTyped() { return outputValues; } @Override...
@Override public Set<Entry<String, Object>> entrySet() { Set<Entry<String, Object>> entrySet = new HashSet<Entry<String, Object>>(); for (Entry<String, TypedValue> typedEntry : outputValues.entrySet()) { DmnDecisionRuleOutputEntry entry = new DmnDecisionRuleOutputEntry(typedEntry.getKey(), typedEntry.g...
repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DmnDecisionResultEntriesImpl.java
1
请完成以下Java代码
public List<TypSondertag> getSondertag() { if (sondertag == null) { sondertag = new ArrayList<TypSondertag>(); } return this.sondertag; } /** * Gets the value of the automatischerAbruf property. * */ public boolean isAutomatischerAbruf() { return ...
} /** * Sets the value of the kundenKennung property. * * @param value * allowed object is * {@link String } * */ public void setKundenKennung(String value) { this.kundenKennung = value; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v2\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v2\VertragsdatenAntwort.java
1
请在Spring Boot框架中完成以下Java代码
private InvoicePayScheduleLoaderAndSaver newLoaderAndSaver() { return InvoicePayScheduleLoaderAndSaver.builder() .queryBL(queryBL) .trxManager(trxManager) .build(); } public void create(@NonNull final InvoicePayScheduleCreateRequest request) { request.getLines().forEach(line -> createLine(line, req...
public void updateById(@NonNull final InvoiceId invoiceId, @NonNull final Consumer<InvoicePaySchedule> updater) { newLoaderAndSaver().updateById(invoiceId, updater); } public void updateByIds(@NonNull final Set<InvoiceId> invoiceIds, @NonNull final Consumer<InvoicePaySchedule> updater) { newLoaderAndSaver().up...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\paymentschedule\repository\InvoicePayScheduleRepository.java
2
请在Spring Boot框架中完成以下Java代码
public static <T> Result<T> newFailureResult(CommonBizException commonBizException, T data){ Result<T> result = new Result<>(); result.isSuccess = false; result.errorCode = commonBizException.getCodeEnum().getCode(); result.message = commonBizException.getCodeEnum().getMessage(); ...
public void setMessage(String message) { this.message = message; } public T getData() { return data; } public void setData(T data) { this.data = data; } @Override public String toString() { return "Result{" + "isSuccess=" + isSuccess + ...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\rsp\Result.java
2
请完成以下Java代码
public String getExecutionId() { return null; } // non-supported (v6) @Override public String getScopeId() { return null; } @Override public String getSubScopeId() { return null; } @Override public String getScopeType() { return null; }...
} @Override public void setScopeType(String scopeType) { } @Override public String getScopeDefinitionId() { return null; } @Override public void setScopeDefinitionId(String scopeDefinitionId) { } @Override public String getMetaInfo() { re...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\TransientVariableInstance.java
1
请在Spring Boot框架中完成以下Java代码
public List<QueryVariable> getVariables() { return variables; } public void setVariables(List<QueryVariable> variables) { this.variables = variables; } public String getCallbackId() { return callbackId; } public void setCallbackId(String callbackId) { this.call...
public void setTenantIdLike(String tenantIdLike) { this.tenantIdLike = tenantIdLike; } public String getTenantIdLikeIgnoreCase() { return tenantIdLikeIgnoreCase; } public void setTenantIdLikeIgnoreCase(String tenantIdLikeIgnoreCase) { this.tenantIdLikeIgnoreCase = tenantIdL...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricProcessInstanceQueryRequest.java
2
请完成以下Java代码
public void setSortAsc (boolean ascending) { if (ascending) m_multiplier = 1; else m_multiplier = -1; } // setSortAsc /************************************************************************** * Compare Data of two entities * @param o1 object * @param o2 object * @return comparator */ @Ov...
else if (cmp1 instanceof BigDecimal && cmp2 instanceof BigDecimal) { BigDecimal d = (BigDecimal)cmp1; return d.compareTo((BigDecimal)cmp2) * m_multiplier; } // Integer else if (cmp1 instanceof Integer && cmp2 instanceof Integer) { Integer d = (Integer)cmp1; return d.compareTo((Integer)cmp2) * m_mu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\MSort.java
1
请完成以下Java代码
public void setModelPackage (java.lang.String ModelPackage) { set_Value (COLUMNNAME_ModelPackage, ModelPackage); } /** Get ModelPackage. @return Java Package of the model classes */ @Override public java.lang.String getModelPackage () { return (java.lang.String)get_Value(COLUMNNAME_ModelPackage); } ...
} /** Get Version. @return Version of the table definition */ @Override public java.lang.String getVersion () { return (java.lang.String)get_Value(COLUMNNAME_Version); } /** Set WebUIServletListener Class. @param WebUIServletListenerClass Optional class to execute custom code on WebUI startup; A de...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_EntityType.java
1
请完成以下Java代码
public Group createPartialGroupFromCompensationLine(@NonNull final I_C_Invoice_Candidate invoiceCandidate) { InvoiceCandidateCompensationGroupUtils.assertCompensationLine(invoiceCandidate); final GroupCompensationLine compensationLine = createCompensationLine(invoiceCandidate); final GroupRegularLine aggregated...
{ return InvoiceCandidatesStorage.builder() .groupId(extractGroupId(invoiceCandidate)) .invoiceCandidate(invoiceCandidate) .performDatabaseChanges(false) .build(); } public void invalidateCompensationInvoiceCandidatesOfGroup(final GroupId groupId) { final IQuery<I_C_Invoice_Candidate> query = re...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\compensationGroup\InvoiceCandidateGroupRepository.java
1
请在Spring Boot框架中完成以下Java代码
public final class AggregationItem { public enum Type { ModelColumn, Attribute } private final AggregationItemId id; private final ILogicExpression includeLogic; private final Type type; private final String columnName; private final int displayType; private final AggregationAttribute attribute; @Builder ...
Check.assumeNotNull(attribute, "attribute not null"); } this.id = id; this.type = type; this.includeLogic = includeLogic; this.columnName = columnName; this.displayType = displayType; this.attribute = attribute; } public boolean isInclude(final Evaluatee context) { final ILogicExpression includeLog...
repos\metasfresh-new_dawn_uat\backend\de.metas.aggregation\src\main\java\de\metas\aggregation\api\AggregationItem.java
2
请在Spring Boot框架中完成以下Java代码
public class WebuiASIEditingInfo { public static WebuiASIEditingInfoBuilder builder(@NonNull ASIEditingInfo info) { return new WebuiASIEditingInfoBuilder() .contextWindowType(info.getWindowType()) // .contextDocumentPath(contextDocumentPath) // .attributeSetId(info.getAttributeSetId()) .attribut...
.soTrx(SOTrx.SALES) .attributeSetInstanceId(attributeSetInstanceId) .build(); return builder(info) .contextDocumentPath(documentPath) .build(); } @NonNull WindowType contextWindowType; DocumentPath contextDocumentPath; @NonNull AttributeSetId attributeSetId; String attributeSetName; String ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pattribute\WebuiASIEditingInfo.java
2
请在Spring Boot框架中完成以下Java代码
public @Nullable File getRollbackFile() { return this.rollbackFile; } public void setRollbackFile(@Nullable File rollbackFile) { this.rollbackFile = rollbackFile; } public boolean isTestRollbackOnUpdate() { return this.testRollbackOnUpdate; } public void setTestRollbackOnUpdate(boolean testRollbackOnUpda...
* Enumeration of destinations to which the summary should be output. Values are the * same as those on {@link UpdateSummaryOutputEnum}. To maximize backwards * compatibility, the Liquibase enum is not used directly. */ public enum ShowSummaryOutput { /** * Log the summary. */ LOG, /** * Output t...
repos\spring-boot-4.0.1\module\spring-boot-liquibase\src\main\java\org\springframework\boot\liquibase\autoconfigure\LiquibaseProperties.java
2
请完成以下Java代码
public String getRootProcessInstanceId() { return rootProcessInstanceId; } public static void fromHistoricActivityInstance(HistoricActivityInstanceDto dto, HistoricActivityInstance historicActivityInstance) { dto.id = historicActivityInstance.getId(); ...
dto.executionId = historicActivityInstance.getExecutionId(); dto.taskId = historicActivityInstance.getTaskId(); dto.calledProcessInstanceId = historicActivityInstance.getCalledProcessInstanceId(); dto.calledCaseInstanceId = historicActivityInstance.getCalledCaseInstanceId(); dto.assignee = historicActiv...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricActivityInstanceDto.java
1
请完成以下Java代码
public Inventory updateById(final InventoryId inventoryId, UnaryOperator<Inventory> updater) { return trxManager.callInThreadInheritedTrx(() -> newLoaderAndSaver().updateById(inventoryId, updater)); } public void updateByQuery(@NonNull final InventoryQuery query, @NonNull final UnaryOperator<Inventory> updater) ...
final ICompositeQueryUpdater<org.compiere.model.I_M_InventoryLine> updaterInventoryLine = queryBL.createCompositeQueryUpdater(org.compiere.model.I_M_InventoryLine.class) .addSetColumnFromColumn(org.compiere.model.I_M_InventoryLine.COLUMNNAME_QtyCount, ModelColumnNameValue.forColumnName(org.compiere.model.I_M_Invent...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\InventoryRepository.java
1
请完成以下Java代码
public class AuthorBookTransformer implements ResultTransformer { private Map<Long, AuthorDto> authorsDtoMap = new HashMap<>(); @Override public Object transformTuple(Object[] os, String[] strings) { Long authorId = ((Number) os[0]).longValue(); AuthorDto authorDto = authorsDtoMap.get(au...
bookDto.setTitle((String) os[4]); authorDto.addBook(bookDto); authorsDtoMap.putIfAbsent(authorDto.getId(), authorDto); return authorDto; } @Override public List<AuthorDto> transformList(List list) { return new ArrayList<>(authorsDtoMap.values()); } }
repos\Hibernate-SpringBoot-master\HibernateSpringBootDtoCustomResultTransformer\src\main\java\com\bookstore\transformer\AuthorBookTransformer.java
1
请完成以下Java代码
public void fireHistoricIdentityLinkEvent(final HistoryEventType eventType) { ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration(); HistoryLevel historyLevel = processEngineConfiguration.getHistoryLevel(); if(historyLevel.isHistoryEventProduced(eventType, this...
if (processDefId != null) { referenceIdAndClass.put(processDefId, ProcessDefinitionEntity.class); } if (taskId != null) { referenceIdAndClass.put(taskId, TaskEntity.class); } return referenceIdAndClass; } @Override public String toString() { return this.getClass().getSimpleName()...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\IdentityLinkEntity.java
1
请完成以下Java代码
public int getSqlType() { return Types.VARCHAR; } @Override public Class<Salary> returnedClass() { return Salary.class; } @Override public boolean equals(Salary x, Salary y) { if (x == y) return true; if (Objects.isNull(x) || Objects.isNull(y)) ...
@Override public Salary deepCopy(Salary value) { if (Objects.isNull(value)) return null; Salary newSal = new Salary(); newSal.setAmount(value.getAmount()); newSal.setCurrency(value.getCurrency()); return newSal; } @Override public boolean isMutable...
repos\tutorials-master\persistence-modules\hibernate-annotations\src\main\java\com\baeldung\hibernate\customtypes\SalaryType.java
1
请完成以下Java代码
public void setProcessed (final boolean Processed) { set_Value (COLUMNNAME_Processed, Processed); } @Override public boolean isProcessed() { return get_ValueAsBoolean(COLUMNNAME_Processed); } @Override public void setProcessing (final boolean Processing) { set_Value (COLUMNNAME_Processing, Processing)...
@Override public java.lang.String getTextMsg() { return get_ValueAsString(COLUMNNAME_TextMsg); } /** * WFState AD_Reference_ID=305 * Reference name: WF_Instance State */ public static final int WFSTATE_AD_Reference_ID=305; /** NotStarted = ON */ public static final String WFSTATE_NotStarted = "ON"; /...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WF_Activity.java
1
请完成以下Java代码
protected IExternalSystemChildConfigId getExternalChildConfigId() { final int id; if (this.childConfigId > 0) { id = this.childConfigId; } else { final IExternalSystemChildConfig childConfig = externalSystemConfigDAO.getChildByParentIdAndType(ExternalSystemParentConfigId.ofRepoId(getRecord_ID()), ge...
parameters.put(PARAM_CHILD_CONFIG_VALUE, woocommerceConfig.getValue()); return parameters; } @Override protected String getTabName() { return ExternalSystemType.WOO.getValue(); } @Override protected ExternalSystemType getExternalSystemType() { return ExternalSystemType.WOO; } @Override protected lo...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\process\InvokeWooCommerceAction.java
1
请完成以下Java代码
public String host() { return host; } public void setHost(String host) { this.host = host; } @Override public int port() { return port; } public void setPort(int port) { this.port = port; } @Override public Transport transport() { retur...
} public void setStartTlsEnabled(boolean startTlsEnabled) { this.startTlsEnabled = startTlsEnabled; } @Override public String user() { return user; } public void setUser(String user) { this.user = user; } @Override public String password() { return...
repos\flowable-engine-main\modules\flowable-mail\src\main\java\org\flowable\mail\common\impl\BaseMailHostServerConfiguration.java
1
请完成以下Java代码
public void setFact_Acct_ID (int Fact_Acct_ID) { if (Fact_Acct_ID < 1) set_ValueNoCheck (COLUMNNAME_Fact_Acct_ID, null); else set_ValueNoCheck (COLUMNNAME_Fact_Acct_ID, Integer.valueOf(Fact_Acct_ID)); } /** Get Accounting Fact. @return Accounting Fact */ public int getFact_Acct_ID () { Integer ...
Object oo = get_Value(COLUMNNAME_IsAllCurrencies); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Open Amount. @param OpenAmt Open item amount */ public void setOpenAmt (BigDecimal OpenAmt) { set_Va...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_T_InvoiceGL.java
1
请完成以下Java代码
public class AuthorizationCheckResultDto { protected String permissionName; protected String resourceName; protected String resourceId; protected Boolean isAuthorized; public AuthorizationCheckResultDto() { } public AuthorizationCheckResultDto(boolean userAuthorized, String permissionName, Res...
public void setAuthorized(Boolean isAuthorized) { this.isAuthorized = isAuthorized; } public String getResourceName() { return resourceName; } public void setResourceName(String resourceName) { this.resourceName = resourceName; } public String getResourceId() { return resourceId; } ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\authorization\AuthorizationCheckResultDto.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable MediaType getDefaultMediaType() { return this.defaultMediaType; } public void setDefaultMediaType(@Nullable MediaType defaultMediaType) { this.defaultMediaType = defaultMediaType; } public @Nullable Boolean getReturnBodyOnCreate() { return this.returnBodyOnCreate; } public void setReturn...
public @Nullable Boolean getEnableEnumTranslation() { return this.enableEnumTranslation; } public void setEnableEnumTranslation(@Nullable Boolean enableEnumTranslation) { this.enableEnumTranslation = enableEnumTranslation; } public void applyTo(RepositoryRestConfiguration rest) { PropertyMapper map = Proper...
repos\spring-boot-4.0.1\module\spring-boot-data-rest\src\main\java\org\springframework\boot\data\rest\autoconfigure\DataRestProperties.java
2
请在Spring Boot框架中完成以下Java代码
public void updateMobileApplicationTrl(final MobileApplicationRepoId mobileApplicationRepoId, @NonNull final String adLanguage) { DB.executeFunctionCallEx( ITrx.TRXNAME_ThreadInherited, addUpdateFunctionCall(FUNCTION_update_Mobile_Application_TRLs, mobileApplicationRepoId, adLanguage), null); } @Supp...
this.byApplicationId = Maps.uniqueIndex(list, MobileApplicationInfo::getId); } public MobileApplicationInfo getById(final MobileApplicationId applicationId) { final MobileApplicationInfo applicationInfo = byApplicationId.get(applicationId); if (applicationInfo == null) { throw new AdempiereException...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\mobile\application\repository\MobileApplicationInfoRepository.java
2
请在Spring Boot框架中完成以下Java代码
public class DunningConfig implements IDunningEditableConfig { private IDunnableSourceFactory dunnableSourceFactory; private IDunningCandidateProducerFactory dunningCandidateProducerFactory; private Class<? extends IDunningCandidateSource> dunningCandidateSourceClass; private Class<? extends IDunningProducer> dunni...
@Override public void setDunningProducerClass(Class<IDunningProducer> dunningProducerClass) { Check.assume(dunningProducerClass != null, "dunningProducerClass is not null"); this.dunningProducerClass = dunningProducerClass; } @Override public IDunningCandidateSource createDunningCandidateSource() { try {...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\api\impl\DunningConfig.java
2
请完成以下Java代码
public class TreeReverser { public void reverseRecursive(TreeNode treeNode) { if (treeNode == null) { return; } TreeNode temp = treeNode.getLeftChild(); treeNode.setLeftChild(treeNode.getRightChild()); treeNode.setRightChild(temp); reverseRecursive(tree...
TreeNode temp = node.getLeftChild(); node.setLeftChild(node.getRightChild()); node.setRightChild(temp); } } public String toString(TreeNode root) { if (root == null) { return ""; } StringBuffer buffer = new StringBuffer(String.valueOf(root.ge...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-5\src\main\java\com\baeldung\algorithms\reversingtree\TreeReverser.java
1
请完成以下Java代码
private final void assertEditing() { Check.assume(isEditing(), HUException.class, "Editor shall be in editing mode"); } @Override public ILUTUConfigurationEditor save() { assertEditing(); final I_M_HU_LUTU_Configuration lutuConfigurationInitial = getLUTUConfiguration(); final I_M_HU_LUTU_Configuration lu...
} _lutuConfigurationInitial = lutuConfigurationToUse; _lutuConfigurationEditing = null; // stop editing mode return this; } @Override public ILUTUConfigurationEditor pushBackToModel() { if (isEditing()) { save(); } final I_M_HU_LUTU_Configuration lutuConfiguration = getLUTUConfiguration(); lu...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\LUTUConfigurationEditor.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonOLCandCreateBulkRequest { public static JsonOLCandCreateBulkRequest of(@NonNull final JsonOLCandCreateRequest request) { return new JsonOLCandCreateBulkRequest(ImmutableList.of(request)); } @JsonProperty("requests") List<JsonOLCandCreateRequest> requests; @JsonCreator @Builder private JsonO...
private JsonOLCandCreateBulkRequest map(@NonNull final UnaryOperator<JsonOLCandCreateRequest> mapper) { if (requests.isEmpty()) { return this; } final ImmutableList<JsonOLCandCreateRequest> newRequests = this.requests.stream() .map(mapper) .collect(ImmutableList.toImmutableList()); return new Js...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-ordercandidates\src\main\java\de\metas\common\ordercandidates\v2\request\JsonOLCandCreateBulkRequest.java
2
请在Spring Boot框架中完成以下Java代码
public class C_Flatrate_RefundConfig { private final RefundConfigRepository refundConfigRepository; public C_Flatrate_RefundConfig(@NonNull final RefundConfigRepository refundConfigRepository) { this.refundConfigRepository = refundConfigRepository; Services.get(IProgramaticCalloutProvider.class).registerAnnotat...
} final RefundConfigQuery query = RefundConfigQuery .builder() .conditionsId(ConditionsId.ofRepoId(configRecord.getC_Flatrate_Conditions_ID())) .build(); final List<RefundConfig> existingRefundConfigs = refundConfigRepository.getByQuery(query); final RefundConfig newRefundConfig = refundConfigReposi...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\refund\interceptor\C_Flatrate_RefundConfig.java
2
请完成以下Java代码
protected String getFileResourceName(Resource resource) { try { return resource.getFile().getAbsolutePath(); } catch (IOException e) { return resource.getFilename(); } } @Override public ProcessEngineConfigurationImpl setDataSource(DataSource dataSource) { if(dataSource instanceof Tra...
public Resource[] getDeploymentResources() { return deploymentResources; } public void setDeploymentResources(Resource[] deploymentResources) { this.deploymentResources = deploymentResources; } public String getDeploymentTenantId() { return deploymentTenantId; } public void setDeploymentTenan...
repos\camunda-bpm-platform-master\engine-spring\core\src\main\java\org\camunda\bpm\engine\spring\SpringTransactionsProcessEngineConfiguration.java
1
请完成以下Java代码
public C_AggregationItem_Builder setAD_Column(@Nullable final String columnName) { if (isBlank(columnName)) { this.adColumnId = null; } else { this.adColumnId = Services.get(IADTableDAO.class).retrieveColumnId(adTableId, columnName); } return this; } private AdColumnId getAD_Column_ID() { ret...
return this; } private String getIncludeLogic() { return includeLogic; } public C_AggregationItem_Builder setC_Aggregation_Attribute(I_C_Aggregation_Attribute attribute) { this.attribute = attribute; return this; } private I_C_Aggregation_Attribute getC_Aggregation_Attribute() { return this.attribut...
repos\metasfresh-new_dawn_uat\backend\de.metas.aggregation\src\main\java\de\metas\aggregation\model\C_AggregationItem_Builder.java
1
请完成以下Java代码
private static class ExtendTermsResult { int extendedCounter = 0; int errorCounter = 0; public void addToThis(@NonNull final C_Flatrate_Term_Extend_And_Notify_User.ExtendTermsResult other) { extendedCounter += other.extendedCounter; errorCounter += other.errorCounter; } public int getCounterSum() ...
try { flatrateBL.extendContractAndNotifyUser(context); return true; } catch (final RuntimeException e) { final I_C_Flatrate_Term contract = context.getContract(); final AdIssueId issueId = Services.get(IErrorManager.class).createIssue(e); addLog("Error extending C_FlatrateTerm_ID={} with C_Flatra...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\flatrate\process\C_Flatrate_Term_Extend_And_Notify_User.java
1
请完成以下Java代码
public BigDecimal getQtyCapacity() { return capacityTotal.toBigDecimal(); } @Override public IAllocationRequest addQty(final IAllocationRequest request) { throw new AdempiereException("Adding Qty is not supported on this level"); } @Override public IAllocationRequest removeQty(final IAllocationRequest req...
{ // nothing, so far, itemStorage is always database coupled, no in memory values } @Override public boolean isEmpty() { return huStorage.isEmpty(getProductId()); } @Override public I_M_HU getM_HU() { return huStorage.getM_HU(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\storage\impl\HUProductStorage.java
1
请完成以下Java代码
protected void scheduleProcessDefinitionActivation(CommandContext commandContext, DeploymentEntity deployment) { for (ProcessDefinitionEntity processDefinitionEntity : deployment.getDeployedArtifacts(ProcessDefinitionEntity.class)) { // If activation date is set, we first suspend all the process de...
// // private String createKey(byte[] bytes) { // if (bytes == null) { // return ""; // } // MessageDigest digest; // try { // digest = MessageDigest.getInstance("MD5"); // } catch (NoSuchAlgorithmException e) { // throw new IllegalStateException("MD5 algorithm not available. Fatal (...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\cmd\DeployCmd.java
1
请完成以下Java代码
public void setContentClassIdFieldName(String contentClassIdFieldName) { this.contentClassIdFieldName = contentClassIdFieldName; } public String getKeyClassIdFieldName() { return this.keyClassIdFieldName; } /** * Configure header name for map key type information. * @param keyClassIdFieldName the header n...
protected @Nullable String retrieveHeaderAsString(Headers headers, String headerName) { Header header = headers.lastHeader(headerName); if (header != null) { String classId = null; if (header.value() != null) { classId = new String(header.value(), StandardCharsets.UTF_8); } return classId; } ret...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\mapping\AbstractJavaTypeMapper.java
1
请完成以下Java代码
public class SysCategoryModel { /**主键*/ private java.lang.String id; /**父级节点*/ private java.lang.String pid; /**类型名称*/ private java.lang.String name; /**类型编码*/ private java.lang.String code; public String getId() { return id; } public void setId(String id) { ...
public void setPid(String pid) { this.pid = pid; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getCode() { return code; } public void setCode(String code) { this.code = code; ...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\system\vo\SysCategoryModel.java
1
请完成以下Java代码
public boolean isVerfuegbarkeitEinzelnSpezifischeRueckmeldungVereinbart() { return verfuegbarkeitEinzelnSpezifischeRueckmeldungVereinbart; } /** * Sets the value of the verfuegbarkeitEinzelnSpezifischeRueckmeldungVereinbart property. * */ public void setVerfuegbarkeitEinzelnSpezifis...
} /** * Sets the value of the gueltigAb property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setGueltigAb(XMLGregorianCalendar value) { this.gueltigAb = value; } /** * Gets the value of the kundenK...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v1\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v1\VertragsdatenAntwort.java
1
请完成以下Java代码
public Class<?> getModelClass() { return modelClass; } @Override public String getTableName() { return tableName; } @Override public final IModelMethodInfo getMethodInfo(final Method method) { modelMethodInfosLock.lock(); try { final Map<Method, IModelMethodInfo> methodInfos = getMethodInfos0();...
_definedColumnNames = findDefinedColumnNames(); } return _definedColumnNames; } @SuppressWarnings("unchecked") private final Set<String> findDefinedColumnNames() { // // Collect all columnnames final ImmutableSet.Builder<String> columnNamesBuilder = ImmutableSet.builder(); ReflectionUtils.getAllFields(...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\persistence\ModelClassInfo.java
1
请在Spring Boot框架中完成以下Java代码
public Map<String, Object> getKeysSize() throws Exception { return redisService.getKeysSize(); } /** * 获取redis key数量 for 报表 * @return * @throws Exception */ @GetMapping("/keysSizeForReport") public Map<String, JSONArray> getKeysSizeReport() throws Exception { return redisS...
* @param request * @param response * @return */ @GetMapping("/queryDiskInfo") public Result<List<Map<String,Object>>> queryDiskInfo(HttpServletRequest request, HttpServletResponse response){ Result<List<Map<String,Object>>> res = new Result<>(); try { // 当前文件系统类 FileSystemView ...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\monitor\controller\ActuatorRedisController.java
2
请完成以下Java代码
public static Vertex newPersonInstance(String realWord) { return newPersonInstance(realWord, 1000); } /** * 创建一个音译人名实例 * * @param realWord * @return */ public static Vertex newTranslatedPersonInstance(String realWord, int frequency) { return new Vertex(Prede...
*/ public static Vertex newTimeInstance(String realWord) { return new Vertex(Predefine.TAG_TIME, realWord, new CoreDictionary.Attribute(Nature.t, 1000)); } /** * 生成线程安全的起始节点 * @return */ public static Vertex newB() { return new Vertex(Predefine.TAG_BIGIN, " ", new...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\common\Vertex.java
1
请完成以下Java代码
public int getP_TradeDiscountRec_Acct () { Integer ii = (Integer)get_Value(COLUMNNAME_P_TradeDiscountRec_Acct); if (ii == null) return 0; return ii.intValue(); } @Override public org.compiere.model.I_C_ValidCombination getP_UsageVariance_A() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_P...
} @Override public org.compiere.model.I_C_ValidCombination getP_WIP_A() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_P_WIP_Acct, org.compiere.model.I_C_ValidCombination.class); } @Override public void setP_WIP_A(org.compiere.model.I_C_ValidCombination P_WIP_A) { set_ValueFromPO(COLUMNNAME_P_WI...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_Acct.java
1
请完成以下Java代码
public void setIsMandatory (final boolean IsMandatory) { set_Value (COLUMNNAME_IsMandatory, IsMandatory); } @Override public boolean isMandatory() { return get_ValueAsBoolean(COLUMNNAME_IsMandatory); } @Override public void setIsPartUniqueIndex (final boolean IsPartUniqueIndex) { set_Value (COLUMNNAME...
/** XML Attribute = A */ public static final String TYPE_XMLAttribute = "A"; /** Embedded EXP Format = M */ public static final String TYPE_EmbeddedEXPFormat = "M"; /** Referenced EXP Format = R */ public static final String TYPE_ReferencedEXPFormat = "R"; @Override public void setType (final java.lang.String Ty...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_EXP_FormatLine.java
1
请完成以下Java代码
public class FCHtmlEditorKit extends HTMLEditorKit { /** * */ private static final long serialVersionUID = -3371176452691681668L; public ViewFactory getViewFactory() { if (defaultFactory == null) { defaultFactory = new FCHtmlFactory(super.getViewFactory()); } return defaultFactory; } private stati...
if (smileImage==null) return null; //forcing image to load synchronously ImageIcon ii = new ImageIcon(); ii.setImage(smileImage); //} return smileImage; } public URL getImageURL() { // here we return url to some image. It might be any // existing image. we need to move ImageView to...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\apps\graph\FCHtmlEditorKit.java
1
请完成以下Java代码
void set(int id, byte value) { _buf[id] = value; } /** * 是否为空 * @return true表示为空 */ boolean empty() { return (_size == 0); } /** * 缓冲区大小 * @return 大小 */ int size() { return _size; } /** * 清空缓存 */ void clea...
{ if (size > _capacity) { resizeBuf(size); } while (_size < size) { _buf[_size++] = value; } } /** * 增加容量 * @param size 容量 */ void reserve(int size) { if (size > _capacity) { resizeBuf(siz...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\dartsclone\details\AutoBytePool.java
1
请完成以下Java代码
public List<WidgetsBundleWidget> findWidgetsBundleWidgetsByWidgetsBundleId(UUID tenantId, UUID widgetsBundleId) { return DaoUtil.convertDataList(widgetsBundleWidgetRepository.findAllByWidgetsBundleId(widgetsBundleId)); } @Override public void saveWidgetsBundleWidget(WidgetsBundleWidget widgetsBundl...
@Override public PageData<WidgetTypeDetails> findAllByTenantId(TenantId tenantId, PageLink pageLink) { return findByTenantId(tenantId.getId(), pageLink); } @Override public List<WidgetTypeFields> findNextBatch(UUID id, int batchSize) { return widgetTypeRepository.findNextBatch(id, Limit...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\widget\JpaWidgetTypeDao.java
1
请完成以下Java代码
public SignalRestService getSignalRestService(String engineName) { String rootResourcePath = getRelativeEngineUri(engineName).toASCIIString(); SignalRestServiceImpl subResource = new SignalRestServiceImpl(engineName, getObjectMapper()); subResource.setRelativeRootResourceUri(rootResourcePath); return su...
SchemaLogRestServiceImpl subResource = new SchemaLogRestServiceImpl(engineName, getObjectMapper()); subResource.setRelativeRootResourceUri(rootResourcePath); return subResource; } public EventSubscriptionRestService getEventSubscriptionRestService(String engineName) { String rootResourcePath = getRelat...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\AbstractProcessEngineRestServiceImpl.java
1
请完成以下Java代码
private Mono<Void> removeSessionFromIndex(String indexKey, String sessionId) { return this.sessionRedisOperations.opsForSet().remove(indexKey, sessionId).then(); } Mono<Map<String, String>> getIndexes(String sessionId) { String sessionIndexesKey = getSessionIndexesKey(sessionId); return this.sessionRedisOperat...
private String getIndexKey(String indexName, String indexValue) { return this.indexKeyPrefix + indexName + ":" + indexValue; } void setNamespace(String namespace) { Assert.hasText(namespace, "namespace cannot be empty"); this.namespace = namespace; updateIndexKeyPrefix(); } void setIndexResolver(IndexReso...
repos\spring-session-main\spring-session-data-redis\src\main\java\org\springframework\session\data\redis\ReactiveRedisSessionIndexer.java
1
请在Spring Boot框架中完成以下Java代码
public int getC_UOM_ID() { return get_ValueAsInt(COLUMNNAME_C_UOM_ID); } @Override public void setExternalId (final java.lang.String ExternalId) { set_Value (COLUMNNAME_ExternalId, ExternalId); } @Override public java.lang.String getExternalId() { return get_ValueAsString(COLUMNNAME_ExternalId); } ...
public void setQty (final BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } @Override public BigDecimal getQty() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setScannedBarcode (final @Nullable java.lang.String Scanne...
repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java-gen\de\metas\pos\repository\model\X_C_POS_OrderLine.java
2
请完成以下Java代码
public Builder targetUri(String targetUri) { this.targetUri = targetUri; return this; } /** * Sets the access token if the request is a Protected Resource request. * @param accessToken the access token if the request is a Protected Resource * request * @return the {@link Builder} */ public B...
URI uri; try { uri = new URI(this.targetUri); uri.toURL(); } catch (Exception ex) { throw new IllegalArgumentException("targetUri must be a valid URL", ex); } if (uri.getQuery() != null || uri.getFragment() != null) { throw new IllegalArgumentException("targetUri cannot contain query or f...
repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\DPoPProofContext.java
1
请完成以下Java代码
public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDescritpion() { return descritpion; } public...
public void setUrl(String url) { this.url = url; } public int getPid() { return pid; } public void setPid(int pid) { this.pid = pid; } public String getMethod() { return method; } public void setMethod(String method) { this.method = method; ...
repos\springBoot-master\springboot-springSecurity3\src\main\java\com\us\example\domain\Permission.java
1
请在Spring Boot框架中完成以下Java代码
public BigDecimal getOrderAmount() { return orderAmount; } public void setOrderAmount(BigDecimal orderAmount) { this.orderAmount = orderAmount; } public BigDecimal getPlatIncome() { return platIncome; } public void setPlatIncome(BigDecimal platIncome) { this.platIncome = platIncome; } public BigDeci...
} public void setCompleteTime(Date completeTime) { this.completeTime = completeTime; } public String getIsRefund() { return isRefund; } public void setIsRefund(String isRefund) { this.isRefund = isRefund == null ? null : isRefund.trim(); } public Short getRefundTimes() { return refundTimes; } publ...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\entity\RpAccountCheckMistakeScratchPool.java
2
请完成以下Java代码
public class Video { private UUID id; private String title; private Instant creationDate; public Video(UUID id, String title, Instant creationDate) { this.id = id; this.title = title; this.creationDate = creationDate; } public Video(String title, Instant creationDate) ...
this.title = title; } public Instant getCreationDate() { return creationDate; } public void setCreationDate(Instant creationDate) { this.creationDate = creationDate; } @Override public String toString() { return "[id:" + id.toString() + ", title:" + title + ", crea...
repos\tutorials-master\persistence-modules\java-cassandra\src\main\java\com\baeldung\datastax\cassandra\domain\Video.java
1
请完成以下Java代码
public boolean shouldInclude(Term term) { // 除掉停用词 String nature = term.nature != null ? term.nature.toString() : "空"; char firstChar = nature.charAt(0); switch (firstChar) { case 'm': case 'b': case 'c':...
return !shouldInclude(term); } /** * 加入停用词到停用词词典中 * @param stopWord 停用词 * @return 词典是否发生了改变 */ public static boolean add(String stopWord) { return dictionary.add(stopWord); } /** * 从停用词词典中删除停用词 * @param stopWord 停用词 * @return 词典是否发生了改变 */ pub...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dictionary\stopword\CoreStopWordDictionary.java
1
请完成以下Java代码
public class ExportAccountInfos extends JavaProcess { final SpreadsheetExporterService spreadsheetExporterService = SpringContextHolder.instance.getBean(SpreadsheetExporterService.class); final ElementValueService elementValueService = SpringContextHolder.instance.getBean(ElementValueService.class); final IFactAcctD...
final File zipFile = FileUtil.zip(files); getResult().setReportData(zipFile, zipFileName); return MSG_OK; } private String getSql(final ElementValueId accountId) { return "SELECT * FROM " + p_Function + "(" + "p_Account_ID := " + accountId.getRepoId() + ", " + "p_C_AcctSchema_ID := " + p_...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\process\ExportAccountInfos.java
1
请完成以下Java代码
public static long filesCompareByLine(Path path1, Path path2) throws IOException { if (path1.getFileSystem() .provider() .isSameFile(path1, path2)) { return -1; } try (BufferedReader bf1 = Files.newBufferedReader(path1); BufferedReader bf2 = Fil...
return lineNumber; } } } public static boolean compareByMemoryMappedFiles(Path path1, Path path2) throws IOException { try (RandomAccessFile randomAccessFile1 = new RandomAccessFile(path1.toFile(), "r"); RandomAccessFile randomAccessFile2 = new RandomAccessFile(pat...
repos\tutorials-master\core-java-modules\core-java-12\src\main\java\com\baeldung\file\content\comparison\CompareFileContents.java
1
请完成以下Java代码
private static class DocBaseTypeCountersMap { public static DocBaseTypeCountersMap ofMap(@NonNull final ImmutableMap<DocBaseType, DocBaseType> map) { return !map.isEmpty() ? new DocBaseTypeCountersMap(map) : EMPTY; } private static final DocBaseTypeCountersMap EMPTY = new DocBaseTypeCountersMap(I...
public Optional<DocBaseType> getCounterDocBaseTypeByDocBaseType(@NonNull final DocBaseType docBaseType) { return Optional.ofNullable(counterDocBaseTypeByDocBaseType.get(docBaseType)); } } @NonNull private ImmutableSet<DocTypeId> retrieveDocTypeIdsByInvoicingPoolId(@NonNull final DocTypeInvoicingPoolId docTyp...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\impl\DocTypeDAO.java
1
请完成以下Java代码
public String docValidate(@NonNull final PO po, final int timing) { Check.assume(isDocument(), "PO '{}' is a document", po); if (!acceptDocument(po)) { return null; } if (timing == ModelValidator.TIMING_AFTER_COMPLETE && !Services.get(IDocumentBL.class).isReversalDocument(po)) { createDocOutbou...
final boolean isNew = changeType == ModelValidator.TYPE_BEFORE_NEW || changeType == ModelValidator.TYPE_AFTER_NEW; final int idxProcessed = po.get_ColumnIndex(DocOutboundProducerValidator.COLUMNNAME_Processed); final boolean processedColumnAvailable = idxProcessed > 0; final boolean processed = processedColumnAva...
repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java\de\metas\document\archive\interceptor\DocOutboundProducerValidator.java
1
请完成以下Java代码
public void logout() throws ServletException { List<LogoutHandler> handlers = HttpServlet3RequestFactory.this.logoutHandlers; if (CollectionUtils.isEmpty(handlers)) { HttpServlet3RequestFactory.this.logger .debug("logoutHandlers is null, so allowing original HttpServletRequest to handle logout"); sup...
this.asyncContext.dispatch(context, path); } @Override public void complete() { this.asyncContext.complete(); } @Override public void start(Runnable run) { this.asyncContext.start(new DelegatingSecurityContextRunnable(run)); } @Override public void addListener(AsyncListener listener) { thi...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\servletapi\HttpServlet3RequestFactory.java
1
请完成以下Java代码
public synchronized void unsubscribe(final WebsocketSubscriptionId subscriptionId) { activeSubscriptionIds.remove(subscriptionId); logger.trace("{}: subscription {} unsubscribed", this, subscriptionId); stopIfNoSubscription(); } public synchronized void unsubscribe(@NonNull final WebsocketSessionId ses...
logger.trace("{}: start producing using initialDelayMillis={}, periodMillis={}", this, initialDelayMillis, periodMillis); } private void stopScheduledFuture() { if (scheduledFuture == null) { return; } try { scheduledFuture.cancel(true); } catch (final Exception ex) { logger...
repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\websocket\producers\WebSocketProducersRegistry.java
1
请完成以下Java代码
public Long getUid() { return uid; } public void setUid(Long uid) { this.uid = uid; } public String getUname() { return uname; } public void setUname(String uname) { this.uname = uname; } public String getNick() { return nick; } public void setNick(String nick) { this.nick = nick; } public...
public Date getCreated() { return created; } public void setCreated(Date created) { this.created = created; } public Date getUpdated() { return updated; } public void setUpdated(Date updated) { this.updated = updated; } public Set<String> getRoles() { return roles; } public void setRoles(Set<St...
repos\spring-boot-quick-master\quick-spring-shiro\src\main\java\com\shiro\entity\User.java
1
请完成以下Java代码
public int getMSV3_BestellungPosition_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_MSV3_BestellungPosition_ID); if (ii == null) return 0; return ii.intValue(); } /** * MSV3_Liefervorgabe AD_Reference_ID=540821 * Reference name: MSV3_Liefervorgabe */ public static final int MSV3_LIEFERVORGAB...
public int getMSV3_Menge () { Integer ii = (Integer)get_Value(COLUMNNAME_MSV3_Menge); if (ii == null) return 0; return ii.intValue(); } /** Set MSV3_Pzn. @param MSV3_Pzn MSV3_Pzn */ @Override public void setMSV3_Pzn (java.lang.String MSV3_Pzn) { set_Value (COLUMNNAME_MSV3_Pzn, MSV3_Pzn); } /*...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java-gen\de\metas\vertical\pharma\vendor\gateway\msv3\model\X_MSV3_BestellungPosition.java
1
请完成以下Java代码
private static boolean extractAlwaysUpdateable(final GridFieldVO gridFieldVO) { if (gridFieldVO.isVirtualColumn() || !gridFieldVO.isUpdateable()) { return false; } // HARDCODED: DocAction shall always be updateable if (WindowConstants.FIELDNAME_DocAction.equals(gridFieldVO.getColumnName())) { return...
@Nullable public Map<Characteristic, DocumentFieldDescriptor.Builder> getSpecialField_DocSatusAndDocAction() { return _specialFieldsCollector == null ? null : _specialFieldsCollector.getDocStatusAndDocAction(); } private WidgetTypeStandardNumberPrecision getStandardNumberPrecision() { WidgetTypeStandardNumber...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\factory\standard\GridTabVOBasedDocumentEntityDescriptorFactory.java
1
请完成以下Spring Boot application配置
# rocketmq 配置项,对应 RocketMQProperties 配置类 rocketmq: name-server: 127.0.0.1:9876 # RocketMQ Namesrv # Producer 配置项 producer: group: demo-producer-group # 生产者分组 send-message-timeout: 3000 # 发送消息超时时间,单位:毫秒。默认为 3000 。 compress-message-body-threshold: 4096 # 消息压缩阀值,当消息体的大小超过该阀值后,进行消息压缩。默认为 4 * 1024B max...
tmq/blob/master/docs/cn/msg_trace/user_guide.md 文档 customized-trace-topic: RMQ_SYS_TRACE_TOPIC # 自定义消息轨迹的 Topic 。默认为 RMQ_SYS_TRACE_TOPIC 。 # Consumer 配置项 consumer: listeners: # 配置某个消费分组,是否监听指定 Topic 。结构为 Map<消费者分组, <Topic, Boolean>> 。默认情况下,不配置表示监听。 test-consumer-group: topic1: false # 关闭 test-...
repos\SpringBoot-Labs-master\lab-31\lab-31-rocketmq-demo\src\main\resources\application.yaml
2
请完成以下Java代码
public static void log(final Logger logger, final Level level, final String msg, final Object... msgParameters) { if (logger == null) { System.err.println(msg + " -- " + (msgParameters == null ? "" : Arrays.asList(msgParameters))); } else if (level == Level.ERROR) { logger.error(msg, msgParameters); ...
logger.info(msg, msgParameters); } else if (level == Level.DEBUG) { logger.debug(msg, msgParameters); } else { logger.trace(msg, msgParameters); } } private LoggingHelper() { } }
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\logging\LoggingHelper.java
1
请在Spring Boot框架中完成以下Java代码
public class C_Doc_Outbound_Config { private final static Logger logger = LogManager.getLogger(C_Doc_Outbound_Config.class); public static final C_Doc_Outbound_Config instance = new C_Doc_Outbound_Config(); private C_Doc_Outbound_Config() { } /** * If <code>IsCreatePrintJob</code> is set to <code>true</code>...
} } /** * If <code>IsDirectEnqueue</code> is set to <code>false</code>, then also unset <code>IsCreatePrintJob</code>, because without a printing queue, there is no print job. * <p> * Note that this is mainly for the user. The business logics (=>AD_Archive) already behave like this for some time. * task htt...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\callout\C_Doc_Outbound_Config.java
2
请完成以下Java代码
public KPIField getGroupByFieldOrNull() { return groupByField; } public boolean hasCompareOffset() { return compareOffset != null; } public Set<CtxName> getRequiredContextParameters() { if (elasticsearchDatasource != null) { return elasticsearchDatasource.getRequiredContextParameters(); } else i...
else { throw new AdempiereException("Unknown datasource type: " + datasourceType); } } public boolean isZoomToDetailsAvailable() { return sqlDatasource != null; } @NonNull public SQLDatasourceDescriptor getSqlDatasourceNotNull() { return Check.assumeNotNull(getSqlDatasource(), "Not an SQL data sourc...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\kpi\descriptor\KPI.java
1
请完成以下Java代码
public void start() { Assert.notNull(connector, "connector is null"); thread = new Thread(new Runnable() { public void run() { logger.info("destination:{} running", destination); process(); } }); thread.setUncaughtExceptionHandler(h...
int size = message.getEntries().size(); if (batchId != -1 && size > 0) { logger.info(canal_get, batchId, size); // for (CanalEntry.Entry entry : message.getEntries()) { // logger.info("parse event has an data:" + entry.toStrin...
repos\spring-boot-leaning-master\2.x_data\3-3 使用 canal 将业务数据从 Mysql 同步到 MongoDB\spring-boot-canal-mongodb\src\main\java\com\neo\canal\CanalClient.java
1
请完成以下Java代码
protected boolean isQualified(@Nullable Resource resource) { return resource != null; } /** * Action to perform when the {@link Resource} identified at the specified {@link String location} is missing, * or was not {@link #isQualified(Resource) qualified}. * * @param resource missing {@link Resource}. * ...
* * In the event that a {@link Resource} cannot be identified at the given {@link String location}, then applications * have 1 last opportunity to handle the missing {@link Resource} event, and either return a different or default * {@link Resource} or throw a {@link ResourceNotFoundException}. * * @param loc...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\core\io\support\ResourceLoaderResourceResolver.java
1
请完成以下Java代码
public String mkAddress( I_C_Location location, boolean isLocalAddress, final I_C_BPartner bPartner, String bPartnerBlock, String userBlock) { final String adLanguage; final OrgId orgId; if (bPartner == null) { adLanguage = countryDAO.getDefault(Env.getCtx()).getAD_Language(); orgId = Env....
.adLanguage(adLanguage) .build() .buildAddressString(location, isLocalAddress, bPartnerBlock, userBlock); } @Override public I_C_Location duplicate(@NonNull final I_C_Location location) { final I_C_Location locationNew = InterfaceWrapperHelper.newInstance(I_C_Location.class, location); InterfaceWrapper...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\location\impl\LocationBL.java
1
请完成以下Java代码
public class MigrationSortSteps extends JavaProcess { private I_AD_Migration migration; @Override protected void prepare() { if (I_AD_Migration.Table_Name.equals(getTableName()) && getRecord_ID() > 0) { this.migration = InterfaceWrapperHelper.create(getCtx(), getRecord_ID(), I_AD_Migration.class, get_TrxNam...
} @Override protected String doIt() throws Exception { if (migration == null || migration.getAD_Migration_ID() <= 0) { throw new AdempiereException("@NotFound@ @AD_Migration_ID@"); } Services.get(IMigrationBL.class).sortStepsByCreated(migration); return "OK"; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\process\MigrationSortSteps.java
1
请完成以下Java代码
public IProductStorage getStorage() { return storage; } private I_M_HU_Item getM_HU_Item() { return huItem; } private I_M_HU_Item getVHU_Item() { // TODO: implement: get VHU Item or create it return huItem; } public Object getReferenceModel() { return referenceModel;
} @Override public List<IPair<IAllocationRequest, IAllocationResult>> unloadAll(final IHUContext huContext) { final IAllocationRequest request = AllocationUtils.createQtyRequest(huContext, storage.getProductId(), // product storage.getQty(), // qty huContext.getDate() // date ); final IAllocation...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\AbstractAllocationSourceDestination.java
1
请完成以下Java代码
protected Map<String, String> matchRequestUri(String requestUri) { Matcher matcher = pattern.matcher(requestUri); if (!matcher.matches()) { return null; } HashMap<String, String> attributes = new HashMap<String, String>(); for (int i = 0; i < matcher.groupCount(); i++) { attributes.pu...
String regex = part; // parse group if (part.startsWith("{") && part.endsWith("}")) { String groupStr = part.substring(1, part.length() - 1); String[] groupSplit = groupStr.split(":"); if (groupSplit.length > 2) { throw new IllegalArgumentException("cannot parse uri part ...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\security\filter\RequestFilter.java
1
请完成以下Java代码
public final class StatusInfo implements Serializable { public static final String STATUS_UNKNOWN = "UNKNOWN"; public static final String STATUS_OUT_OF_SERVICE = "OUT_OF_SERVICE"; public static final String STATUS_UP = "UP"; public static final String STATUS_DOWN = "DOWN"; public static final String STATUS_OF...
return STATUS_OFFLINE.equals(status); } public boolean isDown() { return STATUS_DOWN.equals(status); } public boolean isUnknown() { return STATUS_UNKNOWN.equals(status); } public static Comparator<String> severity() { return Comparator.comparingInt(STATUS_ORDER::indexOf); } @SuppressWarnings("unchecke...
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\domain\values\StatusInfo.java
1
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Integer getFlashOrderOvertime() { return flashOrderOvertime; } public void setFlashOrderOvertime(Integer flashOrderOvertime) { this.flashOrderOvertime = flashOrderOvertime; ...
return commentOvertime; } public void setCommentOvertime(Integer commentOvertime) { this.commentOvertime = commentOvertime; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); ...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\OmsOrderSetting.java
1
请完成以下Java代码
private String buildLockKey(ZooLock lock, Method method, Object[] args) throws NoSuchFieldException, IllegalAccessException { StringBuilder key = new StringBuilder(KEY_SEPARATOR + KEY_PREFIX + lock.key()); // 迭代全部参数的注解,根据使用LockKeyParam的注解的参数所在的下标,来获取args中对应下标的参数值拼接到前半部分key上 Annotation[][] param...
// @LockKeyParam的fields值不为null,所以当前参数应该是对象类型 for (String field : fields) { Class<?> clazz = args[i].getClass(); Field declaredField = clazz.getDeclaredField(field); declaredField.setAccessible(true); Obje...
repos\spring-boot-demo-master\demo-zookeeper\src\main\java\com\xkcoding\zookeeper\aspectj\ZooLockAspect.java
1
请完成以下Java代码
public XMLGregorianCalendar getDateBegin() { return dateBegin; } /** * Sets the value of the dateBegin property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setDateBegin(XMLGregorianCalendar value) { ...
*/ public void setDateEnd(XMLGregorianCalendar value) { this.dateEnd = value; } /** * Gets the value of the acid property. * * @return * possible object is * {@link String } * */ public String getAcid() { return acid; } /** ...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\CaseDetailType.java
1
请在Spring Boot框架中完成以下Java代码
private static class ParentLink { @NonNull String linkColumnName; @NonNull String parentTableName; } @Nullable private ParentLink getParentLink_HeaderForLine(@NonNull final POInfo poInfo) { final String tableName = poInfo.getTableName(); if (!tableName.endsWith("Line")) { return null; } final St...
@Nullable private ParentLink getParentLink_SingleParentColumn(@NonNull final POInfo poInfo) { final String parentLinkColumnName = poInfo.getSingleParentColumnName().orElse(null); if (parentLinkColumnName == null) { return null; } // virtual column parent link is not supported if (poInfo.isVirtualColum...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\references\zoom_into\DefaultGenericZoomIntoTableInfoRepository.java
2
请完成以下Java代码
public class JasperReportsPdfExporter implements JasperReportsExporter { /** * Generates a ByteArrayOutputStream from the provided JasperReport using * the {@link JRPdfExporter}. After that, the generated bytes array is * written in the {@link HttpServletResponse} * * @param jp * The generated...
response.setHeader("Content-Disposition", "inline; filename=" + fileName); // Make sure to set the correct content type // Each format has its own content type response.setContentType("application/pdf"); response.setContentLength(baos.size()); // Retrieve the output stream ServletOutputStream outputStream...
repos\tutorials-master\spring-roo\src\main\java\com\baeldung\web\reports\JasperReportsPdfExporter.java
1
请完成以下Java代码
public static boolean equals(final DocumentQueryOrderByList list1, final DocumentQueryOrderByList list2) { return Objects.equals(list1, list2); } public Stream<DocumentQueryOrderBy> stream() { return list.stream(); } public void forEach(@NonNull final Consumer<DocumentQueryOrderBy> consumer) { list.forEa...
public <T extends IViewRow> Comparator<T> toComparator( @NonNull final FieldValueExtractor<T> fieldValueExtractor, @NonNull final JSONOptions jsonOpts) { // used in case orderBys is empty or whatever else goes wrong final Comparator<T> noopComparator = (o1, o2) -> 0; return stream() .map(orderBy -> o...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentQueryOrderByList.java
1
请完成以下Java代码
public String getId() { return idAttribute.getValue(this); } public void setId(String id) { idAttribute.setValue(this, id); } public String getTextFormat() { return textFormatAttribute.getValue(this); } public void setTextFormat(String textFormat) { textFormatAttribute.setValue(this, text...
} }); idAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_ID) .idAttribute() .build(); textFormatAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_TEXT_FORMAT) .defaultValue("text/plain") .build(); typeBuilder.build(); } }
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\DocumentationImpl.java
1
请完成以下Java代码
public final class AttestationConveyancePreference { /** * The <a href= * "https://www.w3.org/TR/webauthn-3/#dom-attestationconveyancepreference-none">none</a> * preference indicates that the Relying Party is not interested in * <a href="https://www.w3.org/TR/webauthn-3/#authenticator">authenticator</a> * <...
public static final AttestationConveyancePreference ENTERPRISE = new AttestationConveyancePreference("enterprise"); private final String value; AttestationConveyancePreference(String value) { this.value = value; } /** * Gets the String value of the preference. * @return the String value of the preference. ...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\api\AttestationConveyancePreference.java
1
请在Spring Boot框架中完成以下Java代码
public int hashCode() { return Objects.hash(href, limit, next, offset, paymentDisputeSummaries, prev, total); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DisputeSummaryResponse {\n"); sb.append(" href: ").append(toIndentedString(href)).append("\n"); ...
sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(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\DisputeSummaryResponse.java
2