instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public class WorkStation { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id") private Long id; @Column(name = "workstation_number") private Integer workstationNumber; @Column(name = "floor") private String floor; @OneToOne(mappedBy = "workStation") priva...
public Integer getWorkstationNumber() { return workstationNumber; } public void setWorkstationNumber(Integer workstationNumber) { this.workstationNumber = workstationNumber; } public String getFloor() { return floor; } public void setFloor(String floor) { this....
repos\tutorials-master\persistence-modules\hibernate-jpa\src\main\java\com\baeldung\hibernate\onetoone\jointablebased\WorkStation.java
2
请完成以下Java代码
public Builder region(String region) { this.region = region; return this; } /** * Sets the zip code or postal code. * @param postalCode the zip code or postal code * @return the {@link Builder} */ public Builder postalCode(String postalCode) { this.postalCode = postalCode; return this; ...
/** * Builds a new {@link DefaultAddressStandardClaim}. * @return a {@link AddressStandardClaim} */ public AddressStandardClaim build() { DefaultAddressStandardClaim address = new DefaultAddressStandardClaim(); address.formatted = this.formatted; address.streetAddress = this.streetAddress; addres...
repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\oidc\DefaultAddressStandardClaim.java
1
请完成以下Java代码
public class CredentialPropertiesOutput implements AuthenticationExtensionsClientOutput<CredentialPropertiesOutput.ExtensionOutput> { @Serial private static final long serialVersionUID = -3201699313968303331L; /** * The extension id. */ public static final String EXTENSION_ID = "credProps"; private final ...
/** * The output for {@link CredentialPropertiesOutput} * * @author Rob Winch * @since 6.4 * @see #getOutput() */ public static final class ExtensionOutput implements Serializable { @Serial private static final long serialVersionUID = 4557406414847424019L; private final boolean rk; private Exten...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\api\CredentialPropertiesOutput.java
1
请完成以下Java代码
public class BalanceType5Choice { @XmlElement(name = "Cd") @XmlSchemaType(name = "string") protected BalanceType12Code cd; @XmlElement(name = "Prtry") protected String prtry; /** * Gets the value of the cd property. * * @return * possible object is * {@link Ba...
/** * Gets the value of the prtry property. * * @return * possible object is * {@link String } * */ public String getPrtry() { return prtry; } /** * Sets the value of the prtry property. * * @param value * allowed object is ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\BalanceType5Choice.java
1
请在Spring Boot框架中完成以下Java代码
void addDefaultEmptyGroupIfPossible() { if (product.isAny()) { return; } final AttributesKey defaultAttributesKey = this.storageAttributesKeyMatcher.toAttributeKeys().orElse(null); if (defaultAttributesKey == null) { return; } final AvailableToPromiseResultGroupBuilder group = AvailableToPromis...
} @VisibleForTesting boolean isZeroQty() { if (groups.isEmpty()) { return true; } for (AvailableToPromiseResultGroupBuilder group : groups) { if (!group.isZeroQty()) { return false; } } return true; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\repository\atp\AvailableToPromiseResultBucket.java
2
请完成以下Java代码
public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getPassWord() { return passWord; } public void setPassWord(String passWord) { this.passWord = passWord; } public int g...
public Date getRegTime() { return regTime; } public void setRegTime(Date regTime) { this.regTime = regTime; } @Override public String toString() { return "User{" + "id=" + id + ", userName='" + userName + '\'' + ", passWord='"...
repos\spring-boot-leaning-master\2.x_42_courses\第 3-8 课:Spring Data Jpa 和 Thymeleaf 综合实践\spring-boot-Jpa-thymeleaf\src\main\java\com\neo\model\User.java
1
请完成以下Java代码
public class Ant { protected int trailSize; protected int trail[]; protected boolean visited[]; public Ant(int tourSize) { this.trailSize = tourSize; this.trail = new int[tourSize]; this.visited = new boolean[tourSize]; } protected void visitCity(int currentIndex, int city) { trail[currentIndex + 1] = ...
protected boolean visited(int i) { return visited[i]; } protected double trailLength(double graph[][]) { double length = graph[trail[trailSize - 1]][trail[0]]; for (int i = 0; i < trailSize - 1; i++) { length += graph[trail[i]][trail[i + 1]]; } return length; } protected void clear() { for (int i =...
repos\tutorials-master\algorithms-modules\algorithms-genetic\src\main\java\com\baeldung\algorithms\ga\ant_colony\Ant.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable Sentinel getSentinel() { DataRedisProperties.Sentinel sentinel = this.properties.getSentinel(); return (sentinel != null) ? new PropertiesSentinel(getStandalone().getDatabase(), sentinel) : null; } @Override public @Nullable Cluster getCluster() { DataRedisProperties.Cluster cluster = this.pr...
private class PropertiesSentinel implements Sentinel { private final int database; private final DataRedisProperties.Sentinel properties; PropertiesSentinel(int database, DataRedisProperties.Sentinel properties) { this.database = database; this.properties = properties; } @Override public int getDa...
repos\spring-boot-4.0.1\module\spring-boot-data-redis\src\main\java\org\springframework\boot\data\redis\autoconfigure\PropertiesDataRedisConnectionDetails.java
2
请在Spring Boot框架中完成以下Java代码
private void processJsonAttachmentRequest(@NonNull final Exchange exchange) { final ExportPPOrderRouteContext context = ProcessorHelper.getPropertyOrThrowError(exchange, ROUTE_PROPERTY_EXPORT_PP_ORDER_CONTEXT, ExportPPOrderRouteContext.class); final JsonExternalSystemRequest request = context.getJsonExternalSyste...
final JsonTableRecordReference jsonTableRecordReference = JsonTableRecordReference.builder() .tableName(LeichMehlConstants.AD_PINSTANCE_TABLE_NAME) .recordId(adPInstanceId) .build(); final JsonAttachmentRequest jsonAttachmentRequest = JsonAttachmentRequest.builder() .attachment(attachment) .orgCo...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-leichundmehl\src\main\java\de\metas\camel\externalsystems\leichundmehl\to_leichundmehl\pporder\LeichUndMehlExportPPOrderRouteBuilder.java
2
请在Spring Boot框架中完成以下Java代码
public class OrderCreateRequestPackageItem { @JsonProperty("id") OrderCreateRequestPackageItemId id; @JsonProperty("pzn") PZN pzn; @JsonProperty("qty") Quantity qty; @JsonProperty("deliverySpecifications") DeliverySpecifications deliverySpecifications; @JsonProperty("purchaseCandidateId") @JsonInclude(Jso...
@Builder @JsonCreator private OrderCreateRequestPackageItem( @JsonProperty("id") final OrderCreateRequestPackageItemId id, @JsonProperty("pzn") @NonNull final PZN pzn, @JsonProperty("qty") @NonNull final Quantity qty, @JsonProperty("deliverySpecifications") @NonNull final DeliverySpecifications deliverySp...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.commons\src\main\java\de\metas\vertical\pharma\msv3\protocol\order\OrderCreateRequestPackageItem.java
2
请完成以下Java代码
public class ResourceStreamSource implements StreamSource { String resource; ClassLoader classLoader; public ResourceStreamSource(String resource) { this.resource = resource; } public ResourceStreamSource(String resource, ClassLoader classLoader) { this.resource = resource; ...
if (classLoader == null) { inputStream = ReflectUtil.getResourceAsStream(resource); } else { inputStream = classLoader.getResourceAsStream(resource); } if (inputStream == null) { throw new ActivitiIllegalArgumentException("resource '" + resource + "' doesn't e...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\util\io\ResourceStreamSource.java
1
请完成以下Java代码
public class Book { Long id; String name; Long authorId; public Book() { } public Book(Long id, String name, Long authorId) { this.id = id; this.name = name; this.authorId = authorId; } public Long getId() {
return this.id; } public void setId(Long id) { this.id = id; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } }
repos\spring-graphql-main\spring-graphql-docs\src\main\java\org\springframework\graphql\docs\graalvm\server\Book.java
1
请完成以下Java代码
public List<HistoricIdentityLinkEntity> findHistoricIdentityLinks() { return getDbSqlSession().selectList("selectHistoricIdentityLinks"); } @SuppressWarnings("unchecked") public List<HistoricIdentityLinkEntity> findHistoricIdentityLinkByTaskUserGroupAndType(String taskId, String userId, String grou...
for (HistoricIdentityLinkEntity identityLink : identityLinks) { deleteHistoricIdentityLink(identityLink); } // Identity links from cache List<HistoricIdentityLinkEntity> identityLinksFromCache = Context.getCommandContext().getDbSqlSession().findInCache(HistoricIdentityLinkEntity.cla...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\HistoricIdentityLinkEntityManager.java
1
请完成以下Java代码
public Integer getDisabled() { return disabled; } /** * Set the disabled. * * @param disabled the disabled */ public void setDisabled(Integer disabled) { this.disabled = disabled; } /** * Get the theme. * * @return the theme */ public Str...
public void setTheme(String theme) { this.theme = theme; } /** * Get the checks if is ldap. * * @return the checks if is ldap */ public Integer getIsLdap() { return isLdap; } /** * Set the checks if is ldap. * * @param isLdap the checks if is ...
repos\springBoot-master\springboot-mybatis\src\main\java\com\us\example\bean\User.java
1
请完成以下Java代码
public OAuth2Authorization getAuthorization() { return get(OAuth2Authorization.class); } /** * Returns the {@link OAuth2AuthorizationConsent authorization consent}. * @return the {@link OAuth2AuthorizationConsent}, or {@code null} if not available */ @Nullable public OAuth2AuthorizationConsent getAuthoriza...
} /** * Sets the {@link OAuth2Authorization authorization}. * @param authorization the {@link OAuth2Authorization} * @return the {@link Builder} for further configuration */ public Builder authorization(OAuth2Authorization authorization) { return put(OAuth2Authorization.class, authorization); } ...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\OAuth2DeviceVerificationAuthenticationContext.java
1
请完成以下Java代码
private boolean productMatches(final ProductId productId) { if (this.productId == null) { return true; } return Objects.equals(this.productId, productId); } private boolean productCategoryMatches(final ProductCategoryId productCategoryId) { if (this.productCategoryId == null) { return true; } ...
{ return false; } return Objects.equals(this.productManufacturerId, productManufacturerId); } public boolean attributeMatches(@NonNull final ImmutableAttributeSet attributes) { final AttributeValueId breakAttributeValueId = this.attributeValueId; if (breakAttributeValueId == null) { return true; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\conditions\PricingConditionsBreakMatchCriteria.java
1
请完成以下Java代码
public String getCategoryType () { return (String)get_Value(COLUMNNAME_CategoryType); } /** Set Description. @param Description Optional short description of the record */ public void setDescription (String Description) { set_Value (COLUMNNAME_Description, Description); } /** Get Description. @r...
} /** Get Default. @return Default value */ public boolean isDefault () { Object oo = get_Value(COLUMNNAME_IsDefault); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Name. @param Name Alphanume...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_GL_Category.java
1
请完成以下Java代码
public void setTp(BalanceType12 value) { this.tp = value; } /** * Gets the value of the cdtLine property. * * @return * possible object is * {@link CreditLine2 } * */ public CreditLine2 getCdtLine() { return cdtLine; } /** * Set...
* Sets the value of the dt property. * * @param value * allowed object is * {@link DateAndDateTimeChoice } * */ public void setDt(DateAndDateTimeChoice value) { this.dt = value; } /** * Gets the value of the avlbty property. * * <p> *...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\CashBalance3.java
1
请完成以下Java代码
public List<String> getSQLModify(final boolean setNullOption) { final String sqlDefaultValue = getSQLDefaultValue(); final StringBuilder sqlBase_ModifyColumn = new StringBuilder("ALTER TABLE ") .append(tableName) .append(" MODIFY ").append(columnName); final List<String> sqlStatements = new ArrayList<>...
* Get SQL Data Type * * @return e.g. NVARCHAR2(60) */ private String getSQLDataType() { final String columnName = getColumnName(); final ReferenceId displayType = getReferenceId(); final int fieldLength = getFieldLength(); return DB.getSQLDataType(displayType.getRepoId(), columnName, fieldLength); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\table\ddl\ColumnDDL.java
1
请完成以下Java代码
void doPutIfAbsent(K key, V value) { cache.putIfAbsent(key, value); } void doEvict(K key) { cache.evict(key); } TbCacheTransaction<K, V> newTransaction(List<K> keys) { lock.lock(); try { var transaction = new CaffeineTbCacheTransaction<>(this, keys); ...
private void removeTransaction(UUID id) { CaffeineTbCacheTransaction<K, V> transaction = transactions.remove(id); if (transaction != null) { for (var key : transaction.getKeys()) { Set<UUID> transactions = objectTransactions.get(key); if (transactions != null)...
repos\thingsboard-master\common\cache\src\main\java\org\thingsboard\server\cache\CaffeineTbTransactionalCache.java
1
请完成以下Java代码
public void flush() { releaseBatches(); } private void releaseBatches() { this.lock.lock(); try { for (MessageBatch batch : this.batchingStrategy.releaseBatches()) { super.send(batch.exchange(), batch.routingKey(), batch.message(), null); } } finally { this.lock.unlock(); } }
@Override public void doStart() { } @Override public void doStop() { flush(); } @Override public boolean isRunning() { return true; } }
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\core\BatchingRabbitTemplate.java
1
请完成以下Java代码
public boolean isStatus_Print_Job_Instructions() { return get_ValueAsBoolean(COLUMNNAME_Status_Print_Job_Instructions); } @Override public void setTrayNumber (int TrayNumber) { set_ValueNoCheck (COLUMNNAME_TrayNumber, Integer.valueOf(TrayNumber)); } @Override public int getTrayNumber() { return get_V...
@Override public int getUpdatedby_Print_Job_Instructions() { return get_ValueAsInt(COLUMNNAME_Updatedby_Print_Job_Instructions); } @Override public void setUpdated_Print_Job_Instructions (java.sql.Timestamp Updated_Print_Job_Instructions) { set_ValueNoCheck (COLUMNNAME_Updated_Print_Job_Instructions, Update...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_C_Printing_Queue_PrintInfo_v.java
1
请完成以下Java代码
private static final class ProcessParametersCallout { private static void forwardValueToCurrentProcessInstance(final ICalloutField calloutField) { final JavaProcess processInstance = JavaProcess.currentInstance(); final String parameterName = calloutField.getColumnName(); final IRangeAwareParams source =...
TimeUtil.asDate(dateRange.getTo())); } else { return ProcessParams.ofValueObject(parameterName, fieldValue); } } } private static final class ProcessParametersDataBindingDescriptorBuilder implements DocumentEntityDataBindingDescriptorBuilder { public static final ProcessParametersDataBindingDesc...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\adprocess\ADProcessDescriptorsFactory.java
1
请完成以下Java代码
public boolean supports(Class<?> type) { return this.validatedType.equals(type) && this.delegate.supports(type); } @Override public void validate(Object target, Errors errors) { this.delegate.validate(target, errors); } static boolean isJsr303Present(ApplicationContext applicationContext) { ClassLoader cla...
} return true; } private static class Delegate extends LocalValidatorFactoryBean { Delegate(ApplicationContext applicationContext) { setApplicationContext(applicationContext); setMessageInterpolator(new MessageInterpolatorFactory(applicationContext).getObject()); afterPropertiesSet(); } } }
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\properties\ConfigurationPropertiesJsr303Validator.java
1
请完成以下Java代码
public Collection<String> getUrlMappings() { return this.urlMappings; } /** * Add URL mappings, as defined in the Servlet specification, for the servlet. * @param urlMappings the mappings to add * @see #setUrlMappings(Collection) */ public void addUrlMappings(String... urlMappings) { Assert.notNull(urlM...
* Configure registration settings. Subclasses can override this method to perform * additional configuration if required. * @param registration the registration */ @Override protected void configure(ServletRegistration.Dynamic registration) { super.configure(registration); String[] urlMapping = StringUtils....
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\web\servlet\ServletRegistrationBean.java
1
请完成以下Java代码
public int getC_BPartner_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID); if (ii == null) return 0; return ii.intValue(); } /** Set EMail Address. @param EMail Electronic Mail Address */ public void setEMail (String EMail) { set_Value (COLUMNNAME_EMail, EMail); } /** Get ...
{ Integer ii = (Integer)get_Value(COLUMNNAME_Session_ID); if (ii == null) return 0; return ii.intValue(); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), String.valueOf(getSession_ID())); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_Basket.java
1
请完成以下Java代码
protected BatchQuery createNewQuery(ProcessEngine engine) { return engine.getManagementService().createBatchQuery(); } protected void applyFilters(BatchQuery query) { if (batchId != null) { query.batchId(batchId); } if (type != null) { query.type(type); } if (TRUE.equals(without...
if (FALSE.equals(suspended)) { query.active(); } } protected void applySortBy(BatchQuery query, String sortBy, Map<String, Object> parameters, ProcessEngine engine) { if (sortBy.equals(SORT_BY_BATCH_ID_VALUE)) { query.orderById(); } else if (sortBy.equals(SORT_BY_TENANT_ID_VALUE)) { ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\batch\BatchQueryDto.java
1
请在Spring Boot框架中完成以下Java代码
public class X_S_IssueLabel extends org.compiere.model.PO implements I_S_IssueLabel, org.compiere.model.I_Persistent { private static final long serialVersionUID = 1351114609L; /** Standard Constructor */ public X_S_IssueLabel (final Properties ctx, final int S_IssueLabel_ID, @Nullable final String trxName)...
public void setS_Issue_ID (final int S_Issue_ID) { if (S_Issue_ID < 1) set_Value (COLUMNNAME_S_Issue_ID, null); else set_Value (COLUMNNAME_S_Issue_ID, S_Issue_ID); } @Override public int getS_Issue_ID() { return get_ValueAsInt(COLUMNNAME_S_Issue_ID); } @Override public void setS_IssueLabel_ID (...
repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java-gen\de\metas\serviceprovider\model\X_S_IssueLabel.java
2
请在Spring Boot框架中完成以下Java代码
public class WFEventAuditRepository { public void save(@NonNull final WFEventAuditList auditList) { auditList.toList().forEach(this::save); } public void save(@NonNull final WFEventAudit audit) { I_AD_WF_EventAudit record = audit.getId() > 0 ? InterfaceWrapperHelper.loadOutOfTrx(audit.getId(), I_AD_WF_Eve...
.eventType(WFEventAuditType.ofCode(record.getEventType())) .orgId(OrgId.ofRepoId(record.getAD_Org_ID())) // .wfProcessId(WFProcessId.ofRepoId(record.getAD_WF_Process_ID())) .wfNodeId(WFNodeId.ofRepoIdOrNull(record.getAD_WF_Node_ID())) // .documentRef(TableRecordReference.of(record.getAD_Table_ID...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\workflow\service\WFEventAuditRepository.java
2
请完成以下Java代码
private List<I_C_BPartner> getAllBPartnerRecords() { final IQueryBuilder<I_C_BPartner> bPartnerQuery = queryBL.createQueryBuilder(I_C_BPartner.class) .addOnlyActiveRecordsFilter(); if (orgId > 0) { bPartnerQuery.addEqualsFilter(I_C_BPartner.COLUMNNAME_AD_Org_ID, orgId); } return bPartnerQuery.create...
@NonNull private List<I_C_BPartner> getSelectedBPartnerRecords() { final IQueryBuilder<I_C_BPartner> bPartnerQuery = retrieveSelectedRecordsQueryBuilder(I_C_BPartner.class); if (orgId > 0) { bPartnerQuery.addEqualsFilter(I_C_BPartner.COLUMNNAME_AD_Org_ID, orgId); } return bPartnerQuery.create() .st...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\process\InvokeAlbertaForBPartnerIds.java
1
请完成以下Java代码
public void setHelp (String Help) { set_Value (COLUMNNAME_Help, Help); } /** Get Comment/Help. @return Comment or Hint */ public String getHelp () { return (String)get_Value(COLUMNNAME_Help); } /** Set Freight Category. @param M_FreightCategory_ID Category of the Freight */ public void setM_...
return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName()); } /** Set Search Key. @param Value Search key for the record in the format required -...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_FreightCategory.java
1
请完成以下Java代码
public HistoricMilestoneInstanceQuery milestoneInstanceCaseDefinitionId(String caseDefinitionId) { this.caseDefinitionId = caseDefinitionId; return this; } @Override public HistoricMilestoneInstanceQuery milestoneInstanceReachedBefore(Date reachedBefore) { this.reachedBefore = reach...
public List<HistoricMilestoneInstance> executeList(CommandContext commandContext) { return CommandContextUtil.getHistoricMilestoneInstanceEntityManager(commandContext).findHistoricMilestoneInstancesByQueryCriteria(this); } @Override public String getId() { return id; } public Strin...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\history\HistoricMilestoneInstanceQueryImpl.java
1
请完成以下Java代码
public Builder setPaymentRequestAmt(final BigDecimal paymentRequestAmt) { Check.assumeNotNull(paymentRequestAmt, "paymentRequestAmt not null"); this.paymentRequestAmtSupplier = Suppliers.ofInstance(paymentRequestAmt); return this; } public Builder setPaymentRequestAmt(final Supplier<BigDecimal> paymentR...
{ this.isPrepayOrder = isPrepayOrder; return this; } public Builder setPOReference(final String POReference) { this.POReference = POReference; return this; } public Builder setCreditMemo(final boolean creditMemo) { this.creditMemo = creditMemo; return this; } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.swingui\src\main\java\de\metas\banking\payment\paymentallocation\model\InvoiceRow.java
1
请完成以下Java代码
public static List<String> splitExternalIds(@Nullable final String externalIds) { if (Check.isBlank(externalIds)) { return ImmutableList.of(); } return Splitter .on(EXTERNAL_ID_DELIMITER) .splitToList(externalIds); } public static int extractSingleRecordId(@NonNull final List<String> externalIds)...
final List<String> externalIdSegments = Splitter .on("_") .splitToList(externalId); if (externalIdSegments.isEmpty()) { return -1; } final String recordIdStr = externalIdSegments.get(externalIdSegments.size() - 1); try { return Integer.parseInt(recordIdStr); } catch (NumberFormatException...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\lang\ExternalIdsUtil.java
1
请完成以下Java代码
public void setIsError (boolean IsError) { set_Value (COLUMNNAME_IsError, Boolean.valueOf(IsError)); } /** Get Fehler. @return Ein Fehler ist bei der Durchführung aufgetreten */ @Override public boolean isError () { Object oo = get_Value(COLUMNNAME_IsError); if (oo != null) { if (oo instanceof...
/** Get Request Message. @return Request Message */ @Override public java.lang.String getRequestMessage () { return (java.lang.String)get_Value(COLUMNNAME_RequestMessage); } /** Set Response Message. @param ResponseMessage Response Message */ @Override public void setResponseMessage (java.lang.String...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-gen\de\metas\shipper\gateway\dpd\model\X_DPD_StoreOrder_Log.java
1
请在Spring Boot框架中完成以下Java代码
public void setCouchbaseTemplate(CouchbaseTemplate template) { this.template = template; } public Optional<Person> findOne(String id) { return Optional.of(template.findById(Person.class).one(id)); } public List<Person> findAll() { return template.findByQuery(Person.class).all()...
return template.findByQuery(Person.class).matching(where("lastName").is(lastName)).all(); } public void create(Person person) { person.setCreated(DateTime.now()); template.insertById(Person.class).one(person); } public void update(Person person) { person.setUpdated(DateTime.now...
repos\tutorials-master\persistence-modules\spring-data-couchbase-2\src\main\java\com\baeldung\spring\data\couchbase\service\PersonTemplateService.java
2
请在Spring Boot框架中完成以下Java代码
public class CommissionSettingsLineId implements RepoIdAware { int repoId; public static int toRepoId(@Nullable final CommissionSettingsLineId commissionSettingsLineId) { if (commissionSettingsLineId == null) { return -1; } return commissionSettingsLineId.getRepoId(); } @JsonCreator public static Com...
public static CommissionSettingsLineId ofRepoIdOrNull(@Nullable final Integer repoId) { if (repoId == null || repoId <= 0) { return null; } return new CommissionSettingsLineId(repoId); } @Override @JsonValue public int getRepoId() { return repoId; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\businesslogic\CommissionSettingsLineId.java
2
请完成以下Java代码
public void setEntityType (String EntityType) { set_Value (COLUMNNAME_EntityType, EntityType); } /** Get Entity Type. @return Dictionary Entity Type; Determines ownership and synchronization */ public String getEntityType () { return (String)get_Value(COLUMNNAME_EntityType); } /** Set Name. @param...
public void setOrderByClause (String OrderByClause) { set_Value (COLUMNNAME_OrderByClause, OrderByClause); } /** Get Sql ORDER BY. @return Fully qualified ORDER BY clause */ public String getOrderByClause () { return (String)get_Value(COLUMNNAME_OrderByClause); } /** Set Sql WHERE. @param WhereClau...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ReportView.java
1
请完成以下Java代码
public class C_Flatrate_Term_Create_For_MaterialTracking extends C_Flatrate_Term_Create implements IProcessPrecondition { private final IProductDAO productsRepo = Services.get(IProductDAO.class); private int p_flatrateconditionsID; @Override public ProcessPreconditionsResolution checkPreconditionsApplicable(f...
p_flatrateconditionsID = para.getParameterAsInt(I_C_Flatrate_Term.COLUMNNAME_C_Flatrate_Conditions_ID, -1); final int materialTrackingID = getRecord_ID(); final I_M_Material_Tracking materialTracking = InterfaceWrapperHelper.create(getCtx(), materialTrackingID, I_M_Material_Tracking.class, getTrxName()); final I...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\process\C_Flatrate_Term_Create_For_MaterialTracking.java
1
请完成以下Java代码
public void setC_BPartner_ID (int C_BPartner_ID) { if (C_BPartner_ID < 1) set_Value (COLUMNNAME_C_BPartner_ID, null); else set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); } /** Get Geschäftspartner. @return Bezeichnet einen Geschäftspartner */ @Override public int getC_BPart...
* CustomerRetention AD_Reference_ID=540937 * Reference name: C_BPartner_TimeSpan_List */ public static final int CUSTOMERRETENTION_AD_Reference_ID=540937; /** Neukunde = N */ public static final String CUSTOMERRETENTION_Neukunde = "N"; /** Stammkunde = S */ public static final String CUSTOMERRETENTION_Stammkun...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Customer_Retention.java
1
请完成以下Java代码
public class FormData implements Map<String, Object> { TaskEntity task; public FormData(TaskEntity task) { this.task = task; } @Override public void clear() { } @Override public boolean containsKey(Object key) { return false; } @Override public boolean co...
} @Override public void putAll(Map<? extends String, ? extends Object> m) { } @Override public Object remove(Object key) { return null; } @Override public int size() { return 0; } @Override public Collection<Object> values() { return null; } }
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\form\FormData.java
1
请完成以下Java代码
class NestedFileStore extends FileStore { private final NestedFileSystem fileSystem; NestedFileStore(NestedFileSystem fileSystem) { this.fileSystem = fileSystem; } @Override public String name() { return this.fileSystem.toString(); } @Override public String type() { return "nestedfs"; } @Override ...
public <V extends FileStoreAttributeView> V getFileStoreAttributeView(Class<V> type) { return getJarPathFileStore().getFileStoreAttributeView(type); } @Override public Object getAttribute(String attribute) throws IOException { try { return getJarPathFileStore().getAttribute(attribute); } catch (Unchecked...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\nio\file\NestedFileStore.java
1
请完成以下Java代码
public static EventPayload headerWithCorrelation(String name, String type) { EventPayload payload = new EventPayload(name, type); payload.setHeader(true); payload.setCorrelationParameter(true); return payload; } @JsonInclude(JsonInclude.Include.NON_DEFAULT) public boolean is...
} @JsonIgnore public boolean isNotForBody() { return header || isFullPayload || metaParameter; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; ...
repos\flowable-engine-main\modules\flowable-event-registry-model\src\main\java\org\flowable\eventregistry\model\EventPayload.java
1
请完成以下Java代码
public java.lang.String getInternalName() { return get_ValueAsString(COLUMNNAME_InternalName); } @Override public void setMobile_Application_Action_ID (final int Mobile_Application_Action_ID) { if (Mobile_Application_Action_ID < 1) set_ValueNoCheck (COLUMNNAME_Mobile_Application_Action_ID, null); else ...
@Override public void setMobile_Application_ID (final int Mobile_Application_ID) { if (Mobile_Application_ID < 1) set_ValueNoCheck (COLUMNNAME_Mobile_Application_ID, null); else set_ValueNoCheck (COLUMNNAME_Mobile_Application_ID, Mobile_Application_ID); } @Override public int getMobile_Application_ID(...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Mobile_Application_Action.java
1
请在Spring Boot框架中完成以下Java代码
public static boolean canEdit(final Document document, final IUserRolePermissions permissions) { final BooleanWithReason canEdit = checkCanEdit(document, permissions); return canEdit.isTrue(); } private static BooleanWithReason checkCanEdit(@NonNull final Document document, @NonNull final IUserRolePermissions p...
if (tableName == null) { // cannot apply security because this is not table based return -1; // OK } return Services.get(IADTableDAO.class).retrieveTableId(tableName); } private static int getRecordId(final Document document) { if (document.isNew()) { return -1; } else { return document...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\controller\DocumentPermissionsHelper.java
2
请在Spring Boot框架中完成以下Java代码
public class LoginController { @Resource private TestService testService; @GetMapping("/getLogin/{username}/{password}") public String doLoginGet(@PathVariable("username") String username,@PathVariable("password") String password) { Subject subject = SecurityUtils.getSubject(); try { subject.login(n...
// String s = testService.vipPrint(); // wel = wel + s; return wel; } @GetMapping("/login") @ResponseBody public String login() { return "please login!"; } @GetMapping("/vip") @ResponseBody public String vip() { return "hello vip"; } @Ge...
repos\spring-boot-quick-master\quick-shiro\src\main\java\com\shiro\quick\controller\LoginController.java
2
请完成以下Java代码
public boolean isDetached() { return incident.getExecutionId() == null; } public void detachState() { incident.setExecution(null); } public void attachState(MigratingScopeInstance newOwningInstance) { attachTo(newOwningInstance.resolveRepresentativeExecution()); } @Override public void atta...
protected void migrateHistory() { HistoryLevel historyLevel = Context.getProcessEngineConfiguration().getHistoryLevel(); if (historyLevel.isHistoryEventProduced(HistoryEventTypes.INCIDENT_MIGRATE, this)) { HistoryEventProcessor.processHistoryEvents(new HistoryEventProcessor.HistoryEventCreator() { ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingIncident.java
1
请在Spring Boot框架中完成以下Java代码
public RedisTemplate<String, String> redisTemplate(RedisConnectionFactory cf) { RedisTemplate<String, String> redisTemplate = new RedisTemplate<>(); redisTemplate.setConnectionFactory(cf); return redisTemplate; } @Bean public CacheManager cacheManager(RedisTemplate<?, ?> redisTempla...
} @Override public void handleCachePutError(RuntimeException exception, Cache cache, Object key, Object value) { logger.warn("handleCachePutError in redis: {}", exception.getMessage()); } @Override public void handleCacheEvictError(RuntimeExc...
repos\springBoot-master\springboot-Cache\src\main\java\com\us\example\config\RedisConfig.java
2
请完成以下Java代码
public static AccountConceptualName ofNullableString(@Nullable final String name) { final String nameNorm = StringUtils.trimBlankToNull(name); return nameNorm != null ? ofString(nameNorm) : null; } public static AccountConceptualName ofString(@NonNull final String name) { final String nameNorm = StringUtils....
{ if (names == null) { return false; } for (final AccountConceptualName name : names) { if (name != null && equals(this, name)) { return true; } } return false; } public boolean isProductMandatory() { return isAnyOf(P_Asset_Acct); } public boolean isWarehouseLocatorMandatory() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\acct\AccountConceptualName.java
1
请完成以下Java代码
public Set<ProductId> getProductIdsMatchingQueryString( @NonNull final String queryString, @NonNull final ClientId clientId, @NonNull final QueryLimit limit) { return productsRepo.getProductIdsMatchingQueryString(queryString, clientId, limit); } @Override @NonNull public List<I_M_Product> getByIds(@Non...
public void setProductCodeFieldsFromGTIN(@NonNull final I_M_Product record, @Nullable final GTIN gtin) { record.setGTIN(gtin != null ? gtin.getAsString() : null); record.setUPC(gtin != null ? gtin.getAsString() : null); if (gtin != null) { record.setEAN13_ProductCode(null); } } @Override public void ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\impl\ProductBL.java
1
请在Spring Boot框架中完成以下Java代码
public class SimulatedDemandCreatedHandler implements MaterialEventHandler<SimulatedDemandCreatedEvent> { private final CandidateChangeService candidateChangeHandler; public SimulatedDemandCreatedHandler(@NonNull final CandidateChangeService candidateChangeHandler) { this.candidateChangeHandler = candidateChangeH...
event.getDocumentLineDescriptor(), event.getMaterialDescriptor().getQuantity()) .withTraceId(event.getTraceId()); final Candidate.CandidateBuilder candidateBuilder = Candidate .builderForEventDescriptor(event.getEventDescriptor()) .materialDescriptor(event.getMaterialDescriptor()) .type(Candidate...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\simulation\SimulatedDemandCreatedHandler.java
2
请完成以下Java代码
public ProductId getSingleProductId() { return getSingleValue(ScheduledPackageable::getProductId).orElseThrow(() -> new AdempiereException("No single product found in " + list)); } public HUPIItemProductId getSinglePackToHUPIItemProductId() { return getSingleValue(ScheduledPackageable::getPackToHUPIItemProduct...
{ final ShipmentScheduleAndJobScheduleIdSet scheduleIds = getScheduleIds(); return scheduleIds.size() == 1 ? Optional.of(scheduleIds.iterator().next()) : Optional.empty(); } public Optional<UomId> getSingleCatchWeightUomIdIfUnique() { final List<UomId> catchWeightUomIds = list.stream() .map(ScheduledPacka...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\ScheduledPackageableList.java
1
请在Spring Boot框架中完成以下Java代码
public void audit(String settId, String settStatus, String remark){ RpSettRecord settRecord = rpSettRecordDao.getById(settId); if(!settRecord.getSettStatus().equals(SettRecordStatusEnum.WAIT_CONFIRM.name())){ throw SettBizException.SETT_STATUS_ERROR; } settRecord.setSettStatus(settStatus); settRecord.setEd...
public void remit(String settId, String settStatus, String remark){ RpSettRecord settRecord = rpSettRecordDao.getById(settId); if(!settRecord.getSettStatus().equals(SettRecordStatusEnum.CONFIRMED.name())){ throw SettBizException.SETT_STATUS_ERROR; } settRecord.setSettStatus(settStatus); settRecord.setEditT...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\account\service\impl\RpSettHandleServiceImpl.java
2
请完成以下Java代码
protected CComboBox<Operator> getEditor() { if (_editor == null) { _editor = new CComboBox<>(); _editor.enableAutoCompletion(); } return _editor; } private void updateEditor(final JTable table, final int viewRowIndex) { final CComboBox<Operator> editor = getEditor(); final IUserQueryRestriction ...
} else if (DisplayType.YesNo == displayType) { editor.setModel(modelForYesNoColumns); } else { editor.setModel(modelDefault); } } else { editor.setModel(modelEmpty); } } private IUserQueryRestriction getRow(final JTable table, final int viewRowIndex) { final FindAdvancedSearch...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\FindOperatorCellEditor.java
1
请完成以下Java代码
public void setM_FreightCost_includedTab (String M_FreightCost_includedTab) { set_ValueNoCheck (COLUMNNAME_M_FreightCost_includedTab, M_FreightCost_includedTab); } /** Get M_FreightCost_includedTab. @return M_FreightCost_includedTab */ public String getM_FreightCost_includedTab () { return (String)get_Va...
@return Alphanumerische Bezeichnung fuer diesen Eintrag */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName()); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\model\X_M_FreightCost.java
1
请完成以下Java代码
public class ConditionalEventDefinition extends EventDefinition { protected String conditionExpression; protected String conditionLanguage; public String getConditionExpression() { return conditionExpression; } public void setConditionExpression(String conditionExpression) { this....
} @Override public ConditionalEventDefinition clone() { ConditionalEventDefinition clone = new ConditionalEventDefinition(); clone.setValues(this); return clone; } public void setValues(ConditionalEventDefinition otherDefinition) { super.setValues(otherDefinition); ...
repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\ConditionalEventDefinition.java
1
请在Spring Boot框架中完成以下Java代码
public IPricingResult calculatePrice(@NonNull final ServiceRepairProjectCostCollector costCollector) { final IEditablePricingContext pricingCtx = createPricingContext(costCollector) .setFailIfNotCalculated(); try { return pricingBL.calculatePrice(pricingCtx); } catch (final Exception ex) { throw...
return pricingBL.createPricingContext() .setFailIfNotCalculated() .setOrgId(pricingInfo.getOrgId()) .setProductId(costCollector.getProductId()) .setBPartnerId(pricingInfo.getShipBPartnerId()) .setQty(costCollector.getQtyReservedOrConsumed()) .setConvertPriceToContextUOM(true) .setSOTrx(SOTrx...
repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\project\service\commands\createQuotationFromProjectCommand\ProjectQuotationPriceCalculator.java
2
请完成以下Java代码
public final class MSV3Client { private final WebServiceTemplate webServiceTemplate; private final MSV3ClientConfig config; private final String urlPrefix; private final FaultInfoExtractor faultInfoExtractor; @Builder private MSV3Client( @NonNull final MSV3ConnectionFactory connectionFactory, @NonNull fina...
} else { throw new AdempiereException("Webservice returned unexpected response") .appendParametersToMessage() .setParameter("uri", uri) .setParameter("config", config) .setParameter("response", responseValue); } } @VisibleForTesting public WebServiceTemplate getWebServiceTemplate() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java\de\metas\vertical\pharma\vendor\gateway\msv3\MSV3Client.java
1
请完成以下Java代码
public String getTelephone() { return telephone; } public void setTelephone(String telephone) { this.telephone = telephone; } public String getMobilePhone() { return mobilePhone; } public void setMobilePhone(String mobilePhone) { this.mobilePhone = mobilePhone; } public String getWechatId() { return w...
public void setLoginCount(Integer loginCount) { this.loginCount = loginCount; } public List<Role> getRoles() { return roles; } public void setRoles(List<Role> roles) { this.roles = roles; } @Override public String toString() { return "User{" + "id=" + id + ", cnname=" + cnname + ", username=" ...
repos\springBoot-master\springboot-shiro\src\main\java\com\us\bean\User.java
1
请完成以下Java代码
public Boolean getGenerateUniqueProcessApplicationName() { return generateUniqueProcessApplicationName; } public void setGenerateUniqueProcessApplicationName(Boolean generateUniqueProcessApplicationName) { this.generateUniqueProcessApplicationName = generateUniqueProcessApplicationName; } @Override ...
.add("metrics=" + metrics) .add("database=" + database) .add("jobExecution=" + jobExecution) .add("webapp=" + webapp) .add("restApi=" + restApi) .add("authorization=" + authorization) .add("genericProperties=" + genericProperties) .add("adminUser=" + adminUser) .add("filt...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\CamundaBpmProperties.java
1
请完成以下Java代码
public class SetJobPriorityCmd implements Command<Void> { public static final String JOB_PRIORITY_PROPERTY = "priority"; protected String jobId; protected long priority; public SetJobPriorityCmd(String jobId, long priority) { this.jobId = jobId; this.priority = priority; } public Void execute(Co...
createOpLogEntry(commandContext, currentPriority, job); return null; } protected void createOpLogEntry(CommandContext commandContext, long previousPriority, JobEntity job) { PropertyChange propertyChange = new PropertyChange(JOB_PRIORITY_PROPERTY, previousPriority, job.getPriority()); commandContext ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\SetJobPriorityCmd.java
1
请在Spring Boot框架中完成以下Java代码
public void configure(ClientDetailsServiceConfigurer clients) throws Exception { // TODO persist clients details // @formatter:off clients.inMemory() .withClient("browser") .authorizedGrantTypes("refresh_token", "password") .scopes("ui") ...
.scopes("server"); // @formatter:on } @Override public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception { endpoints .tokenStore(tokenStore) .authenticationManager(authenticationManager) .userDetailsService(user...
repos\piggymetrics-master\auth-service\src\main\java\com\piggymetrics\auth\config\OAuth2AuthorizationConfig.java
2
请完成以下Java代码
public class M_Inventory_CreateLines_RestrictBy_LocatorsAndValue extends DraftInventoryBase { private final HuForInventoryLineFactory huForInventoryLineFactory = SpringContextHolder.instance.getBean(HuForInventoryLineFactory.class); private final IOrgDAO orgDAO = Services.get(IOrgDAO.class); @Param(parameterName = ...
final LocalDate movementDate = TimeUtil.asLocalDate(inventory.getMovementDate(), timeZone); final LeastRecentTransactionStrategy.LeastRecentTransactionStrategyBuilder builder = HUsForInventoryStrategies.leastRecentTransaction() .maxLocators(maxLocators) .minimumPrice(minimumPrice) .movementDate(movementD...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\draftlinescreator\process\M_Inventory_CreateLines_RestrictBy_LocatorsAndValue.java
1
请完成以下Java代码
public final class UserGroupsCollection { @NonNull public static UserGroupsCollection of(@Nullable final Collection<UserGroupUserAssignment> assignments) { if (Check.isEmpty(assignments)) { return EMPTY; } else { return new UserGroupsCollection(assignments); } } private static final UserGroupsCo...
assignments = ImmutableSet.of(); } private UserGroupsCollection(final Collection<UserGroupUserAssignment> assignments) { Check.assumeNotEmpty(assignments, "assignments is not empty"); this.assignments = assignments.stream().collect(ImmutableSet.toImmutableSet()); } @NonNull public Stream<UserGroupUserAssig...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\user\UserGroupsCollection.java
1
请完成以下Java代码
public BigDecimal calculateQtyLUForTotalQtyTUsByMaxWeight( @NonNull final I_M_HU_LUTU_Configuration lutuConfiguration, final BigDecimal qtyTUsTotal, @NonNull final I_M_HU_PackingMaterial packingMaterial) { Check.assumeNotNull(lutuConfiguration, "lutuConfiguration not null"); if (qtyTUsTotal == null || qt...
final BigDecimal qtyCUsPerTU = lutuConfiguration.getQtyCUsPerTU(); if (qtyCUsPerTU.signum() <= 0) { // Qty TU not available => cannot compute return BigDecimal.ZERO; } // // calculate total CUs per LU final BigDecimal totalQtyCUs = qtyCUsPerTU.multiply(qtyTUsTotal); // // CUs are counted by prod...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\LUTUConfigurationFactory.java
1
请完成以下Java代码
public boolean isFinished() { return finished; } public boolean isUnfinished() { return unfinished; } public boolean isDeleted() { return deleted; } public boolean isNotDeleted() { return notDeleted; } public boolean isIncludeProcessVariables() { ...
public String getTenantId() { return tenantId; } public String getTenantIdLike() { return tenantIdLike; } public boolean isWithoutTenantId() { return withoutTenantId; } public String getNameLikeIgnoreCase() { return nameLikeIgnoreCase; } public List<Hi...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\HistoricProcessInstanceQueryImpl.java
1
请完成以下Java代码
Book newBook(@Valid @RequestBody Book newBook) { return repository.save(newBook); } // Find @GetMapping("/books/{id}") Book findOne(@PathVariable @Min(1) Long id) { return repository.findById(id) .orElseThrow(() -> new BookNotFoundException(id)); } // Save or up...
// better create a custom method to update a value = :newValue where id = :id return repository.save(x); } else { throw new BookUnSupportedFieldPatchException(update.keySet()); } }) .orElseGet(() -> ...
repos\spring-boot-master\spring-rest-error-handling\src\main\java\com\mkyong\BookController.java
1
请完成以下Java代码
private ILogicExpression compile(final Iterator<String> tokens, final boolean goingDown) { LogicExpressionBuilder result = new LogicExpressionBuilder(); while (tokens.hasNext()) { final String token = tokens.next(); // // Sub-expression start if ("(".equals(token)) { final ILogicExpression ch...
private ILogicExpression compileTuple(final String tupleExpressionStr) { // Prepare: normalize tuple expression final String tupleExpressionStrNormalized = tupleExpressionStr .replace("!=", LogicTuple.OPERATOR_NotEquals) // fix common mistakes: using "!=" instead of "!" .trim(); final boolean returnDeli...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\impl\LogicExpressionCompiler.java
1
请在Spring Boot框架中完成以下Java代码
public TaskBuilder dueDate(Date dueDate) { this.dueDate = dueDate; return this; } @Override public TaskBuilder category(String category) { this.category = category; return this; } @Override public TaskBuilder parentTaskId(String parentTaskId) { this.pare...
@Override public String getOwner() { return ownerId; } @Override public String getAssignee() { return assigneeId; } @Override public String getTaskDefinitionId() { return taskDefinitionId; } @Override public String getTaskDefinitionKey() { retur...
repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\BaseTaskBuilderImpl.java
2
请完成以下Java代码
public org.compiere.model.I_R_MailText getPayPal_PayerApprovalRequest_MailTemplate() { return get_ValueAsPO(COLUMNNAME_PayPal_PayerApprovalRequest_MailTemplate_ID, org.compiere.model.I_R_MailText.class); } @Override public void setPayPal_PayerApprovalRequest_MailTemplate(final org.compiere.model.I_R_MailText Pay...
public void setPayPal_Sandbox (final boolean PayPal_Sandbox) { set_Value (COLUMNNAME_PayPal_Sandbox, PayPal_Sandbox); } @Override public boolean isPayPal_Sandbox() { return get_ValueAsBoolean(COLUMNNAME_PayPal_Sandbox); } @Override public void setPayPal_WebUrl (final @Nullable java.lang.String PayPal_Web...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.paypal\src\main\java-gen\de\metas\payment\paypal\model\X_PayPal_Config.java
1
请在Spring Boot框架中完成以下Java代码
public class ReloadableProperties extends Properties { private PropertiesConfiguration propertiesConfiguration; public ReloadableProperties(PropertiesConfiguration propertiesConfiguration) throws IOException { super.load(new FileReader(propertiesConfiguration.getFile())); this.propertiesConfigu...
} @Override public String getProperty(String key, String defaultValue) { String val = propertiesConfiguration.getString(key, defaultValue); super.setProperty(key, val); return val; } @Override public synchronized void load(Reader reader) throws IOException { throw n...
repos\tutorials-master\spring-boot-modules\spring-boot-properties-2\src\main\java\com\baeldung\properties\reloading\configs\ReloadableProperties.java
2
请完成以下Java代码
public static DomDocument getEmptyDocument(DocumentBuilderFactory documentBuilderFactory) { try { DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); return new DomDocumentImpl(documentBuilder.newDocument()); } catch (ParserConfigurationException e) { throw new Model...
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); documentBuilder.setErrorHandler(new DomErrorHandler()); return new DomDocumentImpl(documentBuilder.parse(inputStream)); } catch (ParserConfigurationException e) { throw new ModelParseException("ParserConfigurationExcept...
repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\util\DomUtil.java
1
请完成以下Java代码
public org.compiere.model.I_M_AttributeSet getM_AttributeSet() { return get_ValueAsPO(COLUMNNAME_M_AttributeSet_ID, org.compiere.model.I_M_AttributeSet.class); } @Override public void setM_AttributeSet(final org.compiere.model.I_M_AttributeSet M_AttributeSet) { set_ValueFromPO(COLUMNNAME_M_AttributeSet_ID, or...
public void setM_AttributeSet_IncludedTab_ID (final int M_AttributeSet_IncludedTab_ID) { if (M_AttributeSet_IncludedTab_ID < 1) set_ValueNoCheck (COLUMNNAME_M_AttributeSet_IncludedTab_ID, null); else set_ValueNoCheck (COLUMNNAME_M_AttributeSet_IncludedTab_ID, M_AttributeSet_IncludedTab_ID); } @Override ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_AttributeSet_IncludedTab.java
1
请完成以下Java代码
public class ExporterFactory implements IExporterFactory { private final Map<String, Class<? extends IExporter>> exporterClasses = new HashMap<String, Class<? extends IExporter>>(); public ExporterFactory() { // Register defaults registerExporter(MIMETYPE_CSV, CSVExporter.class); } @Override public IExporte...
exporter.setDataSource(dataSource); exporter.setConfig(config); return exporter; } @Override public void registerExporter(String mimeType, Class<? extends IExporter> exporterClass) { Check.assume(!Check.isEmpty(mimeType, true), "mimeType not empty"); Check.assumeNotNull(exporterClass, "exporterClass not n...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\data\export\api\impl\ExporterFactory.java
1
请完成以下Java代码
public void setPostingType (String PostingType) { set_Value (COLUMNNAME_PostingType, PostingType); } /** Get PostingType. @return The type of posted amount for the transaction */ public String getPostingType () { return (String)get_Value(COLUMNNAME_PostingType); } /** Set Serial No. @param SerNo ...
{ Integer ii = (Integer)get_Value(COLUMNNAME_UseLifeYears); if (ii == null) return 0; return ii.intValue(); } /** Set Use units. @param UseUnits Currently used units of the assets */ public void setUseUnits (int UseUnits) { set_Value (COLUMNNAME_UseUnits, Integer.valueOf(UseUnits)); } /** Ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Change.java
1
请完成以下Java代码
public Spliterator<T> spliterator() { return new BookSpliterator(elements, 0); } @Override public Stream<T> parallelStream() { return StreamSupport.stream(spliterator(), false); } // standard overridden methods of Collection Interface @Override public int size() { ...
@Override public boolean remove(Object o) { return false; } @Override public boolean containsAll(Collection<?> c) { return false; } @Override public boolean addAll(Collection<? extends T> c) { return false; } @Override public boolean removeAll(Collectio...
repos\tutorials-master\core-java-modules\core-java-streams-5\src\main\java\com\baeldung\streams\parallelstream\MyBookContainer.java
1
请完成以下Java代码
public class MProductPO extends X_M_Product_PO { /** * */ private static final long serialVersionUID = -747761340543484440L; /** * Get current PO of Product * @param ctx context * @param M_Product_ID product * @param trxName transaction * @return PO - current vendor first */ public static MProd...
super(ctx, 0, trxName); if (ignored != 0) throw new IllegalArgumentException("Multi-Key"); else { // setM_Product_ID (0); // @M_Product_ID@ // setC_BPartner_ID (0); // 0 // setVendorProductNo (null); // @Value@ setIsCurrentVendor (true); // Y } } // MProduct_PO /** * Load Constructor * @p...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MProductPO.java
1
请完成以下Java代码
public static ExecutionTree buildExecutionTreeForProcessInstance(Collection<ExecutionEntity> executions) { ExecutionTree executionTree = new ExecutionTree(); if (executions.size() == 0) { return executionTree; } // Map the executions to their parents. Catch and store the roo...
while (!executionsToHandle.isEmpty()) { ExecutionTreeNode parentNode = executionsToHandle.pop(); String parentId = parentNode.getExecutionEntity().getId(); if (parentMapping.containsKey(parentId)) { List<ExecutionEntity> childExecutions = parentMapping.get(parentId); ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\debug\ExecutionTreeUtil.java
1
请完成以下Java代码
public int getAD_Table_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_Table_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Classname. @param Classname Java Classname */ @Override public void setClassname (java.lang.String Classname) { set_Value (COLUMNNAME_Classname, C...
/** Get Entitäts-Art. @return Dictionary Entity Type; Determines ownership and synchronization */ @Override public java.lang.String getEntityType () { return (java.lang.String)get_Value(COLUMNNAME_EntityType); } /** Set Reihenfolge. @param SeqNo Zur Bestimmung der Reihenfolge der Einträge; die kleins...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Field_ContextMenu.java
1
请在Spring Boot框架中完成以下Java代码
public class ExternalWorkerJobBaseResource { protected ManagementService managementService; protected CmmnManagementService cmmnManagementService; protected ExternalWorkerJobRestApiInterceptor restApiInterceptor; protected ExternalWorkerJobQuery createExternalWorkerJobQuery() { if (managementS...
restApiInterceptor.accessExternalWorkerJobById(job); } return job; } @Autowired(required = false) public void setManagementService(ManagementService managementService) { this.managementService = managementService; } @Autowired(required = false) public void setCmmnManag...
repos\flowable-engine-main\modules\flowable-external-job-rest\src\main\java\org\flowable\external\job\rest\service\api\ExternalWorkerJobBaseResource.java
2
请完成以下Java代码
public static boolean isReported(@Nullable final Throwable exception) { Throwable currentEx = exception; while (currentEx != null) { if (currentEx instanceof IIssueReportableAware) { final IIssueReportableAware issueReportable = (IIssueReportableAware)currentEx; if (issueReportable.isIssueReported...
@Nullable public static AdIssueId getAdIssueIdOrNull(@NonNull final Throwable exception) { if (exception instanceof IIssueReportableAware) { final IIssueReportableAware issueReportable = (IIssueReportableAware)exception; if (issueReportable.isIssueReported()) { return issueReportable.getAdIssueId(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\exceptions\IssueReportableExceptions.java
1
请完成以下Java代码
public Object getParameterComponent(int index) { if (index == 0) return fieldCityZip; else if (index == 1) return fieldRadius; else return null; } @Override public String[] getWhereClauses(List<Object> params) { final GeodbObject go = getGeodbObject(); final String searchText = getText(); if...
{ return "DEGREES(" + " (ACOS(" + " SIN(RADIANS(" + lat + ")) * SIN(RADIANS(" + tableAlias + ".lat)) " + " + COS(RADIANS(" + lat + "))*COS(RADIANS(" + tableAlias + ".lat))*COS(RADIANS(" + tableAlias + ".lon) - RADIANS(" + lon + "))" + ") * 60 * 1.1515 " // miles + " * 1.609344" // KM factor + ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\gui\search\InfoQueryCriteriaBPRadius.java
1
请完成以下Java代码
default TableRecordReference getTableRecordReferenceOrNull(@NonNull final DocumentId rowId) { final int recordId = rowId.toIntOr(-1); if (recordId < 0) { return null; } final String tableName = getTableNameOrNull(rowId); if (tableName == null) { return null; } return TableRecordReference.of(t...
} /** * Notify the view that given record(s) has changed. */ void notifyRecordsChanged(TableRecordReferenceSet recordRefs, boolean watchedByFrontend); /** * @return actions which were registered particularly for this view instance */ default ViewActionDescriptorsList getActions() { return ViewActionDes...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\IView.java
1
请在Spring Boot框架中完成以下Java代码
public class DemoApplication { private final Logger logger = LoggerFactory.getLogger(DemoApplication.class); @Autowired private CustomerRepository repository; public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } @EventListener(ApplicationR...
private void createCustomer() { Customer newCustomer = new Customer(); newCustomer.setFirstName("John"); newCustomer.setLastName("Doe"); logger.info("Saving new customer..."); this.repository.save(newCustomer); } private void queryAllCustomers() { List<Customer> ...
repos\tutorials-master\docker-modules\docker-spring-boot-postgres\src\main\java\com\baeldung\docker\DemoApplication.java
2
请完成以下Java代码
public String toString() { final StringBuilder sb = new StringBuilder("词条数量:"); sb.append(trie.size()); return sb.toString(); } @Override public boolean saveTxtTo(String path) { if (trie.size() == 0) return true; // 如果没有词条,那也算成功了 try { Bu...
bw.close(); } catch (Exception e) { Predefine.logger.warning("保存到" + path + "失败" + e); return false; } return true; } /** * 调整频次,按排序后的次序给定频次 * * @param itemList * @return 处理后的列表 */ public static List<Item> normalizeFr...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dictionary\DictionaryMaker.java
1
请完成以下Java代码
public String getTitl() { return titl; } /** * Sets the value of the titl property. * * @param value * allowed object is * {@link String } * */ public void setTitl(String value) { this.titl = value; } /** * Gets the value of the...
* */ public String getNm() { return nm; } /** * Sets the value of the nm property. * * @param value * allowed object is * {@link String } * */ public void setNm(String value) { this.nm = value; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\TaxAuthorisation1.java
1
请完成以下Java代码
public void contribute(Info.Builder builder) { builder.withDetail("build", generateContent()); } @Override protected PropertySource<?> toSimplePropertySource() { Properties props = new Properties(); copyIfSet(props, "group"); copyIfSet(props, "artifact"); copyIfSet(props, "name"); copyIfSet(props, "vers...
protected void postProcessContent(Map<String, Object> content) { replaceValue(content, "time", getProperties().getTime()); } static class BuildInfoContributorRuntimeHints implements RuntimeHintsRegistrar { private final BindingReflectionHintsRegistrar bindingRegistrar = new BindingReflectionHintsRegistrar(); ...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\info\BuildInfoContributor.java
1
请完成以下Java代码
public void notify(DelegateTask delegateTask) { validateParameters(); TaskComparatorImpl taskComparator = new TaskComparatorImpl(); taskComparator.setOriginalTask((TaskInfo) delegateTask); ScriptingEngines scriptingEngines = Context.getProcessEngineConfiguration().getScriptingEngines()...
} if (language == null) { throw new IllegalArgumentException("The field 'language' should be set on the TaskListener"); } } public void setScript(Expression script) { this.script = script; } public void setLanguage(Expression language) { this.language = lan...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\listener\ScriptTaskListener.java
1
请完成以下Java代码
public abstract class JobResult implements Serializable { private int successfulCount; private int failedCount; private int discardedCount; private Integer totalCount = null; // set when all tasks are submitted private List<TaskResult> results = new ArrayList<>(); private String generalError; ...
} } else if (taskResult.isDiscarded()) { if (totalCount == null || discardedCount < totalCount) { discardedCount++; } } else { if (totalCount == null || failedCount < totalCount) { failedCount++; } if (results.si...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\job\JobResult.java
1
请完成以下Java代码
public void fireJobFailedEvent(final Job job, final Throwable exception) { if (isHistoryEventProduced(HistoryEventTypes.JOB_FAIL, job)) { HistoryEventProcessor.processHistoryEvents(new HistoryEventProcessor.HistoryEventCreator() { @Override public HistoryEvent createHistoryEvent(HistoryEventPr...
// helper ///////////////////////////////////////////////////////// protected boolean isHistoryEventProduced(HistoryEventType eventType, Job job) { ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration(); HistoryLevel historyLevel = configuration.getHistoryLevel(); return h...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\HistoricJobLogManager.java
1
请完成以下Java代码
public final static ELResolver lookupResolver(AbstractProcessApplication processApplication) { ServiceLoader<ProcessApplicationElResolver> providers = ServiceLoader.load(ProcessApplicationElResolver.class); List<ProcessApplicationElResolver> sortedProviders = new ArrayList<ProcessApplicationElResolver>(); ...
for (ProcessApplicationElResolver processApplicationElResolver : sortedProviders) { ELResolver elResolver = processApplicationElResolver.getElResolver(processApplication); if (elResolver != null) { compositeResolver.add(elResolver); summary.append(String.format("Class %s", processAp...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\application\impl\DefaultElResolverLookup.java
1
请完成以下Java代码
public boolean catchesError(String errorCode) { return this.errorCode == null || this.errorCode.equals(errorCode); } public boolean catchesException(Exception ex) { if(this.errorCode == null) { return false; } else { // unbox exception while ((ex instanceof ProcessEngineException |...
exceptionClass = exceptionClass.getSuperclass(); } while(exceptionClass != null); return false; } } public void setErrorCodeVariable(String errorCodeVariable) { this.errorCodeVariable = errorCodeVariable; } public String getErrorCodeVariable() { return errorCodeVariable; } public...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\parser\ErrorEventDefinition.java
1
请完成以下Java代码
public Builder onErrorThrowException(final boolean onErrorThrowException) { this.onErrorThrowException = onErrorThrowException; return this; } /** * Advice the executor to switch current context with process info's context. * * @see ProcessInfo#getCtx() * @see Env#switchContext(Properties) *...
} /** * Sets the callback to be executed after AD_PInstance is created but before the actual process is started. * If the callback fails, the exception is propagated, so the process will not be started. * <p> * A common use case of <code>beforeCallback</code> is to create to selections which are linked t...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ProcessExecutor.java
1
请完成以下Java代码
public class DataEntryListValueLookupDescriptor implements LookupDescriptor { private final DataEntryListValueDataSourceFetcher dataEntryListValueDataSourceFetcher; public static DataEntryListValueLookupDescriptor of(@NonNull final List<DataEntryListValue> listValues) { return new DataEntryListValueLookupDescript...
@Override public boolean hasParameters() { return false; } @Override public boolean isNumericKey() { return true; } @Override public Set<String> getDependsOnFieldNames() { return ImmutableSet.of(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\dataentry\window\descriptor\factory\DataEntryListValueLookupDescriptor.java
1
请完成以下Java代码
public ProcessPreconditionsResolution checkPreconditionsApplicable(final @NonNull IProcessPreconditionsContext context) { if (context.isNoSelection()) { return ProcessPreconditionsResolution.rejectBecauseNoSelection(); } if (context.isMoreThanOneSelected()) { return ProcessPreconditionsResolution.reje...
protected String doIt() throws Exception { removeRelations(); return MSG_OK; } private void removeRelations() { queryBL.createQueryBuilder(I_C_Invoice_Relation.class) .addEqualsFilter(I_C_Invoice_Relation.COLUMNNAME_C_Invoice_Relation_Type, relationToRemove) .addEqualsFilter(I_C_Invoice_Relation.COLU...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\process\C_Invoice_RemoveRelation.java
1
请完成以下Spring Boot application配置
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/demo?useUnicode=true&characterEncoding=utf-8&useSSL=false spring.datasource.username=root spring.datasource.password=123456 s
pring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver server.port=8081
repos\springboot-demo-master\shedlock\src\main\resources\application-node1.properties
2
请完成以下Java代码
public void setIsSyncBPartnersToRabbitMQ (final boolean IsSyncBPartnersToRabbitMQ) { set_Value (COLUMNNAME_IsSyncBPartnersToRabbitMQ, IsSyncBPartnersToRabbitMQ); } @Override public boolean isSyncBPartnersToRabbitMQ() { return get_ValueAsBoolean(COLUMNNAME_IsSyncBPartnersToRabbitMQ); } @Override public vo...
} @Override public void setRouting_Key (final String Routing_Key) { set_Value (COLUMNNAME_Routing_Key, Routing_Key); } @Override public String getRouting_Key() { return get_ValueAsString(COLUMNNAME_Routing_Key); } @Override public void setAuthToken (final String AuthToken) { set_Value (COLUMNNAME_Au...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_RabbitMQ_HTTP.java
1
请完成以下Java代码
public void setTaskId(String taskId) { this.taskId = taskId; } @Override public String getScopeId() { return scopeId; } public void setScopeId(String scopeId) { this.scopeId = scopeId; } @Override public String getScopeType() { return scopeType; } ...
} @Override public String getSubScopeId() { return ScopeTypes.BPMN.equals(scopeType) ? executionId : null; } @Override public String getScopeDefinitionId() { return ScopeTypes.BPMN.equals(scopeType) ? processDefinitionId : null; } @Override public String getVariableIns...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\delegate\event\impl\ActivitiVariableEventImpl.java
1
请完成以下Java代码
public static JobEntity createJob(ExecutionEntity execution, BaseElement baseElement, String jobHandlerType, ProcessEngineConfigurationImpl processEngineConfiguration) { JobService jobService = processEngineConfiguration.getJobServiceConfiguration().getJobService(); JobEntity job = jobService.createJob(...
Expression categoryExpression = processEngineConfiguration.getExpressionManager().createExpression(jobCategoryElement.getElementText()); Object categoryValue = categoryExpression.getValue(execution); if (categoryValue != null) { job.setCategory(categoryValue.toString(...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\util\JobUtil.java
1
请完成以下Java代码
public String getStatusActivitySubtitle() { return statusActivitySubtitle.getExpressionString(); } public void setStatusActivitySubtitle(String statusActivitySubtitle) { this.statusActivitySubtitle = parser.parseExpression(statusActivitySubtitle, ParserContext.TEMPLATE_EXPRESSION); } @Data @Builder public s...
@Builder public static class Section { private final String activityTitle; private final String activitySubtitle; @Builder.Default private final List<Fact> facts = new ArrayList<>(); } public record Fact(String name, @Nullable String value) { } }
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\notify\MicrosoftTeamsNotifier.java
1