instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public String getIp() { return ip; } public void setIp(String ip) { this.ip = ip; } public int getPort() { return port; } public void setPort(int port) { this.port = port; } } private String username; ...
return password; } public void setPassword(String password) { this.password = password; } public Server getServer() { return server; } public void setServer(Server server) { this.server = server; } }
repos\tutorials-master\spring-boot-modules\spring-boot-autoconfiguration\src\main\java\com\baeldung\autoconfiguration\annotationprocessor\DatabaseProperties.java
2
请完成以下Java代码
public ProcessEngineConfiguration setPasswordPolicy(PasswordPolicy passwordPolicy) { this.passwordPolicy = passwordPolicy; return this; } public boolean isEnableCmdExceptionLogging() { return enableCmdExceptionLogging; } public ProcessEngineConfiguration setEnableCmdExceptionLogging(boolean enable...
public boolean isDeserializationTypeValidationEnabled() { return deserializationTypeValidationEnabled; } public ProcessEngineConfiguration setDeserializationTypeValidationEnabled(boolean deserializationTypeValidationEnabled) { this.deserializationTypeValidationEnabled = deserializationTypeValidationEnabled...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\ProcessEngineConfiguration.java
1
请在Spring Boot框架中完成以下Java代码
public static List getList() { List strList = new ArrayList(); InputStreamReader read = null; BufferedReader reader = null; try { read = new InputStreamReader(new ClassPathResource("WxCityNo.txt").getInputStream(), "utf-8"); reader = new BufferedReader(read); ...
} catch (IOException e) { e.printStackTrace(); } } } return strList; } public static String getCityNameByNo(String cityNo) { List list = getList(); String cityName = null; for (int i = 0; i < list.size(); i++) { ...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\banklink\utils\weixin\WxCityNo.java
2
请完成以下Java代码
public void runSQLAfterAllImport() { final List<DBFunction> functions = dbFunctions.getAvailableAfterAllFunctions(); if (functions.isEmpty()) { return; } final DataImportRunId dataImportRunId = getDataImportRunIdOfImportedRecords(); functions.forEach(function -> { try { DBFunctionHelper.doDBF...
"SELECT " + ImportTableDescriptor.COLUMNNAME_C_DataImport_Run_ID + " FROM " + importTableName + " WHERE " + ImportTableDescriptor.COLUMNNAME_I_IsImported + "='Y' " + " " + selection.toSqlWhereClause(importTableName) ) ); } private Optional<DataImportConfigId> extractDataImportConfigId(@...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\processing\SqlImportSource.java
1
请完成以下Java代码
public int getM_ShipmentSchedule_ExportAudit_Item_ID() { return get_ValueAsInt(COLUMNNAME_M_ShipmentSchedule_ExportAudit_Item_ID); } @Override public de.metas.inoutcandidate.model.I_M_ShipmentSchedule getM_ShipmentSchedule() { return get_ValueAsPO(COLUMNNAME_M_ShipmentSchedule_ID, de.metas.inoutcandidate.mod...
@Override public int getM_ShipmentSchedule_ID() { return get_ValueAsInt(COLUMNNAME_M_ShipmentSchedule_ID); } @Override public void setTransactionIdAPI (final @Nullable java.lang.String TransactionIdAPI) { throw new IllegalArgumentException ("TransactionIdAPI is virtual column"); } @Override public java.l...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inoutcandidate\model\X_M_ShipmentSchedule_ExportAudit_Item.java
1
请完成以下Java代码
public class MutexLock implements Lock { // 使用静态内部类的方式来自定义同步器,隔离使用者和实现者 static class Sync extends AbstractQueuedSynchronizer { // 我们定义状态标志位是1时表示获取到了锁,为0时表示没有获取到锁 @Override protected boolean tryAcquire(int arg) { // 获取锁有竞争所以需要使用CAS原子操作 if (compareAndSetState(0, 1)...
public boolean tryLock(long time, TimeUnit unit) throws InterruptedException { return sync.tryAcquireNanos(1, unit.toNanos(time)); } @Override public void unlock() { sync.release(0); } @Override public Condition newCondition() { return sync.newCondition(); } p...
repos\spring-boot-student-master\spring-boot-student-concurrent\src\main\java\com\xiaolyuh\MutexLock.java
1
请完成以下Java代码
public class MethodInvocationPrivilegeEvaluator implements InitializingBean { protected static final Log logger = LogFactory.getLog(MethodInvocationPrivilegeEvaluator.class); @SuppressWarnings("NullAway.Init") private @Nullable AbstractSecurityInterceptor securityInterceptor; @Override public void afterProperti...
} try { this.securityInterceptor.getAccessDecisionManager().decide(authentication, invocation, attrs); return true; } catch (AccessDeniedException unauthorized) { logger.debug(LogMessage.format("%s denied for %s", invocation, authentication), unauthorized); return false; } } public void setSecuri...
repos\spring-security-main\access\src\main\java\org\springframework\security\access\intercept\MethodInvocationPrivilegeEvaluator.java
1
请在Spring Boot框架中完成以下Java代码
public class FTSConfigService { private final IESSystem esSystem = Services.get(IESSystem.class); private final FTSConfigRepository ftsConfigRepository; private final FTSFilterDescriptorRepository ftsFilterDescriptorRepository; public FTSConfigService( @NonNull final FTSConfigRepository ftsConfigRepository, ...
{ return ftsConfigRepository.getSourceTables(); } public Optional<FTSFilterDescriptor> getFilterByTargetTableName(@NonNull final String targetTableName) { return ftsFilterDescriptorRepository.getByTargetTableName(targetTableName); } public FTSFilterDescriptor getFilterById(@NonNull final FTSFilterDescriptorI...
repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java\de\metas\fulltextsearch\config\FTSConfigService.java
2
请完成以下Java代码
public int getM_DistributionRun_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_DistributionRun_ID); if (ii == null) return 0; return ii.intValue(); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyName...
set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); } /** Get Product. @return Product, Service, Item */ public int getM_Product_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Total Quantity. @param To...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_DistributionRunLine.java
1
请在Spring Boot框架中完成以下Java代码
private void initRouteContext(final Exchange exchange) { final String clientValue = Util.resolveProperty(getContext(), AbstractEDIRoute.EDI_ORDER_ADClientValue); final EcosioOrdersRouteContext context = EcosioOrdersRouteContext.builder() .clientValue(clientValue) .build(); exchange.setProperty(ROUTE_PR...
} private static void setImportStatusOk(@NonNull final Exchange exchange) { final EcosioOrdersRouteContext context = exchange.getProperty(ROUTE_PROPERTY_ECOSIO_ORDER_ROUTE_CONTEXT, EcosioOrdersRouteContext.class); context.setCurrentReplicationTrxStatus(EcosioOrdersRouteContext.TrxImportStatus.ok()); } private...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\ordersimport\ecosio\EcosioOrdersRoute.java
2
请在Spring Boot框架中完成以下Java代码
public String getProcessingPriorityCode() { return processingPriorityCode; } /** * Sets the value of the processingPriorityCode property. * * @param value * allowed object is * {@link String } * */ public void setProcessingPriorityCode(String value) ...
* */ public String getAgreementId() { return agreementId; } /** * Sets the value of the agreementId property. * * @param value * allowed object is * {@link String } * */ public void setAgreementId(String value) { this.agreementI...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\messaging\header\InterchangeHeaderType.java
2
请完成以下Java代码
public void updateData( @NonNull final AttachmentEntryId attachmentEntryId, final byte[] data) { attachmentEntryRepository.updateAttachmentEntryData(attachmentEntryId, data); } @NonNull public Stream<EmailAttachment> streamEmailAttachments(@NonNull final TableRecordReference recordRef, @Nullable final Stri...
Object referencedRecord; String mimeType; @Builder private AttachmentEntryQuery( @Singular("tagSetToTrue") final List<String> tagsSetToTrue, @Singular("tagSetToAnyValue") final List<String> tagsSetToAnyValue, @Nullable final String mimeType, @NonNull final Object referencedRecord) { this.re...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\attachments\AttachmentEntryService.java
1
请完成以下Java代码
public String toString() { return MoreObjects.toStringHelper(this) .addValue(values.get(this)) .toString(); } @Override public DocumentId getId() { return rowId; } public ClientAndOrgId getClientAndOrgId() { return clientAndOrgId; } @Override public boolean isProcessed() { return false; ...
{ return values.getFieldNames(); } @Override public ViewRowFieldNameAndJsonValues getFieldNameAndJsonValues() { return values.get(this); } @Override public Map<String, ViewEditorRenderMode> getViewEditorRenderModeByFieldName() { return values.getViewEditorRenderModeByFieldName(); } public BPartnerId ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\payment_allocation\InvoiceRow.java
1
请在Spring Boot框架中完成以下Java代码
public static RecordChangeLog createBankAccountChangeLog( @NonNull final I_C_BP_BankAccount bankAccountRecord, @NonNull final CompositeRelatedRecords relatedRecords) { final ImmutableListMultimap<TableRecordReference, RecordChangeLogEntry> recordRef2LogEntries = relatedRecords.getRecordRef2LogEntries(); fina...
@NonNull final ImmutableMap<String, String> columnMap) { final String fieldName = columnMap.get(entry.getColumnName()); if (fieldName == null) { return Optional.empty(); } final RecordChangeLogEntry result = entry .toBuilder() .columnName(columnMap.get(entry.getColumnName())) .build(); retu...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\composite\repository\ChangeLogUtil.java
2
请在Spring Boot框架中完成以下Java代码
public final class ViewProfileId { public static final ViewProfileId NULL = null; public static boolean isNull(final ViewProfileId profileId) { return profileId == null || Objects.equals(profileId, NULL); } @JsonCreator public static final ViewProfileId fromJson(final String profileIdStr) { if (profileIdSt...
} return new ViewProfileId(profileIdStrNorm); } private final String id; private ViewProfileId(@NonNull final String id) { this.id = id; } @JsonValue public String toJson() { return id; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ViewProfileId.java
2
请完成以下Java代码
public void setRate (final @Nullable BigDecimal Rate) { set_Value (COLUMNNAME_Rate, Rate); } @Override public BigDecimal getRate() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Rate); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setSupplier_GTIN_CU (final @Nullable java....
return get_ValueAsBoolean(COLUMNNAME_taxfree); } @Override public void setUPC_CU (final @Nullable java.lang.String UPC_CU) { set_ValueNoCheck (COLUMNNAME_UPC_CU, UPC_CU); } @Override public java.lang.String getUPC_CU() { return get_ValueAsString(COLUMNNAME_UPC_CU); } @Override public void setUPC_TU (...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_cctop_invoic_500_v.java
1
请在Spring Boot框架中完成以下Java代码
public String getResponse() { return response; } /** 返回信息 **/ public void setResponse(String response) { this.response = response == null ? null : response.trim(); } /** 商户编号 **/ public String getMerchantNo() { return merchantNo; } /** 商户编号 **/ public void ...
public String getMerchantOrderNo() { return merchantOrderNo; } /** 商户订单号 **/ public void setMerchantOrderNo(String merchantOrderNo) { this.merchantOrderNo = merchantOrderNo == null ? null : merchantOrderNo.trim(); } /** HTTP状态 **/ public Integer getHttpStatus() { return...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\notify\entity\RpNotifyRecordLog.java
2
请完成以下Java代码
protected String getStencilId(BaseElement baseElement) { EndEvent endEvent = (EndEvent) baseElement; List<EventDefinition> eventDefinitions = endEvent.getEventDefinitions(); if (eventDefinitions.size() != 1) { return STENCIL_EVENT_END_NONE; } EventDefinition eventDef...
} else if (STENCIL_EVENT_END_TERMINATE.equals(stencilId)) { TerminateEventDefinition eventDefinition = new TerminateEventDefinition(); String terminateAllStringValue = getPropertyValueAsString(PROPERTY_TERMINATE_ALL, elementNode); if (StringUtils.isNotEmpty(terminateAllStringValue))...
repos\Activiti-develop\activiti-core\activiti-json-converter\src\main\java\org\activiti\editor\language\json\converter\EndEventJsonConverter.java
1
请完成以下Java代码
public QualityInspectionLineType getQualityInspectionLineType() { return qualityInspectionLineType; } @Override public void setQualityInspectionLineType(final QualityInspectionLineType qualityInspectionLineType) { this.qualityInspectionLineType = qualityInspectionLineType; } @Override public String getPro...
return negateQtyInReport; } @Override public void setNegateQtyInReport(final boolean negateQtyInReport) { this.negateQtyInReport = negateQtyInReport; } @Override public String getComponentType() { return componentType; } @Override public void setComponentType(final String componentType) { this.comp...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\QualityInspectionLine.java
1
请完成以下Java代码
public String getEvent() { return event; } public void setEvent(String event) { this.event = event; } public String getImplementationType() { return implementationType; } public void setImplementationType(String implementationType) { this.implementationType = i...
public String getCustomPropertiesResolverImplementation() { return customPropertiesResolverImplementation; } public void setCustomPropertiesResolverImplementation(String customPropertiesResolverImplementation) { this.customPropertiesResolverImplementation = customPropertiesResolverImplementatio...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\ActivitiListener.java
1
请在Spring Boot框架中完成以下Java代码
public Class<? extends SuspendedJobEntity> getManagedEntityClass() { return SuspendedJobEntityImpl.class; } @Override public SuspendedJobEntity create() { return new SuspendedJobEntityImpl(); } @Override public SuspendedJobEntity findJobByCorrelationId(String correlationId) { ...
return getList(dbSqlSession, "selectSuspendedJobsByExecutionId", executionId, suspendedJobsByExecutionIdMatcher, true); } @Override @SuppressWarnings("unchecked") public List<SuspendedJobEntity> findJobsByProcessInstanceId(final String processInstanceId) { return getDbSqlSession().selectList("s...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\persistence\entity\data\impl\MybatisSuspendedJobDataManager.java
2
请完成以下Java代码
public Response getHeadersBackFromDigestAuthentication() { // As the Digest authentication require some complex steps to work we'll simulate the process // https://en.wikipedia.org/wiki/Digest_access_authentication#Example_with_explanation if (headers.getHeaderString("authorization") == null) { ...
.build(); eventSink.send(event); } private Response echoHeaders() { Response.ResponseBuilder responseBuilder = Response.noContent(); headers.getRequestHeaders() .forEach((k, v) -> { v.forEach(value -> responseBuilder.header(k, value)); ...
repos\tutorials-master\web-modules\jersey\src\main\java\com\baeldung\jersey\server\EchoHeaders.java
1
请在Spring Boot框架中完成以下Java代码
public void setPredicates(List<PredicateProperties> predicates) { this.predicates = predicates; } public List<FilterProperties> getFilters() { return filters; } public void setFilters(List<FilterProperties> filters) { this.filters = filters; } public @Nullable URI getUri() { return uri; } public voi...
public void setMetadata(Map<String, Object> metadata) { this.metadata = metadata; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } RouteProperties that = (RouteProperties) o; return this.order == that.ord...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\config\RouteProperties.java
2
请完成以下Java代码
public void setSalesRep_ID (final int SalesRep_ID) { if (SalesRep_ID < 1) set_Value (COLUMNNAME_SalesRep_ID, null); else set_Value (COLUMNNAME_SalesRep_ID, SalesRep_ID); } @Override public int getSalesRep_ID() { return get_ValueAsInt(COLUMNNAME_SalesRep_ID); } @Override public void setSendEMail...
{ set_ValueFromPO(COLUMNNAME_User2_ID, org.compiere.model.I_C_ElementValue.class, User2); } @Override public void setUser2_ID (final int User2_ID) { if (User2_ID < 1) set_Value (COLUMNNAME_User2_ID, null); else set_Value (COLUMNNAME_User2_ID, User2_ID); } @Override public int getUser2_ID() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Invoice.java
1
请完成以下Java代码
public void onStartup(ServletContext servletContext) { this.servletContext = servletContext; properties.getRestApi().getFetchAndLock().getInitParams().forEach(servletContext::setInitParameter); String restApiPathPattern = applicationPath.getUrlMapping(); registerFilter("EmptyBodyFilter", EmptyBodyFil...
FilterRegistration filterRegistration = servletContext.getFilterRegistration(filterName); if (filterRegistration == null) { filterRegistration = servletContext.addFilter(filterName, filterClass); filterRegistration.addMappingForUrlPatterns(DISPATCHER_TYPES, true, urlPatterns); if (initParameters...
repos\camunda-bpm-platform-master\spring-boot-starter\starter-rest\src\main\java\org\camunda\bpm\spring\boot\starter\rest\CamundaBpmRestInitializer.java
1
请完成以下Spring Boot application配置
spring: redis: host: localhost # 连接超时时间(记得添加单位,Duration) timeout: 10000ms # Redis默认情况下有16个分片,这里配置具体使用的分片 # database: 0 lettuce: pool: # 连接池最大连接数(使用负值表示没有限制) 默认 8 max-active: 8 # 连接池最大阻塞等待时间(使用负值表示没有限制) 默认 -1 max-wait: -1ms # 连接池中的最大空闲连接 默认 8 ...
# 连接池中的最小空闲连接 默认 0 min-idle: 0 cache: # 一般来说是不用配置的,Spring Cache 会根据依赖的包自行装配 type: redis logging: level: com.xkcoding: debug
repos\spring-boot-demo-master\demo-cache-redis\src\main\resources\application.yml
2
请完成以下Java代码
private JSONDocumentChangedWebSocketEvent createEvent(final EventKey key) { return JSONDocumentChangedWebSocketEvent.rootDocument(key.getWindowId(), key.getDocumentId()); } public void staleRootDocument(final WindowId windowId, final DocumentId documentId) { staleRootDocument(windowId, documentId, false); } ...
} fromEvents.forEach(this::mergeFrom); } private void mergeFrom(final EventKey key, final JSONDocumentChangedWebSocketEvent from) { final LinkedHashMap<EventKey, JSONDocumentChangedWebSocketEvent> events = this._events; if (events == null) { throw new AdempiereException("already closed: " + this); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\events\JSONDocumentChangedWebSocketEventCollector.java
1
请完成以下Java代码
protected void switchVersionOfJob(JobEntity jobEntity, ProcessDefinitionEntity newProcessDefinition, Map<String, String> jobDefinitionMapping) { jobEntity.setProcessDefinitionId(newProcessDefinition.getId()); jobEntity.setDeploymentId(newProcessDefinition.getDeploymentId()); String newJobDefinitionId = job...
"does not contain the current activity " + "(id = '" + activityId + "') " + "of the process instance " + "(id = '" + processInstanceId + "')."); } // clear cached activity so that outgoing transitions are refreshed execution.setActivity(newActivity); } /...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\SetProcessDefinitionVersionCmd.java
1
请在Spring Boot框架中完成以下Java代码
public User getUser(String username,String password) { Query query = sessionFactory.getCurrentSession().createQuery("from CUSTOMER where username = :username"); query.setParameter("username",username); try { User user = (User) query.getSingleResult(); System.out.println(user.getPassword()); ...
query.setParameter("username",username); return !query.getResultList().isEmpty(); } @Transactional public User getUserByUsername(String username) { Query<User> query = sessionFactory.getCurrentSession().createQuery("from User where username = :username", User.class); query.setParameter("username...
repos\E-commerce-project-springBoot-master2\JtProject\src\main\java\com\jtspringproject\JtSpringProject\dao\userDao.java
2
请完成以下Java代码
public void setRequestType (java.lang.String RequestType) { set_Value (COLUMNNAME_RequestType, RequestType); } /** Get Anfrageart. @return Anfrageart */ @Override public java.lang.String getRequestType () { return (java.lang.String)get_Value(COLUMNNAME_RequestType); } /** Set Ergebnis. @param Resul...
return (java.lang.String)get_Value(COLUMNNAME_Status); } /** Set Summary. @param Summary Textual summary of this request */ @Override public void setSummary (java.lang.String Summary) { set_Value (COLUMNNAME_Summary, Summary); } /** Get Summary. @return Textual summary of this request */ @Overr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Request.java
1
请完成以下Java代码
default boolean processIt(final String docAction) { return Services.get(IDocumentBL.class).processIt(this, docAction); } /** @return true if success */ boolean unlockIt(); /** @return true if success */ boolean invalidateIt(); /** @return new status (In Progress or Invalid) */ String prepareIt(); /** @re...
int getDoc_User_ID(); int getC_Currency_ID(); BigDecimal getApprovalAmt(); int getAD_Client_ID(); int getAD_Org_ID(); boolean isActive(); void setDocStatus(String newStatus); String getDocStatus(); String getDocAction(); LocalDate getDocumentDate(); Properties getCtx(); int get_ID(); int get_Tab...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\engine\IDocument.java
1
请在Spring Boot框架中完成以下Java代码
ObservationHandlerGroup tracingObservationHandlerGroup(Tracer tracer) { return ClassUtils.isPresent("io.micrometer.core.instrument.MeterRegistry", null) ? new TracingAndMeterObservationHandlerGroup(tracer) : ObservationHandlerGroup.of(TracingObservationHandler.class); } @Bean @ConditionalOnMissingBean @O...
DefaultNewSpanParser newSpanParser() { return new DefaultNewSpanParser(); } @Bean @ConditionalOnMissingBean @ConditionalOnBean(ValueExpressionResolver.class) SpanTagAnnotationHandler spanTagAnnotationHandler(BeanFactory beanFactory, ValueExpressionResolver valueExpressionResolver) { return new Span...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-tracing\src\main\java\org\springframework\boot\micrometer\tracing\autoconfigure\MicrometerTracingAutoConfiguration.java
2
请完成以下Java代码
public abstract class Lookup { /** * the array size */ final protected int s = 50000000; /** * Initialize the array: fill in the array with the same * elements except for the last one. */ abstract public void prepare(); /** * Free the array's reference. */ ab...
abstract public int findPosition(); /** * Get the name of the class that extends this one. It is needed in order * to set up the benchmark. * * @return */ abstract public String getSimpleClassName(); Collection<RunResult> run() throws RunnerException { Options opt = new Op...
repos\tutorials-master\core-java-modules\core-java-lang-2\src\main\java\com\baeldung\primitive\Lookup.java
1
请完成以下Java代码
public boolean isProcessed () { Object oo = get_Value(COLUMNNAME_Processed); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Process Now. @param Processing Process Now */ public void setProcessing (bool...
@return Name of the Report Line Set */ public String getReportLineSetName () { return (String)get_Value(COLUMNNAME_ReportLineSetName); } /** Set Sequence. @param SeqNo Method of ordering records; lowest number comes first */ public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer....
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_ReportLine.java
1
请完成以下Java代码
public class DefinitionsParser implements BpmnXMLConstants { protected static final List<ExtensionAttribute> defaultAttributes = asList( new ExtensionAttribute(TYPE_LANGUAGE_ATTRIBUTE), new ExtensionAttribute(EXPRESSION_LANGUAGE_ATTRIBUTE), new ExtensionAttribute(TARGET_NAMESPACE_ATTRIBUTE)...
ExtensionAttribute extensionAttribute = new ExtensionAttribute(); extensionAttribute.setName(xtr.getAttributeLocalName(i)); extensionAttribute.setValue(xtr.getAttributeValue(i)); if (StringUtils.isNotEmpty(xtr.getAttributeNamespace(i))) { extensionAttribute.setNamespa...
repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\parser\DefinitionsParser.java
1
请在Spring Boot框架中完成以下Java代码
public class JobQueryProperty implements QueryProperty { private static final long serialVersionUID = 1L; private static final Map<String, JobQueryProperty> properties = new HashMap<>(); public static final JobQueryProperty JOB_ID = new JobQueryProperty("ID_"); public static final JobQueryProperty PR...
public JobQueryProperty(String name) { this.name = name; properties.put(name, this); } @Override public String getName() { return name; } public static JobQueryProperty findByName(String propertyName) { return properties.get(propertyName); } }
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\JobQueryProperty.java
2
请完成以下Java代码
public void save(@NonNull final Warehouse warehouse) { warehouseDAO.save(warehouse); } @NonNull public Warehouse createWarehouse(@NonNull final CreateWarehouseRequest request) { return warehouseDAO.createWarehouse(request); } @Override public Optional<LocationId> getLocationIdByLocatorRepoId(final int loc...
@Override @NonNull public ExplainedOptional<LocatorQRCode> getLocatorQRCodeByValue(@NonNull String locatorValue) { final List<I_M_Locator> locators = getActiveLocatorsByValue(locatorValue); if (locators.isEmpty()) { return ExplainedOptional.emptyBecause(AdempiereException.MSG_NotFound); } else if (locat...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\warehouse\api\impl\WarehouseBL.java
1
请完成以下Java代码
public java.lang.String getPriorityRule () { return (java.lang.String)get_Value(COLUMNNAME_PriorityRule); } /** Set Verarbeitet. @param Processed Checkbox sagt aus, ob der Beleg verarbeitet wurde. */ @Override public void setProcessed (boolean Processed) { set_Value (COLUMNNAME_Processed, Boolean.v...
{ if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Summe Zeilen. @param TotalLines Total of all document lines */ @Override public void setTotalLines (java.math.BigDecimal TotalLines) { set_Value (COLUMNNAME_TotalLines, To...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Requisition.java
1
请完成以下Java代码
public String getF_HISTORYID() { return F_HISTORYID; } public void setF_HISTORYID(String f_HISTORYID) { F_HISTORYID = f_HISTORYID; } public String getF_STATUS() { return F_STATUS; } public void setF_STATUS(String f_STATUS) { F_STATUS = f_STATUS; } publ...
} public String getF_PLATFORM_ID() { return F_PLATFORM_ID; } public void setF_PLATFORM_ID(String f_PLATFORM_ID) { F_PLATFORM_ID = f_PLATFORM_ID; } public String getF_ISENTERPRISES() { return F_ISENTERPRISES; } public void setF_ISENTERPRISES(String f_ISENTERPRISES)...
repos\SpringBootBucket-master\springboot-batch\src\main\java\com\xncoding\trans\modules\common\vo\BscTollItem.java
1
请完成以下Java代码
public final class ImmutableDocumentFilterDescriptorsProvider implements DocumentFilterDescriptorsProvider { public static ImmutableDocumentFilterDescriptorsProvider of(final List<DocumentFilterDescriptor> descriptors) { if (descriptors == null || descriptors.isEmpty()) { return EMPTY; } return new Immutab...
// // // public static class Builder { private final List<DocumentFilterDescriptor> descriptors = new ArrayList<>(); private Builder() { } public ImmutableDocumentFilterDescriptorsProvider build() { if (descriptors.isEmpty()) { return EMPTY; } return new ImmutableDocumentFilterDescrip...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\provider\ImmutableDocumentFilterDescriptorsProvider.java
1
请完成以下Java代码
private void validateType(TbMsg msg) { if (!msg.isTypeOf(TbMsgType.SEND_EMAIL)) { String type = msg.getType(); log.warn("Not expected msg type [{}] for SendEmail Node", type); throw new IllegalStateException("Not expected msg type " + type + " for SendEmail Node"); } ...
javaMailProperties.put(MAIL_PROP + protocol + ".starttls.enable", Boolean.valueOf(this.config.isEnableTls()).toString()); if (this.config.isEnableTls() && StringUtils.isNoneEmpty(this.config.getTlsVersion())) { javaMailProperties.put(MAIL_PROP + protocol + ".ssl.protocols", this.config.getTlsVersion...
repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\mail\TbSendEmailNode.java
1
请完成以下Java代码
public class Metrics { public static final String ACTIVTY_INSTANCE_START = "activity-instance-start"; public static final String ACTIVTY_INSTANCE_END = "activity-instance-end"; public static final String FLOW_NODE_INSTANCES = "flow-node-instances"; /** * Number of times job acquisition is performed */ ...
/** * Number of executed Root Process Instance executions. */ public static final String ROOT_PROCESS_INSTANCE_START = "root-process-instance-start"; public static final String PROCESS_INSTANCES = "process-instances"; /** * Number of executed decision elements in the DMN engine. */ public static fi...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\management\Metrics.java
1
请完成以下Java代码
public void removeAttribute(String attributeName) { this.sessionAttrs.remove(attributeName); } /** * Sets the time that this {@link Session} was created. The default is when the * {@link Session} was instantiated. * @param creationTime the time that this {@link Session} was created. */ public void setCrea...
@Override public int hashCode() { return this.id.hashCode(); } private static String generateId() { return UUID.randomUUID().toString(); } /** * Sets the {@link SessionIdGenerator} to use when generating a new session id. * @param sessionIdGenerator the {@link SessionIdGenerator} to use. * @since 3.2 ...
repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\MapSession.java
1
请完成以下Java代码
public StockQtyAndUOMQty computeQtysWithIssuesEffective( @Nullable final Percent qualityDiscountOverride, @NonNull final InvoicableQtyBasedOn invoicableQtyBasedOn) { if (qualityDiscountOverride == null) { return getQtysWithIssues(invoicableQtyBasedOn); } final Quantity qtyTotal = getQtysTotal(invoica...
qtyWithIssuesInStockUomEffective, productId, qtyWithIssuesEffective, qtyTotal.getUomId()); } public StockQtyAndUOMQty computeInvoicableQtyDelivered( @Nullable final Percent qualityDiscountOverride, @NonNull final InvoicableQtyBasedOn invoicableQtyBasedOn) { final StockQtyAndUOMQty qtysWithIssuesEffectiv...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\internalbusinesslogic\ReceiptData.java
1
请完成以下Java代码
public UIComponent getUIComponent(final @NonNull WFProcess wfProcess, final @NonNull WFActivity wfActivity, final @NonNull JsonOpts jsonOpts) { final ManufacturingJob job = ManufacturingMobileApplication.getManufacturingJob(wfProcess); return UIComponent.builderFrom(COMPONENT_TYPE, wfActivity) .properties(Par...
{ return productHazardSymbolService.getHazardSymbolsByProductId(productId) .stream() .map(hazardSymbol -> JsonHazardSymbol.of(hazardSymbol, adLanguage)) .collect(ImmutableList.toImmutableList()); } private ImmutableList<JsonAllergen> getJsonAllergens(final @NonNull ProductId productId, final String adL...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\workflows_api\activity_handlers\issue\RawMaterialsIssueActivityHandler.java
1
请完成以下Java代码
public void setQty (final BigDecimal Qty) { set_ValueNoCheck (COLUMNNAME_Qty, Qty); } @Override public BigDecimal getQty() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyInUOM (final @Nullable BigDecimal QtyInUOM) ...
* Reference name: M_MatchInv_Type */ public static final int TYPE_AD_Reference_ID=541716; /** Material = M */ public static final String TYPE_Material = "M"; /** Cost = C */ public static final String TYPE_Cost = "C"; @Override public void setType (final java.lang.String Type) { set_ValueNoCheck (COLUMNNAME...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_MatchInv.java
1
请完成以下Java代码
public ModificationRestService getModificationRestService(@PathParam("name") String engineName) { return super.getModificationRestService(engineName); } @Override @Path("/{name}" + BatchRestService.PATH) public BatchRestService getBatchRestService(@PathParam("name") String engineName) { return super.ge...
public EventSubscriptionRestService getEventSubscriptionRestService(@PathParam("name") String engineName) { return super.getEventSubscriptionRestService(engineName); } @Override @Path("/{name}" + TelemetryRestService.PATH) public TelemetryRestService getTelemetryRestService(@PathParam("name") String engine...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\NamedProcessEngineRestServiceImpl.java
1
请完成以下Java代码
public I_M_Material_Tracking getM_MaterialTracking() { return materialTracking; } private int getM_MaterialTracking_ID() { final int materialTrackingId = materialTracking == null ? -1 : materialTracking.getM_Material_Tracking_ID(); return materialTrackingId > 0 ? materialTrackingId : -1; } protected void ...
addSources(candidateToAdd.getSources()); } public void addSourceIfNotNull(final IHUPackingMaterialCollectorSource huPackingMaterialCollectorSource) { if (huPackingMaterialCollectorSource != null) { sources.add(huPackingMaterialCollectorSource); } } private void addSources(final Set<IHUPackingMaterialCol...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\spi\impl\HUPackingMaterialDocumentLineCandidate.java
1
请在Spring Boot框架中完成以下Java代码
public HistoricEntityLinkEntity create() { HistoricEntityLinkEntity entityLinkEntity = super.create(); entityLinkEntity.setCreateTime(getClock().getCurrentTime()); return entityLinkEntity; } @Override public List<HistoricEntityLink> findHistoricEntityLinksWithSameRootScopeForScopeId...
@Override public void bulkDeleteHistoricEntityLinksForScopeTypeAndScopeIds(String scopeType, Collection<String> scopeIds) { dataManager.bulkDeleteHistoricEntityLinksForScopeTypeAndScopeIds(scopeType, scopeIds); } @Override public void deleteHistoricEntityLinksForNonExistingProcessInstances() { ...
repos\flowable-engine-main\modules\flowable-entitylink-service\src\main\java\org\flowable\entitylink\service\impl\persistence\entity\HistoricEntityLinkEntityManagerImpl.java
2
请完成以下Java代码
protected String doIt() { final I_C_BankStatement bankStatement = getSelectedBankStatement(); final I_C_BankStatementLine bankStatementLine = getSingleSelectedBankStatementLine(); bankStatementLine.setC_BPartner_ID(bpartnerId.getRepoId()); if (paymentId != null) { bankStatementPaymentBL.linkSinglePaymen...
if (eligiblePaymentIds.isEmpty()) { bankStatementPaymentBL.createSinglePaymentAndLink(bankStatement, bankStatementLine); } else if (eligiblePaymentIds.size() == 1) { PaymentId eligiblePaymentId = eligiblePaymentIds.iterator().next(); bankStatementPaymentBL.linkSinglePayment(bankStatement, bankSt...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\banking\process\C_BankStatement_ReconcileWithSinglePayment.java
1
请完成以下Java代码
public int getAsyncJobLockTimeInMillis() { return asyncJobLockTimeInMillis; } public void setAsyncJobLockTimeInMillis(int asyncJobLockTimeInMillis) { this.asyncJobLockTimeInMillis = asyncJobLockTimeInMillis; } public int getRetryWaitTimeInMillis() { return retryWaitTimeInMillis...
this.resetExpiredJobsInterval = resetExpiredJobsInterval; } public int getResetExpiredJobsPageSize() { return resetExpiredJobsPageSize; } public void setResetExpiredJobsPageSize(int resetExpiredJobsPageSize) { this.resetExpiredJobsPageSize = resetExpiredJobsPageSize; } public ...
repos\Activiti-develop\activiti-core\activiti-spring-boot-starter\src\main\java\org\activiti\spring\boot\AsyncExecutorProperties.java
1
请在Spring Boot框架中完成以下Java代码
public class StartApplication { private static final Logger log = LoggerFactory.getLogger(StartApplication.class); public static void main(String[] args) { SpringApplication.run(StartApplication.class, args); } @Autowired BookRepository bookRepository; @Bean public CommandLineRun...
BigDecimal.valueOf(19.99), LocalDate.of(2023, 7, 31)); Book b3 = new Book("Book C", BigDecimal.valueOf(29.99), LocalDate.of(2023, 6, 10)); Book b4 = new Book("Book D", BigDecimal.valueOf(39.99), L...
repos\spring-boot-master\spring-data-jpa-paging-sorting\src\main\java\com\mkyong\StartApplication.java
2
请完成以下Java代码
private static boolean hasLoopInTree (final I_M_Product_Category productCategory) { final int productCategoryId = productCategory.getM_Product_Category_ID(); final int newParentCategoryId = productCategory.getM_Product_Category_Parent_ID(); // get values ResultSet rs = null; PreparedStatement pstmt = null; ...
return true; } ret = hasLoop(node.getParentId(), categories, loopIndicatorId); } } return ret; } //hasLoop /** * Simple class for tree nodes. * @author Karsten Thiemann, kthiemann@adempiere.org * */ private static class SimpleTreeNode { /** id of the node */ private final int nodeId; /*...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MProductCategory.java
1
请完成以下Java代码
public String getErrorMessage() { return errorMessage; } public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } public long getRetryTimeout() { return retryTimeout; } public void setRetryTimeout(long retryTimeout) { this.retryTimeout = retryTimeout; } ...
public Map<String, VariableValueDto> getVariables() { return variables; } public void setVariables(Map<String, VariableValueDto> variables) { this.variables = variables; } public Map<String, VariableValueDto> getLocalVariables() { return localVariables; } public void setLocalVariables(Map<Str...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\externaltask\ExternalTaskFailureDto.java
1
请完成以下Java代码
public void addBottomCategory(BottomCategory bottomCategory) { bottomCategories.add(bottomCategory); bottomCategory.setMiddleCategory(this); } public void removeBottomCategory(BottomCategory bottomCategory) { bottomCategory.setMiddleCategory(null); bottomCategories.remove(bottom...
this.bottomCategories = bottomCategories; } public TopCategory getTopCategory() { return topCategory; } public void setTopCategory(TopCategory topCategory) { this.topCategory = topCategory; } @Override public int hashCode() { return 2018; } @Override p...
repos\Hibernate-SpringBoot-master\HibernateSpringBootDtoSqlResultSetMapping\src\main\java\com\app\entity\MiddleCategory.java
1
请完成以下Java代码
public void setC_DunningRun_ID (int C_DunningRun_ID) { if (C_DunningRun_ID < 1) set_ValueNoCheck (COLUMNNAME_C_DunningRun_ID, null); else set_ValueNoCheck (COLUMNNAME_C_DunningRun_ID, Integer.valueOf(C_DunningRun_ID)); } /** Get Dunning Run. @return Dunning Run */ public int getC_DunningRun_ID () ...
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Quantity. @param Qty Quantity */ public void setQty (BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } /** Get Quantity. @return Quantity */ public BigDecimal getQty ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_DunningRunEntry.java
1
请完成以下Spring Boot application配置
# Custom properties to ease configuration overrides # on command-line or IDE launch configurations scheme: http hostname: localhost reverse-proxy-port: 7080 angular-port: 4201 angular-prefix: /angular-ui # Update scheme if you enable SSL in angular.json angular-uri: http://${hostname}:${angular-port}${angular-prefix} v...
x}/** - id: vue-ui uri: ${vue-uri} predicates: - Path=${vue-prefix}/** - id: react-ui uri: ${react-uri} predicates: - Path=${react-prefix}/** # not routing to authorization server here # Proxy BFF - id: bff uri: ${bff-uri} pre...
repos\tutorials-master\spring-security-modules\spring-security-oauth2-bff\backend\reverse-proxy\src\main\resources\application.yml
2
请完成以下Java代码
public class OrderConsumer { @Autowired ProductService productService; @Autowired OrderProducer orderProducer; @KafkaListener(topics = "orders", groupId = "inventory") public void consume(Order order) throws IOException { log.info("Order received to process: {}", order); if (O...
orderProducer.sendMessage(order.setOrderStatus(OrderStatus.INVENTORY_FAILURE) .setResponseMessage(e.getMessage())); }) .subscribe(); } else if (OrderStatus.REVERT_INVENTORY.equals(order.getOrderStatus())) { productService.revertOrder(order) ...
repos\tutorials-master\reactive-systems\inventory-service\src\main\java\com\baeldung\async\consumer\OrderConsumer.java
1
请完成以下Java代码
public abstract class AbstractApiKeyInfoEntity<T extends ApiKeyInfo> extends BaseSqlEntity<T> implements BaseEntity<T> { @Column(name = API_KEY_TENANT_ID_COLUMN_NAME) private UUID tenantId; @Column(name = API_KEY_USER_ID_COLUMN_NAME) private UUID userId; @Column(name = API_KEY_EXPIRATION_TIME_COL...
this.enabled = apiKeyInfo.isEnabled(); } protected ApiKeyInfo toApiKeyInfo() { ApiKeyInfo apiKeyInfo = new ApiKeyInfo(new ApiKeyId(getUuid())); apiKeyInfo.setCreatedTime(createdTime); apiKeyInfo.setTenantId(TenantId.fromUUID(tenantId)); apiKeyInfo.setUserId(new UserId(userId)); ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\sql\AbstractApiKeyInfoEntity.java
1
请完成以下Java代码
public UserNotificationsList getNotificationsAsList(@NonNull final QueryLimit limit) { final List<UserNotification> notifications = notificationsRepo.getByUserId(userId, limit); final boolean fullyLoaded = limit.isNoLimit() || notifications.size() <= limit.toInt(); final int totalCount; final int unreadCount;...
} public void markAsRead(final String notificationId) { notificationsRepo.markAsReadById(Integer.parseInt(notificationId)); fireEventOnWebsocket(JSONNotificationEvent.eventRead(notificationId, getUnreadCount())); } public void markAllAsRead() { logger.trace("Marking all notifications as read (if any) for {...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\notification\UserNotificationsQueue.java
1
请完成以下Java代码
default boolean isExploded() { return getRootDirectory() != null; } /** * Returns the root directory of this archive or {@code null} if the archive is not * backed by a directory. * @return the root directory */ default File getRootDirectory() { return null; } /** * Closes the {@code Archive}, rele...
static Archive create(File target) throws Exception { if (!target.exists()) { throw new IllegalStateException("Unable to determine code source archive from " + target); } return (target.isDirectory() ? new ExplodedArchive(target) : new JarFileArchive(target)); } /** * Represents a single entry in the arch...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\launch\Archive.java
1
请完成以下Java代码
public static int getCurrentHour() { Calendar cal = Calendar.getInstance(); cal.setTime(new Date()); return cal.get(Calendar.HOUR_OF_DAY); // 获取当前小时 } /*** * 查询当前分钟 * * @return */ public static int getCurrentMinute() { Calendar cal = Calendar.getInstance(); cal.setTime(new Date()); return cal.g...
Calendar cal = Calendar.getInstance(); cal.setTime(new Date()); cal.add(Calendar.DAY_OF_MONTH, -dayNum); String result = sdf.format(cal.getTime()); return result; } /** * 计算 day 天后的时间 * * @param date * @param day * @return */ public static Date addDay(Date date, int day) { Calendar calendar =...
repos\roncoo-pay-master\roncoo-pay-app-reconciliation\src\main\java\com\roncoo\pay\app\reconciliation\utils\DateUtil.java
1
请完成以下Java代码
protected Map<String, Object> resolveBeanMetadata(final Object bean) { final Map<String, Object> beanMetadata = new LinkedHashMap<>(); try { BeanInfo beanInfo = Introspector.getBeanInfo(bean.getClass()); PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptor...
return beanMetadata; } protected Map<String, ServiceBean> getServiceBeansMap() { return beansOfTypeIncludingAncestors(applicationContext, ServiceBean.class); } protected ReferenceAnnotationBeanPostProcessor getReferenceAnnotationBeanPostProcessor() { return applicationContext.getBean(...
repos\dubbo-spring-boot-project-master\dubbo-spring-boot-compatible\actuator\src\main\java\org\apache\dubbo\spring\boot\actuate\endpoint\metadata\AbstractDubboMetadata.java
1
请完成以下Java代码
public void setQtyCount (final @Nullable BigDecimal QtyCount) { set_Value (COLUMNNAME_QtyCount, QtyCount); } @Override public BigDecimal getQtyCount() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyCount); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyInternalUse ...
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyInternalUse); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setRenderedQRCode (final @Nullable java.lang.String RenderedQRCode) { set_Value (COLUMNNAME_RenderedQRCode, RenderedQRCode); } @Override public java.lang.String getRende...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_InventoryLine_HU.java
1
请完成以下Java代码
protected void closeCallUnauthenticated(final ServerCall<?, ?> call, final AuthenticationException aex) { log.debug(UNAUTHENTICATED_DESCRIPTION, aex); call.close(Status.UNAUTHENTICATED.withCause(aex).withDescription(UNAUTHENTICATED_DESCRIPTION), new Metadata()); } /** * Close the call with...
super(delegate); this.call = call; } @Override // Unary calls error out here public void onHalfClose() { try { super.onHalfClose(); } catch (final AuthenticationException aex) { closeCallUnauthenticated(this.call, aex);...
repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\security\interceptors\ExceptionTranslatingServerInterceptor.java
1
请完成以下Java代码
public List<HistoricProcessInstance> findHistoricProcessInstancesAndVariablesByQueryCriteria( HistoricProcessInstanceQueryImpl historicProcessInstanceQuery ) { if (getHistoryManager().isHistoryEnabled()) { return historicProcessInstanceDataManager.findHistoricProcessInstancesAndVariables...
} @Override public long findHistoricProcessInstanceCountByNativeQuery(Map<String, Object> parameterMap) { return historicProcessInstanceDataManager.findHistoricProcessInstanceCountByNativeQuery(parameterMap); } public HistoricProcessInstanceDataManager getHistoricProcessInstanceDataManager() {...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\HistoricProcessInstanceEntityManagerImpl.java
1
请完成以下Java代码
public Publisher getPublisher() { return publisher; } public void setPublisher(Publisher publisher) { this.publisher = publisher; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (getC...
return false; } return id != null && id.equals(((Book) obj).id); } @Override public int hashCode() { return 2021; } @Override public String toString() { return "Book{" + "id=" + id + ", title=" + title + ", isbn=" + isbn + '}'; } }
repos\Hibernate-SpringBoot-master\HibernateSpringBootNamedSubgraph\src\main\java\com\bookstore\entity\Book.java
1
请完成以下Java代码
public void setFirst(T1 first) { this.first = first; } @Override public Pair<T1, T2> clone() { return new Pair<T1, T2>(first, second); } @Override public boolean equals(Object o) { if (!(o instanceof Pair)) return false; Pair pair = (Pair...
@Override public int hashCode() { int firstHash = 0; int secondHash = 0; if (first != null) firstHash = first.hashCode(); if (second != null) secondHash = second.hashCode(); return firstHash + secondHash; } @Override public int compare...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dependency\perceptron\accessories\Pair.java
1
请在Spring Boot框架中完成以下Java代码
public class EntityLinkEntityManagerImpl extends AbstractServiceEngineEntityManager<EntityLinkServiceConfiguration, EntityLinkEntity, EntityLinkDataManager> implements EntityLinkEntityManager { public EntityLinkEntityManagerImpl(EntityLinkServiceConfiguration entityLinkServiceConfiguration, EntityLinkDataM...
} @Override public InternalEntityLinkQuery<EntityLinkEntity> createInternalEntityLinkQuery() { return new InternalEntityLinkQueryImpl<>(dataManager::findEntityLinksByQuery, dataManager::findEntityLinkByQuery); } @Override public void deleteEntityLinksByScopeIdAndScopeType(String scopeId, S...
repos\flowable-engine-main\modules\flowable-entitylink-service\src\main\java\org\flowable\entitylink\service\impl\persistence\entity\EntityLinkEntityManagerImpl.java
2
请完成以下Java代码
public void setApp(String app) { this.app = app; } public String getIp() { return ip; } public void setIp(String ip) { this.ip = ip; } public Integer getPort() { return port; } public void setPort(Integer port) { this.port = port;
} public String getApiName() { return apiName; } public void setApiName(String apiName) { this.apiName = apiName; } public List<ApiPredicateItemVo> getPredicateItems() { return predicateItems; } public void setPredicateItems(List<ApiPredicateItemVo> predicateItems...
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\domain\vo\gateway\api\AddApiReqVo.java
1
请完成以下Java代码
public I_C_BPartner getC_BPartner() { return qtyReportEvent.getC_BPartner(); } @Override public boolean isContractedProduct() { final String contractLine_uuid = qtyReportEvent.getContractLine_UUID(); return !Check.isEmpty(contractLine_uuid, true); } @Override public I_M_Product getM_Product() { retur...
return qtyReportEvent.getDatePromised(); } @Override public BigDecimal getQty() { return qtyReportEvent.getQtyPromised(); } @Override public void setM_PricingSystem_ID(final int M_PricingSystem_ID) { qtyReportEvent.setM_PricingSystem_ID(M_PricingSystem_ID); } @Override public void setM_PriceList_ID(fi...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\event\impl\PMMPricingAware_QtyReportEvent.java
1
请完成以下Java代码
ShipmentCosts getCreateShipmentCosts(final AcctSchema as) { final CostDetailCreateResultsList results; if (isReversalLine()) { results = services.createReversalCostDetails(CostDetailReverseRequest.builder() .acctSchemaId(as.getId()) .reversalDocumentRef(CostingDocumentRef.ofShipmentLineId(get_ID()))...
final BPartnerId costBPartnerId = CollectionUtils.singleElementOrNull(costBPartnerIds); if (costBPartnerId != null) { return costBPartnerId; } else { return getBPartnerId(); } } @Nullable public BPartnerLocationId getBPartnerLocationId(@NonNull final CostElementId costElementId) { final BPartne...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\DocLine_InOut.java
1
请完成以下Java代码
public final class NullQueueProcessorsExecutor implements IQueueProcessorsExecutor { public static final NullQueueProcessorsExecutor instance = new NullQueueProcessorsExecutor(); private NullQueueProcessorsExecutor() { super(); } @Override public void removeQueueProcessor(final int queueProcessorId) { } @...
{ // nothing } @Override public void shutdown() { // nothing } @Override public IQueueProcessor getQueueProcessor(final QueueProcessorId queueProcessorId) { // nothing return null; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\processor\impl\NullQueueProcessorsExecutor.java
1
请在Spring Boot框架中完成以下Java代码
public Builder setOutputType(final OutputType outputType) { this.outputType = outputType; return this; } public Builder setType(@NonNull final ProcessType type) { this.type = type; return this; } public Builder setJSONPath(final String JSONPath) { this.JSONPath = JSONPath; return this;...
return this; } private ImmutableList<ProcessInfoParameter> getProcessInfoParameters() { return Services.get(IADPInstanceDAO.class).retrieveProcessInfoParameters(pinstanceId) .stream() .map(this::transformProcessInfoParameter) .collect(ImmutableList.toImmutableList()); } private ProcessInfo...
repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\server\ReportContext.java
2
请完成以下Java代码
private XWPFDocument replaceText(XWPFDocument doc, String originalText, String updatedText) { replaceTextInParagraphs(doc.getParagraphs(), originalText, updatedText); for (XWPFTable tbl : doc.getTables()) { for (XWPFTableRow row : tbl.getRows()) { for (XWPFTableCell cell : ro...
List<XWPFRun> runs = paragraph.getRuns(); for (XWPFRun run : runs) { String text = run.getText(0); if (text != null && text.contains(originalText)) { String updatedRunText = text.replace(originalText, updatedText); run.setText(updatedRunText, 0); ...
repos\tutorials-master\apache-poi-2\src\main\java\com\baeldung\poi\replacevariables\DocxNaiveTextReplacer.java
1
请完成以下Java代码
public class WindowHeaderNotice extends JPanel { /** * */ private static final long serialVersionUID = -914277060790906131L; private final JLabel label = new JLabel(); public WindowHeaderNotice() { super(); // // Init components & layout { this.setBackground(AdempierePLAF.getColor("WindowHeaderN...
// FRESH-352: check if we shall override the default background color which we set in the constructor final String windowHeaderNoticeBGColorStr = Env.getContext(ctx, Env.CTXNAME_UI_WindowHeader_Notice_BG_COLOR); if (!Check.isEmpty(windowHeaderNoticeBGColorStr, true)) { final Color backgroundColor = Colors.toCo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\swing\WindowHeaderNotice.java
1
请完成以下Java代码
public class LicenseKeyDataDto { public static final String SERIALIZED_VALID_UNTIL = "valid-until"; public static final String SERIALIZED_IS_UNLIMITED = "unlimited"; protected String customer; protected String type; @JsonProperty(value = SERIALIZED_VALID_UNTIL) protected String validUntil; @JsonProperty...
return features; } public void setFeatures(Map<String, String> features) { this.features = features; } public String getRaw() { return raw; } public void setRaw(String raw) { this.raw = raw; } public static LicenseKeyDataDto fromEngineDto(LicenseKeyData other) { return new LicenseKey...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\telemetry\LicenseKeyDataDto.java
1
请完成以下Java代码
public TimerJobQuery jobWithoutTenantId() { this.withoutTenantId = true; return this; } // sorting ////////////////////////////////////////// @Override public TimerJobQuery orderByJobDuedate() { return orderBy(JobQueryProperty.DUEDATE); } @Override public TimerJobQ...
public String getProcessInstanceId() { return processInstanceId; } public String getExecutionId() { return executionId; } public boolean getExecutable() { return executable; } public Date getNow() { return Context.getProcessEngineConfiguration().getClock().getC...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\TimerJobQueryImpl.java
1
请完成以下Java代码
public <T> T newInstance(final Class<T> modelClass, final Object contextProvider) { return InterfaceWrapperHelper.newInstance(modelClass, contextProvider); } @Override public void initHUStorages(final I_M_HU hu) { // nothing } @Override public void initHUItemStorages(final I_M_HU_Item item) { // nothin...
.createQueryBuilder(I_M_HU_Item_Storage.class, huItem) .filter(new EqualsQueryFilter<I_M_HU_Item_Storage>(I_M_HU_Item_Storage.COLUMNNAME_M_HU_Item_ID, huItem.getM_HU_Item_ID())); queryBuilder.orderBy() .addColumn(I_M_HU_Item_Storage.COLUMNNAME_M_HU_Item_Storage_ID); // predictive order final List<I_M_HU_I...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\storage\impl\HUStorageDAO.java
1
请完成以下Java代码
public CaseInstance start() { return cmmnRuntimeService.startCaseInstance(this); } @Override public CaseInstance startAsync() { return cmmnRuntimeService.startCaseInstanceAsync(this); } @Override public CaseInstance startWithForm() { this.startWithForm = true; ...
@Override public Map<String, Object> getStartFormVariables() { return startFormVariables; } @Override public String getCallbackId() { return this.callbackId; } @Override public String getCallbackType() { return this.callbackType; } @Override public Stri...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\CaseInstanceBuilderImpl.java
1
请完成以下Java代码
private ArrayKey mkGroupingKey(@NonNull final OLCand candidate) { if (aggregationInfo.getGroupByColumns().isEmpty()) { // each candidate results in its own order line return Util.mkKey(candidate.getId()); } final ArrayKeyBuilder groupingValues = ArrayKey.builder() .appendAll(groupingValuesProviders....
return TimeUtil.trunc(date, TimeUtil.TRUNC_DAY); } else if (granularity == Granularity.Week) { return TimeUtil.trunc(date, TimeUtil.TRUNC_WEEK); } else if (granularity == Granularity.Month) { return TimeUtil.trunc(date, TimeUtil.TRUNC_MONTH); } else { throw new AdempiereException("Unknown gra...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\api\OLCandsProcessorExecutor.java
1
请完成以下Java代码
public void delete(JobEntity entity, boolean fireDeleteEvent) { if (entity.getExecutionId() != null && isExecutionRelatedEntityCountEnabledGlobally()) { CountingExecutionEntity executionEntity = (CountingExecutionEntity) getExecutionEntityManager().findById( entity.getExecutionId() ...
/** * Deletes a the byte array used to store the exception information. Subclasses may override * to provide custom implementations. */ protected void deleteExceptionByteArrayRef(JobEntity jobEntity) { ByteArrayRef exceptionByteArrayRef = jobEntity.getExceptionByteArrayRef(); if (exc...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\JobEntityManagerImpl.java
1
请在Spring Boot框架中完成以下Java代码
public final class Aggregation { private final AggregationId id; private final String tableName; private final ImmutableList<AggregationItem> items; @Builder public Aggregation( @Nullable final AggregationId id, @NonNull final String tableName, @NonNull @Singular final Collection<AggregationItem> items) ...
{ continue; } return true; } return false; } public boolean hasInvoicePerShipmentAttribute() { return getItems().stream() .filter(item -> item.getType() == Type.Attribute && item.getAttribute() != null) .anyMatch(item -> ("@" + I_M_InOut.COLUMNNAME_M_InOut_ID + "@").equals(item.getAttribut...
repos\metasfresh-new_dawn_uat\backend\de.metas.aggregation\src\main\java\de\metas\aggregation\api\Aggregation.java
2
请完成以下Java代码
private Object getValue(final JTable table, final int rowIndexView) { final int columnIndexView_Value = table.convertColumnIndexToView(UIDefaultsTableModel.COLUMNINDEX_Value); final Object value = table.getValueAt(rowIndexView, columnIndexView_Value); return value; } private final void setValue(final JT...
* * @author tsa * */ static class FullTextSearchRowFilter extends RowFilter<TableModel, Integer> { public static FullTextSearchRowFilter ofText(final String text) { if (Check.isEmpty(text, true)) { return null; } else { return new FullTextSearchRowFilter(text); } } private fin...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\plaf\UIDefaultsEditorDialog.java
1
请在Spring Boot框架中完成以下Java代码
public class AppConfig { @Bean public DataSource dataSource() { return new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.H2) .build(); } @Bean public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) { LocalContainerEntityManagerF...
@Bean public JpaTransactionManager transactionManager(LocalContainerEntityManagerFactoryBean entityManagerFactory) { return new JpaTransactionManager(entityManagerFactory.getObject()); } private Properties getHibernateProperties() { Properties properties = new Properties(); properti...
repos\tutorials-master\persistence-modules\spring-data-jpa-repo-3\src\main\java\com\baeldung\spring\data\jpa\joinquery\AppConfig.java
2
请完成以下Java代码
public class ReflectionsApp { public Set<Class<? extends Scanner>> getReflectionsSubTypes() { Reflections reflections = new Reflections("org.reflections"); Set<Class<? extends Scanner>> scannersSet = reflections.getSubTypesOf(Scanner.class); return scannersSet; } public Set<Class<?...
public Set<Method> getMethodsWithVoidReturn() { Reflections reflections = new Reflections(java.text.SimpleDateFormat.class, new MethodParameterScanner()); Set<Method> methodsSet = reflections.getMethodsReturn(void.class); return methodsSet; } public Set<String> getPomXmlPaths() { ...
repos\tutorials-master\libraries-jdk8\src\main\java\reflections\ReflectionsApp.java
1
请在Spring Boot框架中完成以下Java代码
public class AsyncComponent { @Async public void asyncMethodWithVoidReturnType() { System.out.println("Execute method asynchronously. " + Thread.currentThread().getName()); } @Async public CompletableFuture<String> asyncMethodWithReturnType() { System.out.println("Execut...
return CompletableFuture.failedFuture(e); } } @Async("threadPoolTaskExecutor") public void asyncMethodWithConfiguredExecutor() { System.out.println("Execute method with configured executor - " + Thread.currentThread().getName()); } @Async public void asyncMethodWith...
repos\tutorials-master\spring-scheduling\src\main\java\com\baeldung\async\AsyncComponent.java
2
请完成以下Java代码
public static Object[] getUIDefaults() { return new Object[] { // // Label (and also editor's labels) border // NOTE: we add a small space on top in order to have the label text aligned on same same base line as the text from the right text field. AdempiereLabelUI.KEY_Border, new BorderUIResource(Bor...
// VButton editor , "VButton.Action.textColor", AdempierePLAF.createActiveValueProxy("black", Color.BLACK) , "VButton.Posted.textColor", new ColorUIResource(Color.MAGENTA) }; } public static final int getVEditorHeight() { return AdempierePLAF.getInt(KEY_VEditor_Height, DEFAULT_VEditor_Height); } pu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\plaf\VEditorUI.java
1
请完成以下Java代码
public Optional<InvoiceRow> getInvoiceRowByInvoiceId( @NonNull final InvoiceId invoiceId, @NonNull final ZonedDateTime evaluationDate) { final List<InvoiceRow> invoiceRows = getInvoiceRowsListByInvoiceId(ImmutableList.of(invoiceId), evaluationDate); if (invoiceRows.isEmpty()) { return Optional.empty(); ...
} public Optional<PaymentRow> getPaymentRowByPaymentId( @NonNull final PaymentId paymentId, @NonNull final ZonedDateTime evaluationDate) { final List<PaymentRow> paymentRows = getPaymentRowsListByPaymentId(ImmutableList.of(paymentId), evaluationDate); if (paymentRows.isEmpty()) { return Optional.empty...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\payment_allocation\PaymentAndInvoiceRowsRepo.java
1
请完成以下Java代码
private static boolean isExcludedSimpleValueType(Class<?> type) { // Same as BeanUtils.isSimpleValueType except for CharSequence and Number return (Void.class != type && void.class != type && (ClassUtils.isPrimitiveOrWrapper(type) || Date.class.isAssignableFrom(type) || Temporal.class.isAssignableFr...
"Please, refer to the documentation for the full list of supported parameters.")); } if (!parameter.getParameterType().isInstance(source)) { throw new IllegalStateException(formatArgumentError(parameter, "does not match the source Object type '" + source.getClass() + "'.")); } return source; } privat...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\data\method\annotation\support\SourceMethodArgumentResolver.java
1
请完成以下Java代码
public void deleteByteArrayById(String byteArrayEntityId) { getDbEntityManager().delete(ByteArrayEntity.class, "deleteByteArrayNoRevisionCheck", byteArrayEntityId); } public void insertByteArray(ByteArrayEntity arr) { arr.setCreateTime(ClockUtil.getCurrentTime()); getDbEntityManager().insert(arr); } ...
operations.add(getDbEntityManager() .updatePreserveOrder(ByteArrayEntity.class, "updateVariableByteArraysByProcessInstanceId", parameters)); operations.add(getDbEntityManager() .updatePreserveOrder(ByteArrayEntity.class, "updateDecisionInputsByteArraysByProcessInstanceId", parameters)); operations.a...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\ByteArrayManager.java
1
请完成以下Java代码
public String[] tag(List<String> wordList) { String[] termArray = new String[wordList.size()]; wordList.toArray(termArray); return tag(termArray); } /** * 在线学习 * * @param segmentedTaggedSentence 人民日报2014格式的句子 * @return 是否学习成功(失败的原因是参数错误) */ public boolea...
for (int i = 0; i < wordTags.length; i++) { String[] wordTag = wordTags[i].split("//"); words[i] = wordTag[0]; tags[i] = wordTag[1]; } return learn(new POSInstance(words, tags, model.featureMap)); } @Override protected Instance createInstance(Sent...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\perceptron\PerceptronPOSTagger.java
1
请完成以下Java代码
public I_PA_Measure getPA_Measure() throws RuntimeException { return (I_PA_Measure)MTable.get(getCtx(), I_PA_Measure.Table_Name) .getPO(getPA_Measure_ID(), get_TrxName()); } /** Set Measure. @param PA_Measure_ID Concrete Performance Measurement */ public void setPA_Measure_ID (int PA_Measure_ID) { ...
@return Relative weight of this step (0 = ignored) */ public BigDecimal getRelativeWeight () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_RelativeWeight); if (bd == null) return Env.ZERO; return bd; } /** Set Sequence. @param SeqNo Method of ordering records; lowest number comes first *...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_Goal.java
1
请完成以下Java代码
public class DeleteHistoricCaseInstancesBulkCmd implements Command<Void>, Serializable { private static final long serialVersionUID = 1L; protected final List<String> caseInstanceIds; public DeleteHistoricCaseInstancesBulkCmd(List<String> caseInstanceIds) { this.caseInstanceIds = caseInstanceIds; } @O...
@Override public Void call() throws Exception { ensureEquals(BadUserRequestException.class, "ClosedCaseInstanceIds", new HistoricCaseInstanceQueryImpl().closed().caseInstanceIds(new HashSet<String>(caseInstanceIds)).count(), caseInstanceIds.size()); return null; } }); co...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\DeleteHistoricCaseInstancesBulkCmd.java
1
请完成以下Java代码
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(ScriptTask.class, BPMN_ELEMENT_SCRIPT_TASK) .namespaceUri(BPMN20_NS) .extendsType(Task.class) .instanceProvider(new ModelTypeInstanceProvider<ScriptTask>() { public Sc...
public void setScript(Script script) { scriptChild.setChild(this, script); } /** camunda extensions */ public String getCamundaResultVariable() { return camundaResultVariableAttribute.getValue(this); } public void setCamundaResultVariable(String camundaResultVariable) { camundaResultVariableAtt...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\ScriptTaskImpl.java
1
请完成以下Java代码
public List<PlainContact> getPlainContacts() { List<PlainContact> contacts = new ArrayList<>(); PlainContact contact1 = new PlainContact("John Doe", "123 Sesame Street", "123-456-789", LocalDate.now(), LocalDateTime.now()); PlainContact contact2 = new PlainContact("John Doe 2", "124 Sesame Stre...
public List<PlainContactWithJavaUtilDate> getPlainContactsWithJavaUtilDate() { List<PlainContactWithJavaUtilDate> contacts = new ArrayList<>(); PlainContactWithJavaUtilDate contact1 = new PlainContactWithJavaUtilDate("John Doe", "123 Sesame Street", "123-456-789", new Date(), new Date()); Plain...
repos\tutorials-master\spring-boot-modules\spring-boot-data\src\main\java\com\baeldung\jsondateformat\ContactController.java
1
请完成以下Java代码
public String getGlueType() { return glueType; } public void setGlueType(String glueType) { this.glueType = glueType; } public String getGlueSource() { return glueSource; } public void setGlueSource(String glueSource) { this.glueSource = glueSource; } public String getGlueRemark() { return glueRem...
public Date getAddTime() { return addTime; } public void setAddTime(Date addTime) { this.addTime = addTime; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } }
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\model\XxlJobLogGlue.java
1
请完成以下Java代码
public String getCdtrNames() { final TransactionParty2 party = entryDtls.getRltdPties(); if (party != null && party.getDbtr() != null) { final PartyIdentification32 cdtr = party.getCdtr(); return cdtr.getNm(); } return null; } @Override protected @Nullable String getUnstructuredRemittanceInfo(fin...
@Override protected @NonNull String getLineDescription(final @NonNull String delimiter) { return entryDtls.getAddtlTxInf(); } @Nullable @Override public String getCcy() { return entryDtls.getAmtDtls().getInstdAmt().getAmt().getCcy(); } /** * @return true if this is a "credit" line (i.e. we get money) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java\de\metas\banking\camt53\wrapper\v02\TransactionDtls2Wrapper.java
1
请完成以下Java代码
public Date getCreateTime() { return createTime; } public UserDetailVO setCreateTime(Date createTime) { this.createTime = createTime; return this; } public Integer getDeleted() { return deleted; } public UserDetailVO setDeleted(Integer deleted) { this.d...
} @Override public String toString() { return "UserDetailVO{" + "id=" + id + ", username='" + username + '\'' + ", password='" + password + '\'' + ", gender=" + gender + ", createTime=" + createTime + ", del...
repos\SpringBoot-Labs-master\lab-12-mybatis\lab-12-mybatis-plus-tenant\src\main\java\cn\iocoder\springboot\lab12\mybatis\vo\UserDetailVO.java
1
请完成以下Java代码
private Individual crossover(Individual indiv1, Individual indiv2) { Individual newSol = new Individual(); for (int i = 0; i < newSol.getDefaultGeneLength(); i++) { if (Math.random() <= uniformRate) { newSol.setSingleGene(i, indiv1.getSingleGene(i)); } else { ...
protected static int getFitness(Individual individual) { int fitness = 0; for (int i = 0; i < individual.getDefaultGeneLength() && i < solution.length; i++) { if (individual.getSingleGene(i) == solution[i]) { fitness++; } } return fitness; } ...
repos\tutorials-master\algorithms-modules\algorithms-genetic\src\main\java\com\baeldung\algorithms\ga\binary\SimpleGeneticAlgorithm.java
1