instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public void setAmount(BigDecimal amount) { this.amount = amount; } public InsuranceContractVisitInterval timePeriod(BigDecimal timePeriod) { this.timePeriod = timePeriod; return this; } /** * Zeitintervall (Unbekannt = 0, Minute = 1, Stunde = 2, Tag = 3, Woche = 4, Mon...
} @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class InsuranceContractVisitInterval {\n"); sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); sb....
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\model\InsuranceContractVisitInterval.java
2
请完成以下Java代码
public class PP_Cost_Collector { @Init public void init() { final IMaterialTrackingBL materialTrackingBL = Services.get(IMaterialTrackingBL.class); materialTrackingBL.addModelTrackingListener(I_PP_Cost_Collector.Table_Name, PPCostCollectorMaterialTrackingListener.instance); } // note that the linking part is ...
final PPOrderId ppOrderId = PPOrderId.ofRepoId(ppCostCollector.getPP_Order_ID()); boolean anyCCLeft = false; final List<I_PP_Cost_Collector> costCollectors = Services.get(IPPCostCollectorDAO.class).getCompletedOrClosedByOrderId(ppOrderId); for (final I_PP_Cost_Collector cc : costCollectors) { if (cc.getPP_C...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\model\validator\PP_Cost_Collector.java
1
请完成以下Java代码
public void setM_Product_ID (int M_Product_ID) { if (M_Product_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Product_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); } /** Get Produkt. @return Produkt, Leistung, Artikel */ @Override public int getM_Product_ID ()...
public java.math.BigDecimal getQty () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty); if (bd == null) return BigDecimal.ZERO; return bd; } /** Set Datensatz-ID. @param Record_ID Direct internal record ID */ @Override public void setRecord_ID (int Record_ID) { if (Record_ID < 0) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-gen\de\metas\acct\model\X_Fact_Acct_ActivityChangeRequest_Source_v.java
1
请在Spring Boot框架中完成以下Java代码
public Boolean isExist(String version, String openId, String type) { return stringRedisTemplate.hasKey(generateKey(version, openId, type)); } public String getSession(String version, String openId, String type) { return get(generateKey(version, openId, type)); } public void delSession(...
// return VOICE_OPENID_V1_SESSION + openId; // } else { // return TEXT_OPENID_V1_SESSION + openId; // } // } else if (V2.equals(version)) { if (DIALOG_VOICE_TYPE.equals(type)) { return VOICE_OPENID_V2_SESSION + openId; ...
repos\spring-boot-quick-master\quick-wx-public\src\main\java\com\wx\pn\config\SessionCache.java
2
请完成以下Java代码
protected void logJobFailure(CommandContext commandContext) { if (commandContext.getProcessEngineConfiguration().isMetricsEnabled()) { commandContext.getProcessEngineConfiguration() .getMetricsRegistry() .markOccurrence(Metrics.JOB_FAILED); } } public void incrementCountRe...
@Override public Void execute(CommandContext commandContext) { JobEntity job = commandContext .getJobManager() .findJobById(jobId); if (job != null) { job.setFailedActivityId(jobFailureCollector.getFailedActivityId()); fireHistoricJobFailedEvt(job); cmd.execu...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\FailedJobListener.java
1
请在Spring Boot框架中完成以下Java代码
public class UserAddDTO implements Serializable { /** * 昵称 */ @NotEmpty(message = "昵称不能为空") @Length(min = 5, max = 16, message = "账号长度为 5-16 位") private String name; /** * 性别 */ @NotNull(message = "性别不能为空") private Integer gender; public String getName() { r...
public UserAddDTO setName(String name) { this.name = name; return this; } public Integer getGender() { return gender; } public UserAddDTO setGender(Integer gender) { this.gender = gender; return this; } }
repos\SpringBoot-Labs-master\lab-30\lab-30-dubbo-xml-demo\user-rpc-service-api\src\main\java\cn\iocoder\springboot\lab30\rpc\dto\UserAddDTO.java
2
请完成以下Java代码
public void onImport(IImportProcess<?> process, Object importModel, Object targetModel, int timing) { if (timing != IImportInterceptor.TIMING_AFTER_IMPORT) { return; } final I_I_Product iproduct = InterfaceWrapperHelper.create(importModel, I_I_Product.class); createTUPackingInstructions(iproduct); } ...
.build() ); } @NonNull private Quantity extractQtyCU(final I_I_Product importRecord) { final UomId uomId = UomId.ofRepoIdOrNull(importRecord.getQtyCU_UOM_ID()); if (uomId == null) { throw new FillMandatoryException(I_I_Product.COLUMNNAME_QtyCU_UOM_ID); } final I_C_UOM uom = uomDAO.getById(uomId); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\product\impexp\interceptor\ImportProductInterceptor.java
1
请完成以下Java代码
public void setM_InOutLine(final org.compiere.model.I_M_InOutLine M_InOutLine) { set_ValueFromPO(COLUMNNAME_M_InOutLine_ID, org.compiere.model.I_M_InOutLine.class, M_InOutLine); } @Override public void setM_InOutLine_ID (final int M_InOutLine_ID) { if (M_InOutLine_ID < 1) set_Value (COLUMNNAME_M_InOutLine...
{ final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyCUsPerTU); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyCUsPerTU_InInvoiceUOM (final @Nullable BigDecimal QtyCUsPerTU_InInvoiceUOM) { set_Value (COLUMNNAME_QtyCUsPerTU_InInvoiceUOM, QtyCUsPerTU_InInvoiceUOM); } @Overrid...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_Desadv_Pack_Item.java
1
请完成以下Java代码
private boolean isCacheCleanupThresholdHit() { return cache.size() >= cacheSize; } private void cacheRemoveExpiredEntries() { logger.trace("cacheRemoveExpiredEntries: {} entries before cleanup", cache.size()); cache.values().removeIf(KPIDataCacheValue::isExpired); logger.trace("cacheRemoveExpiredEntries:...
@NonNull KPITimeRangeDefaults timeRangeDefaults; @NonNull KPIDataContext context; } @Value @ToString(exclude = "data" /* because it's too big */) private static class KPIDataCacheValue { public static KPIDataCacheValue ok(@NonNull final KPIDataResult data, @NonNull final Duration defaultMaxStaleAccepted) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\kpi\data\KPIDataProvider.java
1
请完成以下Java代码
public List<AccessDecisionVoter<?>> getDecisionVoters() { return this.decisionVoters; } public boolean isAllowIfAllAbstainDecisions() { return this.allowIfAllAbstainDecisions; } public void setAllowIfAllAbstainDecisions(boolean allowIfAllAbstainDecisions) { this.allowIfAllAbstainDecisions = allowIfAllAbstai...
public boolean supports(Class<?> clazz) { for (AccessDecisionVoter<?> voter : this.decisionVoters) { if (!voter.supports(clazz)) { return false; } } return true; } @Override public String toString() { return this.getClass().getSimpleName() + " [DecisionVoters=" + this.decisionVoters + ", Allow...
repos\spring-security-main\access\src\main\java\org\springframework\security\access\vote\AbstractAccessDecisionManager.java
1
请完成以下Java代码
public class OriginalBusinessQuery1 { @XmlElement(name = "MsgId", required = true) protected String msgId; @XmlElement(name = "MsgNmId") protected String msgNmId; @XmlElement(name = "CreDtTm") @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar creDtTm; /** * Gets the...
} /** * Sets the value of the msgNmId property. * * @param value * allowed object is * {@link String } * */ public void setMsgNmId(String value) { this.msgNmId = value; } /** * Gets the value of the creDtTm property. * * @return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\OriginalBusinessQuery1.java
1
请完成以下Java代码
public class TenantMembershipEntity implements Serializable, DbEntity { private static final long serialVersionUID = 1L; protected TenantEntity tenant; protected UserEntity user; protected GroupEntity group; protected String id; public Object getPersistentState() { // entity is not updatable ret...
public String getGroupId() { if (group != null) { return group.getId(); } else { return null; } } public TenantEntity getTenant() { return tenant; } public void setTenant(TenantEntity tenant) { this.tenant = tenant; } @Override public String toString() { return "Tena...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\TenantMembershipEntity.java
1
请完成以下Java代码
public boolean isValueNotBlank() {return !TranslatableStrings.isBlank(value);} @SuppressWarnings("unused") public static class WFProcessHeaderPropertyBuilder { public WFProcessHeaderPropertyBuilder value(final ITranslatableString value) { this.value = value; return this; } public WFProcessHeaderPrope...
public WFProcessHeaderPropertyBuilder value(final ZonedDateTime value) { return value(TranslatableStrings.dateAndTime(value)); } @NonNull public WFProcessHeaderPropertyBuilder value(@NonNull final LocalDate value) { return value(TranslatableStrings.date(value)); } public WFProcessHeaderPropertyBui...
repos\metasfresh-new_dawn_uat\backend\de.metas.workflow.rest-api\src\main\java\de\metas\workflow\rest_api\model\WFProcessHeaderProperty.java
1
请完成以下Java代码
public Flux<City> findAllCity() { return cityRepository.findAll().cache(); } public Mono<City> modifyCity(City city) { // 缓存存在,删除缓存 String key = "city_" + city.getId(); boolean hasKey = redisTemplate.hasKey(key); if (hasKey) { redisTemplate.delete(key); ...
} public Mono<Long> deleteCity(Long id) { // 缓存存在,删除缓存 String key = "city_" + id; boolean hasKey = redisTemplate.hasKey(key); if (hasKey) { redisTemplate.delete(key); LOGGER.info("CityHandler.deleteCity() : 从缓存中删除城市 ID >> " + id); } cityRep...
repos\springboot-learning-example-master\springboot-webflux-7-redis-cache\src\main\java\org\spring\springboot\handler\CityHandler.java
1
请在Spring Boot框架中完成以下Java代码
public class TestController { @Autowired private RestTemplate restTemplate; @GetMapping("user/{id:\\d+}") public User getUser(@PathVariable Long id) { Map<String, Object> params = new HashMap<>(); params.put("id", id); URI uri = UriComponentsBuilder.fromUriString("http://Server...
return "新增用户成功"; } else { return "新增用户失败"; } } @GetMapping("user/update") public void updateUser() { User user = new User(1L, "mrbird", "123456"); this.restTemplate.put("http://Server-Provider/user", user); } @GetMapping("user/delete/{id:\\d+}") publ...
repos\SpringAll-master\29.Spring-Cloud-Ribbon-LoadBalance\Ribbon-Consumer\src\main\java\com\example\demo\controller\TestController.java
2
请完成以下Java代码
public static void main(String[] args) throws Exception { new Start().startJetty(getPortFromArgs(args)); } private static int getPortFromArgs(String[] args) { if (args.length > 0) { try { return Integer.parseInt(args[0]); } catch (NumberFormatException ig...
private static ServletContextHandler getServletContextHandler(WebApplicationContext context) { ServletContextHandler contextHandler = new ServletContextHandler(); contextHandler.setErrorHandler(null); contextHandler.setContextPath(CONTEXT_PATH); contextHandler.addServlet(new ServletHolde...
repos\tutorials-master\spring-actuator\src\main\java\com\baeldung\spring\actuator\Start.java
1
请完成以下Java代码
public String getType() { return type; } public void setType(String type) { this.type = type; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public String getText() { return text; }
public void setText(String text) { this.text = text; } public static FileTypeEnum getByType(String type){ if (oConvertUtils.isEmpty(type)) { return null; } for (FileTypeEnum val : values()) { if (val.getType().equals(type)) { return val; ...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\constant\enums\FileTypeEnum.java
1
请完成以下Java代码
void reserve(int size) { if (size > _capacity) { resizeBuf(size); } } /** * 设置缓冲区大小 * @param size 大小 */ private void resizeBuf(int size) { int capacity; if (size >= _capacity * 2) { capacity = size; } ...
_capacity = capacity; } /** * 缓冲区 */ private byte[] _buf; /** * 大小 */ private int _size; /** * 容量 */ private int _capacity; }
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\dartsclone\details\AutoBytePool.java
1
请在Spring Boot框架中完成以下Java代码
public BigDecimalFilter getPrice() { return price; } public void setPrice(BigDecimalFilter price) { this.price = price; } public ZonedDateTimeFilter getLastTrade() { return lastTrade; } public void setLastTrade(ZonedDateTimeFilter lastTrade) { this.lastTrade = ...
symbol, price, lastTrade ); } @Override public String toString() { return "QuoteCriteria{" + (id != null ? "id=" + id + ", " : "") + (symbol != null ? "symbol=" + symbol + ", " : "") + (price != null ? "price=" + price + ", " :...
repos\tutorials-master\jhipster-modules\jhipster-uaa\quotes\src\main\java\com\baeldung\jhipster\quotes\service\dto\QuoteCriteria.java
2
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public String toString() { final StringBuilder builder...
if (getClass() != obj.getClass()) { return false; } final Privilege other = (Privilege) obj; if (id == null) { if (other.id != null) { return false; } } else if (!id.equals(other.id)) { return false; } if (na...
repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\custom\persistence\model\Privilege.java
1
请完成以下Java代码
public class JsonRequestUOMConversionUpsert { @ApiModelProperty(position = 10, required = true, value = "Corresponding to C_UOM_Conversion.C_UOM_ID") private String fromUomCode; @ApiModelProperty(position = 20, required = true, value = "Corresponding to C_UOM_Conversion.C_UOM_To_ID") private String toUomCode; @A...
{ this.fromUomCode = fromUomCode; } public void setToUomCode(final String toUomCode) { this.toUomCode = toUomCode; } public void setFromToMultiplier(final BigDecimal fromToMultiplier) { this.fromToMultiplier = fromToMultiplier; this.fromToMultiplierSet = true; } public void setCatchUOMForProduct(fina...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-product\src\main\java\de\metas\common\product\v2\request\JsonRequestUOMConversionUpsert.java
1
请完成以下Java代码
class CacheExpressionRootObject { private final Collection<? extends Cache> caches; private final Method method; private final Object[] args; private final Object target; private final Class<?> targetClass; public CacheExpressionRootObject( Collection<? extends Cache> caches, Method method, Object[] arg...
return this.caches; } public Method getMethod() { return this.method; } public String getMethodName() { return this.method.getName(); } public Object[] getArgs() { return this.args; } public Object getTarget() { return this.target; } public Class<?> getTargetClass() { return this.targetClass; ...
repos\spring-boot-student-master\spring-boot-student-cache-redis\src\main\java\com\xiaolyuh\redis\cache\expression\CacheExpressionRootObject.java
1
请完成以下Java代码
static class PersonReadConverter implements Converter<String, Contact> { public Contact convert(String source) { if (StringUtils.hasText(source)) { try { return new ObjectMapper().readValue(source, Contact.class); } catch (IOException e) { throw new IllegalStateException(e); } } retur...
@Override public Currency convert(String source) { return Currency.getInstance(source); } } enum CurrencyToStringConverter implements Converter<Currency, String> { INSTANCE; @Override public String convert(Currency source) { return source.getCurrencyCode(); } } }
repos\spring-data-examples-main\cassandra\example\src\main\java\example\springdata\cassandra\convert\ConverterConfiguration.java
1
请完成以下Java代码
public class StringEndsWithPattern { public static boolean usingStringEndsWithMethod(String text, String suffix) { if (text == null || suffix == null) { return false; } return text.endsWith(suffix); } public static boolean usingStringMatchesMethod(String text, String su...
return false; } int toffset = text.length() - suffix.length(); return text.regionMatches(toffset, suffix, 0, suffix.length()); } public static boolean usingPatternClass(String text, String suffix) { if (text == null || suffix == null) { return false; } ...
repos\tutorials-master\core-java-modules\core-java-string-operations-4\src\main\java\com\baeldung\endswithpattern\StringEndsWithPattern.java
1
请完成以下Java代码
class AttributeStorageQualityInspectionSchedulable implements IQualityInspectionSchedulable { public static final Optional<IQualityInspectionSchedulable> of(final HUMaterialTrackingBL huMaterialTrackingBL, final IContextAware context, final IAttributeStorage attributeStorage) { final IMaterialTrackingAttributeBL ma...
@Override public boolean isQualityInspection() { final boolean qualityInspectionFlag = DisplayType.toBoolean(attributeStorage.getValue(attrIsQualityInspection)); return qualityInspectionFlag; } @Override public void setQualityInspection(final boolean qualityInspectionFlag) { attributeStorage.setValue(attrI...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\materialtracking\impl\AttributeStorageQualityInspectionSchedulable.java
1
请完成以下Java代码
public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public Gender getGender() { return gender; } public void setGender(Gender gender) { this.gender = gender; }
public LocalDate getBirthOfDate() { return birthOfDate; } public void setBirthOfDate(LocalDate birthOfDate) { this.birthOfDate = birthOfDate; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } }
repos\Spring-Boot-Advanced-Projects-main\springboot-hibernate-one-one-mapping\src\main\java\net\alanbinu\springboot\entity\UserProfile.java
1
请在Spring Boot框架中完成以下Java代码
public Integer getRecordId() { return recordId; } @Override public XmlService withMod(@Nullable final ServiceModWithSelector.ServiceMod serviceMod) { if (serviceMod == null) { return this; } return withModNonNull(serviceMod); } @Override public String getName() { return name; } public XMLGr...
} public BigDecimal getExternalFactor() { return externalFactor; } @Override public XmlService withModNonNull(final ServiceModWithSelector.ServiceMod serviceMod) { return toBuilder() .amount(serviceMod.getAmount()) .build(); } }
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_xversion\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_xversion\request\model\payload\body\service\XmlRecordServiceType.java
2
请完成以下Java代码
public int getC_DocType_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Belegdatum. @param DateDoc Datum des Belegs */ @Override public void setDateDoc (java.sql.Timestamp DateDoc) { set_Value (COLUMNNAME_DateDoc, Da...
set_Value (COLUMNNAME_DocumentNo, DocumentNo); } /** Get Nr.. @return Document sequence number of the document */ @Override public java.lang.String getDocumentNo () { return (java.lang.String)get_Value(COLUMNNAME_DocumentNo); } /** Set Datensatz-ID. @param Record_ID Direct internal record ID */...
repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java-gen\de\metas\fresh\model\X_RV_Prepared_And_Drafted_Documents.java
1
请在Spring Boot框架中完成以下Java代码
public int getConnectTimeout() { return connectTimeout; } public void setConnectTimeout(int connectTimeout) { this.connectTimeout = connectTimeout; } public int getRequestTimeout() { return requestTimeout; } public void setRequestTimeout(int requestTimeout) { t...
public void setMaxTotalConnections(int maxTotalConnections) { this.maxTotalConnections = maxTotalConnections; } public int getDefaultKeepAliveTimeMillis() { return defaultKeepAliveTimeMillis; } public void setDefaultKeepAliveTimeMillis(int defaultKeepAliveTimeMillis) { this.def...
repos\SpringBootBucket-master\springboot-resttemplate\src\main\java\com\xncoding\pos\config\properties\HttpClientProperties.java
2
请完成以下Java代码
public java.lang.String getTitleShort() { return get_ValueAsString(COLUMNNAME_TitleShort); } @Override public void setURL (final @Nullable java.lang.String URL) { set_Value (COLUMNNAME_URL, URL); } @Override public java.lang.String getURL() { return get_ValueAsString(COLUMNNAME_URL); } @Override ...
{ return get_ValueAsString(COLUMNNAME_Value); } @Override public void setVATaxID (final @Nullable java.lang.String VATaxID) { set_Value (COLUMNNAME_VATaxID, VATaxID); } @Override public java.lang.String getVATaxID() { return get_ValueAsString(COLUMNNAME_VATaxID); } @Override public void setVendorCa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner.java
1
请完成以下Java代码
private List<I_M_Product> getProducts() { if (m_products != null) { return m_products; } final IQueryBuilder<I_M_Product> queryBuilder = Services.get(IQueryBL.class) .createQueryBuilder(I_M_Product.class, this) .addOnlyActiveRecordsFilter() .addOnlyContextClient(); if (p_M_Product_Category_I...
} else { p_M_AttributeSetInstance_ID = 0; } m_products = queryBuilder .create() .list(); return m_products; } private List<I_M_Product> m_products = null; } // Create Cost Element
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\process\CreateCostElement.java
1
请完成以下Java代码
public static void updateConfigurationFromIni() { final String logLevelStr = Ini.getProperty(Ini.P_TRACELEVEL); final Level level = asLogbackLevel(logLevelStr); setLevel(level); if (Ini.isSwingClient()) { final boolean fileLoggingEnabled = Ini.isPropertyBool(Ini.P_TRACEFILE_ENABLED); MetasfreshFileLog...
} else { currentLoggerInfo = "unknown level for logger object " + currentLogger + " (" + currentLogger.getClass() + ")"; } System.out.println(" * " + currentLogger.getName() + "(" + System.identityHashCode(currentLogger) + "): " + currentLoggerInfo); }; System.out.println("\nDumping all log levels ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\logging\LogManager.java
1
请完成以下Java代码
public org.eevolution.model.I_PP_Cost_Collector getReversal() { return get_ValueAsPO(COLUMNNAME_Reversal_ID, org.eevolution.model.I_PP_Cost_Collector.class); } @Override public void setReversal(final org.eevolution.model.I_PP_Cost_Collector Reversal) { set_ValueFromPO(COLUMNNAME_Reversal_ID, org.eevolution.mo...
@Override public void setSetupTimeReal (final @Nullable BigDecimal SetupTimeReal) { set_Value (COLUMNNAME_SetupTimeReal, SetupTimeReal); } @Override public BigDecimal getSetupTimeReal() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_SetupTimeReal); return bd != null ? bd : BigDecimal.ZERO; } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Cost_Collector.java
1
请完成以下Java代码
public String getExpressionString() { return null; } /** * Answer <code>false</code>. */ @Override public boolean isLiteralText() { return false; } /** * Answer <code>null</code>. */ @Override public Class<?> getType(ELContext context) { retu...
@Override public void setValue(ELContext context, Object value) { throw new ELException(LocalMessages.get("error.value.set.rvalue", "<object value expression>")); } @Override public String toString() { return "ValueExpression(" + object + ")"; } @Override public Class<?> ge...
repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\ObjectValueExpression.java
1
请完成以下Java代码
public Boolean getDisplay() { return display; } public void setDisplay(Boolean display) { this.display = display; } @Override public String getDisplayName() { return displayName; } public void setDisplayName(String displayName) { this.displayName = displayN...
"VariableDefinitionImpl{" + "id='" + id + '\'' + ", name='" + name + '\'' + ", description='" + description + '\'' + ", type='" + type + '\'' + ", required=" + ...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\VariableDefinitionImpl.java
1
请完成以下Java代码
public void setQtyReview (final @Nullable BigDecimal QtyReview) { set_Value (COLUMNNAME_QtyReview, QtyReview); } @Override public BigDecimal getQtyReview() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyReview); return bd != null ? bd : BigDecimal.ZERO; } /** * RejectReason AD_Reference_...
/** InProgress = IP */ public static final String STATUS_InProgress = "IP"; /** Processed = PR */ public static final String STATUS_Processed = "PR"; /** Voided = VO */ public static final String STATUS_Voided = "VO"; @Override public void setStatus (final java.lang.String Status) { set_Value (COLUMNNAME_Stat...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_Picking_Candidate.java
1
请在Spring Boot框架中完成以下Java代码
public List<SysPermission> queryByUser(String userId) { List<SysPermission> permissionList = this.sysPermissionMapper.queryByUser(userId); //================= begin 开启租户的时候 如果没有test角色,默认加入test角色================ if (MybatisPlusSaasConfig.OPEN_SYSTEM_TENANT_CONTROL) { if (permissionList == null) { permission...
public List<String> queryPermissionUrlWithStar() { return this.baseMapper.queryPermissionUrlWithStar(); } @Override public boolean hasPermission(String username, SysPermission sysPermission) { int count = baseMapper.queryCountByUsername(username,sysPermission); if(count>0){ return true; }else{ return ...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\service\impl\SysPermissionServiceImpl.java
2
请完成以下Java代码
public void addNullColumn (String columnName) { String nc = getNullColumns(); if (nc == null) { setNullColumns(columnName); } else { setNullColumns(nc + ";" + columnName); } } // addNullColumn /** * Get Name of creator * @return name */ public String getCreatedByName() {
I_AD_User user = Services.get(IUserDAO.class).retrieveUserOrNull(getCtx(), getCreatedBy()); return user.getName(); } // getCreatedByName /** * Before Save * @param newRecord new * @return true */ @Override protected boolean beforeSave (boolean newRecord) { return true; } // beforeSave } // MRequestA...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MRequestAction.java
1
请在Spring Boot框架中完成以下Java代码
public class ChunkServiceImpl implements ChunkService { // process private static final Map<String, ChunkProcess> CHUNK_PROCESS_STORAGE = new ConcurrentHashMap<>(); // file list private static final List<FileInfo> FILE_STORAGE = new CopyOnWriteArrayList<>(); @Autowired private FileClient file...
chunkList.add(new ChunkProcess.ChunkPart(chunkId, chunk.getChunkNumber())); CHUNK_PROCESS_STORAGE.put(filename, chunkProcess.setChunkList(chunkList)); } @Override public void merge(String filename) { ChunkProcess chunkProcess = CHUNK_PROCESS_STORAGE.get(filename); fileClient.merge(c...
repos\springboot-demo-master\file\src\main\java\com\et\service\impl\ChunkServiceImpl.java
2
请完成以下Java代码
protected void setElementProperty(String id, String propertyName, String propertyValue, ObjectNode infoNode) { ObjectNode bpmnNode = createOrGetBpmnNode(infoNode); if (!bpmnNode.has(id)) { bpmnNode.putObject(id); } ((ObjectNode) bpmnNode.get(id)).put(propertyName, propertyVa...
localizationNode.putObject(language); } ObjectNode languageNode = (ObjectNode) localizationNode.get(language); if (!languageNode.has(id)) { languageNode.putObject(id); } ((ObjectNode) languageNode.get(id)).put(propertyName, propertyValue); } protected Objec...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\DynamicBpmnServiceImpl.java
1
请完成以下Java代码
public void lockContact() { int AD_User_ID = Env.getAD_User_ID(getCtx()); Timestamp ts = new Timestamp(System.currentTimeMillis()); setLocked(true); setLockedBy(AD_User_ID); setLockedDate(ts); } public void unlockContact() { setLocked(false); set_Value(COLUMNNAME_LockedBy, null); setLockedDate(nul...
} public void expireLock() { if (isLocked() && isExpired()) unlockContact(); } @Override public String toString() { String bundleName = DB.getSQLValueString(get_TrxName(), "SELECT "+I_R_Group.COLUMNNAME_Name+" FROM "+I_R_Group.Table_Name +" WHERE "+I_R_Group.COLUMNNAME_R_Group_ID+"=?", getR...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\callcenter\model\MRGroupProspect.java
1
请完成以下Java代码
public DetailsBuilder clearProcessEngineNames(Set<? extends String> processEngineNames) { if (this.processEngineNames != null) { this.processEngineNames.clear(); } return this; } public Details build() { return new Details(this); } } public String g...
public int getMaxJobsPerAcquisition() { return maxJobsPerAcquisition; } public int getWaitTimeInMillis() { return waitTimeInMillis; } public Set<String> getProcessEngineNames() { return processEngineNames; } @Override public String toString() { return "Details [nam...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\actuator\JobExecutorHealthIndicator.java
1
请完成以下Java代码
public void setC_CreditLimit_Type(org.compiere.model.I_C_CreditLimit_Type C_CreditLimit_Type) { set_ValueFromPO(COLUMNNAME_C_CreditLimit_Type_ID, org.compiere.model.I_C_CreditLimit_Type.class, C_CreditLimit_Type); } /** Set Credit Limit Type. @param C_CreditLimit_Type_ID Credit Limit Type */ @Override publi...
@param DateFrom Startdatum eines Abschnittes */ @Override public void setDateFrom (java.sql.Timestamp DateFrom) { set_Value (COLUMNNAME_DateFrom, DateFrom); } /** Get Datum von. @return Startdatum eines Abschnittes */ @Override public java.sql.Timestamp getDateFrom () { return (java.sql.Timesta...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_CreditLimit.java
1
请完成以下Java代码
public static HashFunction forName(String name) { switch (name) { case "murmur3_32": return Hashing.murmur3_32(); case "murmur3_128": return Hashing.murmur3_128(); case "crc32": return Hashing.crc32(); case "md5": ...
} public static int getPort(HttpServletRequest request){ String forwardedProto = request.getHeader("x-forwarded-proto"); int serverPort = request.getServerPort(); if (request.getHeader("x-forwarded-port") != null) { try { serverPort = request.getIntHeader("x-for...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\utils\MiscUtils.java
1
请完成以下Java代码
public Greeting getById(@NonNull final GreetingId id) { return getGreetingsMap().getById(id); } private GreetingsMap getGreetingsMap() { return cache.getOrLoad(0, this::retrieveGreetingsMap); } private GreetingsMap retrieveGreetingsMap() { final ImmutableList<Greeting> list = queryBL .createQueryBuil...
.name(record.getName()) .greeting(trlsMap.getColumnTrl(I_C_Greeting.COLUMNNAME_Greeting, record.getGreeting())) .standardType(GreetingStandardType.ofNullableCode(record.getGreetingStandardType())) .active(record.isActive()) .build(); } public Greeting createGreeting(@NonNull final CreateGreetingReque...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\greeting\GreetingRepository.java
1
请完成以下Java代码
public Span log(String event) { return null; } @Override public Span log(long timestampMicroseconds, String event) { return null; } @Override public Span setBaggageItem(String key, String value) { return null; } @Override public String getBaggageItem(String...
@Override public Span setOperationName(String operationName) { return null; } @Override public void finish() { transaction.setStatus(Transaction.SUCCESS); transaction.complete(); } @Override public void finish(long finishMicros) { } }
repos\SpringBoot-Labs-master\lab-61\lab-61-cat-opentracing\src\main\java\cn\iocoder\springboot\lab61\cat\opentracing\CatSpan.java
1
请完成以下Java代码
private byte[] getScriptContent(@NonNull final Path scriptPath) { try { final ArrayList<String> lines = new ArrayList<>(); lines.add("--"); lines.add("-- Script: " + scriptPath); lines.add("-- User: " + getUserName()); lines.add("-- OS user: " + System.getProperty("user.name")); lines.add("--"); ...
{ out.write(bytes); } catch (final IOException ex) { // shall never happen throw AdempiereException.wrapIfNeeded(ex); } }); return out.toByteArray(); } catch (final IOException ex) { // shall never happen throw AdempiereException.wrapIfNeeded(ex); } }...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\rest\MigrationScriptRestControllerTemplate.java
1
请在Spring Boot框架中完成以下Java代码
protected final FreeMarkerProperties getProperties() { return this.properties; } protected void applyProperties(FreeMarkerConfigurationFactory factory) { factory.setTemplateLoaderPaths(this.properties.getTemplateLoaderPath()); factory.setPreferFileSystemAccess(this.properties.isPreferFileSystemAccess()); Str...
Properties settings = new Properties(); settings.put("recognize_standard_file_extensions", "true"); settings.putAll(this.properties.getSettings()); return settings; } private Map<String, Object> createFreeMarkerVariables() { Map<String, Object> variables = new HashMap<>(); for (FreeMarkerVariablesCustomize...
repos\spring-boot-4.0.1\module\spring-boot-freemarker\src\main\java\org\springframework\boot\freemarker\autoconfigure\AbstractFreeMarkerConfiguration.java
2
请完成以下Java代码
public boolean isSyncExternalReferencesToRabbitMQ() { return get_ValueAsBoolean(COLUMNNAME_IsSyncExternalReferencesToRabbitMQ); } @Override public void setRemoteURL (final java.lang.String RemoteURL) { set_Value (COLUMNNAME_RemoteURL, RemoteURL); } @Override public String getRemoteURL() { return get_V...
{ return get_ValueAsString(COLUMNNAME_Routing_Key); } @Override public void setAuthToken (final String AuthToken) { set_Value (COLUMNNAME_AuthToken, AuthToken); } @Override public String getAuthToken() { return get_ValueAsString(COLUMNNAME_AuthToken); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_RabbitMQ_HTTP.java
1
请在Spring Boot框架中完成以下Java代码
public ApiResponse<Void> updateOrderStatusWithHttpInfo(OrderStatus body, String albertaApiKey, String id) throws ApiException { com.squareup.okhttp.Call call = updateOrderStatusValidateBeforeCall(body, albertaApiKey, id, null, null); return apiClient.execute(call); } /** * Auftragsstatus (...
progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequest...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-orders-api\src\main\java\io\swagger\client\api\OrderStatusApi.java
2
请在Spring Boot框架中完成以下Java代码
public String getDOCUMENTID() { return documentid; } /** * Sets the value of the documentid property. * * @param value * allowed object is * {@link String } * */ public void setDOCUMENTID(String value) { this.documentid = value; } /*...
* */ public void setMEASUREATTR(String value) { this.measureattr = value; } /** * Gets the value of the measureunit property. * * @return * possible object is * {@link String } * */ public String getMEASUREUNIT() { return measur...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\PMESU1.java
2
请在Spring Boot框架中完成以下Java代码
private QuotationAggregator newQuotationAggregator(@NonNull final ServiceRepairProjectInfo project) { final List<ServiceRepairProjectTask> tasks = projectService.getTasksByProjectId(project.getProjectId()); return QuotationAggregator.builder() .pricingBL(pricingBL) .orderGroupRepository(orderGroupReposito...
.orgId(orgId) .orgTimeZone(orgTimeZone) .shipBPartnerId(project.getBpartnerId()) .datePromised(extractDatePromised(project, orgTimeZone)) .pricingSystemId(PricingSystemId.ofRepoId(priceList.getM_PricingSystem_ID())) .priceListId(PriceListId.ofRepoId(priceList.getM_PriceList_ID())) .priceListVers...
repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\project\service\commands\CreateQuotationFromProjectCommand.java
2
请完成以下Java代码
public String getA_User13 () { return (String)get_Value(COLUMNNAME_A_User13); } /** Set A_User14. @param A_User14 A_User14 */ public void setA_User14 (String A_User14) { set_Value (COLUMNNAME_A_User14, A_User14); } /** Get A_User14. @return A_User14 */ public String getA_User14 () { return (S...
{ return (String)get_Value(COLUMNNAME_A_User5); } /** Set A_User6. @param A_User6 A_User6 */ public void setA_User6 (String A_User6) { set_Value (COLUMNNAME_A_User6, A_User6); } /** Get A_User6. @return A_User6 */ public String getA_User6 () { return (String)get_Value(COLUMNNAME_A_User6); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Info_Oth.java
1
请在Spring Boot框架中完成以下Java代码
public Credential getCredential() { return this.credential; } public void setCredential(Credential credential) { this.credential = credential; } public List<String> getBaseDn() { return this.baseDn; } public void setBaseDn(List<String> baseDn) { this.baseDn = baseDn; } public String getLdif() { re...
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) { thi...
repos\spring-boot-4.0.1\module\spring-boot-ldap\src\main\java\org\springframework\boot\ldap\autoconfigure\embedded\EmbeddedLdapProperties.java
2
请在Spring Boot框架中完成以下Java代码
final class HttpMessageConverters { private static final boolean jacksonPresent; private static final boolean jackson2Present; private static final boolean gsonPresent; private static final boolean jsonbPresent; static { ClassLoader classLoader = HttpMessageConverters.class.getClassLoader(); jacksonPresen...
} @SuppressWarnings("removal") static GenericHttpMessageConverter<Object> getJsonMessageConverter() { if (jacksonPresent) { return new GenericHttpMessageConverterAdapter<>(new JacksonJsonHttpMessageConverter()); } if (jackson2Present) { return new MappingJackson2HttpMessageConverter(); } if (gsonPres...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\web\server\HttpMessageConverters.java
2
请完成以下Java代码
public String getDefaultSpec() { return defaultSpec; } public void setAllowNullValues(boolean allowNullValues) { this.allowNullValues = allowNullValues; } public void setDefaultSpec(String defaultSpec) { this.defaultSpec = defaultSpec; } ...
} } public static class SimpleCacheProviderProperties { private boolean allowNullValues = true; public boolean isAllowNullValues() { return allowNullValues; } public void setAllowNullValues(boolean allowNullValues) { this.allowNullValues = allowNullVal...
repos\Activiti-develop\activiti-core-common\activiti-spring-cache-manager\src\main\java\org\activiti\spring\cache\ActivitiSpringCacheManagerProperties.java
1
请在Spring Boot框架中完成以下Java代码
public class ApiAuditConfigId implements RepoIdAware { @JsonCreator public static ApiAuditConfigId ofRepoId(final int repoId) { return new ApiAuditConfigId(repoId); } @Nullable public static ApiAuditConfigId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? new ApiAuditConfigId(repoId) : null; } pub...
int repoId; private ApiAuditConfigId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "API_AUDIT_CONFIG_ID"); } @Override @JsonValue public int getRepoId() { return repoId; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\audit\apirequest\config\ApiAuditConfigId.java
2
请完成以下Java代码
public class X_C_CompensationGroup_Schema extends org.compiere.model.PO implements I_C_CompensationGroup_Schema, org.compiere.model.I_Persistent { private static final long serialVersionUID = -765492642L; /** Standard Constructor */ public X_C_CompensationGroup_Schema (final Properties ctx, final int C_Comp...
} @Override public void setC_CompensationGroup_Schema_ID (final int C_CompensationGroup_Schema_ID) { if (C_CompensationGroup_Schema_ID < 1) set_ValueNoCheck (COLUMNNAME_C_CompensationGroup_Schema_ID, null); else set_ValueNoCheck (COLUMNNAME_C_CompensationGroup_Schema_ID, C_CompensationGroup_Schema_ID); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\order\model\X_C_CompensationGroup_Schema.java
1
请完成以下Java代码
public class ServletListenerRegistrationBean<T extends EventListener> extends RegistrationBean { private static final Set<Class<?>> SUPPORTED_TYPES; static { Set<Class<?>> types = new HashSet<>(); types.add(ServletContextAttributeListener.class); types.add(ServletRequestListener.class); types.add(ServletReq...
@Override protected String getDescription() { Assert.notNull(this.listener, "'listener' must not be null"); return "listener " + this.listener; } @Override protected void register(String description, ServletContext servletContext) { try { servletContext.addListener(this.listener); } catch (RuntimeExce...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\web\servlet\ServletListenerRegistrationBean.java
1
请完成以下Java代码
public Object getConfig() { return config; } @Override public String toString() { return String.format("ReadBody: %s", config.getInClass()); } }; } @Override @SuppressWarnings("unchecked") public Predicate<ServerWebExchange> apply(Config config) { throw new UnsupportedOperationException("R...
public <T> Config setPredicate(Class<T> inClass, Predicate<T> predicate) { setInClass(inClass); this.predicate = predicate; return this; } public @Nullable Map<String, Object> getHints() { return hints; } public Config setHints(Map<String, Object> hints) { this.hints = hints; return this; ...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\handler\predicate\ReadBodyRoutePredicateFactory.java
1
请完成以下Java代码
public I_K_Type getK_Type() throws RuntimeException { return (I_K_Type)MTable.get(getCtx(), I_K_Type.Table_Name) .getPO(getK_Type_ID(), get_TrxName()); } /** Set Knowldge Type. @param K_Type_ID Knowledge Type */ public void setK_Type_ID (int K_Type_ID) { if (K_Type_ID < 1) set_ValueNoCheck (C...
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 KeyNamePair getKeyNamePair() { r...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_K_Topic.java
1
请完成以下Java代码
public CountResultDto getJobDefinitionsCount(UriInfo uriInfo) { JobDefinitionQueryDto queryDto = new JobDefinitionQueryDto(getObjectMapper(), uriInfo.getQueryParameters()); return queryJobDefinitionsCount(queryDto); } @Override public List<JobDefinitionDto> queryJobDefinitions(JobDefinitionQueryDto query...
if (dto.getJobDefinitionId() != null) { String message = "Either processDefinitionId or processDefinitionKey can be set to update the suspension state."; throw new InvalidRequestException(Status.BAD_REQUEST, message); } try { dto.updateSuspensionState(getProcessEngine()); } catch (Illega...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\JobDefinitionRestServiceImpl.java
1
请完成以下Java代码
protected List<VariableScopeItemELResolver> getVariableScopeItemELResolvers() { if (variableScopeItemELResolvers == null) { variableScopeItemELResolvers = Arrays.asList( new ExecutionElResolver(), new TaskElResolver(), new AuthenticatedUserELResolver()...
} } @Override public Class<?> getCommonPropertyType(ELContext arg0, Object arg1) { return Object.class; } @Override public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext arg0, Object arg1) { return null; } @Override public Class<?> getType(ELContext ar...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\el\VariableScopeElResolver.java
1
请完成以下Java代码
public long getId() { return id; } public void setId(long id) { this.id = id; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; }
public LocalDate getBirthDate() { return birthDate; } public void setBirthDate(LocalDate birthDate) { this.birthDate = birthDate; } @Override public String toString() { return "User [id=" + id + ", email=" + email + ", birthDate=" + birthDate + "]"; } }
repos\tutorials-master\libraries-data-2\src\main\java\com\baeldung\jmapper\User.java
1
请在Spring Boot框架中完成以下Java代码
public ResponseEntity<PostResponseDto> create(@RequestBody PostRequestDto dto, Authentication auth) { PostResponseDto result = postService.create(dto, auth.getName()); return new ResponseEntity<>(result, HttpStatus.CREATED); } @GetMapping("mine") @PreAuthorize("hasRole('USER')") public ...
@DeleteMapping("{id}") @PreAuthorize("hasAnyRole('USER', 'ADMIN')") public ResponseEntity<?> delete(@PathVariable Long id, Authentication auth) { try { boolean isAdmin = auth.getAuthorities().stream().anyMatch(a -> a.getAuthority().equals("ROLE_ADMIN")); postService.delete(id, is...
repos\tutorials-master\spring-security-modules\spring-security-authorization\spring-security-url-http-method-auth\src\main\java\com\baeldung\springsecurity\controller\PostController.java
2
请在Spring Boot框架中完成以下Java代码
private void setMetricsMarkerLogbackFilter(LoggerContext context) { log.info("Filtering metrics logs from all appenders except the {} appender", LOGSTASH_APPENDER_NAME); OnMarkerEvaluator onMarkerMetricsEvaluator = new OnMarkerEvaluator(); onMarkerMetricsEvaluator.setContext(context); on...
addLogstashAppender(context); } @Override public void onReset(LoggerContext context) { addLogstashAppender(context); } @Override public void onStop(LoggerContext context) { // Nothing to do. } @Override public void onLeve...
repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\config\LoggingConfiguration.java
2
请完成以下Java代码
abstract class ForwardingEventBus implements IEventBus { private final IEventBus delegate; public ForwardingEventBus(@NonNull final IEventBus delegate) { this.delegate = delegate; } protected final IEventBus delegate() { return delegate; } @Override public String toString() { return delegate().toStri...
@Override public void enqueueObject(final Object obj) { delegate().enqueueObject(obj); } @Override public void enqueueObjectsCollection(@NonNull final Collection<?> objs) { delegate().enqueueObjectsCollection(objs); } @Override public boolean isDestroyed() { return delegate().isDestroyed(); } @Over...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\ForwardingEventBus.java
1
请在Spring Boot框架中完成以下Java代码
public static void createWorkpackage(final List<DDOrderLineId> ddOrderLineIds) { SCHEDULER.scheduleAll(ddOrderLineIds); } private static final WorkpackagesOnCommitSchedulerTemplate<DDOrderLineId> SCHEDULER = new WorkpackagesOnCommitSchedulerTemplate<DDOrderLineId>(C_Request_CreateFromDDOrder_Async.class) { @Ov...
return Env.getCtx(); } @Override protected String extractTrxNameFromItem(final DDOrderLineId ddOrderLineId) { return ITrx.TRXNAME_ThreadInherited; } @Override protected TableRecordReference extractModelToEnqueueFromItem(final Collector collector, final DDOrderLineId ddOrderLineId) { return Table...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\request\service\async\spi\impl\C_Request_CreateFromDDOrder_Async.java
2
请完成以下Java代码
public void setM_Shipper_ID (int M_Shipper_ID) { if (M_Shipper_ID < 1) set_Value (COLUMNNAME_M_Shipper_ID, null); else set_Value (COLUMNNAME_M_Shipper_ID, Integer.valueOf(M_Shipper_ID)); } /** Get Lieferweg. @return Methode oder Art der Warenlieferung */ public int getM_Shipper_ID () { Integer...
/** Set Gueltig ab. @param ValidFrom Gueltig ab inklusiv (erster Tag) */ public void setValidFrom (Timestamp ValidFrom) { set_Value (COLUMNNAME_ValidFrom, ValidFrom); } /** Get Gueltig ab. @return Gueltig ab inklusiv (erster Tag) */ public Timestamp getValidFrom () { return (Timestamp)get_Value...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\model\X_M_FreightCostShipper.java
1
请在Spring Boot框架中完成以下Java代码
public class Demo07Producer { private static final String TX_PRODUCER_GROUP = "demo07-producer-group"; @Autowired private RocketMQTemplate rocketMQTemplate; public TransactionSendResult sendMessageInTransaction(Integer id) { // 创建 Demo07Message 消息 Message<Demo07Message> message = Mess...
public RocketMQLocalTransactionState executeLocalTransaction(Message msg, Object arg) { // ... local transaction process, return rollback, commit or unknown logger.info("[executeLocalTransaction][执行本地事务,消息:{} arg:{}]", msg, arg); return RocketMQLocalTransactionState.UNKNOWN; ...
repos\SpringBoot-Labs-master\lab-31\lab-31-rocketmq-demo\src\main\java\cn\iocoder\springboot\lab31\rocketmqdemo\producer\Demo07Producer.java
2
请完成以下Java代码
public static Optional<BPartnerLocationAndCaptureId> optionalOfRepoId( final int bpartnerRepoId, final int bpartnerLocationRepoId, final int locationCaptureRepoId) { return Optional.ofNullable(ofRepoIdOrNull(bpartnerRepoId, bpartnerLocationRepoId, locationCaptureRepoId)); } @Nullable public static BPart...
} public static BPartnerLocationAndCaptureId ofNullableLocationWithUnknownCapture(@Nullable final BPartnerLocationId bpartnerLocationId) { return bpartnerLocationId != null ? new BPartnerLocationAndCaptureId(bpartnerLocationId, null) : null; } public static boolean equals(@Nullable BPartnerLocationAndCa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\BPartnerLocationAndCaptureId.java
1
请完成以下Java代码
public Date getTimestamp() { return timestamp; } public String getExternalTaskId() { return externalTaskId; } public String getTopicName() { return topicName; } public String getWorkerId() { return workerId; } public long getPriority() { return priority; } public Integer get...
public Date getRemovalTime() { return removalTime; } public String getRootProcessInstanceId() { return rootProcessInstanceId; } public static HistoricExternalTaskLogDto fromHistoricExternalTaskLog(HistoricExternalTaskLog historicExternalTaskLog) { HistoricExternalTaskLogDto result = new HistoricEx...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricExternalTaskLogDto.java
1
请在Spring Boot框架中完成以下Java代码
public class TbRuleEngineProcessingResult { @Getter private final String queueName; @Getter private final boolean success; @Getter private final boolean timeout; @Getter private final TbMsgPackProcessingContext ctx; public TbRuleEngineProcessingResult(String queueName, boolean time...
public ConcurrentMap<UUID, TbProtoQueueMsg<ToRuleEngineMsg>> getPendingMap() { return ctx.getPendingMap(); } public ConcurrentMap<UUID, TbProtoQueueMsg<ToRuleEngineMsg>> getSuccessMap() { return ctx.getSuccessMap(); } public ConcurrentMap<UUID, TbProtoQueueMsg<ToRuleEngineMsg>> getFail...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\queue\processing\TbRuleEngineProcessingResult.java
2
请完成以下Java代码
static PGPSecretKey readSecretKey(String fileName) throws IOException, PGPException { InputStream keyIn = new BufferedInputStream(new FileInputStream(fileName)); PGPSecretKey secKey = readSecretKey(keyIn); keyIn.close(); return secKey; } /** * A simple method that opens a k...
PGPSecretKeyRingCollection pgpSec = new PGPSecretKeyRingCollection(PGPUtil.getDecoderStream(input), new JcaKeyFingerprintCalculator()); Iterator keyRingIter = pgpSec.getKeyRings(); while (keyRingIter.hasNext()) { PGPSecretKeyRing keyRing = (PGPSecretKeyRing) keyRingIter.next(); I...
repos\tutorials-master\libraries-security\src\main\java\com\baeldung\bouncycastle\pgp\PGPExampleUtil.java
1
请完成以下Spring Boot application配置
spring.datasource.url=jdbc:mysql://localhost:3306/bookstoredb?createDatabaseIfNotExist=true spring.datasource.username=root spring.datasource.password=root spring.jpa.hibernate.ddl-auto=create spring.jpa.show-sql=true spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect spring.jpa.open-in-view...
zaxxer.hikari=TRACE logging.level.ROOT=INFO logging.level.org.hibernate.engine.transaction.internal.TransactionImpl=DEBUG logging.level.org.springframework.orm.jpa=DEBUG logging.level.org.springframework.transaction=DEBUG
repos\Hibernate-SpringBoot-master\HibernateSpringBootDomainEvents\src\main\resources\application.properties
2
请在Spring Boot框架中完成以下Java代码
public class Saving { @NotNull private BigDecimal amount; @NotNull private Currency currency; @NotNull private BigDecimal interest; @NotNull private Boolean deposit; @NotNull private Boolean capitalization; public BigDecimal getAmount() { return amount; } public void setAmount(BigDecimal amount) {...
} public BigDecimal getInterest() { return interest; } public void setInterest(BigDecimal interest) { this.interest = interest; } public Boolean getDeposit() { return deposit; } public void setDeposit(Boolean deposit) { this.deposit = deposit; } public Boolean getCapitalization() { return capita...
repos\piggymetrics-master\account-service\src\main\java\com\piggymetrics\account\domain\Saving.java
2
请完成以下Java代码
public String get_ValueAsString(final String variableName) { Check.assumeNotNull(variableName, "variableName not null"); if(PARAMETER_ContextTableName.equals(variableName)) { return contextTableName; } // only checking the window scope; global scope might contain default values (e.g. #C_DocTypeTarget_...
// and also to not make Env.parseContext log a WARNING message return "-1"; } return value; } @Override public String toString() { return "GridTabValidationContext [windowNo=" + windowNo + ", tabNo=" + tabNo + ", contextTableName=" + contextTableName + ", tableName=" + tableName + ", ctx="...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\validationRule\impl\GridTabValidationContext.java
1
请完成以下Java代码
public class CustomerWrapperCollectionToString extends Customer { private Integer score; private List<String> orders; private StringBuffer fullname; public Integer getScore() { return score; } public void setScore(Integer score) { this.score = score; } public List<Stri...
public void setOrders(List<String> orders) { this.orders = orders; } public StringBuffer getFullname() { return fullname; } public void setFullname(StringBuffer fullname) { this.fullname = fullname; } @Override public String toString() { return "Customer [s...
repos\tutorials-master\core-java-modules\core-java-string-operations-12\src\main\java\com\baeldung\tostring\CustomerWrapperCollectionToString.java
1
请完成以下Java代码
public Mono<City> save(City city) { return cityRepository.save(city); } public Mono<City> findCityById(Long id) { // 从缓存中获取城市信息 String key = "city_" + id; ValueOperations<String, City> operations = redisTemplate.opsForValue(); // 缓存存在 boolean hasKey = redisTem...
public Flux<City> findAllCity() { return cityRepository.findAll().cache(); } public Mono<City> modifyCity(City city) { // 缓存存在,删除缓存 String key = "city_" + city.getId(); boolean hasKey = redisTemplate.hasKey(key); if (hasKey) { redisTemplate.delete(key); ...
repos\springboot-learning-example-master\springboot-webflux-7-redis-cache\src\main\java\org\spring\springboot\handler\CityHandler.java
1
请在Spring Boot框架中完成以下Java代码
public class JerseyConfig extends ResourceConfig { public JerseyConfig(OdataJpaServiceFactory serviceFactory, EntityManagerFactory entityManagerFactory) { ODataApplication oDataApplication = new ODataApplication(); oDataApplication .getClasses() .forEach( c -> { ...
@Override public void filter(ContainerRequestContext containerRequestContext) throws IOException { EntityManager entityManager = this.entityManagerFactory.createEntityManager(); httpRequest.setAttribute(EM_REQUEST_ATTRIBUTE, entityManager); if (!"GET".equalsIgnoreCase(contain...
repos\springboot-demo-master\olingo\src\main\java\com\et\olingo\config\JerseyConfig.java
2
请完成以下Java代码
public Course getCourse(@PathVariable String username, @PathVariable long id) { return courseManagementService.findById(id); } @DeleteMapping("/{id}") public ResponseEntity<Void> deleteCourse(@PathVariable String username, @Pa...
Course courseUpdated = courseManagementService.save(course); return new ResponseEntity<Course>(course, HttpStatus.OK); } @PostMapping() public ResponseEntity<Void> createCourse(@PathVariable String username, @RequestBody Course course) { Course createdCourse = courseManagementService.save(...
repos\spring-boot-examples-master\spring-boot-react-examples\spring-boot-react-crud-full-stack-with-maven\backend-spring-boot-react-crud-full-stack-with-maven\src\main\java\com\in28minutes\fullstack\springboot\maven\crud\springbootcrudfullstackwithmaven\course\CourseResource.java
1
请完成以下Java代码
private final void fireListeners( @NonNull final OnError onError, @NonNull final TrxEventTiming timingInfo, @NonNull final ITrx trx) { if (listeners == null) { return; } runningWithinTrxEventTiming.set(timingInfo); try { listeners.hardList().stream() .filter(Objects::nonNull) .fil...
listener.deactivate(); } } } private void handleException( @NonNull final OnError onError, @NonNull final TrxEventTiming timingInfo, @NonNull final RegisterListenerRequest listener, @NonNull final Exception ex) { if (onError == OnError.LogAndSkip) { logger.warn("Error while invoking {} using...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\api\impl\TrxListenerManager.java
1
请完成以下Java代码
private void renderAll() { final ListModel<ISideActionsGroupModel> groups = model.getGroups(); for (int i = 0; i < groups.getSize(); i++) { final ISideActionsGroupModel group = groups.getElementAt(i); final SideActionsGroupPanel groupComp = createGroupComponent(group); contentPanel.add(groupComp); } ...
/** * Auto-hide if no groups or groups are not visible */ private final void autoHideIfNeeded() { boolean haveVisibleGroups = false; for (Component groupComp : contentPanel.getComponents()) { if (groupComp.isVisible()) { haveVisibleGroups = true; break; } } setVisible(haveVisibleGroups)...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\ui\sideactions\swing\SideActionsGroupsListPanel.java
1
请完成以下Java代码
private <R, T> DownlinkRequestCallback<R, T> createDownlinkProxyCallback(Runnable processRemove, DownlinkRequestCallback<R, T> callback) { return new DownlinkRequestCallback<>() { @Override public void onSuccess(R request, T response) { processRemove.run(); ...
@Override public void persistUpdates(String endpoint) { LwM2MModelConfig modelConfig = currentModelConfigs.get(endpoint); if (modelConfig != null && !modelConfig.isEmpty()) { modelStore.put(modelConfig); } } @Override public void removeUpdates(String endpoint) { ...
repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\server\model\LwM2MModelConfigServiceImpl.java
1
请完成以下Java代码
public class CustomParameterizedException extends AbstractThrowableProblem { private static final long serialVersionUID = 1L; private static final String PARAM = "param"; public CustomParameterizedException(String message, String... params) { this(message, toParamMap(params)); } public C...
Map<String, Object> paramMap = new HashMap<>(); if (params != null && params.length > 0) { for (int i = 0; i < params.length; i++) { paramMap.put(PARAM + i, params[i]); } } return paramMap; } public static Map<String, Object> toProblemParameters(S...
repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\web\rest\errors\CustomParameterizedException.java
1
请完成以下Java代码
public BigDecimal calculateMeasure (MSLAGoal goal) { // Average BigDecimal retValue = Env.ZERO; BigDecimal total = Env.ZERO; int count = 0; // MSLAMeasure[] measures = goal.getAllMeasures(); for (int i = 0; i < measures.length; i++) { MSLAMeasure measure = measures[i]; if (!measure.isActive() ...
measure.save(); } } // Goal Expired if (goal.getValidTo() != null && goal.getValidTo().after(new Timestamp(System.currentTimeMillis()))) goal.setProcessed(true); // Calculate with 2 digits precision if (count != 0) retValue = total.divide(new BigDecimal(count), 2, BigDecimal.ROUND_HALF_UP); ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\sla\DeliveryAccuracy.java
1
请完成以下Java代码
public int countRecordsWithErrors(@NonNull final ImportRecordsSelection selection) { final String sql = "SELECT COUNT(1) FROM I_Inventory " + " WHERE I_IsImported='E' " + selection.toSqlWhereClause(); return DB.getSQLValueEx(ITrx.TRXNAME_ThreadInherited, sql); } private void dbUpdateErrorMessages(@NonNu...
} // // No Product { final StringBuilder sql = new StringBuilder("UPDATE I_Inventory ") .append(" SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Product, ' ") .append(" WHERE M_Product_ID IS NULL ") .append(" AND I_IsImported<>'Y' ") .append(selection.toSqlWhereClause()); final in...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\inventory\impexp\MInventoryImportTableSqlUpdater.java
1
请完成以下Java代码
public Class<?> publicDefineClass(String name, byte[] b, @Nullable ProtectionDomain protectionDomain) { return defineClass(name, b, 0, b.length, protectionDomain); } @Override public ClassLoader getOriginalClassLoader() { return getParent(); } private URL createFileUrl(String name, ClassLoaderFile file) { ...
this.enumeration = enumeration; } @Override public boolean hasMoreElements() { return (this.firstElement != null || this.enumeration.hasMoreElements()); } @Override public E nextElement() { if (this.firstElement == null) { return this.enumeration.nextElement(); } E element = this.firstElem...
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\restart\classloader\RestartClassLoader.java
1
请完成以下Java代码
public void setSelectionColumnSeqNo (final int SelectionColumnSeqNo) { set_Value (COLUMNNAME_SelectionColumnSeqNo, SelectionColumnSeqNo); } @Override public int getSelectionColumnSeqNo() { return get_ValueAsInt(COLUMNNAME_SelectionColumnSeqNo); } @Override public void setSeqNo (final int SeqNo) { set_...
@Override public java.lang.String getValueMin() { return get_ValueAsString(COLUMNNAME_ValueMin); } @Override public void setVersion (final BigDecimal Version) { set_Value (COLUMNNAME_Version, Version); } @Override public BigDecimal getVersion() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAM...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Column.java
1
请完成以下Java代码
public String createToken(Authentication authentication, boolean rememberMe) { String authorities = authentication.getAuthorities().stream() .map(GrantedAuthority::getAuthority) .collect(Collectors.joining(",")); long now = (new Date()).getTime(); Date validity; ...
return new UsernamePasswordAuthenticationToken(principal, token, authorities); } public boolean validateToken(String authToken) { try { Jwts.parser().setSigningKey(key).parseClaimsJws(authToken); return true; } catch (io.jsonwebtoken.security.SecurityException | Malforme...
repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\security\jwt\TokenProvider.java
1
请完成以下Java代码
private ImmutableList<DeliveryOrderParcel> toDeliveryOrderLines(@NotNull final Set<CreateDraftDeliveryOrderRequest.PackageInfo> packageInfos) { return packageInfos.stream() .map(packageInfo -> { final ImmutableList<DeliveryOrderItem> deliveryOrderItems = purchaseOrderToShipperTransportationRepository.getPac...
final Quantity quantity = uomConversionBL.convertQuantityTo(packageItem.getQuantity(), productId, targetUOMID); final Money unitPrice = Money.of(orderLine.getPriceEntered(), CurrencyId.ofRepoId(orderLine.getC_Currency_ID())); final Money totalPackageValue = unitPrice.multiply(quantity.toBigDecimal()); return Del...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.nshift\src\main\java\de\metas\shipper\gateway\nshift\NShiftDraftDeliveryOrderCreator.java
1
请完成以下Java代码
public PublicKeyCredentialBuilder rawId(Bytes rawId) { this.rawId = rawId; return this; } /** * Sets the {@link #getResponse()} property. * @param response the response * @return the PublicKeyCredentialBuilder */ public PublicKeyCredentialBuilder response(R response) { this.response = respon...
/** * Sets the {@link #getClientExtensionResults()} property. * @param clientExtensionResults the client extension results * @return the PublicKeyCredentialBuilder */ public PublicKeyCredentialBuilder clientExtensionResults( AuthenticationExtensionsClientOutputs clientExtensionResults) { this.clien...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\api\PublicKeyCredential.java
1
请完成以下Java代码
default IHUContextProcessorExecutor createHUContextProcessorExecutor() { return createHUContextProcessorExecutor(PlainContextAware.newWithThreadInheritedTrx()); } /** * Convenient method to process using current env and thread inherited trx. */ default void process(final Consumer<IHUContext> processor) { ...
? Services.get(IUOMDAO.class).getById(uomId) : null; } static I_M_Product extractProductOrNull(@NonNull final I_M_HU_Trx_Line trxLine) { final ProductId productId = extractProductId(trxLine); return productId != null ? Services.get(IProductDAO.class).getById(productId) : null; } @Nullable static...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\hutransaction\IHUTrxBL.java
1
请完成以下Java代码
private Map<String, Object> convertClaims(Map<String, Object> claims, ClientRegistration clientRegistration) { Converter<Map<String, Object>, Map<String, Object>> claimTypeConverter = this.claimTypeConverterFactory .apply(clientRegistration); return (claimTypeConverter != null) ? claimTypeConverter.convert(claim...
* @param retrieveUserInfo the {@code Predicate} used to determine if the UserInfo * Endpoint should be called * @since 6.3 */ public final void setRetrieveUserInfo(Predicate<OidcUserRequest> retrieveUserInfo) { Assert.notNull(retrieveUserInfo, "retrieveUserInfo cannot be null"); this.retrieveUserInfo = retri...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\oidc\userinfo\OidcReactiveOAuth2UserService.java
1
请完成以下Java代码
class M_Product { private final ICurrentCostsRepository currentCostsRepository; private final ICostDetailService costDetailsService; public M_Product( @NonNull final ICurrentCostsRepository currentCostsRepository, @NonNull final ICostDetailService costDetailsService) { this.currentCostsRepository = current...
@ModelChange(timings = ModelValidator.TYPE_AFTER_CHANGE, ifColumnsChanged = I_M_Product.COLUMNNAME_C_UOM_ID) public void updateCostUom(final I_M_Product product) { assertNoCost(product); currentCostsRepository.updateUOMForProduct(product); } @ModelChange(timings = { ModelValidator.TYPE_AFTER_NEW, ModelValidato...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\interceptors\M_Product.java
1
请在Spring Boot框架中完成以下Java代码
public class App extends BaseEntity implements Serializable { @Id @Column(name = "app_id") @ApiModelProperty(value = "ID", hidden = true) @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @ApiModelProperty(value = "名称") private String name; @ApiModelProperty(value = "端口") private...
@ApiModelProperty(value = "部署路径") private String deployPath; @ApiModelProperty(value = "备份路径") private String backupPath; @ApiModelProperty(value = "启动脚本") private String startScript; @ApiModelProperty(value = "部署脚本") private String deployScript; public void copy(App source){ BeanUtil.copyPropert...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\maint\domain\App.java
2
请在Spring Boot框架中完成以下Java代码
protected NotificationTarget prepare(EntitiesImportCtx ctx, NotificationTarget notificationTarget, NotificationTarget oldNotificationTarget, EntityExportData<NotificationTarget> exportData, IdProvider idProvider) { if (notificationTarget.getConfiguration().getType() == NotificationTargetType.PLATFORM_USERS) { ...
return notificationTargetService.saveNotificationTarget(ctx.getTenantId(), notificationTarget); } @Override protected void onEntitySaved(User user, NotificationTarget savedEntity, NotificationTarget oldEntity) throws ThingsboardException { entityActionService.logEntityAction(user, savedEntity.getId...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\sync\ie\importing\impl\NotificationTargetImportService.java
2
请完成以下Java代码
public int getRecordsCount(final RelatedDocumentsPermissions permissions) { return getClearingFactAcctIds().size(); } @Override public MQuery getQuery() { final MQuery query = new MQuery(I_Fact_Acct.Table_Name); final ImmutableSet<FactAcctId> clearingFactAcctIds = getClearingFactAcctIds(); if (!clearingF...
.filter(Objects::nonNull) .collect(ImmutableSet.toImmutableSet()); if (openItemKeys.isEmpty()) { return ImmutableSet.of(); } return factAcctDAO.listIds(FactAcctQuery.builder() .tableName(I_SAP_GLJournal.Table_Name) .excludeRecordRef(fromRecordRef) .isOpenItem(true) .openItemTrxType(FAOpe...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.webui\src\main\java\de\metas\acct\open_items\related_documents\ClearingFactAcctsQuerySupplier.java
1
请完成以下Java代码
public RsaKeyPairJwtEncoderBuilder jwkPostProcessor(Consumer<RSAKey.Builder> jwkPostProcessor) { Assert.notNull(jwkPostProcessor, "jwkPostProcessor cannot be null"); jwkPostProcessor.accept(this.builder); return this; } /** * Builds the {@link NimbusJwtEncoder} instance. * @return the configured {@l...
Curve curve = Curve.forECParameterSpec(publicKey.getParams()); Assert.notNull(curve, "Unable to determine Curve for EC public key."); this.builder = defaultKid.apply(publicKey, privateKey); } /** * Post-process the {@link JWK} using the given {@link Consumer}. For example, you * may use this to overrid...
repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\NimbusJwtEncoder.java
1
请完成以下Java代码
public String decrypt(final String input, String encryptPrefix, String encryptSuffix, String decryptPrefix, String decryptSuffix) { return replaceAll(input, encryptPrefix, encryptSuffix, decryptPrefix, decryptSuffix, encryptor::decrypt); } /** * Decrypt a value * * @param value the value...
} /** * Encrypt a value * * @param value the value * @return encrypted value */ public String encryptValue(String value) { return encryptor.encrypt(value); } /** * <p>getEncryptableProperties.</p> * * @return a {@link org.jasypt.properties.EncryptablePro...
repos\jasypt-spring-boot-master\jasypt-maven-plugin\src\main\java\com\ulisesbocchio\jasyptmavenplugin\encrypt\EncryptionService.java
1