instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public void onNext(T t) { this.delegate.onNext(t); } @Override public void onError(Throwable ex) { this.delegate.onError(ex); } @Override public void onComplete() { this.delegate.onComplete(); } } /** * A map that computes each value when {@link #get} is invoked */ static class Loading...
return this.loaded.remove(key); } @Override public void putAll(Map<? extends K, ? extends V> m) { for (Map.Entry<? extends K, ? extends V> entry : m.entrySet()) { put(entry.getKey(), entry.getValue()); } } @Override public void clear() { this.loaded.clear(); } @Override public boolean ...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configuration\SecurityReactorContextConfiguration.java
2
请完成以下Java代码
public abstract class ComponentMsgProcessor<T extends EntityId> extends AbstractContextAwareMsgProcessor { protected final TenantId tenantId; protected final T entityId; protected ComponentLifecycleState state; protected ComponentMsgProcessor(ActorSystemContext systemContext, TenantId tenantId, T id) ...
start(context); } public ScheduledFuture<?> scheduleStatsPersistTick(TbActorCtx context, long statsPersistFrequency) { return schedulePeriodicMsgWithDelay(context, StatsPersistTick.INSTANCE, statsPersistFrequency, statsPersistFrequency); } protected boolean checkMsgValid(TbMsg tbMsg) { ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\actors\shared\ComponentMsgProcessor.java
1
请完成以下Java代码
class DefaultRequestBuilder implements RequestBuilder, Request { final ServerRequest serverRequest; private HttpHeaders httpHeaders; private HttpMethod method; private @Nullable URI uri; private ArrayList<ResponseConsumer> responseConsumers = new ArrayList<>(); DefaultRequestBuilder(ServerRequest serv...
@Override public Request build() { // TODO: validation return this; } @Override public HttpHeaders getHeaders() { return httpHeaders; } @Override public HttpMethod getMethod() { return method; } @Override public @Nullable URI getUri() { return uri; } @Override public ServerR...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\handler\ProxyExchange.java
1
请完成以下Java代码
public void setLine (int Line) { set_ValueNoCheck (COLUMNNAME_Line, Integer.valueOf(Line)); } /** Get Zeile Nr.. @return Einzelne Zeile in dem Dokument */ @Override public int getLine () { Integer ii = (Integer)get_Value(COLUMNNAME_Line); if (ii == null) return 0; return ii.intValue(); } /**...
{ Integer ii = (Integer)get_Value(COLUMNNAME_Record_ID); if (ii == null) return 0; return ii.intValue(); } /** Set UUID. @param UUID UUID */ @Override public void setUUID (java.lang.String UUID) { set_ValueNoCheck (COLUMNNAME_UUID, UUID); } /** Get UUID. @return UUID */ @Override public j...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\dao\selection\model\X_T_Query_Selection.java
1
请完成以下Java代码
public String getAuthority() { return this.authority; } /** * Returns the attributes about the user. * @return a {@code Map} of attributes about the user */ public Map<String, Object> getAttributes() { return this.attributes; } /** * Returns the attribute name used to access the user's name from the ...
return true; } @Override public int hashCode() { int result = this.getAuthority().hashCode(); result = 31 * result; for (Map.Entry<String, Object> e : getAttributes().entrySet()) { Object key = e.getKey(); Object value = convertURLIfNecessary(e.getValue()); result += Objects.hashCode(key) ^ Objects.h...
repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\user\OAuth2UserAuthority.java
1
请完成以下Java代码
public void dispatchHydrationAlert(String emailId, String username) throws IOException { Email toEmail = new Email(emailId); String templateId = sendGridConfigurationProperties.getHydrationAlertNotification().getTemplateId(); DynamicTemplatePersonalization personalization = new DynamicTemplateP...
request.setBody(mail.build()); sendGrid.api(request); } private Attachments createAttachment(MultipartFile file) throws IOException { byte[] encodedFileContent = Base64.getEncoder().encode(file.getBytes()); Attachments attachment = new Attachments(); attachment.setDisposition("...
repos\tutorials-master\saas-modules\sendgrid\src\main\java\com\baeldung\sendgrid\EmailDispatcher.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 Valid. @param IsValid Element is valid */ public void setIsValid (boolean IsValid) { se...
*/ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public Ke...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Alert.java
1
请在Spring Boot框架中完成以下Java代码
private Hierarchy createFor( @NonNull final BPartnerId bPartnerId, @NonNull final HierarchyBuilder hierarchyBuilder, @NonNull final HashSet<BPartnerId> seenBPartnerIds) { if (!seenBPartnerIds.add(bPartnerId)) { return hierarchyBuilder.build(); // there is a loop in our supposed tree; stoppping now, bec...
} hierarchyBuilder.addChildren(node(parentBPartnerId), ImmutableList.of(node(bPartnerId))); // recurse createFor(parentBPartnerId, hierarchyBuilder, seenBPartnerIds); return hierarchyBuilder.build(); } private HierarchyNode node(@NonNull final BPartnerId bPartnerId) { return HierarchyNode.of(Beneficiar...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\services\hierarchy\CommissionHierarchyFactory.java
2
请完成以下Java代码
public void onInit() { final IInvoiceCandidateListeners invoiceCandidateListeners = Services.get(IInvoiceCandidateListeners.class); invoiceCandidateListeners.addListener(MaterialTrackingInvoiceCandidateListener.instance); } /** * Checks if the given <code>ic</code> references a record that is already tracked....
*/ @ModelChange(timings = { ModelValidator.TYPE_AFTER_NEW }) public void linkToMaterialTracking(final I_C_Invoice_Candidate ic) { final boolean createLink = true; updateLinkToTrackingIfNotNull(ic, createLink); } @ModelChange(timings = { ModelValidator.TYPE_BEFORE_DELETE }) public void unlinkFromMaterialTrack...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\model\validator\C_Invoice_Candidate.java
1
请在Spring Boot框架中完成以下Java代码
public final class AcknowledgeMode { private static final Map<String, AcknowledgeMode> knownModes = new HashMap<>(3); /** * Messages sent or received from the session are automatically acknowledged. This is * the simplest mode and enables once-only message delivery guarantee. */ public static final Acknowled...
* {@code auto}, {@code client}, {@code dupsok} or a non-standard acknowledge mode * that can be {@link Integer#parseInt parsed as an integer}. * @param mode the mode * @return the acknowledge mode */ public static AcknowledgeMode of(String mode) { String canonicalMode = canonicalize(mode); AcknowledgeMode ...
repos\spring-boot-4.0.1\module\spring-boot-jms\src\main\java\org\springframework\boot\jms\autoconfigure\AcknowledgeMode.java
2
请完成以下Java代码
public class Employee { private Long id; private String name; public Employee(Long id, String name) { this.name = name; this.id = id; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { ...
if (!id.equals(employee.id)) return false; return name.equals(employee.name); } @Override public int hashCode() { int result = id.hashCode(); result = 31 * result + name.hashCode(); return result; } @Override public String toString() { return "Employee{...
repos\tutorials-master\core-java-modules\core-java-collections-3\src\main\java\com\baeldung\collections\arraylistvsvector\Employee.java
1
请在Spring Boot框架中完成以下Java代码
public class CurrencyConversionResult { @NonNull private BigDecimal amount; @NonNull private CurrencyId currencyId; @NonNull private BigDecimal sourceAmount; @NonNull private CurrencyId sourceCurrencyId; // NOTE: it might be null when sourceAmount is ZERO and API decided to not fetch the conversionRate becau...
@NonNull private Instant conversionDate; @NonNull private CurrencyConversionTypeId conversionTypeId; @NonNull private ClientId clientId; @NonNull private OrgId orgId; public Money getAmountAsMoney() { return Money.of(amount, currencyId); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\currency\CurrencyConversionResult.java
2
请在Spring Boot框架中完成以下Java代码
public ShippingFulfillmentPagedCollection warnings(List<Error> warnings) { this.warnings = warnings; return this; } public ShippingFulfillmentPagedCollection addWarningsItem(Error warningsItem) { if (this.warnings == null) { this.warnings = new ArrayList<>(); } this.warnings.add(warningsItem); re...
} ShippingFulfillmentPagedCollection shippingFulfillmentPagedCollection = (ShippingFulfillmentPagedCollection)o; return Objects.equals(this.fulfillments, shippingFulfillmentPagedCollection.fulfillments) && Objects.equals(this.total, shippingFulfillmentPagedCollection.total) && Objects.equals(this.warnings, ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\ShippingFulfillmentPagedCollection.java
2
请完成以下Java代码
private void setProductAndTargetWeight(I_PP_Order_Weighting_Run weightingRun, ProductId productId, Quantity targetWeight) { weightingRun.setM_Product_ID(productId.getRepoId()); weightingRun.setC_UOM_ID(targetWeight.getUomId().getRepoId()); weightingRun.setTargetWeight(targetWeight.toBigDecimal()); } @NonNull ...
weightingRun.setC_UOM_ID(weightingSpecifications.getUomId().getRepoId()); weightingRun.setTolerance_Perc(weightingSpecifications.getTolerance().toBigDecimal()); weightingRun.setWeightChecksRequired(weightingSpecifications.getWeightChecksRequired()); updateFromPPOrderIfSet(weightingRun, false); return Opti...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\manufacturing\order\weighting\run\callout\PP_Order_Weighting_Run.java
1
请在Spring Boot框架中完成以下Java代码
public String getLOCATIONNAME() { return locationname; } /** * Sets the value of the locationname property. * * @param value * allowed object is * {@link String } * */ public void setLOCATIONNAME(String value) { this.locationname = value; ...
* * @return * possible object is * {@link HCTAD1 } * */ public HCTAD1 getHCTAD1() { return hctad1; } /** * Sets the value of the hctad1 property. * * @param value * allowed object is * {@link HCTAD1 } * */ p...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_orders\de\metas\edi\esb\jaxb\stepcom\orders\HADRE1.java
2
请完成以下Java代码
/* package */class HUProductStorage implements IHUProductStorage { private final IHUStorage huStorage; private final ProductId productId; private final I_C_UOM uom; private final Capacity capacityTotal; public HUProductStorage( @NonNull final IHUStorage huStorage, @NonNull final ProductId productId, @Non...
final IUOMConversionBL uomConversionBL = Services.get(IUOMConversionBL.class); return uomConversionBL.convertQuantityTo(getQty(), conversionCtx, uom); } @Override public final Quantity getQtyInStockingUOM() { final I_C_UOM productUOM = Services.get(IProductBL.class).getStockUOM(getProductId()); return getQty...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\storage\impl\HUProductStorage.java
1
请完成以下Java代码
public Collection<AuthorityRequirement> getAuthorityRequirement() { return authorityRequirementCollection.get(this); } public Type getType() { return typeChild.getChild(this); } public void setType(Type type) { typeChild.setChild(this, type); } public OrganizationUnit getOwner() { return ...
SequenceBuilder sequenceBuilder = typeBuilder.sequence(); authorityRequirementCollection = sequenceBuilder.elementCollection(AuthorityRequirement.class) .build(); typeChild = sequenceBuilder.element(Type.class) .build(); ownerRef = sequenceBuilder.element(OwnerReference.class) .uriEleme...
repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\KnowledgeSourceImpl.java
1
请完成以下Java代码
public class DocLineSortDAO implements IDocLineSortDAO { @Override public List<I_C_DocLine_Sort_Item> retrieveItems(final I_C_DocLine_Sort docLineSort) { Check.assumeNotNull(docLineSort, "docLineSort not null"); final Properties ctx = InterfaceWrapperHelper.getCtx(docLineSort); final int docLineSortId = docLin...
final IQueryBL queryBL = Services.get(IQueryBL.class); final IQueryBuilder<I_C_DocLine_Sort_Item> queryBuilder = queryBL.createQueryBuilder(I_C_DocLine_Sort_Item.class, ctx, trxName) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_C_DocLine_Sort_Item.COLUMN_C_DocLine_Sort_ID, docLineSortId); return queryB...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\adempiere\docline\sort\api\impl\DocLineSortDAO.java
1
请完成以下Java代码
public void internalExecute() { CmmnEngineConfiguration cmmnEngineConfiguration = CommandContextUtil.getCmmnEngineConfiguration(commandContext); if (cmmnEngineConfiguration.getEndCaseInstanceInterceptor() != null) { cmmnEngineConfiguration.getEndCaseInstanceInterceptor().beforeEndCaseInstanc...
loggingType = CmmnLoggingSessionConstants.TYPE_CASE_COMPLETED; } CmmnLoggingSessionUtil.addLoggingData(loggingType, "Completed case instance with id " + caseInstanceEntity.getId(), caseInstanceEntity, cmmnEngineConfiguration.getObjectMapper()); } CommandCont...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\agenda\operation\AbstractDeleteCaseInstanceOperation.java
1
请完成以下Java代码
public void onReverse(final I_C_Invoice invoice) { if (isCreditMemo(invoice)) { return; } final boolean reversal = true; eventSender.send(createInvoiceChangedEvent(invoice, reversal)); } private InvoiceChangedEvent createInvoiceChangedEvent(final I_C_Invoice invoice, final boolean reversal) { retur...
.stream() .filter(invoiceLine -> invoiceLine.getM_Product_ID() > 0) .collect(ImmutableMap.toImmutableMap( invoiceLine -> ProductId.ofRepoId(invoiceLine.getM_Product_ID()), // keyMapper invoiceLine -> Money.of(invoiceLine.getPriceActual(), currencyId), // valueMapper Money::max)); // mergeFunct...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\product\stats\interceptor\C_Invoice.java
1
请完成以下Java代码
public void setScrappedQty (final @Nullable BigDecimal ScrappedQty) { set_Value (COLUMNNAME_ScrappedQty, ScrappedQty); } @Override public BigDecimal getScrappedQty() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_ScrappedQty); return bd != null ? bd : BigDecimal.ZERO; } @Override public void ...
public int getUser1_ID() { return get_ValueAsInt(COLUMNNAME_User1_ID); } @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() { return get_ValueA...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Cost_Collector.java
1
请完成以下Java代码
public String deployProcess(String resourceName) { LOGGER.debug("Start deploying single process."); // deploy processes as one deployment DeploymentBuilder deploymentBuilder = processEngine.getRepositoryService().createDeployment(); deploymentBuilder.addClasspathResource(resourceName); ...
Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(processFileUrl.openStream()); NodeList nodeList = document.getElementsByTagName(PROCESS_ELEMENT_NAME); for (int i = 0; i < nodeList.getLength(); i++) { Node cn = nodeList.item(i); ...
repos\flowable-engine-main\modules\flowable-cdi\src\main\java\org\flowable\cdi\impl\ProcessDeployer.java
1
请完成以下Java代码
private void initialize() { // search panel searchButton.setText("Search"); searchButton.setOnAction(event -> loadData()); searchButton.setStyle("-fx-background-color: slateblue; -fx-text-fill: white;"); searchField.setOnKeyPressed(event -> { if (event.getCode().equ...
@Override protected ObservableList<Person> call() throws Exception { updateMessage("Loading data"); return FXCollections.observableArrayList(masterData .stream() .filter(value -> value.getName().toLowerCase().contains(searchText...
repos\tutorials-master\javafx\src\main\java\com\baeldung\view\SearchController.java
1
请在Spring Boot框架中完成以下Java代码
public ApplicationListener<?> idSetting() { return (ApplicationListener<BeforeConvertEvent>) event -> { if (event.getEntity() instanceof LegoSet) { setIds((LegoSet) event.getEntity()); } }; } private void setIds(LegoSet legoSet) { if (legoSet.getId() == 0) { legoSet.setId(id.incrementAndGet());...
} catch (SQLException e) { throw new IllegalStateException("Failed to convert CLOB to String.", e); } } })); } @Bean public NamedParameterJdbcTemplate namedParameterJdbcTemplate(JdbcOperations operations) { return new NamedParameterJdbcTemplate(operations); } @Bean DataSourceInitializer initiali...
repos\spring-data-examples-main\jdbc\basics\src\main\java\example\springdata\jdbc\basics\aggregate\AggregateConfiguration.java
2
请完成以下Java代码
public abstract class AcquireJobsRunnable implements Runnable { private final static JobExecutorLogger LOG = ProcessEngineLogger.JOB_EXECUTOR_LOGGER; protected final JobExecutor jobExecutor; protected volatile boolean isInterrupted = false; protected volatile boolean isJobAdded = false; protected final Obj...
synchronized (MONITOR) { isInterrupted = true; if(isWaiting.compareAndSet(true, false)) { MONITOR.notifyAll(); } } } public void jobWasAdded() { isJobAdded = true; if(isWaiting.compareAndSet(true, false)) { // ensures we only notify once // I am OK with the race co...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\AcquireJobsRunnable.java
1
请完成以下Java代码
private static void assertIsNotInstanceOf(Object target, Class<?> type) { if (type.isInstance(target)) { throw new AssertionError(String.format("[%1%s] is an instance of [%2$s]", nullSafeTypeName(target), nullSafeTypeName(type))); } } private static void assertIsNotNull(Object target) { if (Objects.is...
* Asserts the {@link #getSubject() subject} is not {@literal null}. */ default void isNotNull() { assertIsNotNull(getSubject()); } /** * Asserts the {@link #getSubject()} is an instance of {@link GemFireCacheImpl}. */ default void isInstanceOfGemFireCacheImpl() { assertIsInstanceOf(getSubject(),...
repos\spring-boot-data-geode-main\spring-geode-project\apache-geode-extensions\src\main\java\org\springframework\geode\util\GeodeAssertions.java
1
请完成以下Java代码
public void moveColumnsToEnd(final String... columnNamesToMove) { if (columnNamesToMove == null) { return; } for (final String columnNameToMove : columnNamesToMove) { if (columnNameToMove == null) { continue; } if (header.remove(columnNameToMove)) { header.add(columnNameToMove); ...
} return Optional.of(removedTable); } private Optional<Cell> getCommonValue(@NonNull final String columnName) { if (rowsList.isEmpty()) { return Optional.empty(); } final Cell firstValue = rowsList.get(0).getCell(columnName); for (int i = 1; i < rowsList.size(); i++) { final Cell value = rows...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\text\tabular\Table.java
1
请在Spring Boot框架中完成以下Java代码
public class PickingSlotRowType implements IViewRowType { /** * Name of a dedicated picking slot row's type. Other possible name types are borrowed from {@link HUEditorRowType}. */ @VisibleForTesting static final String M_PICKING_SLOT = "M_Picking_Slot"; public static PickingSlotRowType forPickingSlotRow() { ...
@NonNull String name; @Nullable HUEditorRowType huEditorRowType; public boolean isLU() { return huEditorRowType != null && huEditorRowType == HUEditorRowType.LU; } public boolean isTU() { return huEditorRowType != null && huEditorRowType == HUEditorRowType.TU; } public boolean isCU() { return huEditorRowType !...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\PickingSlotRowType.java
2
请完成以下Java代码
public class User implements Serializable { private String uId; private String firstName; private String lastName; private String alias; public User() { } public User(String firstName, String uId, String lastName, String alias) { this.firstName = firstName; this.uId = uId; ...
} public String getAlias() { return alias; } public void setAlias(String alias) { this.alias = alias; } public void generateMyUser() { this.setAlias("007"); this.setFirstName("James"); this.setLastName("Bond"); this.setuId("JB"); } @Overrid...
repos\tutorials-master\libraries-data-3\src\main\java\com\baeldung\objecthydration\User.java
1
请在Spring Boot框架中完成以下Java代码
public class Demo01Controller { private Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private MySource mySource; @GetMapping("/send") public boolean send() { // 创建 Message Demo01Message message = new Demo01Message() .setId(new Random().nextInt());...
} @GetMapping("/send_tag") public boolean sendTag() { for (String tag : new String[]{"yunai", "yutou", "tudou"}) { // 创建 Message Demo01Message message = new Demo01Message() .setId(new Random().nextInt()); // 创建 Spring Message 对象 Messag...
repos\SpringBoot-Labs-master\labx-06-spring-cloud-stream-rocketmq\labx-06-sca-stream-rocketmq-producer-actuator\src\main\java\cn\iocoder\springcloudalibaba\labx6\rocketmqdemo\producerdemo\controller\Demo01Controller.java
2
请完成以下Java代码
public PageData<TenantId> findTenantsIds(PageLink pageLink) { log.trace("Executing findTenantsIds"); Validator.validatePageLink(pageLink); return tenantDao.findTenantsIds(pageLink); } @Override public List<Tenant> findTenantsByIds(TenantId callerId, List<TenantId> tenantIds) { ...
}; @Override public Optional<HasId<?>> findEntity(TenantId tenantId, EntityId entityId) { return Optional.ofNullable(findTenantById(TenantId.fromUUID(entityId.getId()))); } @Override public FluentFuture<Optional<HasId<?>>> findEntityAsync(TenantId tenantId, EntityId entityId) { ret...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\tenant\TenantServiceImpl.java
1
请完成以下Java代码
public boolean isInboundCost() { return !getTrxType().isOutboundCost(); } public boolean isMainProduct() { return getTrxType() == PPOrderCostTrxType.MainProduct; } public boolean isCoProduct() { return getTrxType().isCoProduct(); } public boolean isByProduct() { return getTrxType() == PPOrderCostTr...
{ return addingAccumulatedAmountAndQty(amt.negate(), qty.negate(), uomConverter); } public PPOrderCost withPrice(@NonNull final CostPrice newPrice) { if (this.getPrice().equals(newPrice)) { return this; } return toBuilder().price(newPrice).build(); } /* package */void setPostCalculationAmount(@NonN...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\api\PPOrderCost.java
1
请在Spring Boot框架中完成以下Java代码
public static Optional<ClientId> optionalOfRepoId(final int repoId) { return Optional.ofNullable(ofRepoIdOrNull(repoId)); } @Nullable public static ClientId ofRepoIdOrNull(final int repoId) { if (repoId == SYSTEM.repoId) { return SYSTEM; } else if (repoId == TRASH.repoId) { return TRASH; } e...
return repoId == TRASH.repoId; } public boolean isRegular() { return !isSystem() && !isTrash(); } @Override @JsonValue public int getRepoId() { return repoId; } public static int toRepoId(@Nullable final ClientId clientId) { return clientId != null ? clientId.getRepoId() : -1; } public static boo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\service\ClientId.java
2
请完成以下Java代码
public String toString() { final ToStringHelper builder = MoreObjects.toStringHelper(this) .omitNullValues(); if(isAll()) { builder.addValue("ALL"); } else if(isOther()) { builder.addValue("OTHERS"); } else if(isNone()) { builder.addValue("NONE"); } else // { builder.addValue...
} } lastCharIsWildcard = partSqlLike.endsWith("%"); } if (!lastCharIsWildcard) { sb.append("%"); } return sb.toString(); } public boolean matches(@NonNull final AttributesKey attributesKey) { for (final AttributesKeyPartPattern partPattern : partPatterns) { boolean partPatternMatched = ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\keys\AttributesKeyPattern.java
1
请在Spring Boot框架中完成以下Java代码
public DataSource dataSource() throws SQLException { ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration(); // 设置分库策略 shardingRuleConfig.setDefaultDatabaseShardingStrategyConfig(new InlineShardingStrategyConfiguration("user_id", "ds${user_id % 2}")); // 设置规则适配的表 ...
ds0.setUsername("root"); ds0.setPassword("root"); // 配置第二个数据源 HikariDataSource ds1 = new HikariDataSource(); ds1.setDriverClassName("com.mysql.cj.jdbc.Driver"); ds1.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/spring-boot-demo-2?useUnicode=true&characterEncoding=UTF-8&useSSL=false&au...
repos\spring-boot-demo-master\demo-sharding-jdbc\src\main\java\com\xkcoding\sharding\jdbc\config\DataSourceShardingConfig.java
2
请完成以下Java代码
public I_AD_Val_Rule getAD_Val_Rule() throws RuntimeException { return (I_AD_Val_Rule)MTable.get(getCtx(), I_AD_Val_Rule.Table_Name) .getPO(getAD_Val_Rule_ID(), get_TrxName()); } /** Set Dynamische Validierung. @param AD_Val_Rule_ID Regel für die dynamische Validierung */ public void setAD_Val_Rule...
public void setIncluded_Val_Rule_ID (int Included_Val_Rule_ID) { if (Included_Val_Rule_ID < 1) set_ValueNoCheck (COLUMNNAME_Included_Val_Rule_ID, null); else set_ValueNoCheck (COLUMNNAME_Included_Val_Rule_ID, Integer.valueOf(Included_Val_Rule_ID)); } /** Get Included_Val_Rule_ID. @return Validation ru...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Val_Rule_Included.java
1
请完成以下Java代码
public static String getValue(HttpServletRequest request, String key) { Cookie cookie = get(request, key); if (cookie != null) { return cookie.getValue(); } return null; } /** * 查询Cookie * * @param request * @param key */ private static Cookie get(HttpServletRequest request, String key) { Coo...
/** * 删除Cookie * * @param request * @param response * @param key */ public static void remove(HttpServletRequest request, HttpServletResponse response, String key) { Cookie cookie = get(request, key); if (cookie != null) { set(response, key, "", null, COOKIE_PATH, 0, true); } } }
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\util\CookieUtil.java
1
请完成以下Java代码
public int getQM_Specification_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_QM_Specification_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Valid from. @param ValidFrom Valid from including this date (first day) */ public void setValidFrom (Timestamp ValidFrom) { set_Val...
return (Timestamp)get_Value(COLUMNNAME_ValidTo); } /** Set Search Key. @param Value Search key for the record in the format required - must be unique */ public void setValue (String Value) { set_Value (COLUMNNAME_Value, Value); } /** Get Search Key. @return Search key for the record in the format re...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_QM_Specification.java
1
请在Spring Boot框架中完成以下Java代码
public String login(HttpServletRequest request, Model model) { return "system/login"; } /** * 函数功能说明 :退出 * * @return String * @throws * @参数: @return */ @RequestMapping(value = "/logout", method = {RequestMethod.POST, RequestMethod.GET}) public String logout(HttpSe...
return "system/login"; } if (StringUtil.isEmpty(password)) { msg = "请输入手机号/密码"; model.addAttribute("msg", msg); return "system/login"; } rpUserInfo = rpUserInfoService.getDataByMobile(mobile); if (rpUserInfo == null) { msg = "用户名/密码...
repos\roncoo-pay-master\roncoo-pay-web-merchant\src\main\java\com\roncoo\pay\controller\login\LoginController.java
2
请在Spring Boot框架中完成以下Java代码
HazelcastConfigCustomizer springManagedContextHazelcastConfigCustomizer(ApplicationContext applicationContext) { return (config) -> { SpringManagedContext managementContext = new SpringManagedContext(); managementContext.setApplicationContext(applicationContext); config.setManagedContext(managementContex...
} /** * {@link HazelcastConfigResourceCondition} that checks if the * {@code spring.hazelcast.config} configuration key is defined. */ static class ConfigAvailableCondition extends HazelcastConfigResourceCondition { ConfigAvailableCondition() { super(CONFIG_SYSTEM_PROPERTY, "file:./hazelcast.xml", "class...
repos\spring-boot-4.0.1\module\spring-boot-hazelcast\src\main\java\org\springframework\boot\hazelcast\autoconfigure\HazelcastServerConfiguration.java
2
请完成以下Java代码
protected boolean beforeSave(boolean newRecord) { // // Transform to summary level account if (!newRecord && isSummary() && is_ValueChanged(COLUMNNAME_IsSummary)) { // // Check if we have accounting facts boolean match = new Query(getCtx(), I_Fact_Acct.Table_Name, I_Fact_Acct.COLUMNNAME_Account_ID + "...
return true; } // beforeSave @Override protected boolean afterSave(boolean newRecord, boolean success) { // Value/Name change if (!newRecord && (is_ValueChanged(COLUMNNAME_Value) || is_ValueChanged(COLUMNNAME_Name))) { MAccount.updateValueDescription(getCtx(), "Account_ID=" + getC_ElementValue_ID(), ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MElementValue.java
1
请完成以下Java代码
public static HttpServletRequest getHttpServletRequest() { return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); } /** * 获取HttpServletResponse */ public static HttpServletResponse getHttpServletResponse() { return ((ServletRequestAttributes) RequestContextHolder.getReq...
} /** * 通过name获取 Bean. * * @param name * @return */ public static Object getBean(String name) { return getApplicationContext().getBean(name); } /** * 通过class获取Bean. * * @param clazz * @param <T> * @return */ public static <T> T getBean(Class<T> clazz) { return getApplicationConte...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\SpringContextUtils.java
1
请在Spring Boot框架中完成以下Java代码
public Date getExitAfter() { return exitAfter; } public void setExitAfter(Date exitAfter) { this.exitAfter = exitAfter; } public Date getEndedBefore() { return endedBefore; } public void setEndedBefore(Date endedBefore) { this.endedBefore = endedBefore; } ...
return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } public Boolean getWithoutTenantId() { return withoutTenantId; } public void setWithoutTenantId(Boolean withoutTenantId) { this.withoutTenantId = withoutTenantId; } public...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\planitem\HistoricPlanItemInstanceQueryRequest.java
2
请在Spring Boot框架中完成以下Java代码
public class ReferenceType { @XmlElement(name = "ReferenceCodeQualifier") protected String referenceCodeQualifier; @XmlElement(name = "ReferenceNumber", required = true) protected String referenceNumber; @XmlElement(name = "ReferenceNumberDate") @XmlSchemaType(name = "dateTime") protected X...
} /** * Sets the value of the referenceNumber property. * * @param value * allowed object is * {@link String } * */ public void setReferenceNumber(String value) { this.referenceNumber = value; } /** * Gets the value of the referenceNumberDa...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\ReferenceType.java
2
请完成以下Java代码
public boolean isNull(final Object model, final String columnName) { return GridTabWrapper.isNull(model, columnName); } @Override public <T> T getDynAttribute(final Object model, final String attributeName) { final T value = GridTabWrapper.getWrapper(model).getDynAttribute(attributeName); return value; } ...
final GridTabWrapper wrapper = GridTabWrapper.getWrapper(model); if (wrapper == null) { throw new AdempiereException("Cannot extract " + GridTabWrapper.class + " from " + model); } return wrapper.getPO(); } @Override public Evaluatee getEvaluatee(final Object model) { return GridTabWrapper.getGridTab...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\wrapper\GridTabInterfaceWrapperHelper.java
1
请完成以下Java代码
public void setJobPriority(PriorityDto dto) { if (dto.getPriority() == null) { throw new RestException(Status.BAD_REQUEST, "Priority for job '" + jobId + "' cannot be null."); } try { ManagementService managementService = engine.getManagementService(); managementService.setJobPriority(job...
public void deleteJob() { try { engine.getManagementService() .deleteJob(jobId); } catch (AuthorizationException e) { throw e; } catch (NullValueException e) { throw new InvalidRequestException(Status.NOT_FOUND, e.getMessage()); } catch (ProcessEngineException e) { throw ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\runtime\impl\JobResourceImpl.java
1
请完成以下Java代码
protected ProcessPreconditionsResolution checkPreconditionsApplicable() { final DocumentIdsSelection selectedRowIds = getSelectedRowIds(); if (selectedRowIds.isEmpty()) { return ProcessPreconditionsResolution.rejectBecauseNoSelection(); } return ProcessPreconditionsResolution.accept(); } private void ...
huLotNoQuarantineService.markHUAsQuarantine(hu); final I_M_InOut firstReceipt = inOutLinesForHU.get(0).getM_InOut(); final BPartnerLocationId bpLocationId = BPartnerLocationId.ofRepoId(firstReceipt.getC_BPartner_ID(), firstReceipt.getC_BPartner_Location_ID()); husToQuarantine.add(HUToDistribute.builder() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\product\process\WEBUI_M_Product_LotNumber_Quarantine.java
1
请完成以下Java代码
public <T> T getSelectedModel(final Class<T> modelClass) { return InterfaceWrapperHelper.create(document, modelClass); } @Override public <T> List<T> getSelectedModels(final Class<T> modelClass) { return streamSelectedModels(modelClass) .collect(ImmutableList.toImmutableList()); } @NonNull @Override ...
@Override public SelectionSize getSelectionSize() { return SelectionSize.ofSize(1); } @Override public <T> IQueryFilter<T> getQueryFilter(@NonNull final Class<T> recordClass) { final String keyColumnName = InterfaceWrapperHelper.getKeyColumnName(tableName); return EqualsQueryFilter.of(keyColumnName, getSin...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\DocumentPreconditionsAsContext.java
1
请在Spring Boot框架中完成以下Java代码
public int updateQuantity(Long id, Long memberId, Integer quantity) { OmsCartItem cartItem = new OmsCartItem(); cartItem.setQuantity(quantity); OmsCartItemExample example = new OmsCartItemExample(); example.createCriteria().andDeleteStatusEqualTo(0) .andIdEqualTo(id).andM...
updateCart.setId(cartItem.getId()); updateCart.setModifyDate(new Date()); updateCart.setDeleteStatus(1); cartItemMapper.updateByPrimaryKeySelective(updateCart); cartItem.setId(null); add(cartItem); return 1; } @Override public int clear(Long memberId) { ...
repos\mall-master\mall-portal\src\main\java\com\macro\mall\portal\service\impl\OmsCartItemServiceImpl.java
2
请在Spring Boot框架中完成以下Java代码
public Set<String> getRoles() { return this.roles; } public void setRoles(Set<String> roles) { this.roles = roles; } /** * Status properties for the group. */ public static class Status { /** * List of health statuses in order of severity. */ private List<String> order = new ArrayList<>(); ...
public List<String> getOrder() { return this.order; } public void setOrder(List<String> statusOrder) { if (!CollectionUtils.isEmpty(statusOrder)) { this.order = statusOrder; } } public Map<String, Integer> getHttpMapping() { return this.httpMapping; } } }
repos\spring-boot-4.0.1\module\spring-boot-health\src\main\java\org\springframework\boot\health\autoconfigure\actuate\endpoint\HealthProperties.java
2
请完成以下Java代码
public static ObjectMapper sharedJsonObjectMapper() { return sharedJsonObjectMapper.get(); } @VisibleForTesting public static void resetSharedJsonObjectMapper() { sharedJsonObjectMapper.forget(); } private static final ExtendedMemorizingSupplier<ObjectMapper> sharedJsonObjectMapper = ExtendedMemorizingSupp...
@NonNull public static <T> T fromJsonNonNull(@NonNull final String json, @NonNull final Class<T> valueType) { try { return sharedJsonObjectMapper().readValue(json, valueType); } catch (final JsonProcessingException e) { throw Check.mkEx("Failed converting JSON to " + valueType.getSimpleName() + ": `" ...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\JsonObjectMapperHolder.java
1
请在Spring Boot框架中完成以下Java代码
public class CalcAspect { @Pointcut("execution(* cn.javastack.springboot.aop.service.CalcService.*(..))") private void pointcut() { } @Before("pointcut()") public void before() { System.out.println("********** @Before 前置通知"); } @After("pointcut()") public void after() { ...
@AfterThrowing("pointcut()") public void afterThrowing() { System.out.println("******** @AfterThrowing 异常通知"); } @Around("pointcut()") public Object around(ProceedingJoinPoint proceedingJoinPoint) throws Throwable { Object result; System.out.println("环绕通知之前"); result = p...
repos\spring-boot-best-practice-master\spring-boot-aop\src\main\java\cn\javastack\springboot\aop\aspect\CalcAspect.java
2
请完成以下Java代码
public void build(String userName, Path projectPath, String packageName) throws IOException { Model model = new Model(); configureModel(userName, model); dependencies.forEach(model::addDependency); Build build = configureJavaVersion(); model.setBuild(build); MavenXpp3Writ...
"}\n"; } private static Path generateFolders(Path sourceFolder, String packageName) throws IOException { return Files.createDirectories(sourceFolder.resolve(packageName)); } private Build configureJavaVersion() { Plugin plugin = new Plugin(); plugin.setGroupId("org.apache.maven...
repos\tutorials-master\maven-modules\maven-exec-plugin\src\main\java\com\baeldung\learningplatform\ProjectBuilder.java
1
请完成以下Java代码
public void setCopaymentTo(@Nullable final LocalDate copaymentTo) { this.copaymentTo = copaymentTo; this.copaymentToSet = true; } public void setIsTransferPatient(@Nullable final Boolean isTransferPatient) { this.isTransferPatient = isTransferPatient; this.transferPatientSet = true; } public void setIVT...
this.careDegree = careDegree; this.careDegreeSet = true; } public void setCreatedAt(@Nullable final Instant createdAt) { this.createdAt = createdAt; this.createdAtSet = true; } public void setCreatedByIdentifier(@Nullable final String createdByIdentifier) { this.createdByIdentifier = createdByIdentifier...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-bpartner\src\main\java\de\metas\common\bpartner\v2\request\alberta\JsonAlbertaPatient.java
1
请完成以下Java代码
public void setRMALine(MRMALine rmaLine) { // Check if this invoice is CreditMemo - teo_sarca [ 2804142 ] final I_C_Invoice invoice = getC_Invoice(); if (!Services.get(IInvoiceBL.class).isCreditMemo(invoice)) { throw new AdempiereException("InvoiceNotCreditMemo"); } setAD_Org_ID(rmaLine.getAD_Org_ID());...
setLineTotalAmt(rmaLine.getLineNetAmt()); setC_Project_ID(rmaLine.getC_Project_ID()); // 07442 // Do not change the activity if it was already set final int activityId = getC_Activity_ID(); if (activityId <= 0) { setC_Activity_ID(rmaLine.getC_Activity_ID()); } setC_Campaign_ID(rmaLine.getC_Campaign_...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MInvoiceLine.java
1
请完成以下Java代码
public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getLastUpdatedTime() { return lastUpdatedTime; } public void setLastUpdatedTime(Date lastUpdatedTime) { this.lastUpdatedT...
// common methods ////////////////////////////////////////////////////////// @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("HistoricVariableInstanceEntity["); sb.append("id=").append(id); sb.append(", name=").append(name); sb.appe...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\HistoricVariableInstanceEntityImpl.java
1
请完成以下Java代码
public long getId() { return id; } public void setId(final long id) { this.id = id; } public Optional<Salary> getSalary() { return salary; } public void setSalary(final Optional<Salary> salary) { this.salary = salary; } public String getPhoneticName() ...
return phoneNumbers; } public void setPhoneNumbers(final List<PhoneNumber> phoneNumbers) { this.phoneNumbers = phoneNumbers; } @Override public String toString() { return "Employee{" + "lastName='" + lastName + '\'' + ", firstName='" + firstName + '\''...
repos\tutorials-master\spring-boot-modules\spring-boot-data-2\src\main\java\com\baeldung\jsonignore\emptyfields\Employee.java
1
请完成以下Java代码
public ResponseEntity<Void> updateUserWithHttpInfo(String username, User body) throws RestClientException { Object postBody = body; // verify the required parameter 'username' is set if (username == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the requ...
final MultiValueMap formParams = new LinkedMultiValueMap(); final String[] accepts = { }; final List<MediaType> accept = apiClient.selectHeaderAccept(accepts); final String[] contentTypes = { "application/json" }; final MediaType contentType = apiClient.selectHeaderC...
repos\tutorials-master\spring-swagger-codegen-modules\spring-openapi-generator-api-client\src\main\java\com\baeldung\petstore\client\api\UserApi.java
1
请在Spring Boot框架中完成以下Java代码
public void setSaveMode(SaveMode saveMode) { this.saveMode = saveMode; } public @Nullable String getCleanupCron() { return this.cleanupCron; } public void setCleanupCron(@Nullable String cleanupCron) { this.cleanupCron = cleanupCron; } public ConfigureAction getConfigureAction() { return this.configure...
* No not attempt to apply any custom Redis configuration. */ NONE } /** * Type of Redis session repository to auto-configure. */ public enum RepositoryType { /** * Auto-configure a RedisSessionRepository or ReactiveRedisSessionRepository. */ DEFAULT, /** * Auto-configure a RedisIndexedSes...
repos\spring-boot-4.0.1\module\spring-boot-session-data-redis\src\main\java\org\springframework\boot\session\data\redis\autoconfigure\SessionDataRedisProperties.java
2
请完成以下Java代码
static I_M_Warehouse extractWarehouseOrNull(final I_M_HU hu) { final WarehouseId warehouseId = extractWarehouseIdOrNull(hu); return warehouseId != null ? InterfaceWrapperHelper.create(Services.get(IWarehouseDAO.class).getById(warehouseId), I_M_Warehouse.class) : null; } @Nullable static I_M_HU_PI_Item_...
void setHUStatus(@NonNull I_M_HU hu, @NonNull String huStatus); boolean isEmptyStorage(I_M_HU hu); boolean isDestroyedOrEmptyStorage(I_M_HU hu); void setClearanceStatusRecursively(final HuId huId, final ClearanceStatusInfo statusInfo); boolean isHUHierarchyCleared(@NonNull I_M_HU hu); ITranslatableString getC...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\IHandlingUnitsBL.java
1
请完成以下Java代码
private static void acceptNewConnections(ServerSocket serverSocket, List<ClientConnection> clientConnections) throws SocketException { serverSocket.setSoTimeout(100); try { Socket newClient = serverSocket.accept(); ClientConnection clientConnection = new ClientConnection(newClien...
} } catch (IOException e) { logger.error("Error reading from client {}", client.getSocket() .getInetAddress(), e); } } } private static void closeClientConnection(List<ClientConnection> clientConnections) { for (ClientConnection client...
repos\tutorials-master\core-java-modules\core-java-sockets\src\main\java\com\baeldung\threading\request\ThreadPerRequestServer.java
1
请完成以下Java代码
public void actionPerformed(ActionEvent e) { if(!(e.getSource() instanceof JTextComponent)) { if(gc.getMTab().getRecord_ID() != -1) performSwitch(); } } public void focusGained(FocusEvent e) { performSwitch(); } private void performSwitch() { //gc.transferFocus(); //panel.dispatchTabSwitch(gc); ...
} else if(c instanceof org.compiere.grid.ed.VDate) { org.compiere.grid.ed.VDate d = ((org.compiere.grid.ed.VDate)c); //d.addFocusListener(this); d.addActionListener(this); //d.addKeyListener(new MovementAdapter()); return; } else if(c instanceof org.compiere.grid.ed.VLookup) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\TabSwitcher.java
1
请完成以下Java代码
private int getAD_RelationType_ID() { return Check.assumeGreaterThanZero(adRelationTypeId, "adRelationTypeId"); } private RelatedDocumentsId getRelatedDocumentsId() { return RelatedDocumentsId.ofString("AD_RelationType_ID-" + getAD_RelationType_ID()); } public Builder setInternalName(final String in...
private AdWindowId getCustomizationWindowId(@Nullable final AdWindowId adWindowId) { return adWindowId != null ? customizedWindowInfoMap.getCustomizedWindowInfo(adWindowId).map(CustomizedWindowInfo::getCustomizationWindowId).orElse(adWindowId) : null; } public Builder setSourceRoleDisplayName(final ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\references\related_documents\relation_type\SpecificRelationTypeRelatedDocumentsProvider.java
1
请完成以下Java代码
private I_M_PriceList_Version getPriceListVersionEffective(final IPricingContext pricingCtx) { final I_M_PriceList_Version contextPLV = pricingCtx.getM_PriceList_Version(); if (contextPLV != null) { return contextPLV.isActive() ? contextPLV : null; } final I_M_PriceList_Version plv = priceListsRepo.retri...
{ final UomId productPriceUomId = UomId.ofRepoIdOrNull(productPrice.getC_UOM_ID()); if (productPriceUomId != null) { return productPriceUomId; } final ProductId productId = ProductId.ofRepoId(productPrice.getM_Product_ID()); return productsService.getStockUOMId(productId); } private static void updat...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\rules\price_list_version\MainProductPriceRule.java
1
请完成以下Java代码
default void toOutputStream(OutputStream out) throws IOException { toOutputStream(out, StandardCharsets.UTF_8); } /** * Write the JSON to the provided {@link OutputStream} using the given * {@link Charset}. The output stream will not be closed. * @param out the {@link OutputStream} to receive the JSON * @p...
out.flush(); } /** * Factory method used to create a {@link WritableJson} with a sensible * {@link Object#toString()} that delegate to {@link WritableJson#toJsonString()}. * @param writableJson the source {@link WritableJson} * @return a new {@link WritableJson} with a sensible {@link Object#toString()}. *...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\json\WritableJson.java
1
请完成以下Java代码
public boolean isEmpty() { return getElements().isEmpty(); } public boolean contains(Object o) { return getElements().contains(o); } public Iterator<T> iterator() { return (Iterator<T>) getElements().iterator(); } public Object[] toArray() { return ...
for (T element : c) { add(element); } return true; } public boolean removeAll(Collection<?> c) { boolean result = false; for (Object o : c) { result |= remove(o); } return result; } public boolean retainAll(Collection<?> c) { ...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\camunda\CamundaListImpl.java
1
请完成以下Java代码
public class DelegateExpressionActivitiEventListener extends BaseDelegateEventListener { protected Expression expression; protected boolean failOnException = false; public DelegateExpressionActivitiEventListener(Expression expression, Class<?> entityClass) { this.expression = expression; s...
} else { // Force failing, since the exception we're about to throw // cannot be ignored, because it did not originate from the listener itself failOnException = true; throw new ActivitiIllegalArgumentException( "Delegate expression " +...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\helper\DelegateExpressionActivitiEventListener.java
1
请完成以下Java代码
public int getRef_M_PackagingTreeItem_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_Ref_M_PackagingTreeItem_ID); if (ii == null) return 0; return ii.intValue(); } /** Status AD_Reference_ID=540165 */ public static final int STATUS_AD_Reference_ID=540165; /** Ready = R */ public static final Strin...
set_Value (COLUMNNAME_Type, Type); } /** Get Art. @return Art */ @Override public String getType () { return (String)get_Value(COLUMNNAME_Type); } /** Set Gewicht. @param Weight Gewicht eines Produktes */ @Override public void setWeight (BigDecimal Weight) { set_Value (COLUMNNAME_Weight, We...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\compiere\model\X_M_PackagingTreeItem.java
1
请完成以下Java代码
protected UpdateJobSuspensionStateBuilderImpl createJobCommandBuilder() { UpdateJobSuspensionStateBuilderImpl builder = new UpdateJobSuspensionStateBuilderImpl(); if (processInstanceId != null) { builder.byProcessInstanceId(processInstanceId); } else if (processDefinitionId != null) { builder....
} } return builder; } @Override protected AbstractSetJobStateCmd getNextCommand() { UpdateJobSuspensionStateBuilderImpl jobCommandBuilder = createJobCommandBuilder(); return getNextCommand(jobCommandBuilder); } protected abstract AbstractSetJobStateCmd getNextCommand(UpdateJobSuspensionStat...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\AbstractSetProcessInstanceStateCmd.java
1
请完成以下Java代码
public Optional<WindowId> getZoomIntoWindowId() { return Optional.empty(); } @Override public boolean isCached() { return true; } @Override @Nullable public String getCachePrefix() { return null; // not important because isCached() returns false } @Override public void cacheInvalidate() { label...
} return labelsValuesLookupDataSource.findById(id); } @Override public LookupDataSourceContext.Builder newContextForFetchingList() { return LookupDataSourceContext.builder(tableName) .setRequiredParameters(parameters) .requiresAD_Language() .requiresUserRolePermissionsKey(); } @Override public...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\lookup\LabelsLookup.java
1
请完成以下Java代码
public class VersionParam { /** * 机具IMEI码 */ @ApiModelProperty(value = "IMEI码", name = "imei", example = "2324DEEFAXX122", required = true) private String imei; /** * 应用ID */ @ApiModelProperty(value = "APP应用ID,每个APP都有唯一的Application Id", name = "applicationId", example = "com.xnco...
} public String getVersion() { return version; } public void setVersion(String version) { this.version = version; } public String getImei() { return imei; } public void setImei(String imei) { this.imei = imei; } }
repos\SpringBootBucket-master\springboot-swagger2\src\main\java\com\xncoding\jwt\api\model\VersionParam.java
1
请完成以下Java代码
public class CumulativePermission extends AbstractPermission { private String pattern = THIRTY_TWO_RESERVED_OFF; public CumulativePermission() { super(0, ' '); } public CumulativePermission clear(Permission permission) { this.mask &= ~permission.getMask(); this.pattern = AclFormattingUtils.demergePatterns(...
return this; } public CumulativePermission set(Permission permission) { this.mask |= permission.getMask(); this.pattern = AclFormattingUtils.mergePatterns(this.pattern, permission.getPattern()); return this; } @Override public String getPattern() { return this.pattern; } }
repos\spring-security-main\acl\src\main\java\org\springframework\security\acls\domain\CumulativePermission.java
1
请完成以下Java代码
private void loadFromGridTab() { runDisabled(new Runnable() { @Override public void run() { loadFromGridTab0(); } }); } private void loadFromGridTab0() { final GridTab mTab = getGridTab(); if (mTab == null) { return; } // // Get GridFields and sort them by SeqNoGrid final Gr...
final TableColumn column = tableColumnModel.getColumn(i); final String columnName = getColumnName(column); // Update final GridField gridField = columnName2GridField.get(columnName); loadTableColumn(column, gridField); } // // Reorder table's columns based on GridField settings int currentIdx = 0;...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\grid\CTableColumns2GridTabSynchronizer.java
1
请在Spring Boot框架中完成以下Java代码
public Page<Persons> query() { return this.instance.findBySex( this.sex, this.pageable ); } public Integer getCount() { return this.query().getSize(); } public Integer getPageNumber() { return this.query().getNumber(); } pub...
typeInstance = new AllType(sex, email, pageable); } else if (sex.length() > 0 && email.length() > 0) { typeInstance = new SexEmailType(sex, email, pageable); } else { typeInstance = new SexType(sex, email, pageable); } this.multiValue.setCount(typeInstance.get...
repos\SpringBoot-vue-master\src\main\java\com\boylegu\springboot_vue\controller\pagination\PaginationFormatting.java
2
请完成以下Java代码
public <T> T get(final String name) { if (props.containsKey(name)) { @SuppressWarnings("unchecked") final T value = (T)props.get(name); return value; } // Check other sources for (final IContext source : sources) { final String valueStr = source.getProperty(name); if (valueStr != null) {...
// Check defaults @SuppressWarnings("unchecked") final T value = (T)defaults.get(name); return value; } @Override public String toString() { return "Context[" + "sources=" + sources + ", properties=" + props + ", defaults=" + defaults + "]"; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.printing.client\src\main\java\de\metas\printing\client\Context.java
1
请完成以下Java代码
public class FetchAndLockResult { protected List<LockedExternalTaskDto> tasks = new ArrayList<LockedExternalTaskDto>(); protected Throwable throwable; public FetchAndLockResult(List<LockedExternalTaskDto> tasks) { this.tasks = tasks; } public FetchAndLockResult(Throwable throwable) { this.throwable...
public boolean wasSuccessful() { return throwable == null; } public static FetchAndLockResult successful(List<LockedExternalTaskDto> tasks) { return new FetchAndLockResult(tasks); } public static FetchAndLockResult failed(Throwable throwable) { return new FetchAndLockResult(throwable); } @Ove...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\FetchAndLockResult.java
1
请在Spring Boot框架中完成以下Java代码
public class MSV3CustomerConfigService { @Autowired private MSV3ServerPeerService msv3ServerPeerService; public void publishConfigChanged(final I_MSV3_Customer_Config configRecord) { msv3ServerPeerService.publishUserChangedEvent(toMSV3UserChangedEvent(configRecord)); } public void publishConfigDeleted(final i...
} private static MSV3UserChangedEvent toMSV3UserChangedEvent(final I_MSV3_Customer_Config configRecord) { final MSV3MetasfreshUserId externalId = MSV3MetasfreshUserId.of(configRecord.getMSV3_Customer_Config_ID()); if (configRecord.isActive()) { return MSV3UserChangedEvent.prepareCreatedOrUpdatedEvent(exter...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server-peer-metasfresh\src\main\java\de\metas\vertical\pharma\msv3\server\peer\metasfresh\services\MSV3CustomerConfigService.java
2
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public org.compiere.model.I_M_Allergen getM_Allergen() { return get_ValueAsPO(COLUMNNAME_M_Allergen_ID, org.compiere.model.I_M_Allergen.class); } @Override public void set...
@Override public int getM_Product_Allergen_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_Allergen_ID); } @Override public void setM_Product_ID (final int M_Product_ID) { if (M_Product_ID < 1) set_Value (COLUMNNAME_M_Product_ID, null); else set_Value (COLUMNNAME_M_Product_ID, M_Product_ID); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_Allergen.java
1
请完成以下Java代码
public void setSEPA_Export_ID (int SEPA_Export_ID) { if (SEPA_Export_ID < 1) set_ValueNoCheck (COLUMNNAME_SEPA_Export_ID, null); else set_ValueNoCheck (COLUMNNAME_SEPA_Export_ID, Integer.valueOf(SEPA_Export_ID)); } /** Get SEPA Export. @return SEPA Export */ @Override public int getSEPA_Export_ID ...
{ return (java.lang.String)get_Value(COLUMNNAME_SEPA_Protocol); } /** Set Swift code. @param SwiftCode Swift Code or BIC */ @Override public void setSwiftCode (java.lang.String SwiftCode) { set_Value (COLUMNNAME_SwiftCode, SwiftCode); } /** Get Swift code. @return Swift Code or BIC */ @Overri...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\base\src\main\java-gen\de\metas\payment\sepa\model\X_SEPA_Export.java
1
请完成以下Java代码
public ProcessConstantsMapping getConstantForFlowElement(String flowElementUUID) { ProcessConstantsMapping processConstantsMapping = constants.get(flowElementUUID); return processConstantsMapping != null ? processConstantsMapping : new ProcessConstantsMapping(); } public ProcessVariablesMapping...
public boolean shouldMapAllInputs(String elementId) { ProcessVariablesMapping processVariablesMapping = mappings.get(elementId); return ( processVariablesMapping.getMappingType() != null && (processVariablesMapping.getMappingType().equals(MappingType.MAP_ALL_INPUTS) || ...
repos\Activiti-develop\activiti-core\activiti-spring-process-extensions\src\main\java\org\activiti\spring\process\model\Extension.java
1
请完成以下Java代码
static abstract class UIResourceJsonSerializer<T> implements JsonSerializer<T>, JsonDeserializer<T> { public static final String PROPERTY_Classname = "className"; } public static class ColorJsonSerializer extends UIResourceJsonSerializer<Color> { @Override public JsonElement serialize(Color src, Type typeOfS...
@Override public JsonElement serialize(VEditorDialogButtonAlign src, Type typeOfSrc, JsonSerializationContext context) { final JsonObject jo = new JsonObject(); jo.addProperty(PROPERTY_Classname, src.getClass().getName()); jo.addProperty("value", src.toString()); return jo; } @Override public VEd...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\plaf\UIDefaultsSerializer.java
1
请完成以下Java代码
public URL lookupBpmPlatformXmlLocationFromEnvironmentVariable() { String bpmPlatformXmlLocation = System.getenv(BPM_PLATFORM_XML_ENVIRONMENT_VARIABLE); String logStatement = "environment variable [" + BPM_PLATFORM_XML_ENVIRONMENT_VARIABLE + "]"; if (bpmPlatformXmlLocation == null) { bpmPlatformXmlLo...
return fileLocation; } public URL lookupBpmPlatformXmlFromClassPath() { return lookupBpmPlatformXmlFromClassPath(BPM_PLATFORM_XML_RESOURCE_LOCATION); } public URL lookupBpmPlatformXml() { URL fileLocation = lookupBpmPlatformXmlLocationFromJndi(); if (fileLocation == null) { fileLocation = l...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\deployment\AbstractParseBpmPlatformXmlStep.java
1
请完成以下Java代码
public JsonNode getAdditionalInfo() { return super.getAdditionalInfo(); } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("Tenant [title="); builder.append(title); builder.append(", region="); builder.append(re...
builder.append(", address="); builder.append(address); builder.append(", address2="); builder.append(address2); builder.append(", zip="); builder.append(zip); builder.append(", phone="); builder.append(phone); builder.append(", email="); builder.ap...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\Tenant.java
1
请完成以下Java代码
public ImmutableMap<HuId, PickedHUEditorRow> getForPickingCandidates() { final ImmutableMap<HuId, ImmutableSet<OrderId>> huId2OrderIds = getHUId2OpenPickingOrderIds(); return topLevelHUId2ProcessedFlag.keySet() .stream() .map(topLevelHUId -> { final HUEditorRow editorRow = huEditorRows.get(topLevelHU...
pickingCandidates.stream() .filter(pickingCandidate -> pickingCandidate.getPickingSlotId() != null) .filter(pickingCandidate -> !pickingCandidate.isRejectedToPick()) .filter(pickingCandidate -> pickingCandidate.getPickFrom().getHuId() != null) .forEach(pickingCandidate -> huId2ProcessedFlag.merge(pickin...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\PickingCandidateHURowsProvider.java
1
请完成以下Java代码
private String generatePseudoRandomNumber() { byte[] randomBytes = new byte[this.pseudoRandomNumberBytes]; this.secureRandom.nextBytes(randomBytes); return new String(Hex.encode(randomBytes)); } private String computeServerSecretApplicableAt(long time) { return this.serverSecret + ":" + Long.valueOf(time % t...
* defaults to 256) */ public void setPseudoRandomNumberBytes(int pseudoRandomNumberBytes) { Assert.isTrue(pseudoRandomNumberBytes >= 0, "Must have a positive pseudo random number bit size"); this.pseudoRandomNumberBytes = pseudoRandomNumberBytes; } public void setServerInteger(Integer serverInteger) { this....
repos\spring-security-main\core\src\main\java\org\springframework\security\core\token\KeyBasedPersistenceTokenService.java
1
请完成以下Java代码
private void addFactoryMethod(EclipseNode singletonClass, TypeDeclaration astNode, TypeReference typeReference, TypeDeclaration innerClass, FieldDeclaration field) { MethodDeclaration factoryMethod = new MethodDeclaration(astNode.compilationResult); factoryMethod.modifiers = AccStatic | ClassFileConstan...
private ConstructorDeclaration addConstructor(EclipseNode singletonClass, TypeDeclaration astNode) { ConstructorDeclaration constructor = new ConstructorDeclaration(astNode.compilationResult); constructor.modifiers = AccPrivate; constructor.selector = astNode.name; constructor.sourceStar...
repos\tutorials-master\lombok-modules\lombok-custom\src\main\java\com\baeldung\singleton\handlers\SingletonEclipseHandler.java
1
请完成以下Java代码
public class PreferenceCustomizer { /** * Shall be called once, at client startup. */ public static void customizePrefernces() { final IMsgBL msgBL = Services.get(IMsgBL.class); final Border insetBorder = BorderFactory.createEmptyBorder(2, 2, 2, 0); final FlowLayout flowLayout = new FlowLayout(FlowLayout....
// do this on store final ValueNamePair selectedItem = dlmLevelField.getSelectedItem(); if(selectedItem != null) { Ini.setProperty(DLMPermanentIniCustomizer.INI_P_DLM_DLM_LEVEL, selectedItem.getValue()); } }); } public static Map<Integer, ValueNamePair> getValues() { final IMsgBL msg...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\swingui\src\main\java\de\metas\dlm\swingui\PreferenceCustomizer.java
1
请完成以下Java代码
public class Employee { private int id; private String firstName; private String lastName; public Employee(int id, String firstName, String lastName) { this.id = id; this.firstName = firstName; this.lastName = lastName; } public int getId() { return id; }...
public String getFirstName() { return firstName; } public void setFirstName(final String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(final String lastName) { this.lastName = lastName; }...
repos\tutorials-master\persistence-modules\spring-jdbc\src\main\java\com\baeldung\spring\jdbc\template\inclause\Employee.java
1
请完成以下Java代码
public Integer getInputType() { return inputType; } public void setInputType(Integer inputType) { this.inputType = inputType; } public String getInputList() { return inputList; } public void setInputList(String inputList) { this.inputList = inputList; } ...
public void setHandAddStatus(Integer handAddStatus) { this.handAddStatus = handAddStatus; } public Integer getType() { return type; } public void setType(Integer type) { this.type = type; } @Override public String toString() { StringBuilder sb = new StringB...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsProductAttribute.java
1
请完成以下Spring Boot application配置
spring.quartz.job-store-type=jdbc # Always create the Quartz database on startup spring.quartz.jdbc.initialize-schema=always spring.datasource.jdbc-url=jdbc:h2:~/quartz-db;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE spring.datasource.driverClassName=org.h2.Driver spring.dat
asource.username=sa spring.datasource.password= spring.jpa.hibernate.ddl-auto=create spring.h2.console.enabled=true
repos\tutorials-master\spring-quartz\src\main\resources\application-recovery.properties
2
请完成以下Java代码
private Optional<ProductPrice> getManualPrice(@NonNull final I_C_InvoiceLine invoiceLine) { if (!invoiceLine.isManualPrice() || invoiceLine.getPrice_UOM_ID() <= 0 || invoiceLine.getM_Product_ID() <= 0) { logger.trace("Missing manual product price information on C_InvoiceLine: {}!", invoiceLine.getC_Invo...
private Optional<ProductPrice> getManualPrice(@NonNull final IPricingContext pricingContext) { if (pricingContext.getManualPriceEnabled() == null || !pricingContext.getManualPriceEnabled().isTrue() || pricingContext.getUomId() == null || pricingContext.getProductId() == null || pricingContext.getCurr...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\pricing\rules\ManualPricePricingRule.java
1
请完成以下Java代码
public class FindActiveActivityIdsCmd implements Command<List<String>>, Serializable { private static final long serialVersionUID = 1L; protected String executionId; public FindActiveActivityIdsCmd(String executionId) { this.executionId = executionId; } public List<String> execute(Command...
List<String> activeActivityIds = new ArrayList<String>(); collectActiveActivityIds(executionEntity, activeActivityIds); return activeActivityIds; } protected void collectActiveActivityIds(ExecutionEntity executionEntity, List<String> activeActivityIds) { if (executionEntity.isActive() &...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\FindActiveActivityIdsCmd.java
1
请完成以下Java代码
public StoredProcedureQuery createNamedStoredProcedureQuery(String name) { return delegate.createNamedStoredProcedureQuery(name); } public StoredProcedureQuery createStoredProcedureQuery(String procedureName) { return delegate.createStoredProcedureQuery(procedureName); }...
public EntityManagerFactory getEntityManagerFactory() { return delegate.getEntityManagerFactory(); } public CriteriaBuilder getCriteriaBuilder() { return delegate.getCriteriaBuilder(); } public Metamodel getMetamodel() { return delegate.getMetamodel(...
repos\tutorials-master\apache-olingo\src\main\java\com\baeldung\examples\olingo2\CarsODataJPAServiceFactory.java
1
请完成以下Java代码
public void setProcessed (final boolean Processed) { set_ValueNoCheck (COLUMNNAME_Processed, Processed); } @Override public boolean isProcessed() { return get_ValueAsBoolean(COLUMNNAME_Processed); } @Override public void setProcessing (final boolean Processing) { set_ValueNoCheck (COLUMNNAME_Processin...
} @Override public void setSumOrderedInStockingUOM (final @Nullable BigDecimal SumOrderedInStockingUOM) { set_ValueNoCheck (COLUMNNAME_SumOrderedInStockingUOM, SumOrderedInStockingUOM); } @Override public BigDecimal getSumOrderedInStockingUOM() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_SumO...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_M_InOut_Desadv_V.java
1
请完成以下Java代码
public class Permission { private int id; //权限名称 private String name; //权限描述 private String descritpion; //授权链接 private String url; //父节点id private int pid; public int getId() { return id; } public void setId(int id) { this.id = id; } public...
this.descritpion = descritpion; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public int getPid() { return pid; } public void setPid(int pid) { this.pid = pid; } }
repos\springBoot-master\springboot-SpringSecurity1\src\main\java\com\us\example\domain\Permission.java
1
请完成以下Java代码
public CashAccount16 getSfkpgAcct() { return sfkpgAcct; } /** * Sets the value of the sfkpgAcct property. * * @param value * allowed object is * {@link CashAccount16 } * */ public void setSfkpgAcct(CashAccount16 value) { this.sfkpgAcct = valu...
public String getAddtlTxInf() { return addtlTxInf; } /** * Sets the value of the addtlTxInf property. * * @param value * allowed object is * {@link String } * */ public void setAddtlTxInf(String value) { this.addtlTxInf = 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\EntryTransaction2.java
1
请完成以下Java代码
static boolean checkUsingReplaceAllMethod(String input) { if (input == null || input.isEmpty()) { return false; } String result = input.replaceAll("\\d", ""); return result.length() != input.length(); } static boolean checkUsingIsDigitMethod(String input) { ...
static boolean checkUsingApacheCommonsLang(String input) { String result = StringUtils.getDigits(input); return result != null && !result.isEmpty(); } static boolean checkUsingGuava(String input) { if (input == null || input.isEmpty()) { return false; } Stri...
repos\tutorials-master\core-java-modules\core-java-string-operations-11\src\main\java\com\baeldung\strcontainsnumber\StrContainsNumberUtils.java
1
请在Spring Boot框架中完成以下Java代码
public Mono<Boolean> apply(UserDO userDO) { // 如果不存在该用户,则直接返回 false 失败 if (userDO == USER_NULL) { return Mono.just(false); } // 查询用户是否存在 return userRepository.findByUsernam...
// 执行删除。这里仅仅是示例,项目中不要物理删除,而是标记删除 return user.defaultIfEmpty(USER_NULL) // 设置 USER_NULL 作为 null 的情况,否则 flatMap 不会往下走 .flatMap(new Function<UserDO, Mono<Boolean>>() { @Override public Mono<Boolean> apply(UserDO userDO) { // 如果不存在该用户,...
repos\SpringBoot-Labs-master\lab-27\lab-27-webflux-elasticsearch\src\main\java\cn\iocoder\springboot\lab27\springwebflux\controller\UserController.java
2
请完成以下Java代码
public void parseIntermediateThrowEvent(Element intermediateEventElement, ScopeImpl scope, ActivityImpl activity) { addActivityHandlers(activity); } public void parseIntermediateCatchEvent(Element intermediateEventElement, ScopeImpl scope, ActivityImpl activity) { // do not write history for link events ...
@Override public void parseIoMapping(Element extensionElements, ActivityImpl activity, IoMapping inputOutput) { } // helper methods /////////////////////////////////////////////////////////// protected void addActivityHandlers(ActivityImpl activity) { ensureHistoryLevelInitialized(); if (historyLevel....
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\parser\HistoryParseListener.java
1
请完成以下Java代码
public void setRecord_ID (final int Record_ID) { if (Record_ID < 0) set_Value (COLUMNNAME_Record_ID, null); else set_Value (COLUMNNAME_Record_ID, Record_ID); } @Override public int getRecord_ID() { return get_ValueAsInt(COLUMNNAME_Record_ID); } @Override public void setRegionName (final @Nullable ...
public int getRevolut_Payment_Export_ID() { return get_ValueAsInt(COLUMNNAME_Revolut_Payment_Export_ID); } @Override public void setRoutingNo (final @Nullable java.lang.String RoutingNo) { set_Value (COLUMNNAME_RoutingNo, RoutingNo); } @Override public java.lang.String getRoutingNo() { return get_Value...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.revolut\src\main\java-gen\de\metas\payment\revolut\model\X_Revolut_Payment_Export.java
1