instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
protected boolean isValidSortByValue(String value) { return VALID_SORT_BY_VALUES.contains(value); } @Override protected CaseDefinitionQuery createNewQuery(ProcessEngine engine) { return engine.getRepositoryService().createCaseDefinitionQuery(); } @Override protected void applyFilters(CaseDefinitio...
query.caseDefinitionVersion(version); } if (TRUE.equals(latestVersion)) { query.latestVersion(); } if (tenantIds != null && !tenantIds.isEmpty()) { query.tenantIdIn(tenantIds.toArray(new String[tenantIds.size()])); } if (TRUE.equals(withoutTenantId)) { query.withoutTenantId(); ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\repository\CaseDefinitionQueryDto.java
2
请在Spring Boot框架中完成以下Java代码
public Context currentContext() { return this.context; } @Override public void onSubscribe(Subscription s) { this.delegate.onSubscribe(s); } @Override public void onNext(T t) { this.delegate.onNext(t); } @Override public void onError(Throwable ex) { this.delegate.onError(ex); } @Ov...
} @Override public V remove(Object key) { if (!this.loaders.containsKey(key)) { throw new IllegalArgumentException( "This map only supports the following keys: " + this.loaders.keySet()); } return this.loaded.remove(key); } @Override public void putAll(Map<? extends K, ? extends V> m) { ...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configuration\SecurityReactorContextConfiguration.java
2
请完成以下Java代码
public void updateFromOrder(@NonNull final I_C_Payment record) { final OrderId orderId = OrderId.ofRepoIdOrNull(record.getC_Order_ID()); if (orderId == null) { return; } final OrderPayScheduleId orderPayScheduleId = OrderPayScheduleId.ofRepoIdOrNull(record.getC_OrderPaySchedule_ID()); if (orderPaySche...
record.setOverUnderAmt(BigDecimal.ZERO); // record.setPayAmt(priceActual); record.setDiscountAmt(discountAmount); paymentBL.validateDocTypeIsInSync(record); } @DocValidate(timings = { ModelValidator.TIMING_AFTER_COMPLETE }) public void updateOrderPayScheduleStatus(final I_C_Payment payment) { final Orde...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\payment\C_Payment.java
1
请完成以下Java代码
public void commit() { // Do nothing, transaction is managed by spring } public void rollback() { // Just in case the rollback isn't triggered by an // exception, we mark the current transaction rollBackOnly. transactionManager.getTransaction(null).setRollbackOnly(); } ...
} } ); } } protected abstract class TransactionSynchronizationAdapter implements TransactionSynchronization, Ordered { public void suspend() {} public void resume() {} public void flush() {} public void beforeCommit(boolean readOnly) {} ...
repos\Activiti-develop\activiti-core\activiti-spring\src\main\java\org\activiti\spring\SpringTransactionContext.java
1
请完成以下Java代码
public String getID() { return id; } /** * 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 retoureSu...
* */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") public static class Position extends RetourePositionType { @XmlAttribute(name = "RetourenAnteilTyp", required = true) protected RetourenAnteilTypType retourenAnteilTyp; /** * Gets the value of...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v2\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v2\RetourenavisAnfrageAntwort.java
1
请完成以下Java代码
public boolean isDefault() { return get_ValueAsBoolean(COLUMNNAME_IsDefault); } @Override public void setM_Shipper_ID (final int M_Shipper_ID) { if (M_Shipper_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Shipper_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Shipper_ID, M_Shipper_ID); } @Override pub...
public static final String SHIPPERGATEWAY_NShift = "nshift"; @Override public void setShipperGateway (final @Nullable java.lang.String ShipperGateway) { set_Value (COLUMNNAME_ShipperGateway, ShipperGateway); } @Override public java.lang.String getShipperGateway() { return get_ValueAsString(COLUMNNAME_Shipp...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Shipper.java
1
请完成以下Java代码
public static Period detectAndParse(String value, @Nullable ChronoUnit unit) { return detect(value).parse(value, unit); } /** * Detect the style from the given source value. * @param value the source value * @return the period style * @throws IllegalArgumentException if the value is not a known style */ ...
Function<Integer, Period> factory) { this.chronoUnit = chronoUnit; this.suffix = suffix; this.intValue = intValue; this.factory = factory; } private Period parse(String value) { return this.factory.apply(Integer.parseInt(value)); } private String print(Period value) { return intValue(value) ...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\convert\PeriodStyle.java
1
请在Spring Boot框架中完成以下Java代码
public class UserConfirmationSupportUtil { @Value @Builder public static class UIComponentProps { @Nullable String question; boolean confirmed; @Builder.Default @NonNull WFActivityAlwaysAvailableToUser alwaysAvailableToUser = WFActivityAlwaysAvailableToUser.DEFAULT; public static UIComponentPropsBuilder...
return UIComponent.builder() .type(UIComponentType.CONFIRM_BUTTON) .alwaysAvailableToUser(props.getAlwaysAvailableToUser()) .properties(Params.builder() .value("question", props.getQuestion()) .value("confirmed", props.isConfirmed()) .build()) .build(); } public static UIComponent c...
repos\metasfresh-new_dawn_uat\backend\de.metas.workflow.rest-api\src\main\java\de\metas\workflow\rest_api\activity_features\user_confirmation\UserConfirmationSupportUtil.java
2
请完成以下Java代码
public List<Event> findEventsByProcessInstanceId(String processInstanceId) { checkHistoryEnabled(); return commentDataManager.findEventsByProcessInstanceId(processInstanceId); } @Override public void deleteCommentsByTaskId(String taskId) { checkHistoryEnabled(); commentDataM...
processDefinitionId = process.getProcessDefinitionId(); } } getEventDispatcher().dispatchEvent( ActivitiEventBuilder.createEntityEvent( ActivitiEventType.ENTITY_DELETED, commentEntity, processInstanceId, ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\CommentEntityManagerImpl.java
1
请完成以下Java代码
public void setC_Aggregation_Attribute_ID (int C_Aggregation_Attribute_ID) { if (C_Aggregation_Attribute_ID < 1) set_ValueNoCheck (COLUMNNAME_C_Aggregation_Attribute_ID, null); else set_ValueNoCheck (COLUMNNAME_C_Aggregation_Attribute_ID, Integer.valueOf(C_Aggregation_Attribute_ID)); } /** Get Aggregati...
} /** Get Name. @return Alphanumeric identifier of the entity */ @Override public java.lang.String getName () { return (java.lang.String)get_Value(COLUMNNAME_Name); } /** * Type AD_Reference_ID=540533 * Reference name: C_Aggregation_Attribute_Type */ public static final int TYPE_AD_Reference_ID=...
repos\metasfresh-new_dawn_uat\backend\de.metas.aggregation\src\main\java-gen\de\metas\aggregation\model\X_C_Aggregation_Attribute.java
1
请完成以下Java代码
public boolean isEligibleForRejectPicking() { return isEligibleForChangingPickStatus() && !isApproved() && pickStatus != null && pickStatus.isEligibleForRejectPicking(); } public boolean isEligibleForPacking() { return isEligibleForChangingPickStatus() && isApproved() && pickStatus != null ...
return isEligibleForChangingPickStatus() && pickStatus != null && pickStatus.isEligibleForProcessing(); } public String getLocatorName() { return locator != null ? locator.getDisplayName() : ""; } @Override public List<ProductsToPickRow> getIncludedRows() { return includedRows; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\productsToPick\rows\ProductsToPickRow.java
1
请在Spring Boot框架中完成以下Java代码
public boolean enabled() { return obtain(GangliaProperties::isEnabled, GangliaConfig.super::enabled); } @Override public Duration step() { return obtain(GangliaProperties::getStep, GangliaConfig.super::step); } @Override public TimeUnit durationUnits() { return obtain(GangliaProperties::getDurationUnits, ...
public int ttl() { return obtain(GangliaProperties::getTimeToLive, GangliaConfig.super::ttl); } @Override public String host() { return obtain(GangliaProperties::getHost, GangliaConfig.super::host); } @Override public int port() { return obtain(GangliaProperties::getPort, GangliaConfig.super::port); } }
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\ganglia\GangliaPropertiesConfigAdapter.java
2
请在Spring Boot框架中完成以下Java代码
public abstract class DiagramElement implements Serializable { private static final long serialVersionUID = 1L; protected String id; public DiagramElement() {} public DiagramElement(String id) { this.id = id; } /** * Id of the diagram element. */ public String getId() ...
return id; } public void setId(String id) { this.id = id; } @Override public String toString() { return "id=" + getId(); } public abstract boolean isNode(); public abstract boolean isEdge(); }
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\repository\DiagramElement.java
2
请在Spring Boot框架中完成以下Java代码
public class GithubController { private OAuth20Service createService(String state) { return new ServiceBuilder("e1f8d4f1a5c71467a159") .apiSecret("4851597541a8f33a4f1bf1c70f3cedcfefbeb13b") .state(state) .callback("http://localhost:8080/spring-mvc-simple/github/callback")...
public String callback(HttpServletRequest servletReq, @RequestParam("code") String code, @RequestParam("state") String state) throws InterruptedException, ExecutionException, IOException { String initialState = (String) servletReq.getSession().getAttribute("state"); if(initialState.equals(state)) { ...
repos\tutorials-master\spring-web-modules\spring-mvc-basics-2\src\main\java\com\baeldung\spring\controller\scribe\GithubController.java
2
请完成以下Java代码
public String getParentTaskId() { return parentTaskId; } public void setParentTaskId(String parentTaskId) { this.parentTaskId = parentTaskId; } public void setDeleteReason(final String deleteReason) { this.deleteReason = deleteReason; } public void setTaskId(String taskId) { this.taskId =...
@Override public String toString() { return this.getClass().getSimpleName() + "[taskId" + taskId + ", assignee=" + assignee + ", owner=" + owner + ", name=" + name + ", description=" + description + ", dueDate=" + dueDate + ", followUpDa...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricTaskInstanceEventEntity.java
1
请在Spring Boot框架中完成以下Java代码
static class Jackson2JsonMessageConvertersCustomizer implements ClientHttpMessageConvertersCustomizer, ServerHttpMessageConvertersCustomizer { private final ObjectMapper objectMapper; Jackson2JsonMessageConvertersCustomizer(ObjectMapper objectMapper) { this.objectMapper = objectMapper; } @Override pu...
@Override public void customize(ServerBuilder builder) { builder.withXmlConverter(new org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter( this.objectMapper)); } } private static class PreferJackson2OrJacksonUnavailableCondition extends AnyNestedCondition { PreferJackson2OrJ...
repos\spring-boot-4.0.1\module\spring-boot-http-converter\src\main\java\org\springframework\boot\http\converter\autoconfigure\Jackson2HttpMessageConvertersConfiguration.java
2
请完成以下Java代码
public int getC_Greeting_ID() { return get_ValueAsInt(COLUMNNAME_C_Greeting_ID); } @Override public void setGreeting (final @Nullable java.lang.String Greeting) { set_Value (COLUMNNAME_Greeting, Greeting); } @Override public java.lang.String getGreeting() { return get_ValueAsString(COLUMNNAME_Greetin...
set_Value (COLUMNNAME_IsDefault, IsDefault); } @Override public boolean isDefault() { return get_ValueAsBoolean(COLUMNNAME_IsDefault); } @Override public void setIsFirstNameOnly (final boolean IsFirstNameOnly) { set_Value (COLUMNNAME_IsFirstNameOnly, IsFirstNameOnly); } @Override public boolean isFir...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Greeting.java
1
请完成以下Java代码
public class IgnoreConfig { /** * 需要忽略的 URL 格式,不考虑请求方法 */ private List<String> pattern = Lists.newArrayList(); /** * 需要忽略的 GET 请求 */ private List<String> get = Lists.newArrayList(); /** * 需要忽略的 POST 请求 */ private List<String> post = Lists.newArrayList(); /** ...
private List<String> head = Lists.newArrayList(); /** * 需要忽略的 PATCH 请求 */ private List<String> patch = Lists.newArrayList(); /** * 需要忽略的 OPTIONS 请求 */ private List<String> options = Lists.newArrayList(); /** * 需要忽略的 TRACE 请求 */ private List<String> trace = Lists....
repos\spring-boot-demo-master\demo-rbac-security\src\main\java\com\xkcoding\rbac\security\config\IgnoreConfig.java
1
请在Spring Boot框架中完成以下Java代码
public class ShipmentScheduleStockChangedEventHandler implements MaterialEventHandler<StockChangedEvent> { private final ShipmentScheduleInvalidateBL scheduleInvalidateBL; private final IWarehouseDAO warehouseDAO = Services.get(IWarehouseDAO.class); public ShipmentScheduleStockChangedEventHandler(@NonNull final Shi...
{ final ProductDescriptor productDescriptor = event.getProductDescriptor(); final ShipmentScheduleAttributeSegment shipmentScheduleAttributeSegment = ShipmentScheduleAttributeSegment.ofAttributeSetInstanceId(AttributeSetInstanceId.ofRepoIdOrNone(productDescriptor.getAttributeSetInstanceId())); final Set<Warehous...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\spi\ShipmentScheduleStockChangedEventHandler.java
2
请完成以下Java代码
private boolean checkEnabled() { final boolean enabled = model.isEnabled(); action.setEnabled(enabled); final JMenuItem menuItem = action.getMenuItem(); menuItem.setEnabled(enabled); menuItem.setVisible(enabled); return enabled; } private void assertEnabled() { if (!checkEnabled()) { throw ne...
final GridTab gridTab = gc.getMTab(); final VTable table = gc.getVTable(); // // Check CTable to GridTab synchronizer final CTableColumns2GridTabSynchronizer synchronizer = CTableColumns2GridTabSynchronizer.get(table); if (synchronizer == null) { // synchronizer does not exist, nothing to save return...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\apps\AWindowSaveState.java
1
请完成以下Java代码
public String getDocAction () { return (String)get_Value(COLUMNNAME_DocAction); } /** Set Grant. @param GrantPermission Grant Permission */ public void setGrantPermission (String GrantPermission) { set_Value (COLUMNNAME_GrantPermission, GrantPermission); } /** Get Grant. @return Grant Permission...
set_Value (COLUMNNAME_IsReadWrite, Boolean.valueOf(IsReadWrite)); } /** Get Read Write. @return Field is read / write */ public boolean isReadWrite () { Object oo = get_Value(COLUMNNAME_IsReadWrite); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Role_PermRequest.java
1
请在Spring Boot框架中完成以下Java代码
public InvoiceLinePriceAndDiscount withUpdatedPriceEntered() { if (priceActual.signum() == 0) { return toBuilder().priceEntered(ZERO).build(); } final BigDecimal priceEntered = discount.addToBase(priceActual, precision.toInt(), precision.getRoundingMode()); return toBuilder().priceEntered(priceEntered).bu...
final BigDecimal delta = priceEntered.subtract(priceActual); final Percent discount = Percent.of(delta, priceEntered, precision.toInt()); return toBuilder().discount(discount).build(); } public void applyTo(@NonNull final I_C_InvoiceLine invoiceLine) { logger.debug("Applying {} to {}", this, invoiceLine); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\service\impl\InvoiceLinePriceAndDiscount.java
2
请完成以下Java代码
public static OrgMappingId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? new OrgMappingId(repoId) : null; } public static Optional<OrgMappingId> optionalOfRepoId(final int repoId) { return Optional.ofNullable(ofRepoIdOrNull(repoId)); } public static int toRepoId(@Nullable final OrgMappingId orgMapp...
} private OrgMappingId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "AD_Org_Mapping_ID"); } @JsonValue public int toJson() { return getRepoId(); } public static boolean equals(@Nullable final OrgMappingId o1, @Nullable final OrgMappingId o2) { return Objects.equals(o1, o2); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\OrgMappingId.java
1
请完成以下Java代码
protected HttpRequestHandler createHttpRequestHandler(FlowableHttpRequestHandler handler, CmmnEngineConfiguration cmmnEngineConfiguration) { HttpRequestHandler requestHandler = null; if (handler != null) { if (IMPLEMENTATION_TYPE_CLASS.equalsIgnoreCase(handler.getImplementationType())) { ...
responseHandler = new ClassDelegateHttpHandler(handler.getImplementation(), handler.getFieldExtensions()); } else if (ImplementationType.IMPLEMENTATION_TYPE_DELEGATEEXPRESSION.equalsIgnoreCase(handler.getImplementationType())) { responseHandler = new DelegateExpressi...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\behavior\impl\http\DefaultCmmnHttpActivityDelegate.java
1
请完成以下Java代码
public class Car { private String make; private String model; public Car() { } public Car(String make, String model) { this.make = make; this.model = model; } public String getMake() {
return make; } public void setMake(String make) { this.make = make; } public String getModel() { return model; } public void setModel(String model) { this.model = model; } }
repos\tutorials-master\spring-web-modules\spring-freemarker\src\main\java\com\baeldung\freemarker\model\Car.java
1
请完成以下Java代码
private File img2txt(File file) throws IOException { BufferedImage image = ImageIO.read(file); BufferedImage scaled = getScaledImg(image); char[][] array = getImageMatrix(scaled); StringBuffer sb = new StringBuffer(); for (char[] cs : array) { for (char c : cs) { ...
int r = Integer.valueOf(Integer.toBinaryString(rgb).substring(0, 8), 2); int g = (rgb & 0xff00) >> 8; int b = rgb & 0xff; int gray = (int) (0.2126 * r + 0.7152 * g + 0.0722 * b); // 把int gray转换成char int len = toChar.length(); ...
repos\spring-boot-quick-master\quick-img2txt\src\main\java\com\quick\img2txt\Img2TxtService.java
1
请完成以下Java代码
public static <T> HttpResult<T> success(T obj, int code) { SuccessResult<T> result = new SuccessResult<T>(); result.setStatus(true); result.setCode(200); result.setEntry(obj); return result; } public static <T> HttpResult<List<T>> success(List<T> list) { SuccessResult<List<T>> result = new SuccessResult<...
public String getMessage() { return null != message ? message : HttpResult.MESSAGE_SUCCESS; } @Override public int getCode() { return code != 0 ? code : HttpResult.RESPONSE_SUCCESS; } } public static class FailureResult<T> extends HttpResult<T> { @Override public String getMessage() { return ...
repos\springboot-demo-master\Aviator\src\main\java\com\et\exception\HttpResult.java
1
请完成以下Java代码
protected DataManager<AttachmentEntity> getDataManager() { return attachmentDataManager; } @Override public List<AttachmentEntity> findAttachmentsByProcessInstanceId(String processInstanceId) { checkHistoryEnabled(); return attachmentDataManager.findAttachmentsByProcessInstanceId(pr...
ActivitiEventType.ENTITY_DELETED, attachment, executionId, processInstanceId, processDefinitionId ) ); } } } protected void checkHistoryEnabled() { if ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\AttachmentEntityManagerImpl.java
1
请完成以下Java代码
public static boolean isSameWeek(Date date1, Date date2) { if (date1 == null || date2 == null) { return false; } Calendar calendar1 = Calendar.getInstance(); calendar1.setTime(date1); Calendar calendar2 = Calendar.getInstance(); calendar2.setTime(date2); ...
* @return */ public static List<Date> getDateRangeList(Date begin, Date end) { List<Date> dateList = new ArrayList<>(); if (begin == null || end == null) { return dateList; } // 清除时间部分,只比较日期 Calendar beginCal = Calendar.getInstance(); beginCal.setTim...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\DateUtils.java
1
请完成以下Java代码
public static void main(String[] args) throws IOException, GitAPIException { // prepare a new test-repository try (Repository repository = Helper.createNewRepository()) { try (Git git = new Git(repository)) { // create the file File myfile = new File(repositor...
try(PrintWriter writer = new PrintWriter(myfile)) { writer.append("Hello, world!"); } // Stage all changed files, omitting new files, and commit with one command git.commit() .setAll(true) .setMessage("C...
repos\tutorials-master\jgit\src\main\java\com\baeldung\jgit\porcelain\CommitAll.java
1
请完成以下Spring Boot application配置
spring: h2: console: enabled: true path: /h2-console settings.trace: false settings.web-allow-others: false datasource: url: jdbc:h2:mem:mydb username: sa password: password driverClassName: org.h2.Driver jpa: database
-platform: org.hibernate.dialect.H2Dialect properties: hibernate: globally_quoted_identifiers: true
repos\tutorials-master\persistence-modules\spring-boot-persistence-h2\src\main\resources\application.yaml
2
请完成以下Java代码
public boolean isReadonlyUI(final IAttributeValueContext ctx, final IAttributeSet attributeSet, final I_M_Attribute attribute) { final String attributeKey = attribute.getValue(); if (RepackNumberUtils.ATTR_IsRepackNumberRequired.equals(attributeKey)) { return true; } else if (RepackNumberUtils.ATTR_Repack...
{ final String attributeKey = attribute.getValue(); if (RepackNumberUtils.ATTR_IsRepackNumberRequired.equals(attributeKey)) { return RepackNumberUtils.isRepackNumberRequired(attributeSet); } else if (RepackNumberUtils.ATTR_RepackNumber.equals(attributeKey)) { return RepackNumberUtils.isRepackNumberReq...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma\src\main\java\de\metas\vertical\pharma\attributes\RepackNumberAttributeCallout.java
1
请完成以下Java代码
private boolean isActiveEventSubscription(EventSubscriptionEntity signalEventSubscriptionEntity) { ExecutionEntity execution = signalEventSubscriptionEntity.getExecution(); return !execution.isEnded() && !execution.isCanceled(); } private void startProcessInstances(List<EventSubscriptionEntity> startSignal...
return result; } protected List<EventSubscriptionEntity> filterStartSubscriptions(List<EventSubscriptionEntity> subscriptions) { List<EventSubscriptionEntity> result = new ArrayList<EventSubscriptionEntity>(); for (EventSubscriptionEntity subscription : subscriptions) { if (subscription.getExecution...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\SignalEventReceivedCmd.java
1
请完成以下Java代码
public boolean hasInvoices() { final String whereClause = "C_DunningRunEntry_ID=? AND C_Invoice_ID IS NOT NULL"; return new Query(getCtx(), I_C_DunningRunLine.Table_Name, whereClause, get_TrxName()) .setParameters(getC_DunningRunEntry_ID()) .anyMatch(); } // hasInvoices /** * Get Parent * * @retur...
if (level.isSetCreditStop() || level.isSetPaymentTerm()) { final IBPartnerDAO bpartnersRepo = Services.get(IBPartnerDAO.class); final I_C_BPartner thisBPartner = bpartnersRepo.getById(getC_BPartner_ID()); final BPartnerStats stats =bpartnerStatsDAO.getCreateBPartnerStats(thisBPartner); if (level.is...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MDunningRunEntry.java
1
请完成以下Java代码
public String registerNamespace(String namespaceUri) { synchronized(document) { String lookupPrefix = lookupPrefix(namespaceUri); if (lookupPrefix == null) { // check if a prefix is known String prefix = XmlQName.KNOWN_PREFIXES.get(namespaceUri); // check if prefix is not already...
element.setAttributeNS(XMLNS_ATTRIBUTE_NS_URI, XMLNS_ATTRIBUTE + ":" + prefix, namespaceUri); } } public String lookupPrefix(String namespaceUri) { synchronized(document) { return element.lookupPrefix(namespaceUri); } } public boolean equals(Object o) { if (this == o) { return true...
repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\instance\DomElementImpl.java
1
请完成以下Java代码
public String getLocationUri() { return locationUriAttribute.getValue(this); } public void setLocationUri(String locationUri) { locationUriAttribute.setValue(this, locationUri); } public Collection<AuthorityRequirement> getAuthorityRequirement() { return authorityRequirementCollection.get(this); ...
public KnowledgeSource newInstance(ModelTypeInstanceContext instanceContext) { return new KnowledgeSourceImpl(instanceContext); } }); locationUriAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_LOCATION_URI) .build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence();...
repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\KnowledgeSourceImpl.java
1
请在Spring Boot框架中完成以下Java代码
public int getMaxScale() { return this.maxScale; } public void setMaxScale(int maxScale) { this.maxScale = maxScale; } public int getMaxBucketCount() { return this.maxBucketCount; } public void setMaxBucketCount(int maxBucketCount) { this.maxBucketCount = maxBucketCount; } public TimeUnit getBaseTim...
public static class Meter { /** * Maximum number of buckets to be used for exponential histograms, if configured. * This has no effect on explicit bucket histograms. */ private @Nullable Integer maxBucketCount; /** * Histogram type when histogram publishing is enabled. */ private @Nullable Hist...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\otlp\OtlpMetricsProperties.java
2
请完成以下Java代码
public class X_WEBUI_Board extends org.compiere.model.PO implements I_WEBUI_Board, org.compiere.model.I_Persistent { private static final long serialVersionUID = -522212501L; /** Standard Constructor */ public X_WEBUI_Board (final Properties ctx, final int WEBUI_Board_ID, @Nullable final String trxName) ...
else set_Value (COLUMNNAME_AD_Val_Rule_ID, AD_Val_Rule_ID); } @Override public int getAD_Val_Rule_ID() { return get_ValueAsInt(COLUMNNAME_AD_Val_Rule_ID); } @Override public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java-gen\de\metas\ui\web\base\model\X_WEBUI_Board.java
1
请完成以下Java代码
private Individual tournamentSelection(Population pop) { Population tournament = new Population(tournamentSize, false); for (int i = 0; i < tournamentSize; i++) { int randomId = (int) (Math.random() * pop.getIndividuals().size()); tournament.getIndividuals().add(i, pop.getIndivid...
} protected void setSolution(String newSolution) { solution = new byte[newSolution.length()]; for (int i = 0; i < newSolution.length(); i++) { String character = newSolution.substring(i, i + 1); if (character.contains("0") || character.contains("1")) { soluti...
repos\tutorials-master\algorithms-modules\algorithms-genetic\src\main\java\com\baeldung\algorithms\ga\binary\SimpleGeneticAlgorithm.java
1
请完成以下Java代码
public final VNumber getVNumber(final String columnName, final boolean mandatory) { final Properties ctx = Env.getCtx(); final String title = Services.get(IMsgBL.class).translate(ctx, columnName); return new VNumber(columnName, mandatory, false, // isReadOnly true, // isUpdateable DisplayType.Num...
{ final String columnName = columnNamesIt.next(); missingColumnsBuilder.append("@").append(columnName).append("@"); if (columnNamesIt.hasNext()) { missingColumnsBuilder.append(", "); } } final Exception ex = new AdempiereException("@NotFound@ " + missingColumnsBuilder.toString()); ADialog.erro...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\api\impl\SwingEditorFactory.java
1
请完成以下Java代码
public abstract static class TransactionStateSynchronization { protected final TransactionListener transactionListener; protected final TransactionState transactionState; private final CommandContext commandContext; public TransactionStateSynchronization(TransactionState transactionState, TransactionL...
protected abstract boolean isCommitted(int status); protected abstract boolean isRolledBack(int status); } @Override public boolean isTransactionActive() { try { return isTransactionActiveInternal(); } catch (Exception e) { throw LOG.exceptionWhileInteractingWithTransaction("getting tra...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cfg\jta\AbstractTransactionContext.java
1
请在Spring Boot框架中完成以下Java代码
public class CreatePackagesForInOutRequest { @NonNull I_M_InOut shipment; boolean processed; @Nullable List<PackageInfo> packageInfos; public static CreatePackagesForInOutRequest ofShipment(@NonNull final I_M_InOut shipment) { return CreatePackagesForInOutRequest.builder() .shipment(shipment) .proce...
.packageInfos(null) .build(); } public InOutId getShipmentId() { return InOutId.ofRepoId(shipment.getM_InOut_ID()); } @Nullable public ShipperTransportationId getShipperTransportationId() { return ShipperTransportationId.ofRepoIdOrNull(shipment.getM_ShipperTransportation_ID()); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipping\CreatePackagesForInOutRequest.java
2
请完成以下Java代码
public class MessageEntity extends JobEntity { public static final String TYPE = "message"; private static final long serialVersionUID = 1L; private final static EnginePersistenceLogger LOG = ProcessEngineLogger.PERSISTENCE_LOGGER; private String repeat = null; public String getRepeat() { return repe...
} @Override public void init(CommandContext commandContext, boolean shouldResetLock, boolean shouldCallDeleteHandler) { super.init(commandContext, shouldResetLock, shouldCallDeleteHandler); repeat = null; } @Override public String toString() { return this.getClass().getSimpleName() + ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\MessageEntity.java
1
请完成以下Java代码
protected String getEngineVersion() { return CmmnEngine.VERSION; } @Override protected String getSchemaVersionPropertyName() { return "cmmn.schema.version"; } @Override protected String getDbSchemaLockName() { return CMMN_DB_SCHEMA_LOCK_NAME; } @Override pr...
} @Override protected String getDbVersionForChangelogVersion(String changeLogVersion) { if (StringUtils.isNotEmpty(changeLogVersion) && changeLogVersionMap.containsKey(changeLogVersion)) { return changeLogVersionMap.get(changeLogVersion); } return "6.1.2.0"; } @Over...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\db\CmmnDbSchemaManager.java
1
请完成以下Java代码
protected ProcessPreconditionsResolution checkPreconditionsApplicable() { if (!getSelectedRowIds().isSingleDocumentId()) { return ProcessPreconditionsResolution.rejectBecauseNotSingleSelection(); } final PickingSlotRow pickingSlotRow = getSingleSelectedRow(); if (!pickingSlotRow.isPickingSourceHURow()) ...
return MSG_OK; } @Override protected void postProcess(final boolean success) { if (!success) { return; } if (sourceWasDeleted) { // unselect the row we just deleted the record of, to avoid an 'EntityNotFoundException' invalidatePickingSlotsView(); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\process\WEBUI_Picking_M_Source_HU_Delete.java
1
请完成以下Java代码
public void setEntityType (java.lang.String EntityType) { set_Value (COLUMNNAME_EntityType, EntityType); } /** Get Entitäts-Art. @return Dictionary Entity Type; Determines ownership and synchronization */ @Override public java.lang.String getEntityType () { return (java.lang.String)get_Value(COLUMNNA...
@Override public int getIMP_RequestHandlerType_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_IMP_RequestHandlerType_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Name. @param Name Alphanumeric identifier of the entity */ @Override public void setName (java.lang.String Nam...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\process\rpl\requesthandler\model\X_IMP_RequestHandlerType.java
1
请完成以下Java代码
public InformationItem getVariable() { return variable; } public void setVariable(InformationItem variable) { this.variable = variable; } public List<InformationRequirement> getRequiredDecisions() { return requiredDecisions; } public void setRequiredDecisions(List<Inform...
public Expression getExpression() { return expression; } public void setExpression(Expression expression) { this.expression = expression; } public boolean isForceDMN11() { return forceDMN11; } public void setForceDMN11(boolean forceDMN11) { this.forceDMN11 = for...
repos\flowable-engine-main\modules\flowable-dmn-model\src\main\java\org\flowable\dmn\model\Decision.java
1
请在Spring Boot框架中完成以下Java代码
public class PPOrderNodeId implements RepoIdAware { @JsonCreator public static PPOrderNodeId ofRepoId(final int repoId) { return new PPOrderNodeId(repoId); } public static PPOrderNodeId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? new PPOrderNodeId(repoId) : null; } public static Optional<PPOrde...
public static int toRepoIdOr(final PPOrderNodeId id, final int defaultValue) { return id != null ? id.getRepoId() : defaultValue; } int repoId; private PPOrderNodeId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "PP_Order_Node_ID"); } @JsonValue public int toJson() { return get...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\pporder\PPOrderNodeId.java
2
请完成以下Java代码
public class Lecture { @PlanningId private Long id; private Integer roomNumber; private Integer period; public Lecture(Long i) { this.id = i; } public Lecture() { } @PlanningVariable(valueRangeProviderRefs = {"availablePeriods"}) public Integer getPeriod() { r...
@PlanningVariable(valueRangeProviderRefs = {"availableRooms"}) public Integer getRoomNumber() { return roomNumber; } public void setPeriod(Integer period) { this.period = period; } public void setRoomNumber(Integer roomNumber) { this.roomNumber = roomNumber; } }
repos\tutorials-master\optaplanner\src\main\java\com\baeldung\optaplanner\Lecture.java
1
请在Spring Boot框架中完成以下Java代码
public static class Validation { /** * Whether to enable LDAP schema validation. */ private boolean enabled = true; /** * Path to the custom schema. */ private @Nullable Resource schema; public boolean isEnabled() { return this.enabled; }
public void setEnabled(boolean enabled) { this.enabled = enabled; } public @Nullable Resource getSchema() { return this.schema; } public void setSchema(@Nullable Resource schema) { this.schema = schema; } } }
repos\spring-boot-4.0.1\module\spring-boot-ldap\src\main\java\org\springframework\boot\ldap\autoconfigure\embedded\EmbeddedLdapProperties.java
2
请完成以下Java代码
public boolean isIncludeProcessVariables() { return includeProcessVariables; } public boolean iswithException() { return withJobException; } public String getNameLikeIgnoreCase() { return nameLikeIgnoreCase; } public List<ProcessInstanceQueryImpl> getOrQueryObjects() {...
public void setStartedBefore(Date startedBefore) { this.startedBefore = startedBefore; } public Date getStartedAfter() { return startedAfter; } public void setStartedAfter(Date startedAfter) { this.startedAfter = startedAfter; } public String getStartedBy() { r...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\ProcessInstanceQueryImpl.java
1
请完成以下Java代码
public static List<GrantedAuthority> commaSeparatedStringToAuthorityList(String authorityString) { return createAuthorityList(StringUtils.tokenizeToStringArray(authorityString, ",")); } /** * Converts an array of GrantedAuthority objects to a Set. * @return a Set of the Strings obtained from each call to * G...
grantedAuthorities.add(new SimpleGrantedAuthority(authority)); } return grantedAuthorities; } /** * Converts authorities into a List of GrantedAuthority objects. * @param authorities the authorities to convert * @return a List of GrantedAuthority objects * @since 6.1 */ public static List<GrantedAutho...
repos\spring-security-main\core\src\main\java\org\springframework\security\core\authority\AuthorityUtils.java
1
请在Spring Boot框架中完成以下Java代码
public void configureWebSocketTransport(WebSocketTransportRegistration registration) { registration.addDecoratorFactory(wsConnectHandlerDecoratorFactory()); } @Bean public static WebSocketRegistryListener webSocketRegistryListener() { return new WebSocketRegistryListener(); } @Bean public WebSocketConnectHa...
return endpoints; } @Override public void setOrder(int order) { this.registry.setOrder(order); } @Override public void setUrlPathHelper(UrlPathHelper urlPathHelper) { this.registry.setUrlPathHelper(urlPathHelper); } @Override public WebMvcStompEndpointRegistry setErrorHandler(StompSubProtocol...
repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\web\socket\config\annotation\AbstractSessionWebSocketMessageBrokerConfigurer.java
2
请在Spring Boot框架中完成以下Java代码
public Duration getQuery() { return this.query; } public void setQuery(Duration query) { this.query = query; } public Duration getView() { return this.view; } public void setView(Duration view) { this.view = view; } public Duration getSearch() { return this.search; } public void ...
} public void setAnalytics(Duration analytics) { this.analytics = analytics; } public Duration getManagement() { return this.management; } public void setManagement(Duration management) { this.management = management; } } }
repos\spring-boot-4.0.1\module\spring-boot-couchbase\src\main\java\org\springframework\boot\couchbase\autoconfigure\CouchbaseProperties.java
2
请完成以下Java代码
public String getTypeLanguage() { return typeLanguageAttribute.getValue(this); } public void setTypeLanguage(String typeLanguage) { typeLanguageAttribute.setValue(this, typeLanguage); } public String getExporter() { return exporterAttribute.getValue(this); } public void setExporter(String exp...
public Collection<Extension> getExtensions() { return extensionCollection.get(this); } public Collection<RootElement> getRootElements() { return rootElementCollection.get(this); } public Collection<BpmnDiagram> getBpmDiagrams() { return bpmnDiagramCollection.get(this); } public Collection<Rel...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\DefinitionsImpl.java
1
请完成以下Java代码
public class JwtResponse { private String token; private String type = "Bearer"; private String username; public JwtResponse(String accessToken, String username) { this.token = accessToken; this.username = username; } public String getAccessToken() { return token; ...
public String getTokenType() { return type; } public void setTokenType(String tokenType) { this.type = tokenType; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } }
repos\tutorials-master\spring-security-modules\spring-security-core\src\main\java\com\baeldung\jwtsignkey\response\JwtResponse.java
1
请完成以下Java代码
public int getM_Picking_Job_ID() { return get_ValueAsInt(COLUMNNAME_M_Picking_Job_ID); } @Override public void setM_Product_ID (final int M_Product_ID) { if (M_Product_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Product_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Product_ID, M_Product_ID); } @Over...
@Override public int getPickFrom_Locator_ID() { return get_ValueAsInt(COLUMNNAME_PickFrom_Locator_ID); } @Override public void setPickFrom_Warehouse_ID (final int PickFrom_Warehouse_ID) { if (PickFrom_Warehouse_ID < 1) set_Value (COLUMNNAME_PickFrom_Warehouse_ID, null); else set_Value (COLUMNNAME_...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_Picking_Job_HUAlternative.java
1
请在Spring Boot框架中完成以下Java代码
public void setPassword(String password) { this.password = password; } } @NotBlank private String hostName; @Min(1025) @Max(65536) private int port; @Pattern(regexp = "^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,6}$") private String from; private Credentials credent...
return from; } public void setFrom(String from) { this.from = from; } public Credentials getCredentials() { return credentials; } public void setCredentials(Credentials credentials) { this.credentials = credentials; } public List<String> getDefaultRecipients()...
repos\tutorials-master\spring-boot-modules\spring-boot-core\src\main\java\com\baeldung\configurationproperties\ConfigProperties.java
2
请完成以下Java代码
public void setTour(String value) { this.tour = value; } /** * Gets the value of the retourenAnteilTyp property. * * @return * possible object is * {@link RetourenAnteilTypType } * */ public RetourenAnteilT...
* &lt;extension base="{urn:msv3:v2}RetourePositionType"&gt; * &lt;/extension&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") public static cla...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v2\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v2\RetourenavisAnkuendigungAntwort.java
1
请完成以下Java代码
public class MEXPFormatLine extends X_EXP_FormatLine { /** * */ private static final long serialVersionUID = 1855089248134520749L; /** Static Logger */ private static Logger s_log = LogManager.getLogger(X_EXP_FormatLine.class); public MEXPFormatLine(Properties ctx, int C_EDIFormat_Line_ID, String trxNam...
pstmt = null; } catch (SQLException e) { s_log.error(sql.toString(), e); throw e; } finally { try { if (pstmt != null) pstmt.close (); pstmt = null; } catch (Exception e) { pstmt = null; } } return result; } @Override protected boolean afterSave (boolean newRecord, boolean success) { if(!succ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MEXPFormatLine.java
1
请完成以下Java代码
public void updateProcessed(final I_C_Async_Batch asyncBatch) { // // Our batch was processed right now => notify user by sending email if (asyncBatch.isProcessed() && isNotificationType(asyncBatch, X_C_Async_Batch_Type.NOTIFICATIONTYPE_AsyncBatchProcessed)) { asyncBatchListeners.notify(asyncBatch); }...
// // Our batch was not processed => notify user with note when workpackage processed if (!asyncBatch.isProcessed() && isNotificationType(asyncBatch, X_C_Async_Batch_Type.NOTIFICATIONTYPE_WorkpackageProcessed)) { asyncBatchListeners.notify(asyncBatch); } } private boolean isNotificationType(@NonNull f...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\model\validator\C_Async_Batch.java
1
请完成以下Java代码
public ChannelDefinitionEntity findChannelDefinitionByKeyAndVersion(String channelDefinitionKey, Integer eventVersion) { Map<String, Object> params = new HashMap<>(); params.put("channelDefinitionKey", channelDefinitionKey); params.put("eventVersion", eventVersion); List<ChannelDefinitio...
@Override public long findChannelDefinitionCountByNativeQuery(Map<String, Object> parameterMap) { return (Long) getDbSqlSession().selectOne("selectChannelDefinitionCountByNativeQuery", parameterMap); } @Override public void updateChannelDefinitionTenantIdForDeployment(String deploymentId, Strin...
repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\persistence\entity\data\impl\MybatisChannelDefinitionDataManager.java
1
请完成以下Java代码
public void setId(Integer id) { this.id = id; } public Integer getProductId() { return productId; } public void setProductId(Integer productId) { this.productId = productId; } public String getStatus() { return status; } public void setStatus(String st...
public void setCustomerId(String customerId) { this.customerId = customerId; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getCreationDate() { return creationDate; } pu...
repos\tutorials-master\spring-boot-modules\spring-boot-graphql-2\src\main\java\com\baeldung\graphqlvsrest\entity\Order.java
1
请完成以下Java代码
public CleanableHistoricProcessInstanceReport createCleanableHistoricProcessInstanceReport() { return new CleanableHistoricProcessInstanceReportImpl(commandExecutor); } public CleanableHistoricDecisionInstanceReport createCleanableHistoricDecisionInstanceReport() { return new CleanableHistoricDecisionInsta...
public SetRemovalTimeSelectModeForHistoricDecisionInstancesBuilder setRemovalTimeToHistoricDecisionInstances() { return new SetRemovalTimeToHistoricDecisionInstancesBuilderImpl(commandExecutor); } public SetRemovalTimeSelectModeForHistoricBatchesBuilder setRemovalTimeToHistoricBatches() { return new SetRem...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoryServiceImpl.java
1
请完成以下Java代码
private void deactivatePartner(@NonNull final I_C_BPartner partner) { partner.setIsActive(false); InterfaceWrapperHelper.save(partner); } private ImportRecordResult importOrUpdateBPartner(@NonNull final I_I_Pharma_BPartner importRecord, final boolean isInsertOnly) { final boolean bpartnerExists = importRecor...
private ImportRecordResult doNothingAndUsePreviousPartner(@NonNull final I_I_Pharma_BPartner importRecord, @NonNull final I_I_Pharma_BPartner previousImportRecord) { importRecord.setC_BPartner(previousImportRecord.getC_BPartner()); return ImportRecordResult.Nothing; } @Override protected void markImported(@Non...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma\src\main\java\de\metas\impexp\bpartner\IFABPartnerImportProcess.java
1
请在Spring Boot框架中完成以下Java代码
public class MyBatisUsersConfig { /** * 创建 users 数据源 */ @Bean(name = "usersDataSource") @ConfigurationProperties(prefix = "spring.datasource.users") public DataSource dataSource() { return DataSourceBuilder.create().build(); } /** * 创建 MyBatis SqlSessionFactory */ ...
return bean.getObject(); } /** * 创建 MyBatis SqlSessionTemplate */ @Bean(name = "usersSqlSessionTemplate") public SqlSessionTemplate sqlSessionTemplate() throws Exception { return new SqlSessionTemplate(this.sqlSessionFactory()); } /** * 创建 users 数据源的 TransactionManager 事...
repos\SpringBoot-Labs-master\lab-17\lab-17-dynamic-datasource-mybatis\src\main\java\cn\iocoder\springboot\lab17\dynamicdatasource\config\MyBatisUsersConfig.java
2
请完成以下Java代码
public boolean isCompletable() { return completable; } @Override public String getEntryCriterionId() { return entryCriterionId; } @Override public String getExitCriterionId() { return exitCriterionId; } @Override public String getFormKey() { return ...
@Override public Set<String> getVariableNames() { return variables.keySet(); } @Override public Map<String, Object> getPlanItemInstanceLocalVariables() { return localVariables; } @Override public PlanItem getPlanItem() { return planItem; } @Override pub...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\delegate\ReadOnlyDelegatePlanItemInstanceImpl.java
1
请完成以下Java代码
public List<FactTrxLines> createFactTrxLines(final List<FactLine> factLines) { if (factLines.isEmpty()) { return ImmutableList.of(); } final Map<Integer, FactTrxLines.FactTrxLinesBuilder> factTrxLinesByKey = new LinkedHashMap<>(); for (final FactLine factLine : factLines) { factTrxLinesByKey.compute...
private static int extractGroupNo(final FactLine factLine) { final DocLine<?> docLine = factLine.getDocLine(); if (docLine instanceof DocLine_GLJournal) { return ((DocLine_GLJournal)docLine).getGroupNo(); } else { throw new AdempiereException("Expected a DocLine_GLJournal: " + docLine); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\Doc_GLJournal_FactTrxStrategy.java
1
请完成以下Java代码
public class Agent { /** * The {@link AgentId}. */ private final AgentId id; /** * The version of the agent, if any. */ private final String version; public Agent(AgentId id, String version) { this.id = id; this.version = version; } public AgentId getId() { return this.id; } public String ge...
/** * NX. */ NX("nx", "@nxrocks_nx-spring-boot"), /** * A generic browser. */ BROWSER("browser", "Browser"); final String id; final String name; public String getId() { return this.id; } public String getName() { return this.name; } AgentId(String id, String name) { this.i...
repos\initializr-main\initializr-web\src\main\java\io\spring\initializr\web\support\Agent.java
1
请完成以下Java代码
private static PackageItem toPackageItem(@NonNull final I_M_InOutLine inOutLine) { final ProductId productId = ProductId.ofRepoIdOrNull(inOutLine.getM_Product_ID()); final OrderLineId orderLineId = OrderLineId.ofRepoIdOrNull(inOutLine.getC_OrderLine_ID()); if (productId == null || orderLineId == null) { ret...
return queryBL.createQueryBuilder(I_M_ShippingPackage.class) .filter(ConstantQueryFilter.of(false)); } final IQueryBuilder<I_M_ShippingPackage> builder = queryBL.createQueryBuilder(I_M_ShippingPackage.class) .addOnlyActiveRecordsFilter(); final Collection<OrderId> orderIds = query.getOrderIds(); if (...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\shipping\PurchaseOrderToShipperTransportationRepository.java
1
请在Spring Boot框架中完成以下Java代码
public class UploadConfig { @Value("${qiniu.accessKey}") private String accessKey; @Value("${qiniu.secretKey}") private String secretKey; private final MultipartProperties multipartProperties; @Autowired public UploadConfig(MultipartProperties multipartProperties) { this.multipart...
/** * 华东机房 */ @Bean public com.qiniu.storage.Configuration qiniuConfig() { return new com.qiniu.storage.Configuration(Zone.zone0()); } /** * 构建一个七牛上传工具实例 */ @Bean public UploadManager uploadManager() { return new UploadManager(qiniuConfig()); } /** ...
repos\spring-boot-demo-master\demo-upload\src\main\java\com\xkcoding\upload\config\UploadConfig.java
2
请完成以下Java代码
class CreateOrUpdateOrderLineFromOrderCostCommand { // // services @NonNull private final IOrderBL orderBL; @NonNull private final MoneyService moneyService; // // Params @NonNull private final OrderCost orderCost; @Nullable private final ProductId productId; // // State @Nullable private I_C_Order _order;...
orderBL.setProductId(orderLine, productId, true); } orderLine.setQtyEntered(BigDecimal.ONE); orderLine.setQtyOrdered(BigDecimal.ONE); orderLine.setIsManualPrice(true); orderLine.setIsPriceEditable(false); final Money costAmountConv = convertToOrderCurrency(orderCost.getCostAmount()); orderLine.setPrice...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\costs\CreateOrUpdateOrderLineFromOrderCostCommand.java
1
请完成以下Java代码
public static DDOrderCandidateAllocList of(@NonNull final Collection<DDOrderCandidateAlloc> list) { return list.isEmpty() ? EMPTY : new DDOrderCandidateAllocList(list); } public static Collector<DDOrderCandidateAlloc, ?, DDOrderCandidateAllocList> collect() { return GuavaCollectors.collectUsingListAccumulator(...
return list.iterator(); } public Map<DDOrderCandidateId, DDOrderCandidateAllocList> groupByCandidateId() { if (list.isEmpty()) { return ImmutableMap.of(); } return list.stream().collect(Collectors.groupingBy(DDOrderCandidateAlloc::getDdOrderCandidateId, collect())); } public Optional<Quantity> getQty...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddordercandidate\DDOrderCandidateAllocList.java
1
请在Spring Boot框架中完成以下Java代码
public ResponseEntity<String> usingResponseEntityConstructor() { HttpHeaders responseHeaders = new HttpHeaders(); responseHeaders.set("Baeldung-Example-Header", "Value-ResponseEntityContructor"); String responseBody = "Response with header using ResponseEntity (constructor)"; HttpStatus ...
return ResponseEntity.ok() .header(responseHeaderKey, responseHeaderValue) .body(responseBody); } @GetMapping("/response-entity-builder-with-http-headers") public ResponseEntity<String> usingResponseEntityBuilderAndHttpHeaders() { HttpHeaders responseHeaders = new HttpHeader...
repos\tutorials-master\spring-web-modules\spring-rest-http\src\main\java\com\baeldung\responseheaders\controllers\ResponseHeaderController.java
2
请完成以下Java代码
private int hashNode(int id) { int hashValue = 0; for (; id != 0; id = _nodes.get(id).sibling) { int unit = _nodes.get(id).unit(); byte label = _nodes.get(id).label; hashValue ^= hash(((label & 0xFF) << 24) ^ unit); } return hashValue; ...
} return id; } private void freeNode(int id) { _recycleBin.add(id); } private static int hash(int key) { key = ~key + (key << 15); // key = (key << 15) - key - 1; key = key ^ (key >>> 12); key = key + (key << 2); key = key ^ (key >>> 4); ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\dartsclone\details\DawgBuilder.java
1
请完成以下Java代码
public boolean equals(Object obj) { if ((obj == null) || (obj.getClass() != this.getClass())) return false; if (obj == this) return true; Campus other = (Campus) obj; return this.hashCode() == other.hashCode(); } @SuppressWarnings("unused") private Ca...
this.id = id; return this; } public Builder name(String name) { this.name = name; return this; } public Builder location(Point location) { this.location = location; return this; } } }
repos\tutorials-master\persistence-modules\spring-data-couchbase-2\src\main\java\com\baeldung\spring\data\couchbase\model\Campus.java
1
请完成以下Java代码
public void setLastProcessed (final @Nullable java.sql.Timestamp LastProcessed) { set_Value (COLUMNNAME_LastProcessed, LastProcessed); } @Override public java.sql.Timestamp getLastProcessed() { return get_ValueAsTimestamp(COLUMNNAME_LastProcessed); } @Override public de.metas.async.model.I_C_Queue_WorkPa...
{ set_ValueFromPO(COLUMNNAME_Parent_Async_Batch_ID, de.metas.async.model.I_C_Async_Batch.class, Parent_Async_Batch); } @Override public void setParent_Async_Batch_ID (final int Parent_Async_Batch_ID) { if (Parent_Async_Batch_ID < 1) set_Value (COLUMNNAME_Parent_Async_Batch_ID, null); else set_Value (...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java-gen\de\metas\async\model\X_C_Async_Batch.java
1
请完成以下Java代码
public List<Object> getContent() { if (content == null) { content = new ArrayList<Object>(); } return this.content; } /** * Gets the value of the algorithm property. * * @return * possible object is * {@link String } * */ ...
return algorithm; } /** * Sets the value of the algorithm property. * * @param value * allowed object is * {@link String } * */ public void setAlgorithm(String value) { this.algorithm = value; } }
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\AgreementMethodType.java
1
请完成以下Java代码
protected String doIt() throws Exception { ppOrderCandidateService.setDateStartSchedule(getSelectedPPOrderCandidateIds(), convertParamsToTimestamp()); return MSG_OK; } @ProcessParamLookupValuesProvider(parameterName = PARAM_Hour, numericKey = false, lookupSource = DocumentLayoutElementFieldDescriptor.LookupSour...
.collect(ImmutableSet.toImmutableSet()); } } @NonNull private Timestamp convertParamsToTimestamp() { return Timestamp.valueOf(TimeUtil.asLocalDate(p_Date) .atTime(Integer.parseInt(p_Hour), Integer.parseInt(p_Minute))); } @NonNull private LookupValue.StringLookupValue toStringLookupValue(final int value...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.webui\src\main\java\de\metas\manufacturing\webui\process\PP_Order_Candidate_SetStartDate.java
1
请完成以下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...
@param W_ClickCount_ID Web Click Management */ public void setW_ClickCount_ID (int W_ClickCount_ID) { if (W_ClickCount_ID < 1) set_ValueNoCheck (COLUMNNAME_W_ClickCount_ID, null); else set_ValueNoCheck (COLUMNNAME_W_ClickCount_ID, Integer.valueOf(W_ClickCount_ID)); } /** Get Click Count. @retur...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_ClickCount.java
1
请完成以下Java代码
public class RoleGroup { @Getter private final String name; private static final ConcurrentHashMap<String, RoleGroup> cache = new ConcurrentHashMap<>(); private RoleGroup(@NonNull final String name) { this.name = name; } @Nullable public static RoleGroup ofNullableString(@Nullable final String name) { fi...
if (nameNorm == null) { return null; } return cache.computeIfAbsent(name, RoleGroup::new); } @Override @Deprecated public String toString() { return getName(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\RoleGroup.java
1
请在Spring Boot框架中完成以下Java代码
public ResolveHUResponse resolveHU(@NonNull final ResolveHURequest request) { return newHUScannedCodeResolveCommand() .scannedCode(request.getScannedCode()) .inventory(getById(request.getWfProcessId(), request.getCallerId())) .lineId(request.getLineId()) .locatorId(request.getLocatorId()) .build(...
return inventoryService.updateById(inventoryId, inventory -> { inventory.assertHasAccess(callerId); return inventory.updatingLineById(request.getLineId(), line -> { // TODO handle the case when huId is null final Quantity qtyBook = huService.getQty(request.getHuId(), line.getProductId()); final Quanti...
repos\metasfresh-new_dawn_uat\backend\de.metas.inventory.mobileui\src\main\java\de\metas\inventory\mobileui\job\service\InventoryJobService.java
2
请完成以下Java代码
public EmployerAddressType getEmployer() { return employer; } /** * Sets the value of the employer property. * * @param value * allowed object is * {@link EmployerAddressType } * */ public void setEmployer(EmployerAddressType value) { this.em...
* {@link BalanceTGType } * */ public void setBalance(BalanceTGType value) { this.balance = value; } /** * Gets the value of the paymentPeriod property. * * @return * possible object is * {@link Duration } * */ public Duration g...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_450_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_450\request\GarantType.java
1
请完成以下Java代码
public void onCR_TaxAmt(final I_GL_JournalLine glJournalLine) { final ITaxAccountable taxAccountable = asTaxAccountable(glJournalLine, ACCTSIGN_Credit); taxAccountableCallout.onTaxAmt(taxAccountable); } @CalloutMethod(columnNames = I_GL_JournalLine.COLUMNNAME_DR_TaxTotalAmt) public void onDR_TaxTotalAmt(final ...
glJournalLine.setDR_AutoTaxAccount(drAutoTax); glJournalLine.setCR_AutoTaxAccount(crAutoTax); // // Update journal line type final String type = taxRecord ? X_GL_JournalLine.TYPE_Tax : X_GL_JournalLine.TYPE_Normal; glJournalLine.setType(type); } private ITaxAccountable asTaxAccountable(final I_GL_JournalL...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\callout\GL_JournalLine.java
1
请完成以下Java代码
public Object getValue(ELContext context, Object base, Object property) { context.setPropertyResolved(false); ELResolver delegate = getElResolverDelegate(); if(delegate == null) { return null; } else { return delegate.getValue(context, base, property); } } public boolean isReadOnly(...
ELResolver delegate = getElResolverDelegate(); if(delegate != null) { delegate.setValue(context, base, property, value); } } public Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params) { context.setPropertyResolved(false); ELResolver delegate = ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\el\AbstractElResolverDelegate.java
1
请完成以下Java代码
public void deleteDeployment(String deploymentId) { repositoryService.deleteDeployment(deploymentId); } @ManagedOperation(description = "Suspend given process ID") public void suspendProcessDefinitionById(String processId) { repositoryService.suspendProcessDefinitionById(processId); } ...
public void suspendProcessDefinitionByKey(String processDefinitionKey) { repositoryService.suspendProcessDefinitionByKey(processDefinitionKey); } @ManagedOperation(description = "Activate given process ID") public void activatedProcessDefinitionByKey(String processDefinitionKey) { repositor...
repos\flowable-engine-main\modules\flowable-jmx\src\main\java\org\flowable\management\jmx\mbeans\ProcessDefinitionsMBean.java
1
请完成以下Java代码
public void setHistoryConfiguration(String historyConfiguration) { this.historyConfiguration = historyConfiguration; } public String getIncidentMessage() { return incidentMessage; } public void setIncidentMessage(String incidentMessage) { this.incidentMessage = incidentMessage; } public void ...
public boolean isResolved() { return IncidentState.RESOLVED.getStateCode() == incidentState; } public String getRootProcessInstanceId() { return rootProcessInstanceId; } public void setRootProcessInstanceId(String rootProcessInstanceId) { this.rootProcessInstanceId = rootProcessInstanceId; } ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricIncidentEventEntity.java
1
请在Spring Boot框架中完成以下Java代码
public class PrimaryConfig { @Autowired private JpaProperties jpaProperties; @Autowired @Qualifier("primaryDataSource") private DataSource primaryDataSource; @Bean(name = "entityManagerPrimary") @Primary public EntityManager entityManager(EntityManagerFactoryBuilder builder) { ...
.properties(getVendorProperties(primaryDataSource)) .packages("com.neo.domain") //设置实体类所在位置 .persistenceUnit("primaryPersistenceUnit") .build(); } private Map<String, String> getVendorProperties(DataSource dataSource) { return jpaProperties.getHibernatePr...
repos\spring-boot-leaning-master\1.x\第04课:Spring Data Jpa 的使用\spring-boot-multi-Jpa\src\main\java\com\neo\config\PrimaryConfig.java
2
请完成以下Java代码
private CampaignPriceProvider createCampaignPriceProvider(@NonNull final Order order) { if (!order.getSoTrx().isSales()) { return CampaignPriceProviders.none(); } if (order.getCountryId() == null) { return CampaignPriceProviders.none(); } if (!bpartnersRepo.isCampaignPriceAllowed(order.getBpartne...
{ return ImmutableList.of( createProcessDescriptor(WEBUI_ProductsProposal_SaveProductPriceToCurrentPriceListVersion.class), createProcessDescriptor(WEBUI_ProductsProposal_ShowProductsToAddFromBasePriceList.class), createProcessDescriptor(WEBUI_ProductsProposal_ShowProductsSoldToOtherCustomers.class), ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\products_proposal\view\OrderProductsProposalViewFactory.java
1
请完成以下Java代码
private void enqueueChunk(final Collection<DocumentToRepost> documentsToRepost) { FactAcctRepostCommand.builder() .documentsToRepost(documentsToRepost) .forcePosting(forcePosting) .onErrorNotifyUserId(getUserId()) .build() .execute(); } private Stream<DocumentToRepost> streamDocumentsToRepost(...
.recordId(recordId) .clientId(adClientId) .build(); } private DocumentToRepost extractDocumentToRepostFromRegularRow(final IViewRow row) { final int adTableId = adTablesRepo.retrieveTableId(getTableName()); final int recordId = row.getId().toInt(); final ClientId adClientId = ClientId.ofRepoId(row.ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\accounting\process\WEBUI_Fact_Acct_Repost_ViewRows.java
1
请完成以下Java代码
public Object getValue(ELContext context, Object base, Object property) { if (base == null) { if (wrappedMap.containsKey(property)) { context.setPropertyResolved(true); return wrappedMap.get(property); } } return null; } @Override ...
if (wrappedMap.containsKey(property)) { throw new FlowableException("Cannot set value of '" + property + "', it's readonly!"); } } } @Override public Class<?> getCommonPropertyType(ELContext context, Object arg) { return Object.class; } @Override pub...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\el\ReadOnlyMapELResolver.java
1
请完成以下Spring Boot application配置
spring: application: name: Main-APP mvc: static-path-pattern: /static/** jooq: sql-dialect: MySQL liquibase: enabled: true change-log: classpath:/liquibase/master.xml jpa: open-in-view: false hibernate: ddl-auto: none # we use liqu...
ory: post-processors: cssVariables,cssMinJawr,jsMin pre-processors: cssUrlRewriting,cssImport,semicolonAppender,removeSourceMaps,singlelineStripper filter-url: /wro4j # this is the default, needs to be used in secConfig and the htmls # https://github.com/gavlyukovskiy/spring-boot-data-source-decora...
repos\spring-boot-web-application-sample-master\main-app\main-webapp\src\main\resources\application.yml
2
请完成以下Java代码
public class UserNotificationSettings { @NotNull @Valid private final Map<NotificationType, NotificationPref> prefs; public static final UserNotificationSettings DEFAULT = new UserNotificationSettings(Collections.emptyMap()); public static final Set<NotificationDeliveryMethod> deliveryMethods = N...
} @Data public static class NotificationPref { private boolean enabled; @NotNull private Map<NotificationDeliveryMethod, Boolean> enabledDeliveryMethods; public static NotificationPref createDefault() { NotificationPref pref = new NotificationPref(); pre...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\notification\settings\UserNotificationSettings.java
1
请在Spring Boot框架中完成以下Java代码
public class User { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @Column(unique = true) private String username; @Column private String password; @Column(unique = true) private String email; @ManyToMany(fetch = FetchType.LAZY) @JoinTable(name = "u...
public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public Set<Role> getRoles() { return roles; } public void setRoles(Set<Role> roles) { this.roles = roles; } public void addRole(Role role) { r...
repos\tutorials-master\quarkus-modules\quarkus-rbac\src\main\java\com\baeldung\quarkus\rbac\users\User.java
2
请完成以下Java代码
public void appendStructure(StringBuilder builder, Bindings bindings) { parameters.appendStructure(builder, bindings); builder.append(" -> "); body.appendStructure(builder, bindings); } @Override public Object eval(Bindings bindings, ELContext context) { // Create a ValueExp...
@Override public String getExpressionString() { return body.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof LambdaBodyValueExpression)) return false; LambdaBodyValueExpression ...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\de\odysseus\el\tree\impl\ast\AstLambdaExpression.java
1
请在Spring Boot框架中完成以下Java代码
public class BaseCaseDefinitionResource { @Autowired protected CmmnRestResponseFactory restResponseFactory; @Autowired protected CmmnRepositoryService repositoryService; @Autowired(required=false) protected CmmnRestApiInterceptor restApiInterceptor; /** * Returns the {@link Case...
} /** * Returns the {@link CaseDefinition} that is requested without calling the access interceptor * Throws the right exceptions when bad request was made or definition was not found. */ protected CaseDefinition getCaseDefinitionFromRequestWithoutAccessCheck(String caseDefinitionId) { C...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\repository\BaseCaseDefinitionResource.java
2
请完成以下Java代码
public void createTenant(TenantDto dto) { if (getIdentityService().isReadOnly()) { throw new InvalidRequestException(Status.FORBIDDEN, "Identity service implementation is read-only."); } Tenant newTenant = getIdentityService().newTenant(dto.getId()); dto.update(newTenant); getIdentityServic...
// GET /count URI countUri = baseUriBuilder.clone().path("/count").build(); resourceOptionsDto.addReflexiveLink(countUri, HttpMethod.GET, "count"); // POST /create if (!getIdentityService().isReadOnly() && isAuthorized(CREATE)) { URI createUri = baseUriBuilder.clone().path("/create").build(); ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\TenantRestServiceImpl.java
1
请完成以下Java代码
public void setDefaultAsyncJobAcquireWaitTimeInMillis(int defaultAsyncJobAcquireWaitTimeInMillis) { this.defaultAsyncJobAcquireWaitTimeInMillis = defaultAsyncJobAcquireWaitTimeInMillis; } public void setTimerJobRunnable(AcquireTimerJobsRunnable timerJobRunnable) { this.timerJobRunnable = timerJ...
public int getResetExpiredJobsInterval() { return resetExpiredJobsInterval; } public void setResetExpiredJobsInterval(int resetExpiredJobsInterval) { this.resetExpiredJobsInterval = resetExpiredJobsInterval; } public int getResetExpiredJobsPageSize() { return resetExpiredJobsPa...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\asyncexecutor\DefaultAsyncJobExecutor.java
1
请在Spring Boot框架中完成以下Java代码
public InMemoryUserDetailsManager createUserDetailsManager() { UserDetails userDetails1 = createNewUser("in28minutes", "dummy"); UserDetails userDetails2 = createNewUser("ranga", "dummydummy"); return new InMemoryUserDetailsManager(userDetails1, userDetails2); } private UserDetails createNewUser(String u...
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http.authorizeHttpRequests( auth -> auth.anyRequest().authenticated()); http.formLogin(withDefaults()); http.csrf(AbstractHttpConfigurer::disable); // OR // http.csrf(AbstractHttpConfigurer::disable); http.headers(header...
repos\master-spring-and-spring-boot-main\11-web-application\src\main\java\com\in28minutes\springboot\myfirstwebapp\security\SpringSecurityConfiguration.java
2
请完成以下Java代码
class Person { /** * The {@literal id} and {@link RedisHash#toString()} build up the {@literal key} for the Redis {@literal HASH}. * <br /> * * <pre> * <code> * {@link RedisHash#value()} + ":" + {@link Person#id} * //eg. persons:9b0ed8ee-14be-46ec-b5fa-79570aadb91d * </code> * </pre> * * <strong...
* * <pre> * <code> * children.[0] := persons:41436096-aabe-42fa-bd5a-9a517fbf0260 * children.[1] := persons:1973d8e7-fbd4-4f93-abab-a2e3a00b3f53 * children.[2] := persons:440b24c6-ede2-495a-b765-2d8b8d6e3995 * </code> * </pre> */ private @Reference List<Person> children; public Person(String firstnam...
repos\spring-data-examples-main\redis\repositories\src\main\java\example\springdata\redis\repositories\Person.java
1