instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public class UnsynchronizedReceiver implements Runnable { private static final Logger LOG = LoggerFactory.getLogger(UnsynchronizedReceiver.class); private final Data data; private String message; private boolean illegalMonitorStateExceptionOccurred; public UnsynchronizedReceiver(Data data) { ...
LOG.error("thread was interrupted", e); Thread.currentThread().interrupt(); } catch (IllegalMonitorStateException e) { LOG.error("illegal monitor state exception occurred", e); illegalMonitorStateExceptionOccurred = true; } } public boolean hasIllegalMonitorS...
repos\tutorials-master\core-java-modules\core-java-exceptions-3\src\main\java\com\baeldung\exceptions\illegalmonitorstate\UnsynchronizedReceiver.java
1
请完成以下Java代码
public void setEnable(List<String> enable) { if (enable != null) { enabledHeaders = enable.stream().map(String::toLowerCase).collect(Collectors.toUnmodifiableSet()); } } /** * @return the default/opt-out header names to disable */ public Set<String> getDisabledHeaders() { return disabledHeaders; } /...
public Set<String> getDefaultHeaders() { return defaultHeaders; } @Override public String toString() { return "SecureHeadersProperties{" + "xssProtectionHeader='" + xssProtectionHeader + '\'' + ", strictTransportSecurity='" + strictTransportSecurity + '\'' + ", frameOptions='" + frameOptions + '\'' + ",...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\SecureHeadersProperties.java
1
请完成以下Java代码
public static byte[] decodeBase64(final String str) { return BaseEncoding.base64().decode(str); } // 03743 public static void writeBytes(final File file, final byte[] data) { FileOutputStream out = null; try { out = new FileOutputStream(file, false); out.write(data); } catch (final IOException e...
{ msg = e.getMessage(); } if (Check.isEmpty(msg, true)) { // note that e.g. a NullPointerException doesn't have a nice message msg = dumpStackTraceToString(e); } return msg; } public static String replaceNonDigitCharsWithZero(String stringToModify) { final int size = stringToModify.length(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\Util.java
1
请完成以下Java代码
public String getCd() { return cd; } /** * Sets the value of the cd property. * * @param value * allowed object is * {@link String } * */ public void setCd(String value) { this.cd = value; } /** * Gets the value of the issr prop...
* {@link String } * */ public String getIssr() { return issr; } /** * Sets the value of the issr property. * * @param value * allowed object is * {@link String } * */ public void setIssr(String value) { this.issr = valu...
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\ProprietaryBankTransactionCodeStructure1.java
1
请完成以下Java代码
public boolean isStarted() { return client.isStarted(); } @Override public void start() { client.start(); } @Override public void stop() { client.stop(); }
@Override public void destroy() { if (client != null) { client.destroy(); } client = null; } @Override public void restart() { stop(); start(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.embedded-client\src\main\java\de\metas\printing\client\impl\PrintingClientDelegate.java
1
请完成以下Java代码
public class InvoiceCandidateGroupCompensationChangesHandler { private final InvoiceCandidateGroupRepository groupsRepo; @Builder private InvoiceCandidateGroupCompensationChangesHandler(@NonNull final InvoiceCandidateGroupRepository groupsRepo) { this.groupsRepo = groupsRepo; } public void onInvoiceCandidateC...
final boolean groupCompensationLine = invoiceCandidate.isGroupCompensationLine(); final String amtType = invoiceCandidate.getGroupCompensationAmtType(); if (!groupCompensationLine) { onRegularGroupLineChanged(invoiceCandidate); } else if (X_C_OrderLine.GROUPCOMPENSATIONAMTTYPE_Percent.equals(amtType)) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\compensationGroup\InvoiceCandidateGroupCompensationChangesHandler.java
1
请完成以下Java代码
public DocumentNoBuilder setFailOnError(final boolean failOnError) { _failOnError = failOnError; return this; } private boolean isFailOnError() { return _failOnError; } @Override public DocumentNoBuilder setUsePreliminaryDocumentNo(final boolean usePreliminaryDocumentNo) { this._usePreliminaryDocument...
{ calendarYearMonthAndDayBuilder.calendarMonth(getCalendarMonth(docSeqInfo.getDateColumn())); } return calendarYearMonthAndDayBuilder.build(); } @Builder @Value private static class CalendarYearMonthAndDay { String calendarYear; String calendarMonth; String calendarDay; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\sequence\impl\DocumentNoBuilder.java
1
请完成以下Java代码
public void setCountryCode(final String countryCode) { this.countryCode = countryCode; this.countryCodeSet = true; } public void setGln(final String gln) { this.gln = gln; this.glnSet = true; } public void setShipTo(final Boolean shipTo) { this.shipTo = shipTo; this.shipToSet = true; } public vo...
public void setEphemeral(final Boolean ephemeral) { this.ephemeral = ephemeral; this.ephemeralSet = true; } public void setEmail(@Nullable final String email) { this.email = email; this.emailSet = true; } public void setPhone(final String phone) { this.phone = phone; this.phoneSet = true; } publ...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-bpartner\src\main\java\de\metas\common\bpartner\v2\request\JsonRequestLocation.java
1
请完成以下Java代码
public String getDocAction() { return model.getDocAction(); } @Override public boolean save() { InterfaceWrapperHelper.save(model); return true; } @Override public Properties getCtx() { return InterfaceWrapperHelper.getCtx(model); } @Override public int get_ID() { return InterfaceWrapperHelper...
public String get_TrxName() { return InterfaceWrapperHelper.getTrxName(model); } @Override public void set_TrxName(final String trxName) { InterfaceWrapperHelper.setTrxName(model, trxName); } @Override public boolean isActive() { return model.isActive(); } @Override public Object getModel() { re...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\engine\DocumentWrapper.java
1
请完成以下Java代码
public static int getDividerLocation() { final int defaultValue = 400; final String key = "Divider"; final String value = (String)s_prop.get(key); if (value == null || value.length() == 0) return defaultValue; int valueInt = defaultValue; try { valueInt = Integer.parseInt(value); } catch (fina...
return Charset.defaultCharset(); } try { return Charset.forName(charsetName); } catch (final Exception ignored) { } return Charset.defaultCharset(); } public static String getPropertyFileName() { return s_propertyFileName; } // public static class IsNotSwingClient implements Condition // { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\Ini.java
1
请完成以下Java代码
public ServerResponse.BodyBuilder cacheControl(CacheControl cacheControl) { this.headers.setCacheControl(cacheControl); return this; } @Override public ServerResponse.BodyBuilder varyBy(String... requestHeaders) { this.headers.setVary(Arrays.asList(requestHeaders)); return this; } @Override public Serve...
} @Override public ServerResponse stream(Consumer<ServerResponse.StreamBuilder> streamConsumer) { return GatewayStreamingServerResponse.create(this.statusCode, this.headers, this.cookies, streamConsumer, null); } private static class WriteFunctionResponse extends AbstractGatewayServerResponse { private final...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\handler\GatewayServerResponseBuilder.java
1
请完成以下Java代码
public void collectAll(@Nullable final Collection<? extends Object> sqlParams) { if (sqlParams == null || sqlParams.isEmpty()) { return; } if (params == null) { throw new IllegalStateException("Cannot append " + sqlParams + " to not collecting params"); } params.addAll(sqlParams); } public void...
} else { params.add(sqlValue); return "?"; } } /** @return readonly live list */ public List<Object> toList() { return paramsRO; } /** @return read/write live list */ public List<Object> toLiveList() { return params; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\sql\SqlParamsCollector.java
1
请完成以下Java代码
public String getTopic() { return this.topic; } public @Nullable Headers getHeaders() { return this.headers; } public byte[] getData() { return Arrays.copyOf(this.data, this.data.length); } public boolean isForKey() { return this.isForKey; }
public Exception getException() { return this.exception; } @Override public String toString() { return "FailedDeserializationInfo{" + "topic='" + this.topic + '\'' + ", headers=" + this.headers + ", data=" + Arrays.toString(this.data) + ", isForKey=" + this.isForKey + ", exception=" + this.e...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\serializer\FailedDeserializationInfo.java
1
请完成以下Java代码
public class TokenizedStringBuilder { // Parameters private final StringBuilder sb; private final String separator; private boolean autoAppendSeparator = true; // Status private boolean lastAppendedIsSeparator = false; public TokenizedStringBuilder(final StringBuilder sb, final String separator) { super(); ...
this.autoAppendSeparator = autoAppendSeparator; return this; } public boolean isLastAppendedIsSeparator() { return lastAppendedIsSeparator; } public String getSeparator() { return separator; } public TokenizedStringBuilder append(final Object obj) { if (autoAppendSeparator) { appendSeparatorIfN...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\text\TokenizedStringBuilder.java
1
请完成以下Java代码
public void setC_PaySchedule(final org.compiere.model.I_C_PaySchedule C_PaySchedule) { set_ValueFromPO(COLUMNNAME_C_PaySchedule_ID, org.compiere.model.I_C_PaySchedule.class, C_PaySchedule); } @Override public void setC_PaySchedule_ID (final int C_PaySchedule_ID) { if (C_PaySchedule_ID < 1) set_ValueNoChec...
set_Value (COLUMNNAME_DueDate, DueDate); } @Override public java.sql.Timestamp getDueDate() { return get_ValueAsTimestamp(COLUMNNAME_DueDate); } @Override public void setIsValid (final boolean IsValid) { set_Value (COLUMNNAME_IsValid, IsValid); } @Override public boolean isValid() { return get_Va...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_InvoicePaySchedule.java
1
请在Spring Boot框架中完成以下Java代码
public class HistoricIncidentRestServiceImpl implements HistoricIncidentRestService { protected ObjectMapper objectMapper; protected ProcessEngine processEngine; public HistoricIncidentRestServiceImpl(ObjectMapper objectMapper, ProcessEngine processEngine) { this.objectMapper = objectMapper; this.proces...
result.add(dto); } return result; } @Override public CountResultDto getHistoricIncidentsCount(UriInfo uriInfo) { HistoricIncidentQueryDto queryDto = new HistoricIncidentQueryDto(objectMapper, uriInfo.getQueryParameters()); HistoricIncidentQuery query = queryDto.toQuery(processEngine); long ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\history\HistoricIncidentRestServiceImpl.java
2
请完成以下Java代码
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 KeyNam...
{ set_Value (COLUMNNAME_RemindDays, Integer.valueOf(RemindDays)); } /** Get Reminder Days. @return Days between sending Reminder Emails for a due or inactive Document */ public int getRemindDays () { Integer ii = (Integer)get_Value(COLUMNNAME_RemindDays); if (ii == null) return 0; return ii.intVa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WorkflowProcessor.java
1
请完成以下Java代码
public void setIsDefault (boolean IsDefault) { set_Value (COLUMNNAME_IsDefault, Boolean.valueOf(IsDefault)); } /** Get Standard. @return Default value */ @Override public boolean isDefault () { Object oo = get_Value(COLUMNNAME_IsDefault); if (oo != null) { if (oo instanceof Boolean) retu...
public java.lang.String getOtherClause () { return (java.lang.String)get_Value(COLUMNNAME_OtherClause); } /** Set Verarbeiten. @param Processing Verarbeiten */ @Override public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Verarbei...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_InfoWindow.java
1
请完成以下Java代码
public void setResourceNamesOnEventDefinitions(ParsedDeployment parsedDeployment) { for (ChannelDefinitionEntity channelDefinition : parsedDeployment.getAllChannelDefinitions()) { String resourceName = parsedDeployment.getResourceForChannelDefinition(channelDefinition).getName(); channel...
*/ public ChannelDefinitionEntity getPersistedInstanceOfChannelDefinition(ChannelDefinitionEntity channelDefinition) { String deploymentId = channelDefinition.getDeploymentId(); if (StringUtils.isEmpty(channelDefinition.getDeploymentId())) { throw new FlowableIllegalArgumentException("Pr...
repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\deployer\ChannelDefinitionDeploymentHelper.java
1
请完成以下Java代码
public Optional<SqlAndParamsExpression> buildSqlOrderBy(final DocumentQueryOrderByList orderBys) { if (orderBys.isEmpty()) { return Optional.empty(); } final SqlAndParamsExpression.Builder result = SqlAndParamsExpression.builder(); // // First ORDER BYs if (beforeOrderBys != null && !beforeOrderBys....
private IStringExpression buildSqlOrderBy(final DocumentQueryOrderBy orderBy) { final String fieldName = orderBy.getFieldName(); final SqlOrderByValue sqlExpression = bindings.getFieldOrderBy(fieldName); return buildSqlOrderBy(sqlExpression, orderBy.isAscending(), orderBy.isNullsLast()); } private IStringExpr...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\sql\SqlDocumentOrderByBuilder.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonAttachment { @NonNull @JsonProperty("ID") String id; @NonNull @JsonProperty("FileName") String fileName; @Nullable @JsonProperty("ValidUntil") String validUntil; @Nullable @JsonProperty("DocumentType") String documentType; @Nullable @JsonProperty("DocumentGroup") String documentGroup...
@NonNull @JsonProperty("FileName") final String fileName, @Nullable @JsonProperty("ValidUntil") final String validUntil, @Nullable @JsonProperty("DocumentType") final String documentType, @Nullable @JsonProperty("DocumentGroup") final String documentGroup) { this.id = id; this.fileName = fileName; this....
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-grssignum\src\main\java\de\metas\camel\externalsystems\grssignum\to_grs\api\model\JsonAttachment.java
2
请完成以下Java代码
public boolean accept(final I_C_Invoice_Candidate_Recompute model) { if (model == null) { return false; } final int invoiceCandidateId = model.getC_Invoice_Candidate_ID(); return acceptInvoiceCandidateId(invoiceCandidateId); } public boolean acceptInvoiceCandidateId(final int invoiceCandidateId) { ...
// => we consider only those records which were NOT locked if (lock == null) { return !lockManager.isLocked(I_C_Invoice_Candidate.class, invoiceCandidateId); } // // Case: Lock is set // => we consider only those records which were locked by given lock else { return lockManager.isLocked(I_C_Invoic...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\LockedByOrNotLockedAtAllFilter.java
1
请完成以下Java代码
public class SysDictPage { /** * 主键 */ private String id; /** * 字典名称 */ @Excel(name = "字典名称", width = 20) private String dictName; /** * 字典编码 */
@Excel(name = "字典编码", width = 30) private String dictCode; /** * 删除状态 */ private Integer delFlag; /** * 描述 */ @Excel(name = "描述", width = 30) private String description; @ExcelCollection(name = "字典列表") private List<SysDictItem> sysDictItemList; }
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\vo\SysDictPage.java
1
请完成以下Java代码
private EventBus createEventBus(final Topic topic) { final MicrometerEventBusStatsCollector micrometerEventBusStatsCollector = EventBusFactory.createMicrometerEventBusStatsCollector(topic, new SimpleMeterRegistry()); final EventBusMonitoringService eventBusMonitoringService = new EventBusMonitoringService(new Micr...
@Override public void addAvailableUserNotificationsTopic(final Topic topic) { assertJUnitTestMode(); // as of now, no unit test needs an implementation. } @Override public void registerUserNotificationsListener(final IEventListener listener) { assertJUnitTestMode(); // as of now, no unit test needs an im...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\impl\PlainEventBusFactory.java
1
请完成以下Java代码
public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public...
public void setEmail(String email) { this.email = email; } @Override public String toString() { return "User{" + "id=" + id + ", firstName='" + firstName + '\'' + ", lastName='" + lastName + '\'' + ", email='" + email + '\...
repos\tutorials-master\persistence-modules\spring-boot-persistence-mongodb\src\main\java\com\baeldung\mongodb\models\User.java
1
请完成以下Java代码
public String toString() { return "PlainTourInstanceQueryParams [" + "tour=" + tour + ", deliveryDate=" + deliveryDate + ", processed=" + processed + ", genericTourInstance=" + genericTourInstance + ", shipperTransportationId=" + shipperTransportationId + "]"; } @Override public I_M_Tour ...
} @Override public void setProcessed(Boolean processed) { this.processed = processed; } @Override public Boolean getGenericTourInstance() { return genericTourInstance; } @Override public void setGenericTourInstance(Boolean genericTourInstance) { this.genericTourInstance = genericTourInstance; } @...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\tourplanning\api\impl\PlainTourInstanceQueryParams.java
1
请完成以下Java代码
public class PurchaseOrderFromItemsAggregator extends MapReduceAggregator<PurchaseOrderFromItemFactory, PurchaseOrderItem> { public static PurchaseOrderFromItemsAggregator newInstance() { return new PurchaseOrderFromItemsAggregator(); } public static PurchaseOrderFromItemsAggregator newInstance(@Nullable final...
return PurchaseOrderFromItemFactory.builder() .orderAggregationKey(orderAggregationKey) .userNotifications(userNotifications) .docType(docType) .build(); } @Override protected void closeGroup(@NonNull final PurchaseOrderFromItemFactory orderFactory) { final I_C_Order newPurchaseOrder = orderFacto...
repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\purchaseordercreation\localorder\PurchaseOrderFromItemsAggregator.java
1
请完成以下Java代码
public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getText() { return text; } public void setText(String text) { this.text = text; }
public List<String> getComments() { return comments; } public void setComments(List<String> comments) { this.comments = comments; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } }
repos\tutorials-master\mapstruct\src\main\java\com\baeldung\unmappedproperties\dto\DocumentDTO.java
1
请完成以下Java代码
public final class Tags implements Serializable { private final Map<String, String> values; private static final Tags EMPTY = new Tags(Collections.emptyMap()); private Tags(Map<String, String> tags) { if (tags.isEmpty()) { this.values = Collections.emptyMap(); } else { this.values = Collections.unmodi...
return from((Map<String, Object>) nestedTags); } String flatPrefix = prefix + "."; return from(map.entrySet() .stream() .filter((e) -> e.getKey() != null) .filter((e) -> e.getKey().toLowerCase().startsWith(flatPrefix)) .collect(toLinkedHashMap((e) -> e.getKey().substring(flatPrefix.length()), ...
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\domain\values\Tags.java
1
请完成以下Java代码
public static boolean matches( @NonNull final IdentifierString locationIdentifier, @NonNull final BPartnerLocation location) { switch (locationIdentifier.getType()) { case EXTERNAL_ID: return locationIdentifier.asExternalId().equals(location.getExternalId()); case GLN: return locationIdentifier...
return contactIdentifier.asValue().equals(contact.getValue()); default: throw new AdempiereException("Unexpected type; contactIdentifier=" + contactIdentifier); } } @Nullable public static InvoiceRule getInvoiceRule(@Nullable final JsonInvoiceRule jsonInvoiceRule) { if (jsonInvoiceRule == null) { r...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\bpartner\bpartnercomposite\BPartnerCompositeRestUtils.java
1
请完成以下Java代码
public class MybatisHistoricMilestoneInstanceDataManager extends AbstractCmmnDataManager<HistoricMilestoneInstanceEntity> implements HistoricMilestoneInstanceDataManager { public MybatisHistoricMilestoneInstanceDataManager(CmmnEngineConfiguration cmmnEngineConfiguration) { super(cmmnEngineConfiguration); ...
} @Override public long findHistoricMilestoneInstancesCountByQueryCriteria(HistoricMilestoneInstanceQueryImpl query) { return (Long) getDbSqlSession().selectOne("selectHistoricMilestoneInstanceCountByQueryCriteria", query); } @Override public void bulkDeleteHistoricMilestoneInstanc...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\data\impl\MybatisHistoricMilestoneInstanceDataManager.java
1
请在Spring Boot框架中完成以下Java代码
public Queue helloQueue() { return new Queue("helloQueue"); } @Bean public Queue msgQueue() { return new Queue("msgQueue"); } //===============以下是验证topic Exchange的队列========== @Bean public Queue queueMessage() { return new Queue("topic.message"); } @Bean public Queue queueMessages() { return new Qu...
* @return */ @Bean Binding bindingExchangeMessages(Queue queueMessages, TopicExchange exchange) { return BindingBuilder.bind(queueMessages).to(exchange).with("topic.#"); } @Bean Binding bindingExchangeA(Queue AMessage, FanoutExchange fanoutExchange) { return BindingBuilder.bind(AMessage).to(fanoutExchange);...
repos\spring-boot-quick-master\quick-rabbitmq\src\main\java\com\quick\mq\config\RabbitConfig.java
2
请完成以下Java代码
public HistoricActivityStatisticsQuery includeFinished() { includeFinished = true; return this; } public HistoricActivityStatisticsQuery includeCanceled() { includeCanceled = true; return this; } public HistoricActivityStatisticsQuery includeCompleteScope() { includeCompleteScope = true; ...
protected void checkQueryOk() { super.checkQueryOk(); ensureNotNull("No valid process definition id supplied", "processDefinitionId", processDefinitionId); } // getters ///////////////////////////////////////////////// public String getProcessDefinitionId() { return processDefinitionId; } publi...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricActivityStatisticsQueryImpl.java
1
请完成以下Java代码
public class UrlCheckFilter implements Filter { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { final HttpServletRequest httpServletRequest = (HttpServletRequest) request; String servletPath = httpServle...
if (redirect) { String redirectUrl; if (StringUtils.isBlank(BaseUrlFilter.getBaseUrl())) { // 正常 BaseUrlFilter 有限此 Filter 执行,不会执行到此 redirectUrl = httpServletRequest.getContextPath() + servletPath; } else { if (BaseUrlFilter.getBaseUrl()...
repos\kkFileView-master\server\src\main\java\cn\keking\web\filter\UrlCheckFilter.java
1
请完成以下Java代码
final class SystemStatusListener extends OnConsoleStatusListener { private static final long RETROSPECTIVE_THRESHOLD = 300; private final boolean debug; private SystemStatusListener(boolean debug) { this.debug = debug; setResetResistant(false); setRetrospective(0); } @Override public void start() { su...
public void addStatusEvent(Status status) { if (this.debug || status.getLevel() >= Status.WARN) { super.addStatusEvent(status); } } @Override protected PrintStream getPrintStream() { return (!this.debug) ? System.err : System.out; } private static long getElapsedTime(Status status, long now) { return ...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\logging\logback\SystemStatusListener.java
1
请完成以下Java代码
public final class Foo { private final String text; private final int number; public Foo(String text, int number) { this.text = text; this.number = number; } public String getText() { return text; } public int getNumber() { return number; } @Overri...
public String toString() { return "Foo [text=" + text + ", number=" + number + "]"; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false...
repos\tutorials-master\google-auto-project\src\main\java\com\baeldung\autovalue\Foo.java
1
请完成以下Java代码
public HistoricBatchQuery batchId(String batchId) { ensureNotNull("Batch id", batchId); this.batchId = batchId; return this; } public String getBatchId() { return batchId; } public HistoricBatchQuery type(String type) { ensureNotNull("Type", type); this.type = type; return this; ...
} public HistoricBatchQuery orderByStartTime() { return orderBy(HistoricBatchQueryProperty.START_TIME); } public HistoricBatchQuery orderByEndTime() { return orderBy(HistoricBatchQueryProperty.END_TIME); } @Override public HistoricBatchQuery orderByTenantId() { return orderBy(HistoricBatchQue...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\history\HistoricBatchQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class CustomerService { @Resource private CustomerRepository repository; /** * 删除所有的客户 */ public void deleteAll() { repository.deleteAll(); } /** * 保存客户 * @param customer 客户 */ public void save(Customer customer) { repository.save(customer); ...
/** * 通过名查找某个客户 * @param firstName * @return */ public Customer findByFirstName(String firstName) { return repository.findByFirstName(firstName); } /** * 通过姓查找客户列表 * @param lastName * @return */ public List<Customer> findByLastName(String lastName) { ...
repos\SpringBootBucket-master\springboot-mongodb\src\main\java\com\xncoding\pos\service\CustomerService.java
2
请完成以下Java代码
public static List<JwDepartmentTreeVo> listToTree(List<Department> allDepartment) { // 先找出所有的父级 List<JwDepartmentTreeVo> treeList = getByParentId("1", allDepartment); Optional<Department> departmentOptional = allDepartment.stream().filter(item -> "0".equals(item.getParentid())).findAny(); ...
} } return list; } private static void getChildrenRecursion(List<JwDepartmentTreeVo> treeList, List<Department> allDepartment) { for (JwDepartmentTreeVo departmentTree : treeList) { // 递归寻找子级 List<JwDepartmentTreeVo> children = getByParentId(departmentTree.getId(...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\vo\thirdapp\JwDepartmentTreeVo.java
1
请完成以下Java代码
public boolean accept(T model) { final int adClientId = getAD_Client_ID(model); final Properties ctxToUse = this.ctx != null ? ctx : InterfaceWrapperHelper.getCtx(model); final int contextClientId = Env.getAD_Client_ID(ctxToUse); // Context client if (adClientId == contextClientId) { return true; }...
{ final Object adClientId = InterfaceWrapperHelper.getValueOrNull(model, COLUMNNAME_AD_Client_ID); if (adClientId == null) { return -1; } else if (adClientId instanceof Number) { return ((Number)adClientId).intValue(); } else { throw new IllegalArgumentException("Invalid AD_Client_ID value '"...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\ContextClientQueryFilter.java
1
请完成以下Java代码
public class C_AcctSchema_Update_DebtorIdAndCreditorId extends JavaProcess implements IProcessPrecondition { private final IAcctSchemaBL acctSchemaBL = Services.get(IAcctSchemaBL.class); private final IAcctSchemaDAO acctSchemaDAO = Services.get(IAcctSchemaDAO.class); @Param(parameterName = "AD_Org_ID") private BigD...
return ProcessPreconditionsResolution.accept(); } @Override protected String doIt() throws Exception { final AcctSchema acctSchema = acctSchemaDAO.getById(AcctSchemaId.ofRepoId(getRecord_ID())); if (acctSchema.isAutoSetDebtoridAndCreditorid()) { acctSchemaBL.updateDebitorCreditorIds(acctSchema, OrgId.ofRe...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\process\C_AcctSchema_Update_DebtorIdAndCreditorId.java
1
请完成以下Java代码
class EscapeAwareWhiteSpaceArgumentDelimiter extends WhitespaceArgumentDelimiter { @Override public boolean isEscaped(CharSequence buffer, int pos) { return (isEscapeChar(buffer, pos - 1)); } private boolean isEscapeChar(CharSequence buffer, int pos) { if (pos >= 0) { for (char c : getEscapeChars()) { ...
private String[] cleanArguments(String[] arguments) { String[] cleanArguments = new String[arguments.length]; for (int i = 0; i < arguments.length; i++) { cleanArguments[i] = cleanArgument(arguments[i]); } return cleanArguments; } private String cleanArgument(String argument) { for (char c : getQuoteCha...
repos\spring-boot-4.0.1\cli\spring-boot-cli\src\main\java\org\springframework\boot\cli\command\shell\EscapeAwareWhiteSpaceArgumentDelimiter.java
1
请完成以下Java代码
public JsonInventoryLineHU getLineHU( @RequestParam("wfProcessId") @NonNull String wfProcessIdStr, @RequestParam("lineId") @NonNull String lineIdStr, @RequestParam("lineHUId") @NonNull String lineHUIdStr) { assertApplicationAccess(); final WFProcessId wfProcessId = WFProcessId.ofString(wfProcessIdStr); ...
{ assertApplicationAccess(); final WFProcessId wfProcessId = WFProcessId.ofString(wfProcessIdStr); final InventoryLineId lineId = InventoryLineId.ofObject(lineIdStr); final InventoryLine line = jobService.getById(wfProcessId, Env.getLoggedUserId()).getLineById(lineId); return JsonGetLineHUsResponse.builder...
repos\metasfresh-new_dawn_uat\backend\de.metas.inventory.mobileui\src\main\java\de\metas\inventory\mobileui\rest_api\InventoryRestController.java
1
请在Spring Boot框架中完成以下Java代码
public int numThreads() { return obtain(AtlasProperties::getNumThreads, AtlasConfig.super::numThreads); } @Override public int batchSize() { return obtain(AtlasProperties::getBatchSize, AtlasConfig.super::batchSize); } @Override public String uri() { return obtain(AtlasProperties::getUri, AtlasConfig.supe...
@Override public Duration configTTL() { return obtain(AtlasProperties::getConfigTimeToLive, AtlasConfig.super::configTTL); } @Override public String configUri() { return obtain(AtlasProperties::getConfigUri, AtlasConfig.super::configUri); } @Override public String evalUri() { return obtain(AtlasPropertie...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\atlas\AtlasPropertiesConfigAdapter.java
2
请完成以下Java代码
public final class EMailCustomType implements Comparable<EMailCustomType> { public static EMailCustomType ofNullableCode(@Nullable final String code) { return code != null ? EMailCustomType.ofCode(code) : null; } public static EMailCustomType ofCode(@NonNull final String code) { return new EMailCustomType(cod...
{ this.code = code; } @Deprecated @Override public String toString() { return getCode(); } public static boolean equals(EMailCustomType t1, EMailCustomType t2) {return Objects.equals(t1, t2);} @Override public int compareTo(final EMailCustomType other) {return this.code.compareTo(other.code);} }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\email\EMailCustomType.java
1
请完成以下Java代码
public String getId() { return id; } public Set<String> getIds() { return ids; } public String getDecisionDefinitionId() { return decisionDefinitionId; } public String getDeploymentId() { return deploymentId; } public String getDecisionKey() { ...
} public String getProcessInstanceIdWithChildren() { return processInstanceIdWithChildren; } public String getCaseInstanceIdWithChildren() { return caseInstanceIdWithChildren; } public Boolean getFailed() { return failed; } public String getTenantId() { ...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\HistoricDecisionExecutionQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
private Map<String, Set<Resource>> createMap(final Resource[] resources) { final Map<String, Set<Resource>> resourcesMap = new HashMap<>(); for (final Resource resource : resources) { final String parentFolderName = determineGroupName(resource); if (resourcesMap.get(parentFolder...
if (resourceParentIsDirectory(resource)) { result = resource.getFile().getParentFile().getName(); } } catch (IOException e) { // no-op, fallback to resource name } return result; } private boolean resourceParentIsDirectory(final Resource resource)...
repos\flowable-engine-main\modules\flowable-spring\src\main\java\org\flowable\spring\configurator\ResourceParentFolderAutoDeploymentStrategy.java
2
请在Spring Boot框架中完成以下Java代码
public R<IPage<AuthClient>> list(AuthClient authClient, Query query) { IPage<AuthClient> pages = clientService.page(Condition.getPage(query), Condition.getQueryWrapper(authClient)); return R.data(pages); } /** * 新增 */ @PostMapping("/save") @ApiOperationSupport(order = 3) @Operation(summary = "新增", descripti...
public R submit(@Valid @RequestBody AuthClient authClient) { return R.status(clientService.saveOrUpdate(authClient)); } /** * 删除 */ @PostMapping("/remove") @ApiOperationSupport(order = 6) @Operation(summary = "逻辑删除", description = "传入ids") public R remove(@Parameter(description = "主键集合", required = true) @R...
repos\SpringBlade-master\blade-service\blade-system\src\main\java\org\springblade\system\controller\AuthClientController.java
2
请在Spring Boot框架中完成以下Java代码
public String indexDateFormat() { return obtain(ElasticProperties::getIndexDateFormat, ElasticConfig.super::indexDateFormat); } @Override public String indexDateSeparator() { return obtain(ElasticProperties::getIndexDateSeparator, ElasticConfig.super::indexDateSeparator); } @Override public String timestamp...
@Override public @Nullable String password() { return get(ElasticProperties::getPassword, ElasticConfig.super::password); } @Override public @Nullable String pipeline() { return get(ElasticProperties::getPipeline, ElasticConfig.super::pipeline); } @Override public @Nullable String apiKeyCredentials() { r...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\elastic\ElasticPropertiesConfigAdapter.java
2
请在Spring Boot框架中完成以下Java代码
public class DistributionJobHUReservationService { @NonNull private final DistributionHUService huService; public void reservePickFromHUs(final DistributionJob job) { // FIXME: don't reserve the VHUs for now because that's breaking the QR code logic // i.e. QR codes get lost // for (final DistributionJobLine...
// .customerId(job.getCustomerId()) // .huId(step.getPickFromHU().getId()) // .build()) // .orElseThrow(() -> new AdempiereException("Failed reserving HUs for " + step)); // } // } } public void releaseAllReservations(final DistributionJob job) { final ImmutableSet<HUReservationDo...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\job\service\DistributionJobHUReservationService.java
2
请完成以下Java代码
public void setIncrementNo (int IncrementNo) { set_Value (COLUMNNAME_IncrementNo, Integer.valueOf(IncrementNo)); } /** Get Increment. @return The number to increment the last document number by */ public int getIncrementNo () { Integer ii = (Integer)get_Value(COLUMNNAME_IncrementNo); if (ii == null) ...
public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName()); } /** Set Prefix. @param Prefix Prefix before the sequence number */ public void setPrefix (String Prefix) { set_Value (COLUMNNAME_Prefix, Prefix); } /** Get Prefix. @return Prefix before the sequence ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_LotCtl.java
1
请在Spring Boot框架中完成以下Java代码
public Set<MatchInvId> getIdsProcessedButNotPostedByInOutLineIds(@NonNull final Set<InOutLineId> inoutLineIds) { if (inoutLineIds.isEmpty()) { return ImmutableSet.of(); } return queryBL .createQueryBuilder(I_M_MatchInv.class) .addOnlyActiveRecordsFilter() .addInArrayFilter(I_M_MatchInv.COLUMN_M...
public Set<MatchInvId> getIdsProcessedButNotPostedByInvoiceLineIds(@NonNull final Set<InvoiceAndLineId> invoiceAndLineIds) { if (invoiceAndLineIds.isEmpty()) { return ImmutableSet.of(); } return queryBL .createQueryBuilder(I_M_MatchInv.class) .addOnlyActiveRecordsFilter() .addInArrayOrAllFilter...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\matchinv\service\MatchInvoiceRepository.java
2
请完成以下Java代码
public void setAD_Table(org.compiere.model.I_AD_Table AD_Table) { set_ValueFromPO(COLUMNNAME_AD_Table_ID, org.compiere.model.I_AD_Table.class, AD_Table); } /** Set DB-Tabelle. @param AD_Table_ID Database Table information */ @Override public void setAD_Table_ID (int AD_Table_ID) { if (AD_Table_ID < 1...
return ii.intValue(); } /** Set Mitteilung. @param TextMsg Text Message */ @Override public void setTextMsg (java.lang.String TextMsg) { set_Value (COLUMNNAME_TextMsg, TextMsg); } /** Get Mitteilung. @return Text Message */ @Override public java.lang.String getTextMsg () { return (java.lan...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Attachment.java
1
请完成以下Java代码
private IQuery<I_MD_Available_For_Sales_QueryResult> createDBQueryForAvailableForSalesQuery( final int queryNo, @NonNull final AvailableForSalesQuery availableForSalesQuery) { final IQueryBuilder<I_MD_Available_For_Sales_QueryResult> queryBuilder = Services .get(IQueryBL.class) .createQueryBuilder(I_MD...
+ ", p_AD_ORG_ID => " + availableForSalesQuery.getOrgId().getRepoId() ); if (availableForSalesQuery.getWarehouseId() != null) { sqlFrom.append(", p_M_Warehouse_ID => ") .append(availableForSalesQuery.getWarehouseId().getRepoId()); } else { sqlFrom.append(", p_M_Warehouse_ID => NULL"); } sql...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java\de\metas\material\cockpit\availableforsales\AvailableForSalesSqlHelper.java
1
请完成以下Java代码
public Map<String, String> getTemplateData() { Map<String, String> templateData = details != null ? new HashMap<>(details) : new HashMap<>(); templateData.put("alarmType", alarmType); templateData.put("action", action); templateData.put("alarmId", alarmId.toString()); templateDat...
public CustomerId getAffectedCustomerId() { return alarmCustomerId; } @Override public EntityId getStateEntityId() { return alarmOriginator; } @Override public DashboardId getDashboardId() { return dashboardId; } }
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\notification\info\AlarmNotificationInfo.java
1
请完成以下Java代码
public void run(String... strings) throws Exception { // install groups & users Group adminGroup = identityService.newGroup("admin"); adminGroup.setName("admin"); adminGroup.setType("security-role"); identityService.saveGroup(adminGroup); ...
identityService.createMembership("jbarrez", "user"); identityService.createMembership("jbarrez", "admin"); identityService.createMembership("filiphr", "user"); identityService.createMembership("jlong", "user"); } }; } public static void main(S...
repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-samples\flowable-spring-boot-sample-rest-api-security\src\main\java\flowable\Application.java
1
请在Spring Boot框架中完成以下Java代码
public String getTenantId() { return configuration.getTenantId(); } public void setTenantId(String tenantId) { configuration.setTenantId(tenantId); } public AsyncJobExecutorConfiguration getConfiguration() { return configuration; } public void setConfiguration(AsyncJob...
@Override public Duration getLockForceAcquireAfter() { return configuration.getTimerLockForceAcquireAfter(); } } public class AcquireAsyncJobsDueRunnableConfiguration implements AcquireJobsRunnableConfiguration { @Override public boolean isGlobalAcquireLockEnabled()...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\asyncexecutor\AbstractAsyncExecutor.java
2
请在Spring Boot框架中完成以下Java代码
public ProductionDetailBuilder toProductionDetailBuilder() { return ProductionDetail.builder() .productPlanningId(productPlanningId) .productBomLineId(productBomLineId) .ppOrderRef(toPPOrderRef()); } @Nullable private PPOrderRef toPPOrderRef() { if (ppOrderCandidateId == null && ppOrderId == null)...
if (ppOrderLineIds.isOnly()) { productDetailSubQueryBuilder.addInArrayFilter(I_MD_Candidate_Prod_Detail.COLUMNNAME_PP_Order_BOMLine_ID, ppOrderLineIds.toSet()); doFilter = true; } if (ppOrderCandidateId != null) { productDetailSubQueryBuilder.addEqualsFilter(I_MD_Candidate_Prod_Detail.COLUMNNAM...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\repository\query\ProductionDetailsQuery.java
2
请在Spring Boot框架中完成以下Java代码
public class MatchOrderIdShipmentScheduleConsolidatePredicate implements IShipmentScheduleAllowConsolidatePredicate { private static final Logger logger = LogManager.getLogger(MatchOrderIdShipmentScheduleConsolidatePredicate.class); @NonNull private final IDesadvBL desadvBL; private final IOrderDAO orderDAO = Ser...
.retrieveByOrderCriteria(OrderQuery.builder() .orderId(orderID) .orgId(OrgId.ofRepoId(sched.getAD_Org_ID())) .build()) .orElseThrow(() -> new AdempiereException("Unable to retrieve C_Order for C_Order_ID=" + orderID)); final int desadvID = InterfaceWrapperHelper.create(orde...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\api\MatchOrderIdShipmentScheduleConsolidatePredicate.java
2
请完成以下Java代码
public DocStatus getDocStatus() { final int index = po.get_ColumnIndex("DocStatus"); return index >= 0 ? DocStatus.ofNullableCodeOrUnknown((String)po.get_Value(index)) : null; } @Override public boolean isProcessing() {return po.get_ValueAsBoolean("Processing");} @Override public boolean isProcessed...
} return null; } @Override @Nullable public Boolean getValueAsBooleanOrNull(@NonNull final String columnName) { final int index = po.get_ColumnIndex(columnName); if (index != -1) { final Object valueObj = po.get_Value(index); return DisplayType.toBoolean(valueObj, null); } return null; } @O...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\doc\POAcctDocModel.java
1
请完成以下Java代码
public Set<CustomerOrder> getOrders() { return customerOrders; } public void setOrders(Set<CustomerOrder> orders) { this.customerOrders = orders; } @Column private String email; @Column(name = "dob", columnDefinition = "DATE") private LocalDate dob; @Column privat...
public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public LocalDate getDob() { return dob; } public void setDob(LocalDate dob) { this.dob = dob; } public String getName() { return name; } ...
repos\tutorials-master\persistence-modules\spring-data-jpa-repo-3\src\main\java\com\baeldung\spring\data\jpa\joinquery\entities\Customer.java
1
请完成以下Java代码
private AlarmApiCallResult withPropagated(AlarmApiCallResult result) { if (result.isSuccessful() && result.getAlarm() != null) { List<EntityId> propagationEntities; if (result.isPropagationChanged()) { try { propagationEntities = createEntityAlarmRecor...
private void validateAlarmRequest(AlarmModificationRequest request) { ConstraintValidator.validateFields(request); if (request.getEndTs() > 0 && request.getStartTs() > request.getEndTs()) { throw new DataValidationException("Alarm start ts can't be greater then alarm end ts!"); } ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\alarm\BaseAlarmService.java
1
请完成以下Java代码
public void setAD_PrinterHW_ID (int AD_PrinterHW_ID) { if (AD_PrinterHW_ID < 1) set_Value (COLUMNNAME_AD_PrinterHW_ID, null); else set_Value (COLUMNNAME_AD_PrinterHW_ID, Integer.valueOf(AD_PrinterHW_ID)); } @Override public int getAD_PrinterHW_ID() { return get_ValueAsInt(COLUMNNAME_AD_PrinterHW_ID...
@Override public int getAD_PrinterHW_MediaSize_ID() { return get_ValueAsInt(COLUMNNAME_AD_PrinterHW_MediaSize_ID); } @Override public void setName (java.lang.String Name) { set_ValueNoCheck (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return (java.lang.String)get_Value(CO...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_AD_PrinterHW_MediaSize.java
1
请完成以下Java代码
public void setIsTableID (final boolean IsTableID) { set_Value (COLUMNNAME_IsTableID, IsTableID); } @Override public boolean isTableID() { return get_ValueAsBoolean(COLUMNNAME_IsTableID); } @Override public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override ...
{ return get_ValueAsString(COLUMNNAME_RestartFrequency); } @Override public void setStartNo (final int StartNo) { set_Value (COLUMNNAME_StartNo, StartNo); } @Override public int getStartNo() { return get_ValueAsInt(COLUMNNAME_StartNo); } @Override public void setSuffix (final @Nullable java.lang.St...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Sequence.java
1
请完成以下Java代码
public void setAD_Table_ID (int AD_Table_ID) { if (AD_Table_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_Table_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_Table_ID, Integer.valueOf(AD_Table_ID)); } /** Get Table. @return Database Table information */ public int getAD_Table_ID () { Integer ii = ...
@param Record_ID Direct internal record ID */ public void setRecord_ID (int Record_ID) { if (Record_ID < 0) set_ValueNoCheck (COLUMNNAME_Record_ID, null); else set_ValueNoCheck (COLUMNNAME_Record_ID, Integer.valueOf(Record_ID)); } /** Get Record ID. @return Direct internal record ID */ publ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Sequence_Audit.java
1
请完成以下Java代码
public boolean isOneDepart() { return oneDepart; } public void setOneDepart(boolean oneDepart) { this.oneDepart = oneDepart; } public String getSysDate() { return DateUtils.formatDate(); } public String getSysTime() { return DateUtils.now(); } public String getSysUserCode() { return sysUserCode; ...
} public String getSysUserId() { return sysUserId; } public void setSysUserId(String sysUserId) { this.sysUserId = sysUserId; } public String getSysOrgId() { return sysOrgId; } public void setSysOrgId(String sysOrgId) { this.sysOrgId = sysOrgId; } public String getSysRoleCode() { return sysRoleC...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\system\vo\SysUserCacheInfo.java
1
请完成以下Java代码
public void setIsModifyPrice (final boolean IsModifyPrice) { set_Value (COLUMNNAME_IsModifyPrice, IsModifyPrice); } @Override public boolean isModifyPrice() { return get_ValueAsBoolean(COLUMNNAME_IsModifyPrice); } @Override public void setM_PriceList_ID (final int M_PriceList_ID) { if (M_PriceList_ID ...
{ set_Value (COLUMNNAME_POSPaymentProcessor, POSPaymentProcessor); } @Override public java.lang.String getPOSPaymentProcessor() { return get_ValueAsString(COLUMNNAME_POSPaymentProcessor); } @Override public void setPrinterName (final @Nullable java.lang.String PrinterName) { set_Value (COLUMNNAME_Print...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_POS.java
1
请完成以下Java代码
private void setHeaderAggregationKey(@NonNull final C_OLCandToOrderEnqueuer.EnqueueWorkPackageRequest request) { final IOLCandBL olCandBL = Services.get(IOLCandBL.class); final OLCandIterator olCandIterator = getOrderedOLCandIterator(request); final OLCandProcessorDescriptor olCandProcessorDescriptor = request....
@NonNull ILock mainLock; @NonNull PInstanceId orderLineCandSelectionId; @NonNull OLCandProcessorDescriptor olCandProcessorDescriptor; @Nullable AsyncBatchId asyncBatchId; boolean propagateAsyncBatchIdToOrderRecord; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\api\async\C_OLCandToOrderEnqueuer.java
1
请在Spring Boot框架中完成以下Java代码
public static Saml2Error invalidResponse(String description) { return new Saml2Error(Saml2ErrorCodes.INVALID_RESPONSE, description); } /** * Construct an {@link Saml2ErrorCodes#INTERNAL_VALIDATION_ERROR} error * @param description the error description * @return the resulting {@link Saml2Error} * @since 7....
* @param description the error description * @return the resulting {@link Saml2Error} * @since 7.0 */ public static Saml2Error subjectNotFound(String description) { return new Saml2Error(Saml2ErrorCodes.SUBJECT_NOT_FOUND, description); } /** * Returns the error code. * @return the error code */ publi...
repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\core\Saml2Error.java
2
请完成以下Java代码
private MUserDefField[] getFields() { if (m_fields != null) { return m_fields; } final String whereClause = MUserDefField.COLUMNNAME_AD_UserDef_Tab_ID+"=?"; final List<MUserDefField> list = new Query(getCtx(), MUserDefField.Table_Name, whereClause, get_TrxName()) .setParameters(get_ID()) ....
if (AD_Field_ID.getRepoId() == field.getAD_Field_ID()) { return field; } } return null; } public void apply(GridTabVO vo) { final String name = getName(); if (!Check.isEmpty(name) && name.length() > 1) vo.setName(name); if (!Check.isEmpty(getDescription())) vo.setDescription(getDescription...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\model\MUserDefTab.java
1
请完成以下Java代码
public PlanItemInstanceEntityBuilder localVariables(Map<String, Object> localVariables) { this.localVariables = localVariables; return this; } @Override public PlanItemInstanceEntityBuilder addToParent(boolean addToParent) { this.addToParent = addToParent; return this; } ...
} public Map<String, Object> getLocalVariables() { return localVariables; } public boolean hasLocalVariables() { return localVariables != null && localVariables.size() > 0; } public boolean isAddToParent() { return addToParent; } public boolean isSilentNameExpressionE...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\PlanItemInstanceEntityBuilderImpl.java
1
请完成以下Java代码
public class MustacheViewResolver extends UrlBasedViewResolver { private final Compiler compiler; private @Nullable String charset; /** * Create a {@code MustacheViewResolver} backed by a default instance of a * {@link Compiler}. */ public MustacheViewResolver() { this.compiler = Mustache.compiler(); s...
* Set the charset. * @param charset the charset */ public void setCharset(String charset) { this.charset = charset; } @Override protected Class<?> requiredViewClass() { return MustacheView.class; } @Override protected AbstractUrlBasedView createView(String viewName) { MustacheView view = (MustacheVie...
repos\spring-boot-4.0.1\module\spring-boot-mustache\src\main\java\org\springframework\boot\mustache\reactive\view\MustacheViewResolver.java
1
请完成以下Java代码
void get_oracle_actions2( Dependency instance, List<Action> actions) { get_oracle_actions2(instance.heads, instance.deprels, actions); } void get_oracle_actions2(List<Integer> heads, List<Integer> deprels, List<Ac...
boolean all_descendents_reduced = true; if (top0 >= 0) { for (int i = 0; i < heads.size(); ++i) { if (heads.get(i) == top0 && output.get(i) != top0) { // _INFO << i << " " << output[i]; all_descendents_reduce...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dependency\nnparser\action\ActionUtils.java
1
请完成以下Java代码
public final class ModelInterceptor2ModelValidatorWrapper implements ModelValidator, IUserLoginListener { public static final ModelValidator wrapIfNeeded(final IModelInterceptor interceptor) { if (interceptor instanceof ModelValidator) { return (ModelValidator)interceptor; } else { return new ModelInt...
} @Override public final int getAD_Client_ID() { return interceptor.getAD_Client_ID(); } @Override public final String modelChange(final PO po, final int changeTypeCode) throws Exception { final ModelChangeType changeType = ModelChangeType.valueOf(changeTypeCode); interceptor.onModelChange(po, changeType...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\modelvalidator\ModelInterceptor2ModelValidatorWrapper.java
1
请完成以下Java代码
public class Bestellung { @XmlElement(name = "Auftraege", required = true) protected List<BestellungAuftrag> auftraege; @XmlAttribute(name = "Id", required = true) protected String id; @XmlAttribute(name = "BestellSupportId", required = true) protected int bestellSupportId; /** * Gets...
* Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } /** * Gets the value of the bestellSupportId property. * */ public int getBestellSupp...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v1\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v1\Bestellung.java
1
请完成以下Java代码
public static String getHost(String baseUrl, DeviceConnectivityInfo properties, String protocol) throws URISyntaxException { String initialHost = StringUtils.isBlank(properties.getHost()) ? baseUrl : properties.getHost(); InetAddress inetAddress; String host = null; if (VALID_URL_PATTERN...
host = "[" + host + "]"; } } return host; } public static String getPort(DeviceConnectivityInfo properties) { return StringUtils.isBlank(properties.getPort()) ? "" : properties.getPort(); } public static boolean isLocalhost(String host) { try { I...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\util\DeviceConnectivityUtil.java
1
请完成以下Java代码
protected ExecutionEntity getExecutionFromContext() { if (Context.getCommandContext() != null) { ExecutionContext executionContext = ExecutionContextHolder.getExecutionContext(); if (executionContext != null) { return executionContext.getExecution(); } ...
public void setTask(Task task) { if (Context.getCommandContext() != null) { throw new FlowableCdiException("Cannot work with tasks in an active command."); } getScopedAssociation().setTask(task); } @Override public Map<String, Object> getCachedVariables() { if (C...
repos\flowable-engine-main\modules\flowable-cdi\src\main\java\org\flowable\cdi\impl\context\DefaultContextAssociationManager.java
1
请完成以下Java代码
static ConfigurationPropertyCaching get(Iterable<ConfigurationPropertySource> sources, @Nullable Object underlyingSource) { Assert.notNull(sources, "'sources' must not be null"); if (underlyingSource == null) { return new ConfigurationPropertySourcesCaching(sources); } for (ConfigurationPropertySource sou...
} /** * {@link AutoCloseable} used to control a * {@link ConfigurationPropertyCaching#override() cache override}. * * @since 3.5.0 */ interface CacheOverride extends AutoCloseable { @Override void close(); } }
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\properties\source\ConfigurationPropertyCaching.java
1
请在Spring Boot框架中完成以下Java代码
private void invalidateCacheForProductPrice(final int updatedRecords, final IQuery<I_M_ProductPrice> productPriceQuery) { final CacheInvalidateMultiRequest cacheInvalidateMultiRequest; if (updatedRecords > 100) { cacheInvalidateMultiRequest = CacheInvalidateMultiRequest.allRecordsForTable(I_M_ProductPrice.Tab...
final I_M_PriceList priceList = getById(priceListId); if (priceList == null) { throw new AdempiereException("@NotFound@ @M_PriceList_ID@: " + priceListId); } return CurrencyId.ofRepoId(priceList.getC_Currency_ID()); } @Override public I_M_ProductScalePrice retrieveScalePriceForExactBreak(@NonNull final P...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\service\impl\PriceListDAO.java
2
请完成以下Java代码
public void register() { if (bundle.getBundleContext() != null) { reg = bundle.getBundleContext().registerService(ScriptEngineResolver.class.getName(), this, null); } } public void unregister() { if (reg != null) { reg.unregister(); ...
} LOGGER.trace("Resolved ScriptEngineFactory: {} for expected name: {}", engine, name); return engine; } } LOGGER.debug("ScriptEngineFactory: {} does not match expected name: {}", factory.getEngineName(), name); ...
repos\flowable-engine-main\modules\flowable-osgi\src\main\java\org\flowable\osgi\Extender.java
1
请完成以下Java代码
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()); } /** 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 required - must be unique */ public String getValue () { return (String)get_Value(COLU...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ReplicationStrategy.java
1
请完成以下Java代码
public boolean saveTxtTo(String path) { if (trie.size() == 0) return true; // 如果没有词条,那也算成功了 try { BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(IOUtil.newOutputStream(path), "UTF-8")); Set<Map.Entry<String, Item>> entries = trie.entrySet(); ...
for (Map.Entry<String, Item> entry : entries) { if (filter.onSave(entry.getValue())) { bw.write(entry.getValue().toString()); bw.newLine(); } } bw.close(); } catch (Exception e) ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dictionary\DictionaryMaker.java
1
请完成以下Java代码
public class DecisionTaskExport extends AbstractPlanItemDefinitionExport<DecisionTask> { @Override protected Class<DecisionTask> getExportablePlanItemDefinitionClass() { return DecisionTask.class; } @Override protected String getPlanItemDefinitionXmlElementValue(DecisionTask decisionTask) ...
return TaskExport.writeTaskFieldExtensions(decisionTask, extensionElementWritten, xtw); } @Override protected void writePlanItemDefinitionBody(CmmnModel model, DecisionTask decisionTask, XMLStreamWriter xtw, CmmnXmlConverterOptions options) throws Exception { super.writePlanItemDefinitionBody(model...
repos\flowable-engine-main\modules\flowable-cmmn-converter\src\main\java\org\flowable\cmmn\converter\export\DecisionTaskExport.java
1
请完成以下Java代码
protected IScriptsApplierListener createScriptsApplierListener() { return config.getScriptsApplierListener(); } @Override protected IDatabase createDatabase() { return dbconnectionMaker.createDb(dbConnectionSettings, dbName); } }; scriptApplier.run(); } private File constructSqlDir(fin...
{ if (rolloutDirName == null || rolloutDirName.trim().isEmpty()) { throw new IllegalArgumentException("Rollout directory not specified"); } final File rolloutDir = directoryChecker.checkDirectory("Rollout directory", rolloutDirName); logger.info("Rollout directory: " + rolloutDir); final File sqlDir = ...
repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.cli\src\main\java\de\metas\migration\cli\rollout_migrate\MigrationScriptApplier.java
1
请完成以下Java代码
public static class Via { @XmlAttribute(name = "via", required = true) protected String via; @XmlAttribute(name = "sequence_id", required = true) @XmlSchemaType(name = "unsignedShort") protected int sequenceId; /** * Gets the value of the via property. ...
/** * Gets the value of the sequenceId property. * */ public int getSequenceId() { return sequenceId; } /** * Sets the value of the sequenceId property. * */ public void setSequenceId(int value) { this.seque...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\TransportType.java
1
请在Spring Boot框架中完成以下Java代码
public final class POJsonConverters { @NonNull private final ExternalSystemRepository externalSystemRepository; @NonNull public ExternalSystemId getExternalSystemIdByExternalSystemCode(@NonNull final JsonPurchaseCandidateCreateItem request) { return externalSystemRepository.getIdByType(ExternalSystemType.ofValue...
public List<ExternalSystemIdWithExternalIds> fromJson(@NonNull final List<JsonPurchaseCandidateReference> candidates) { final List<ExternalSystemIdWithExternalIds> externalSystemIdWithExternalIds = new ArrayList<>(); for (final JsonPurchaseCandidateReference cand : candidates) { final ExternalHeaderIdWithExte...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\order\POJsonConverters.java
2
请完成以下Java代码
public class NonBlockingQueue<T> { private final AtomicReference<Node<T>> head, tail; private final AtomicInteger size; public NonBlockingQueue() { head = new AtomicReference<>(null); tail = new AtomicReference<>(null); size = new AtomicInteger(); size.set(0); } pu...
nextNode = currentHead.getNext(); } while(!head.compareAndSet(currentHead, nextNode)); size.decrementAndGet(); return currentHead.getValue(); } public int size() { return this.size.get(); } private class Node<T> { private final T value; private volatile...
repos\tutorials-master\core-java-modules\core-java-concurrency-advanced-3\src\main\java\com\baeldung\lockfree\NonBlockingQueue.java
1
请完成以下Java代码
static void initCipher(Cipher cipher, int mode, SecretKey secretKey) { initCipher(cipher, mode, secretKey, null); } /** * Initializes the Cipher for use. */ static void initCipher(Cipher cipher, int mode, SecretKey secretKey, byte[] salt, int iterationCount) { initCipher(cipher, mode, secretKey, new PBEPara...
catch (InvalidKeyException ex) { throw new IllegalArgumentException("Unable to initialize due to invalid secret key", ex); } catch (InvalidAlgorithmParameterException ex) { throw new IllegalStateException("Unable to initialize due to invalid decryption parameter spec", ex); } } /** * Invokes the Cipher...
repos\spring-security-main\crypto\src\main\java\org\springframework\security\crypto\encrypt\CipherUtils.java
1
请完成以下Java代码
public Collection<? extends GrantedAuthority> getAuthorities() { final List<GrantedAuthority> authorities = new ArrayList<>(); for (final Privilege privilege : user.getPrivileges()) { authorities.add(new SimpleGrantedAuthority(privilege.getName())); } return authorities; ...
@Override public boolean isCredentialsNonExpired() { return true; } @Override public boolean isEnabled() { return true; } public User getUser() { return user; } }
repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\custom\security\MyUserPrincipal.java
1
请完成以下Java代码
public void setWEBUI_DashboardItem_ID (final int WEBUI_DashboardItem_ID) { if (WEBUI_DashboardItem_ID < 1) set_ValueNoCheck (COLUMNNAME_WEBUI_DashboardItem_ID, null); else set_ValueNoCheck (COLUMNNAME_WEBUI_DashboardItem_ID, WEBUI_DashboardItem_ID); } @Override public int getWEBUI_DashboardItem_ID() ...
{ set_ValueFromPO(COLUMNNAME_WEBUI_KPI_ID, de.metas.ui.web.base.model.I_WEBUI_KPI.class, WEBUI_KPI); } @Override public void setWEBUI_KPI_ID (final int WEBUI_KPI_ID) { if (WEBUI_KPI_ID < 1) set_Value (COLUMNNAME_WEBUI_KPI_ID, null); else set_Value (COLUMNNAME_WEBUI_KPI_ID, WEBUI_KPI_ID); } @Overri...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java-gen\de\metas\ui\web\base\model\X_WEBUI_DashboardItem.java
1
请在Spring Boot框架中完成以下Java代码
protected X509Certificate[] getTrustedX509CertificatesForTrustManager() { try { CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); ArrayList<Certificate> allCerts = new ArrayList<>(); for (String trustedCert : ssl.getTrustedX509Certificates()) { try { URL url = Resourc...
: KeyStore.getInstance(ssl.getKeyStoreType()); try { URL url = ResourceUtils.getURL(ssl.getKeyStore()); store.load(url.openStream(), ssl.getKeyStorePassword() != null ? ssl.getKeyStorePassword().toCharArray() : null); } catch (Exception e) { throw new RuntimeException("Could not load key stor...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\config\AbstractSslConfigurer.java
2
请在Spring Boot框架中完成以下Java代码
public class PurchaseDetailsQuery { public static PurchaseDetailsQuery ofPurchaseDetailOrNull(@Nullable final PurchaseDetail purchaseDetail) { if (purchaseDetail == null) { return null; } return PurchaseDetailsQuery.builder() .productPlanningRepoId(purchaseDetail.getProductPlanningRepoId()) .purcha...
/** default = false */ boolean orderLineRepoIdMustBeNull; @Builder private PurchaseDetailsQuery( final int productPlanningRepoId, final int purchaseCandidateRepoId, final int receiptScheduleRepoId, final Boolean orderLineRepoIdMustBeNull) { this.productPlanningRepoId = productPlanningRepoId; this.p...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\repository\query\PurchaseDetailsQuery.java
2
请在Spring Boot框架中完成以下Java代码
public List<DeploymentResourceDto> getDeploymentResources() { List<Resource> resources = engine.getRepositoryService().getDeploymentResources(deploymentId); List<DeploymentResourceDto> deploymentResources = new ArrayList<DeploymentResourceDto>(); for (Resource resource : resources) { deploymentResour...
String[] filenameParts = name.split("/"); if (filenameParts.length > 0) { int idx = filenameParts.length-1; filename = filenameParts[idx]; } String[] extensionParts = name.split("\\."); if (extensionParts.length > 0) { int idx = extensionParts.length-1; ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\repository\impl\DeploymentResourcesResourceImpl.java
2
请完成以下Java代码
public class UserDto { protected UserProfileDto profile; protected UserCredentialsDto credentials; // transformers ////////////////////////////////// public static UserDto fromUser(User user, boolean isIncludeCredentials) { UserDto userDto = new UserDto(); userDto.setProfile(UserProfileDto.fromU...
} public void setProfile(UserProfileDto profile) { this.profile = profile; } public UserCredentialsDto getCredentials() { return credentials; } public void setCredentials(UserCredentialsDto credentials) { this.credentials = credentials; } }
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\identity\UserDto.java
1
请在Spring Boot框架中完成以下Java代码
public class OLCandDocumentLocationAdapterFactory implements DocumentLocationAdapterFactory { @Override public Optional<IDocumentLocationAdapter> getDocumentLocationAdapterIfHandled(final Object record) { return toOLCand(record).map(OLCandDocumentLocationAdapterFactory::bpartnerLocationAdapter); } @Override pu...
return new DocumentBillLocationAdapter(delegate); } public static DropShipLocationAdapter dropShipAdapter(@NonNull final I_C_OLCand delegate) { return new DropShipLocationAdapter(delegate); } public static DropShipOverrideLocationAdapter dropShipOverrideAdapter(@NonNull final I_C_OLCand delegate) { return n...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\location\adapter\OLCandDocumentLocationAdapterFactory.java
2
请在Spring Boot框架中完成以下Java代码
protected abstract static class TemplateAvailabilityProperties { private String prefix; private String suffix; protected TemplateAvailabilityProperties(String prefix, String suffix) { this.prefix = prefix; this.suffix = suffix; } protected abstract List<String> getLoaderPath(); public String getP...
public void setPrefix(String prefix) { this.prefix = prefix; } public String getSuffix() { return this.suffix; } public void setSuffix(String suffix) { this.suffix = suffix; } } }
repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\template\PathBasedTemplateAvailabilityProvider.java
2
请完成以下Java代码
public void stop() { if (!running) { return; } running = false; } private void process() { int batchSize = 4 * 1024; while (running) { try { MDC.put("destination", destination); connector.connect(); ...
// logger.info("parse event has an data:" + entry.toString()); // } MessageHandler messageHandler = SpringUtil.getBean("messageHandler", MessageHandler.class); messageHandler.execute(message.getEntries()); ...
repos\spring-boot-leaning-master\2.x_data\3-3 使用 canal 将业务数据从 Mysql 同步到 MongoDB\spring-boot-canal-mongodb\src\main\java\com\neo\canal\CanalClient.java
1
请完成以下Java代码
public Builder useTextFromActionName(final boolean useTextFromAction) { this.useTextFromAction = useTextFromAction; return this; } private final boolean isUseTextFromActionName() { return useTextFromAction; } private String getText() { return text; } public Builder setToolTipText(final ...
* * @param buttonInsets * @see AbstractButton#setMargin(Insets) */ public Builder setButtonInsets(final Insets buttonInsets) { this.buttonInsets = buttonInsets; return this; } private final Insets getButtonInsets() { return buttonInsets; } /** * Sets the <code>defaultCapable</code> ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\AppsAction.java
1
请完成以下Java代码
public void setProductValue (java.lang.String ProductValue) { throw new IllegalArgumentException ("ProductValue is virtual column"); } /** Get Produktschlüssel. @return Schlüssel des Produktes */ @Override public java.lang.String getProductValue () { return (java.lang.String)get_Value(COLUMNNAME_Product...
@Override public void setValidFrom (java.sql.Timestamp ValidFrom) { set_Value (COLUMNNAME_ValidFrom, ValidFrom); } /** Get Gültig ab. @return Gültig ab inklusiv (erster Tag) */ @Override public java.sql.Timestamp getValidFrom () { return (java.sql.Timestamp)get_Value(COLUMNNAME_ValidFrom); } /** Se...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java-gen\de\metas\procurement\base\model\X_PMM_Product.java
1
请完成以下Java代码
private void setPricingSystem(final Properties ctx, final I_C_Invoice_Candidate ic) { final IBPartnerDAO bPartnerPA = Services.get(IBPartnerDAO.class); final PricingSystemId pricingSysId = bPartnerPA.retrievePricingSystemIdOrNull( BPartnerId.ofRepoId(ic.getBill_BPartner_ID()), SOTrx.ofBoolean(ic.isSOTrx())...
{ final InvoiceCandidateGroupRepository groupsRepo = SpringContextHolder.instance.getBean(InvoiceCandidateGroupRepository.class); final Group group = groupsRepo.createPartialGroupFromCompensationLine(ic); group.updateAllCompensationLines(); final InvoiceCandidatesStorage orderLinesStorage = groupsRepo.createN...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\callout\C_Invoice_Candidate.java
1