instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public InventoryLineHU convertQuantities(@NonNull final UnaryOperator<Quantity> qtyConverter) { return toBuilder() .qtyCount(qtyConverter.apply(getQtyCount())) .qtyBook(qtyConverter.apply(getQtyBook())) .build(); } public InventoryLineHU updatingFrom(@NonNull final InventoryLineCountRequest request) ...
{ InventoryLineHUBuilder updatingFrom(@NonNull final InventoryLineCountRequest request) { return huId(request.getHuId()) .huQRCode(HuId.equals(this.huId, request.getHuId()) ? this.huQRCode : null) .qtyInternalUse(null) .qtyBook(request.getQtyBook()) .qtyCount(request.getQtyCount()) .isCo...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\InventoryLineHU.java
1
请完成以下Java代码
public double getRotation() { return rotation; } public void setRotation(double rotation) { this.rotation = rotation; } public boolean equals(GraphicInfo ginfo) { if (this.getX() != ginfo.getX()) { return false; } if (this.getY() != ginfo.getY()) { return fal...
return false; } // check for zero value in case we are comparing model value to BPMN DI value // model values do not have xml location information if (0 != this.getXmlColumnNumber() && 0 != ginfo.getXmlColumnNumber() && this.getXmlColumnNumber() != ginfo.getXmlColumnNumber()) { return fals...
repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\GraphicInfo.java
1
请在Spring Boot框架中完成以下Java代码
private String getRootUrl(){ return "http://localhost:" + port; } @Test public void contextLoads(){ } // @Test // public void testGetAllDevelopers(){ // HttpHeaders headers = new HttpHeaders(); // HttpEntity<String> entity = new HttpEntity<String>(null, headers); // // ...
@Test public void testUpdatePost(){ int id = 1; Developer developer = restTemplate.getForObject(getRootUrl() + "/developers/" + id, Developer.class); developer.setFirstName("hamdambek"); developer.setLastName("urunov"); restTemplate.put(getRootUrl() + "/developer/" + id, dev...
repos\SpringBoot-Projects-FullStack-master\Part-4 Spring Boot REST API\SpringMySQL\src\main\java\spring\restapi\service\SpringBootCrudRestApplicationTests.java
2
请完成以下Java代码
public Quantity getSingleQuantity() { return getSingleGroup().getQty(); } @Value public static class Group { public enum Type { ATTRIBUTE_SET, OTHER_STORAGE_KEYS, ALL_STORAGE_KEYS } ProductId productId; Quantity qty; Type type;
ImmutableAttributeSet attributes; @Builder public Group( @NonNull final Group.Type type, @NonNull final ProductId productId, @NonNull final Quantity qty, @Nullable final ImmutableAttributeSet attributes) { this.type = type; this.productId = productId; this.qty = qty; this.attributes =...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\adapter\AvailabilityInfoResultForWebui.java
1
请完成以下Java代码
public class FilterUtils { public static <T> Optional<T> findUniqueElementMatchingPredicate_WithReduction(Stream<T> elements, Predicate<T> predicate) { return elements.filter(predicate) .collect(Collectors.reducing((a, b) -> null)); } public static <T> T getUniqueElementMatchingPredica...
return null; } public static <T> T getUniqueElementMatchingPredicate_WithCollectingAndThen(Stream<T> elements, Predicate<T> predicate) { return elements.filter(predicate) .collect(Collectors.collectingAndThen(Collectors.toList(), FilterUtils::getUniqueElement)); } private static <T...
repos\tutorials-master\core-java-modules\core-java-streams-4\src\main\java\com\baeldung\streams\filteronlyoneelement\FilterUtils.java
1
请完成以下Java代码
public void loadPreference(final Properties ctx) { final int adUserId = Env.getAD_User_ID(ctx); loadPreference(adUserId); } /** * Set Property * * @param key Key * @param value Value */ public void setProperty(final String key, final String value) { if (props == null) { props = new Properties...
/** * Get Property * * @param key Key * @return Value */ public String getProperty(final String key) { if (key == null) { return ""; } if (props == null) { return ""; } final String value = props.getProperty(key, ""); if (Check.isEmpty(value)) { return ""; } return value; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\session\UserPreference.java
1
请在Spring Boot框架中完成以下Java代码
public Duration getTimerLockForceAcquireAfter() { return timerLockForceAcquireAfter; } public void setTimerLockForceAcquireAfter(Duration timerLockForceAcquireAfter) { this.timerLockForceAcquireAfter = timerLockForceAcquireAfter; } public Duration getResetExpiredJobsInterval() { ...
} public void setResetExpiredJobsPageSize(int resetExpiredJobsPageSize) { this.resetExpiredJobsPageSize = resetExpiredJobsPageSize; } public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } }
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\asyncexecutor\AsyncJobExecutorConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public void deleteArticle(User me, @PathVariable String slug) { articleService.deleteArticle(me, slug); } @PreAuthorize("isAuthenticated()") @GetMapping("/api/articles/feed") public MultipleArticlesResponse getFeedArticles( User me, @RequestParam(value = "limit", require...
@DeleteMapping("/api/articles/{slug}/comments/{id}") public void deleteComment(User me, @PathVariable String slug, @PathVariable int id) { articleService.deleteComment(me, id); } @PostMapping("/api/articles/{slug}/favorite") public SingleArticleResponse favoriteArticle(User me, @PathVariable St...
repos\realworld-spring-boot-native-master\src\main\java\com\softwaremill\realworld\application\article\controller\ArticleController.java
2
请完成以下Java代码
private static class SingletonHolder { public static final SerializableCloneableSingleton instance = new SerializableCloneableSingleton(); } public static SerializableCloneableSingleton getInstance() { return SingletonHolder.instance; } @Override public String describeMe() { ...
this.state++; } public int getState() { return state; } private Object readResolve() throws ObjectStreamException { return SingletonHolder.instance; } public Object cloneObject() throws CloneNotSupportedException { return this.clone(); } }
repos\tutorials-master\core-java-modules\core-java-lang-oop-modifiers-2\src\main\java\com\baeldung\staticsingletondifference\SerializableCloneableSingleton.java
1
请完成以下Spring Boot application配置
spring: boot: admin: ui: theme: color: "#4A1420" palette: 50: "#F8EBE4" 100: "#F2D7CC" 200: "#E5AC9C" 300: "#D87B6C" 400: "#CB463B" 500: "#9F2A2
A" 600: "#83232A" 700: "#661B26" 800: "#4A1420" 900: "#2E0C16"
repos\spring-boot-admin-master\spring-boot-admin-samples\spring-boot-admin-sample-servlet\src\main\resources\application-themed.yml
2
请完成以下Java代码
private void mapEditorAction(int keyCode, int modifiers, Action a) { final KeyStroke ks = KeyStroke.getKeyStroke(keyCode, modifiers); // editor.getKeymap().removeKeyStrokeBinding(ks); // editor.getKeymap().addActionForKeyStroke(ks, a); // String name = (String)a.getValue(Action.SHORT_DESCRIPTION); if (name...
Dialog parent = null; Container e = getParent(); while (e != null) { if (e instanceof Dialog) { parent = (Dialog)e; break; } e = e.getParent(); } return parent; } public boolean print() { throw new UnsupportedOperationException(); } public static boolean isHtml(String s) { if (...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\RichTextEditor.java
1
请完成以下Java代码
protected void prepare() { final ProcessInfoParameter[] para = getParametersAsArray(); for (ProcessInfoParameter element : para) { final String name = element.getParameterName(); if (element.getParameter() == null) { // do nothing } else if (CreateCreditMemoFromInvoice.PARA_C_DocType_ID.equa...
else if (CreateCreditMemoFromInvoice.PARA_IsReferenceInvoice.equals(name)) { referenceInvoice = element.getParameterAsBoolean(); } else if (CreateCreditMemoFromInvoice.PARA_IsCreditedInvoiceReinvoicable.equals(name)) { creditedInvoiceReinvoicable = element.getParameterAsBoolean(); } else { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\adempiere\invoice\process\CreateCreditMemoFromInvoice.java
1
请完成以下Java代码
public class ActiveOrHistoricCurrencyAndAmount { @XmlValue protected BigDecimal value; @XmlAttribute(name = "Ccy", required = true) protected String ccy; /** * Gets the value of the value property. * * @return * possible object is * {@link BigDecimal } * ...
*/ public String getCcy() { return ccy; } /** * Sets the value of the ccy property. * * @param value * allowed object is * {@link String } * */ public void setCcy(String value) { this.ccy = value; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\ActiveOrHistoricCurrencyAndAmount.java
1
请完成以下Java代码
public int getLoadCount() { return loadCount; } public final String getTrxName() { return _trxName; } public final String setTrxName(final String trxName) { final String trxNameOld = _trxName; _trxName = trxName; return trxNameOld; } public final boolean isOldValues() { return useOldValues; } ...
} }; } public IModelInternalAccessor getModelInternalAccessor() { if (_modelInternalAccessor == null) { _modelInternalAccessor = new POJOModelInternalAccessor(this); } return _modelInternalAccessor; } POJOModelInternalAccessor _modelInternalAccessor = null; public static IModelInternalAccessor get...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\wrapper\POJOWrapper.java
1
请完成以下Java代码
public RequestTypeId retrieveOrgChangeRequestTypeId() { return retrieveRequestTypeIdByInternalName(InternalName_OrgSwitch); } @Override public RequestTypeId retrieveBPartnerCreatedFromAnotherOrgRequestTypeId() { return retrieveRequestTypeIdByInternalName(InternalName_C_BPartner_CreatedFromAnotherOrg); } @O...
.firstIdOnly(RequestTypeId::ofRepoIdOrNull); return Optional.ofNullable(requestTypeId); } private Optional<RequestTypeId> retrieveFirstActiveRequestTypeId() { final RequestTypeId requestTypeId = queryBL.createQueryBuilderOutOfTrx(I_R_RequestType.class) .addOnlyActiveRecordsFilter() .orderBy(I_R_Request...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\request\api\impl\RequestTypeDAO.java
1
请在Spring Boot框架中完成以下Java代码
public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } @ApiModelProperty(example = "oneEvent") public String getKey() { return key; } public void setKey(String key) { this.key = key; } @ApiModelProperty(example = ...
this.category = category; } @ApiModelProperty(example = "oneEvent.event") public String getResourceName() { return resourceName; } public void setResourceName(String resourceName) { this.resourceName = resourceName; } public void setResource(String resource) { this...
repos\flowable-engine-main\modules\flowable-event-registry-rest\src\main\java\org\flowable\eventregistry\rest\service\api\repository\EventDefinitionResponse.java
2
请完成以下Java代码
public I_C_OrderLine getCreated_OrderLine() { return get_ValueAsPO(COLUMNNAME_Created_OrderLine_ID, I_C_OrderLine.class); } @Override public void setCreated_OrderLine(final I_C_OrderLine Created_OrderLine) { set_ValueFromPO(COLUMNNAME_Created_OrderLine_ID, I_C_OrderLine.class, Created_OrderLine); } @Overri...
{ return get_ValueAsBoolean(COLUMNNAME_IsSOTrx); } @Override public I_M_CostElement getM_CostElement() { return get_ValueAsPO(COLUMNNAME_M_CostElement_ID, I_M_CostElement.class); } @Override public void setM_CostElement(final I_M_CostElement M_CostElement) { set_ValueFromPO(COLUMNNAME_M_CostElement_ID, ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Order_Cost.java
1
请在Spring Boot框架中完成以下Java代码
public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public static Map<String, Map<String, Object>> toMap() { CardTypeEnum[] ary = CardTypeEnum.values(); Map<String, Map<String, Object>> enumMap = new HashMap<String, Map<String...
} public static CardTypeEnum getEnum(String enumName) { CardTypeEnum resultEnum = null; CardTypeEnum[] enumAry = CardTypeEnum.values(); for (int i = 0; i < enumAry.length; i++) { if (enumAry[i].name().equals(enumName)) { resultEnum = enumAry[i]; break; } } return resultEnum; } }
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\user\enums\CardTypeEnum.java
2
请完成以下Java代码
public <T extends ReferenceListAwareEnum> T getParameterValueAsRefListOrNull(@NonNull final String parameterName, @NonNull final Function<String, T> mapper) { final DocumentFilterParam param = getParameterOrNull(parameterName); if (param == null) { return null; } return param.getValueAsRefListOrNull(mapp...
public DocumentFilterBuilder setFacetFilter(final boolean facetFilter) { return facetFilter(facetFilter); } public boolean hasParameters() { return !Check.isEmpty(parameters) || !Check.isEmpty(internalParameterNames); } public DocumentFilterBuilder setParameters(@NonNull final List<DocumentFilt...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\DocumentFilter.java
1
请完成以下Java代码
public int getM_AttributeSet_ID() { return get_ValueAsInt(COLUMNNAME_M_AttributeSet_ID); } @Override public void setM_PricingSystem_ID (final int M_PricingSystem_ID) { if (M_PricingSystem_ID < 1) set_Value (COLUMNNAME_M_PricingSystem_ID, null); else set_Value (COLUMNNAME_M_PricingSystem_ID, M_Prici...
set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } /** * PaymentRule AD_Reference_ID=195 * Reference name: _Payment Rule */ public static final int PAYMENTRULE_AD_Reference_ID=195; /** Cash = B */ public static final Strin...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java-gen\de\metas\ordercandidate\model\X_C_OLCandProcessor.java
1
请完成以下Java代码
public void deactivateLineQtys(final I_C_RfQResponseLine responseLine) { if (!responseLine.isActive()) { final IRfqDAO rfqDAO = Services.get(IRfqDAO.class); for (final I_C_RfQResponseLineQty qty : rfqDAO.retrieveResponseQtys(responseLine)) { if (qty.isActive()) { qty.setIsActive(false); ...
public void preventDeleteIfThereAreReportedQuantities(final I_C_RfQResponseLine rfqResponseLine) { if(rfqResponseLine.getPrice().signum() != 0) { throw new RfQResponseLineHasReportedPriceException(rfqResponseLine); } final IRfqDAO rfqDAO = Services.get(IRfqDAO.class); if (rfqDAO.hasResponseQtys(rfqResp...
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\model\interceptor\C_RfQResponseLine.java
1
请在Spring Boot框架中完成以下Java代码
public class Document { @XmlElement(name = "Xlief4h", required = true) protected List<Xlief4H> xlief4H; /** * Gets the value of the xlief4H property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the ...
* * <p> * Objects of the following type(s) are allowed in the list * {@link Xlief4H } * * */ public List<Xlief4H> getXlief4H() { if (xlief4H == null) { xlief4H = new ArrayList<Xlief4H>(); } return this.xlief4H; } }
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\Document.java
2
请完成以下Java代码
public static Rabbit createRabbitUsingClassForName() throws InstantiationException, IllegalAccessException, ClassNotFoundException { Rabbit rabbit = (Rabbit) Class.forName("com.baeldung.objectcreation.objects.Rabbit").newInstance(); return rabbit; } public static Rabbit createRabbi...
return (SerializableRabbit) ois.readObject(); } } public static Rabbit createRabbitUsingSupplier() { Supplier<Rabbit> rabbitSupplier = Rabbit::new; Rabbit rabbit = rabbitSupplier.get(); return rabbit; } public static Rabbit[] createRabbitArray() { ...
repos\tutorials-master\core-java-modules\core-java-lang-oop-constructors-2\src\main\java\com\baeldung\objectcreation\utils\CreateRabbits.java
1
请在Spring Boot框架中完成以下Java代码
public class SecondJpaConfig { static final String REPOSITORY_PACKAGE = "com.xkcoding.multi.datasource.jpa.repository.second"; private static final String ENTITY_PACKAGE = "com.xkcoding.multi.datasource.jpa.entity.second"; /** * 扫描spring.jpa.second开头的配置信息 * * @return jpa配置信息 */ @Be...
// 设置持久化单元名,用于@PersistenceContext注解获取EntityManager时指定数据源 .persistenceUnit("secondPersistenceUnit").build(); } /** * 获取实体管理对象 * * @param factory 注入名为secondEntityManagerFactory的bean * @return 实体管理对象 */ @Bean(name = "secondEntityManager") public EntityManager entityMan...
repos\spring-boot-demo-master\demo-multi-datasource-jpa\src\main\java\com\xkcoding\multi\datasource\jpa\config\SecondJpaConfig.java
2
请在Spring Boot框架中完成以下Java代码
public SentinelResourceAspect sentinelResourceAspect() { return new SentinelResourceAspect(); } @PostConstruct public void init() { initFlowRules(); initDegradeRules(); initSystemProtectionRules(); } private void initFlowRules() { List<FlowRule> flowRules = ...
DegradeRule rule = new DegradeRule(); rule.setResource(RESOURCE_NAME); rule.setCount(10); rule.setTimeWindow(10); rules.add(rule); DegradeRuleManager.loadRules(rules); } private void initSystemProtectionRules() { List<SystemRule> rules = new ArrayList<>(); ...
repos\tutorials-master\spring-cloud-modules\spring-cloud-sentinel\src\main\java\com\baeldung\spring\cloud\sentinel\config\SentinelAspectConfiguration.java
2
请完成以下Java代码
public void addedChild(Resource child) { } @Override public void removedChild(Resource child) { } @Override public void addedObserveRelation(ObserveRelation relation) { Request request = relation.getExchange().getRequest(); String token = getToke...
return dtlsSessionInfo; }); } else { tbCoapDtlsSessionInfo = null; } return tbCoapDtlsSessionInfo; } private String getCertPem(EndpointContext endpointContext) { try { X509CertPath certPath = (X509CertPath) endpointContext.getPeerIdent...
repos\thingsboard-master\common\transport\coap\src\main\java\org\thingsboard\server\transport\coap\CoapTransportResource.java
1
请在Spring Boot框架中完成以下Java代码
public final class DataWebAutoConfiguration { private final DataWebProperties properties; DataWebAutoConfiguration(DataWebProperties properties) { this.properties = properties; } @Bean @ConditionalOnMissingBean PageableHandlerMethodArgumentResolverCustomizer pageableCustomizer() { return (resolver) -> { ...
}; } @Bean @ConditionalOnMissingBean SortHandlerMethodArgumentResolverCustomizer sortCustomizer() { return (resolver) -> resolver.setSortParameter(this.properties.getSort().getSortParameter()); } @Bean @ConditionalOnMissingBean SpringDataWebSettings springDataWebSettings() { return new SpringDataWebSettin...
repos\spring-boot-4.0.1\module\spring-boot-data-commons\src\main\java\org\springframework\boot\data\autoconfigure\web\DataWebAutoConfiguration.java
2
请完成以下Java代码
public class PersonRequest { private int id; private String firstName; private String lastName; private int age; private String address; public static void main(String[] args) { PersonRequest personRequest = new PersonRequest(); personRequest.setId(1); personRequest.setF...
public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public String getAddress() { return addr...
repos\tutorials-master\aws-modules\aws-lambda-modules\lambda-function\src\main\java\com\baeldung\lambda\dynamodb\bean\PersonRequest.java
1
请完成以下Java代码
private PartyIdentificationSEPA3 convertPartyIdentificationSEPA3(@NonNull final I_SEPA_Export sepaHeader) { final PartyIdentificationSEPA3 partyIdCopy = new PartyIdentificationSEPA3(); final PartySEPA2 partySEPA = new PartySEPA2(); partyIdCopy.setId(partySEPA); final PersonIdentificationSEPA2 prvtId = new Per...
private String getSEPA_MandateRefNo(final I_SEPA_Export_Line line) { return CoalesceUtil.coalesceSuppliers( () -> line.getSEPA_MandateRefNo(), () -> getBPartnerValueById(line.getC_BPartner_ID()) + "-1"); } private String getBPartnerValueById(final int bpartnerRepoId) { return bpartnerService.getBPartne...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\base\src\main\java\de\metas\payment\sepa\sepamarshaller\impl\SEPACustomerDirectDebitMarshaler_Pain_008_003_02.java
1
请在Spring Boot框架中完成以下Java代码
public class BPartnerAttribute { private static final Interner<BPartnerAttribute> interner = Interners.newStrongInterner(); @NonNull String code; private BPartnerAttribute(@NonNull final String code) { this.code = code; } public static BPartnerAttribute ofCode(@NonNull final String code) { final BPartnerA...
: null; } @Override @Deprecated public String toString() { return getCode(); } @JsonValue public @NonNull String getCode() { return code; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\attributes\BPartnerAttribute.java
2
请完成以下Java代码
public void setIsRentalEquipment (final boolean IsRentalEquipment) { set_Value (COLUMNNAME_IsRentalEquipment, IsRentalEquipment); } @Override public boolean isRentalEquipment() { return get_ValueAsBoolean(COLUMNNAME_IsRentalEquipment); } @Override public void setSalesLineId (final @Nullable String SalesL...
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_TimePeriod); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setUnit (final @Nullable String Unit) { set_Value (COLUMNNAME_Unit, Unit); } @Override public String getUnit() { return get_ValueAsString(COLUMNNAME_Unit); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java-gen\de\metas\vertical\healthcare\alberta\model\X_Alberta_OrderedArticleLine.java
1
请在Spring Boot框架中完成以下Java代码
public Page<Map<String, Object>> queryHitByPage(int pageNo,int pageSize, String keyword, String indexName, String... fieldNames) { // 构造查询条件,使用标准分词器. QueryBuilder matchQuery = createQueryBuilder(keyword,fieldNames); // 设置高亮,使用默认的highlighter高亮器 HighlightBuilder highlightBuilder = createH...
// 设置高亮字段 for (String fieldName: fieldNames) highlightBuilder.field(fieldName); return highlightBuilder; } /** * 处理高亮结果 * @auther: zhoudong * @date: 2018/12/18 10:48 */ private List<Map<String,Object>> getHitList(SearchHits hits){ List<Map<String,Object>> list =...
repos\springboot-demo-master\elasticsearch\src\main\java\demo\et59\elaticsearch\service\impl\BaseSearchServiceImpl.java
2
请完成以下Java代码
public int getValue() { return value; } public int setValue(int v) { int value = getLeafValue(v); setBase(currentBase + UNUSED_CHAR_VALUE, value); this.value = v; return v; } @Override public boolean ha...
if (check.size() > to && check.get(to) == from) { path.append(i); from = to; path.append(from); baseParent = base.get(from); if (getCheck(baseParent + UNUSED_CHAR_VALUE) == from) { ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\trie\datrie\MutableDoubleArrayTrieInteger.java
1
请在Spring Boot框架中完成以下Java代码
static MethodInterceptor jsr250AuthorizationMethodInterceptor( ObjectProvider<Jsr250MethodSecurityConfiguration> _jsr250MethodSecurityConfiguration) { Supplier<AuthorizationManagerBeforeMethodInterceptor> supplier = () -> { Jsr250MethodSecurityConfiguration configuration = _jsr250MethodSecurityConfiguration.get...
@Autowired(required = false) void setRoleHierarchy(RoleHierarchy roleHierarchy) { AuthoritiesAuthorizationManager authoritiesAuthorizationManager = new AuthoritiesAuthorizationManager(); authoritiesAuthorizationManager.setRoleHierarchy(roleHierarchy); this.authorizationManager.setAuthoritiesAuthorizationManager(...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\method\configuration\Jsr250MethodSecurityConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public class ReconciliationEntityVo { /** 对账批次号 **/ private String accountCheckBatchNo; /** 账单日期 **/ private Date billDate; /** 银行类型 WEIXIN ALIPAY **/ private String bankType; /** 下单时间 **/ private Date orderTime; /** 银行交易时间 **/ private Date bankTradeTime; /** 银行订单号 **/ private String bankOrderNo; /*...
public void setBankTrxNo(String bankTrxNo) { this.bankTrxNo = bankTrxNo; } public String getBankTradeStatus() { return bankTradeStatus; } public void setBankTradeStatus(String bankTradeStatus) { this.bankTradeStatus = bankTradeStatus; } public BigDecimal getBankAmount() { return bankAmount; } public...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\vo\ReconciliationEntityVo.java
2
请完成以下Java代码
public BPartnerCustomerAccounts getCustomerAccounts( @NonNull final BPartnerId bpartnerId, @NonNull final AcctSchemaId acctSchemaId) { final ImmutableMap<AcctSchemaId, BPartnerCustomerAccounts> map = customerAccountsCache.getOrLoad(bpartnerId, this::retrieveCustomerAccounts); final BPartnerCustomerAccounts a...
.create() .stream() .map(BPartnerAccountsRepository::fromRecord) .collect(ImmutableMap.toImmutableMap(BPartnerCustomerAccounts::getAcctSchemaId, accts -> accts)); } @NonNull private static BPartnerCustomerAccounts fromRecord(@NonNull final I_C_BP_Customer_Acct record) { return BPartnerCustomerAccount...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\accounts\BPartnerAccountsRepository.java
1
请完成以下Java代码
public void actionPerformed(ActionEvent e) { replaceChB_actionPerformed(e); } }); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 4; gbc.insets = new Insets(5, 10, 5, 10); gbc.anchor = GridBagConstraints.WEST; areaPanel.add(chkReplace, gbc); txtReplace.setPreferredSize(new Dimension(300,...
this.getRootPane().setDefaultButton(okB); // build button-panel buttonsPanel.add(okB); buttonsPanel.add(cancelB); getContentPane().add(buttonsPanel, BorderLayout.SOUTH); } void okB_actionPerformed(ActionEvent e) { this.dispose(); } void cancelB_actionPerformed(ActionEvent e) { CANCELLED = true; this...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\net\sf\memoranda\ui\htmleditor\FindDialog.java
1
请完成以下Java代码
private Stream<AdArchive> streamArchivesForLogIds(final ImmutableList<DocOutboundLogId> logIds) { return docOutboundDAO.streamByIdsInOrder(logIds) .filter(I_C_Doc_Outbound_Log::isActive) .map(log -> getLastArchive(log).orElse(null)) .filter(Objects::nonNull); } @NonNull private Optional<AdArchive> ge...
for (int page = 0; page < pdfReaderToAdd.getNumberOfPages(); ) { targetPdf.addPage(targetPdf.getImportedPage(pdfReaderToAdd, ++page)); } targetPdf.freeReader(pdfReaderToAdd); } catch (final BadPdfFormatException | IOException e) { errorCount.incrementAndGet(); } finally { if (pdfRe...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.webui\src\main\java\de\metas\archive\process\MassConcatenateOutboundPdfs.java
1
请完成以下Java代码
protected final void invalidateView() { final IView view = getView(); invalidateView(view.getViewId()); } protected final void invalidateParentView() { final IView view = getView(); final ViewId parentViewId = view.getParentViewId(); if (parentViewId != null) { invalidateView(parentViewId); } } ...
final DocumentIdsSelection selectedRowIds = getSelectedRowIds(); final DocumentId documentId = selectedRowIds.getSingleDocumentId(); return getView().getById(documentId); } @OverridingMethodsMustInvokeSuper protected Stream<? extends IViewRow> streamSelectedRows() { final DocumentIdsSelection selectedRowIds ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\adprocess\ViewBasedProcessTemplate.java
1
请完成以下Java代码
public int getM_Attribute_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Attribute_ID); if (ii == null) return 0; return ii.intValue(); } /** Set MKTG_ContactPerson_Attribute. @param MKTG_ContactPerson_Attribute_ID MKTG_ContactPerson_Attribute */ @Override public void setMKTG_ContactPerson_At...
@Override public void setMKTG_ContactPerson(de.metas.marketing.base.model.I_MKTG_ContactPerson MKTG_ContactPerson) { set_ValueFromPO(COLUMNNAME_MKTG_ContactPerson_ID, de.metas.marketing.base.model.I_MKTG_ContactPerson.class, MKTG_ContactPerson); } /** Set MKTG_ContactPerson. @param MKTG_ContactPerson_ID MKTG_C...
repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java-gen\de\metas\marketing\base\model\X_MKTG_ContactPerson_Attribute.java
1
请在Spring Boot框架中完成以下Java代码
public static class JsonInsertIntoImportTable { String fromResource; String toImportTableName; String importFormatName; DataImportConfigId dataImportConfigId; String duration; DataImportRunId dataImportRunId; int countTotalRows; int countValidRows; @JsonInclude(JsonInclude.Include.NON_EMPTY) List...
@Builder @JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE, isGetterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE) public static class JsonActualImport { String importTableName; String targetTableName; int countImportRecordsConsidered; int countInsertsInt...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\data_import\JsonDataImportResponse.java
2
请完成以下Java代码
public ResponseEntity<JsonResponseContact> retrieveContact( @ApiParam(required = true, value = CONTACT_IDENTIFIER_DOC) // @PathVariable("contactIdentifier") // @NonNull final String contactIdentifierStr) { final IdentifierString contactIdentifier = IdentifierString.of(contactIdentifierStr); final Optiona...
final JsonPersisterService persister = jsonServiceFactory.createPersister(); jsonRequestConsolidateService.consolidateWithIdentifier(contacts); for (final JsonRequestContactUpsertItem requestItem : contacts.getRequestItems()) { final JsonResponseUpsertItem responseItem = persister.persist( IdentifierStr...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\bpartner\ContactRestController.java
1
请完成以下Java代码
public static List getWayList(String way) { PayTypeEnum[] ary = PayTypeEnum.values(); List list = new ArrayList(); for (int i = 0; i < ary.length; i++) { if(ary[i].way.equals(way)){ Map<String, String> map = new HashMap<String, String>(); map.put("desc", ary[i].ge...
* * @return */ public static String getJsonStr() { PayTypeEnum[] enums = PayTypeEnum.values(); StringBuffer jsonStr = new StringBuffer("["); for (PayTypeEnum senum : enums) { if (!"[".equals(jsonStr.toString())) { jsonStr.append(","); } ...
repos\roncoo-pay-master\roncoo-pay-common-core\src\main\java\com\roncoo\pay\common\core\enums\PayTypeEnum.java
1
请完成以下Java代码
private Set<InvoiceCandidateId> voidAndReturnInvoiceCandIds(final I_C_Invoice invoice) { // NOTE: we have to separate voidAndReturnInvoiceCandIds and enqueueForInvoicing in 2 transactions because // InvoiceCandidateEnqueuer is calling updateSelectionBeforeEnqueueing in a new transaction (for some reason?!?) // a...
notificationBL.send(userNotificationRequest); return false; } return true; } @NonNull private IInvoicingParams getIInvoicingParams() { final PlainInvoicingParams invoicingParams = new PlainInvoicingParams(); invoicingParams.setUpdateLocationAndContactForInvoice(true); invoicingParams.setIgnoreInvoic...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\async\spi\impl\RecreateInvoiceWorkpackageProcessor.java
1
请完成以下Java代码
public void execute(Runnable runnable) { // 获取父线程MDC中的内容,必须在run方法之前,否则等异步线程执行的时候有可能MDC里面的值已经被清空了,这个时候就会返回null Map<String, String> context = MDC.getCopyOfContextMap(); super.execute(() -> run(runnable, context)); } /** * 子线程委托的执行方法 * * @param runnable {@link Runnable} ...
try { MDC.setContextMap(context); } catch (Exception e) { logger.error(e.getMessage(), e); } } try { // 执行异步操作 runnable.run(); } finally { // 清空MDC内容 MDC.clear(); } } }
repos\spring-boot-student-master\spring-boot-student-log\src\main\java\com\xiaolyuh\utils\MdcThreadPoolTaskExecutor.java
1
请完成以下Java代码
public class RemoveElementFromAnArray { public int[] removeAnElementWithAGivenIndex(int[] array, int index) { return ArrayUtils.remove(array, index); } public int[] removeAllElementsWithGivenIndices(int[] array, int... indices) { return ArrayUtils.removeAll(array, indices); } publ...
public int[] removeLastElementUsingCopyOfRangeMethod(int[] array) { return Arrays.copyOfRange(array, 0, array.length - 1); } public int[] removeLastElementUsingArrayCopyMethod(int[] array, int[] resultArray) { System.arraycopy(array, 0, resultArray, 0, array.length-1); return resultArra...
repos\tutorials-master\core-java-modules\core-java-arrays-operations-basic-3\src\main\java\com\baeldung\array\remove\RemoveElementFromAnArray.java
1
请在Spring Boot框架中完成以下Java代码
public void persistTwoBooks() { Book ar = new Book(); ar.setIsbn("001-AR"); ar.setTitle("Ancient Rome"); ar.setPrice(25); Book rh = new Book(); rh.setIsbn("001-RH"); rh.setTitle("Rush Hour"); rh.setPrice(31); bookRepository.save(ar); boo...
// cache List<Book> in "books" @Cacheable(cacheNames = "books") public List<Book> fetchBookByPrice() { List<Book> books = bookRepository.fetchByPrice(30); return books; } // evict cache "books" @CacheEvict(cacheNames="books", allEntries=true) public void deleteBo...
repos\Hibernate-SpringBoot-master\HibernateSpringBootSpringCacheEhCacheKickoff\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
public void setMKTG_Campaign_ID (int MKTG_Campaign_ID) { if (MKTG_Campaign_ID < 1) set_ValueNoCheck (COLUMNNAME_MKTG_Campaign_ID, null); else set_ValueNoCheck (COLUMNNAME_MKTG_Campaign_ID, Integer.valueOf(MKTG_Campaign_ID)); } /** Get MKTG_Campaign. @return MKTG_Campaign */ @Override public int ge...
/** Get Name. @return Alphanumeric identifier of the entity */ @Override public java.lang.String getName () { return (java.lang.String)get_Value(COLUMNNAME_Name); } /** Set Externe Datensatz-ID. @param RemoteRecordId Externe Datensatz-ID */ @Override public void setRemoteRecordId (java.lang.String R...
repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java-gen\de\metas\marketing\base\model\X_MKTG_Campaign.java
1
请完成以下Java代码
public final class AddHoursQueryFilterModifier implements IQueryFilterModifier { private static final String SQL_FUNC_AddHours = "addHours"; private final String hoursColumnSql; /** * * @param hoursColumn model column which contains the hours to add */ public AddHoursQueryFilterModifier(final String hoursCo...
if (columnName == null || columnName == COLUMNNAME_Constant) { return value; } // // ColumnName: add Hours to it else { final Date dateTime = toDate(value); if (dateTime == null) { return null; } final int hoursToAdd = getHours(model); return TimeUtil.addHours(dateTime, hoursToAdd);...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\AddHoursQueryFilterModifier.java
1
请完成以下Java代码
public boolean isSOTrx() { final I_C_Invoice invoice = getInvoice(); return invoice.isSOTrx(); } @Override public I_C_Country getC_Country() { final I_C_Invoice invoice = getInvoice(); if (invoice.getC_BPartner_Location_ID() <= 0) { return null; } final IBPartnerDAO bpartnerDAO = Services.get(I...
return bPartnerLocationRecord.getC_Location().getC_Country(); } private I_C_Invoice getInvoice() { final I_C_Invoice invoice = invoiceLine.getC_Invoice(); if (invoice == null) { throw new AdempiereException("Invoice not set for" + invoiceLine); } return invoice; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\adempiere\mm\attributes\countryattribute\impl\InvoiceLineCountryAware.java
1
请在Spring Boot框架中完成以下Java代码
public void customize(WebServiceTemplate webServiceTemplate) { webServiceTemplate.setCheckConnectionForFault(this.checkConnectionFault); } } /** * {@link WebServiceTemplateCustomizer} to set * {@link WebServiceTemplate#setCheckConnectionForError(boolean) * checkConnectionForError}. */ private static f...
* faultMessageResolver}. */ private static final class FaultMessageResolverCustomizer implements WebServiceTemplateCustomizer { private final FaultMessageResolver faultMessageResolver; private FaultMessageResolverCustomizer(FaultMessageResolver faultMessageResolver) { this.faultMessageResolver = faultMessag...
repos\spring-boot-4.0.1\module\spring-boot-webservices\src\main\java\org\springframework\boot\webservices\client\WebServiceTemplateBuilder.java
2
请完成以下Java代码
public String getDbHostname() { return getProperty(PROP_DB_SERVER, "localhost"); } public String getDbPort() { return getProperty(PROP_DB_PORT, "5432"); } public String getDbPassword() { return getProperty(PROP_DB_PASSWORD, // Default value is null because in case is not configured we shall use other...
{ final HashMap<Object, Object> result = new HashMap<>(properties); result.put(PROP_DB_PASSWORD, "******"); return result.toString(); } public DBConnectionSettings toDBConnectionSettings() { return DBConnectionSettings.builder() .dbHostname(getDbHostname()) .dbPort(getDbPort()) .dbName(getDbName...
repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.cli\src\main\java\de\metas\migration\cli\rollout_migrate\DBConnectionSettingProperties.java
1
请完成以下Java代码
public ProcessEngineException shellExecutionException(Throwable cause) { return new ProcessEngineException(exceptionMessage("034", "Could not execute shell command."), cause); } public void errorPropagationException(String activityId, Throwable cause) { logError("035", "Caught an exception while propagate ...
"042", "Execution with id '{}' throws an error event with errorCode '{}' and errorMessage '{}', but no error handler was defined. ", executionId, errorCode, errorMessage)); } public ProcessEngineException missingBoundaryCatchEventEscalation(String executionId, String escalationCode...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\behavior\BpmnBehaviorLogger.java
1
请完成以下Java代码
public String toString() { StringBuffer sb = new StringBuffer ("X_C_CycleStep[") .append(get_ID()).append("]"); return sb.toString(); } public I_C_Cycle getC_Cycle() throws RuntimeException { return (I_C_Cycle)MTable.get(getCtx(), I_C_Cycle.Table_Name) .getPO(getC_Cycle_ID(), get_...
@param RelativeWeight Relative weight of this step (0 = ignored) */ public void setRelativeWeight (BigDecimal RelativeWeight) { set_Value (COLUMNNAME_RelativeWeight, RelativeWeight); } /** Get Relative Weight. @return Relative weight of this step (0 = ignored) */ public BigDecimal getRelativeWeight (...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_CycleStep.java
1
请完成以下Java代码
public void setIp(String ip) { this.ip = ip; } @Override public Integer getPort() { return port; } public void setPort(Integer port) { this.port = port; } public String getLimitApp() { return limitApp; } public void setLimitApp(String limitApp) {
this.limitApp = limitApp; } public String getResource() { return resource; } public void setResource(String resource) { this.resource = resource; } @Override public Rule toRule() { ParamFlowRule rule = new ParamFlowRule(); return rule; } }
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-sentinel\src\main\java\com\alibaba\csp\sentinel\dashboard\rule\nacos\entity\ParamFlowRuleCorrectEntity.java
1
请完成以下Java代码
public final C_AllocationLine_Builder paymentId(@Nullable final PaymentId paymentId) { return paymentId(PaymentId.toRepoId(paymentId)); } public final C_AllocationLine_Builder paymentId(final int paymentId) { allocLine.setC_Payment_ID(paymentId); return this; } public final C_AllocationLine_Builder amount...
&& allocLine.getPaymentWriteOffAmt().signum() == 0; } public final C_AllocationHdr_Builder lineDone() { return parent; } /** * @param allocHdrSupplier allocation header supplier which will provide the allocation header created & saved, just in time, so call it ONLY if you are really gonna create an allocatio...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\allocation\api\C_AllocationLine_Builder.java
1
请在Spring Boot框架中完成以下Java代码
public String getById(@PathVariable String id) throws Exception { SolrDocument document = solrService.getById(db_core,id); System.out.println(document); return document.toString(); } /** * 综合查询: 在综合查询中, 有按条件查询, 条件过滤, 排序, 分页, 高亮显示, 获取部分域信息 * @return */ @RequestMapping(...
// 2、创建索引 Mono<String> result = WebClient.create(solrHost) .get() .uri(fileDataImport) .retrieve() .bodyToMono(String.class); System.out.println(result.block()); return "success"; } /** * 综合查询: 在综合查询中, 有按条件查询, 条件过滤, 排序...
repos\springboot-demo-master\solr\src\main\java\demo\et59\solr\controller\SolrController.java
2
请在Spring Boot框架中完成以下Java代码
public int size() { return this.loaders.size(); } @Override public boolean isEmpty() { return this.loaders.isEmpty(); } @Override public boolean containsKey(Object key) { return this.loaders.containsKey(key); } @Override public Set<K> keySet() { return this.loaders.keySet(); } @Ove...
} @Override public void clear() { this.loaded.clear(); } @Override public boolean containsValue(Object value) { return this.loaded.containsValue(value); } @Override public Collection<V> values() { return this.loaded.values(); } @Override public Set<Entry<K, V>> entrySet() { return ...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configuration\SecurityReactorContextConfiguration.java
2
请完成以下Java代码
default @Nullable Integer getIdle() { return null; } /** * Return the maximum number of active connections that can be allocated at the same * time or {@code -1} if there is no limit. Can also return {@code null} if that * information is not available. * @return the maximum number of active connections or ...
/** * Return the query to use to validate that a connection is valid or {@code null} if * that information is not available. * @return the validation query or {@code null} */ @Nullable String getValidationQuery(); /** * The default auto-commit state of connections created by this pool. If not set * ({@co...
repos\spring-boot-4.0.1\module\spring-boot-jdbc\src\main\java\org\springframework\boot\jdbc\metadata\DataSourcePoolMetadata.java
1
请完成以下Java代码
public Builder notBefore(Instant notBefore) { return claim(OAuth2TokenClaimNames.NBF, notBefore); } /** * Sets the issued at {@code (iat)} claim, which identifies the time at which the * OAuth 2.0 Token was issued. * @param issuedAt the time at which the OAuth 2.0 Token was issued * @return the {@li...
* A {@code Consumer} to be provided access to the claims allowing the ability to * add, replace, or remove. * @param claimsConsumer a {@code Consumer} of the claims * @return the {@link Builder} */ public Builder claims(Consumer<Map<String, Object>> claimsConsumer) { claimsConsumer.accept(this.claims);...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\token\OAuth2TokenClaimsSet.java
1
请完成以下Java代码
public class UsingOptional { public static final String DEFAULT_VALUE = "Default Value"; public Optional<Object> process(boolean processed) { String response = doSomething(processed); return Optional.ofNullable(response); } public String findFirst() { return getList() ...
.flatMap(list -> list.stream().findFirst()); } private Optional<List<String>> getOptionalList() { return Optional.of(getList()); } private String doSomething(boolean processed) { if (processed) { return "passed"; } else { return null; } } }
repos\tutorials-master\patterns-modules\design-patterns-behavioral\src\main\java\com\baeldung\nulls\UsingOptional.java
1
请完成以下Java代码
public class MigratingCalledCaseInstance implements MigratingInstance { public static final MigrationLogger MIGRATION_LOGGER = ProcessEngineLogger.MIGRATION_LOGGER; protected CaseExecutionEntity caseInstance; public MigratingCalledCaseInstance(CaseExecutionEntity caseInstance) { this.caseInstance = caseIns...
@Override public void attachState(MigratingTransitionInstance targetTransitionInstance) { throw MIGRATION_LOGGER.cannotAttachToTransitionInstance(this); } @Override public void migrateState() { // nothing to do } @Override public void migrateDependentEntities() { // nothing to do } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingCalledCaseInstance.java
1
请完成以下Java代码
public abstract class InfoQueryCriteriaBPRadiusAbstract implements IInfoQueryCriteria { public static final String SYSCONFIG_DefaultRadius = "de.metas.radiussearch.DefaultRadius"; protected String locationTableAlias = "a"; private IInfoSimple parent; private I_AD_InfoColumn infoColumn; @Override public void...
@Override public Object getParameterToComponent(int index) { return null; } @Override public Object getParameterValue(int index, boolean returnValueTo) { return null; } public IInfoSimple getParent() { return parent; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\compiere\apps\search\InfoQueryCriteriaBPRadiusAbstract.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable String getType() { return this.type; } public void setType(@Nullable String type) { this.type = type; } public @Nullable String getProvider() { return this.provider; } public void setProvider(@Nullable String provider) { this.provider = provider; } public @Nullable Strin...
return this.location; } public void setLocation(@Nullable String location) { this.location = location; } public @Nullable String getPassword() { return this.password; } public void setPassword(@Nullable String password) { this.password = password; } } }
repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\ssl\JksSslBundleProperties.java
2
请完成以下Java代码
public java.math.BigDecimal getOpenItems () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_OpenItems); if (bd == null) return BigDecimal.ZERO; return bd; } /** Set Kredit gewährt. @param SO_CreditUsed Gegenwärtiger Aussenstand */ @Override public void setSO_CreditUsed (java.math.BigDecimal ...
public static final int SOCREDITSTATUS_AD_Reference_ID=289; /** CreditStop = S */ public static final String SOCREDITSTATUS_CreditStop = "S"; /** CreditHold = H */ public static final String SOCREDITSTATUS_CreditHold = "H"; /** CreditWatch = W */ public static final String SOCREDITSTATUS_CreditWatch = "W"; /** N...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_Stats.java
1
请完成以下Spring Boot application配置
server.port=8088 #rabbitmq spring.rabbitmq.host=localhost spring.rabbitmq.port=5672 spring.rabbitmq.username=admin spring.rabbitmq.password=admin spring.rabbitmq.virtual-host=my_vhost man
agement.endpoints.web.exposure.include=* management.endpoint.shutdown.enabled=true
repos\springboot-demo-master\rabbitmq\src\main\resources\application.properties
2
请在Spring Boot框架中完成以下Java代码
private void removeFromStarred(UserDashboardsInfo stored, DashboardId dashboardId) { UUID id = dashboardId.getId(); stored.getStarred().removeIf(filterById(id)); stored.getLast().stream().filter(d -> id.equals(d.getId())).findFirst().ifPresent(d -> d.setStarred(false)); } private void a...
private UserDashboardsInfo refreshDashboardTitles(TenantId tenantId, UserDashboardsInfo stored) { if (stored == null) { return UserDashboardsInfo.EMPTY; } stored.getLast().forEach(i -> i.setTitle(null)); stored.getStarred().forEach(i -> i.setTitle(null)); Set<UUID> u...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\entitiy\user\DefaultTbUserSettingsService.java
2
请完成以下Java代码
public int getFullVersion() { return majorVersion * 1000000 + minorVersion * 1000 + fixVersion; } public int getMajorVersion() { return majorVersion; } public SentinelVersion setMajorVersion(int majorVersion) { this.majorVersion = majorVersion; return this; } p...
return true; } return getFullVersion() >= version.getFullVersion(); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SentinelVersion that = (SentinelVersion)o; if (g...
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\datasource\entity\SentinelVersion.java
1
请完成以下Java代码
public void clear() { queuesMap.clear(); } public FrontendPrinterData toFrontendPrinterData() { return queuesMap.values() .stream() .map(PrinterQueue::toFrontendPrinterData) .collect(GuavaCollectors.collectUsingListAccumulator(FrontendPrinterData::of)); } } @RequiredArgsConstructor p...
{ pdfWriter.addArchivePartToPDF(printingDataAndSegment.getPrintingData(), printingDataAndSegment.getSegment()); } } return baos.toByteArray(); } private String suggestFilename() { final ImmutableSet<String> filenames = segments.stream() .map(PrintingDataAndSegment::getDocumentFileName) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\frontend\FrontendPrinter.java
1
请完成以下Java代码
private void collectHUTransactionCandidate(final IHUTransactionCandidate huTransaction) { final I_M_HU hu = huTransaction.getM_HU(); if (hu == null) { return; } final Quantity quantity = huTransaction.getQuantity(); if (quantity.isZero()) { return; } final I_M_HU topLevelHU = hand...
// // // // private interface LUTUSpec { } @Value private static class HUPIItemProductLUTUSpec implements LUTUSpec { public static final HUPIItemProductLUTUSpec VIRTUAL = new HUPIItemProductLUTUSpec(HUPIItemProductId.VIRTUAL_HU, null); @NonNull HUPIItemProductId tuPIItemProductId; @Nullable HuPackingI...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pporder\api\impl\AbstractPPOrderReceiptHUProducer.java
1
请完成以下Java代码
protected ProcessPreconditionsResolution checkPreconditionsApplicable() { if(!isHUEditorView()) { return ProcessPreconditionsResolution.rejectWithInternalReason("not the HU view"); } if (!streamSelectedHUIds(Select.ONLY_TOPLEVEL).findAny().isPresent()) { return ProcessPreconditionsResolution.reject(ms...
final Timestamp movementDate = Env.getDate(getCtx()); returnsServiceFacade.createVendorReturnInOutForHUs(husToReturn, movementDate); return MSG_OK; } @Override protected void postProcess(final boolean success) { if (husToReturn != null && !husToReturn.isEmpty()) { getView().removeHUsAndInvalidate(husToR...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_HU_ReturnToVendor.java
1
请完成以下Java代码
public String getDescription () { return (String)get_Value(COLUMNNAME_Description); } /** Set Increment. @param IncrementNo The number to increment the last document number by */ public void setIncrementNo (int IncrementNo) { set_Value (COLUMNNAME_IncrementNo, Integer.valueOf(IncrementNo)); } /** ...
/** Get Prefix. @return Prefix before the sequence number */ public String getPrefix () { return (String)get_Value(COLUMNNAME_Prefix); } /** Set Start No. @param StartNo Starting number/position */ public void setStartNo (int StartNo) { set_Value (COLUMNNAME_StartNo, Integer.valueOf(StartNo)); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_LotCtl.java
1
请完成以下Java代码
public List<I_C_BPartner_Product> getBPartnerProductRecords(final Set<ProductId> productIds) { return partnerProductsRepo.retrieveForProductIds(productIds); } public List<I_M_HU_PI_Item_Product> getMHUPIItemProductRecords(final Set<ProductId> productIds) { return huPIItemProductDAO.retrieveAllForProducts(produ...
public List<I_C_BPartner> getPartnerRecords(@NonNull final ImmutableSet<BPartnerId> manufacturerIds) { return queryBL.createQueryBuilder(I_C_BPartner.class) .addInArrayFilter(I_C_BPartner.COLUMN_C_BPartner_ID, manufacturerIds) .create() .list(); } @NonNull public JsonCreatedUpdatedInfo extractCreated...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\product\ProductsServicesFacade.java
1
请完成以下Java代码
public class CashAccount16 { @XmlElement(name = "Id", required = true) protected AccountIdentification4Choice id; @XmlElement(name = "Tp") protected CashAccountType2 tp; @XmlElement(name = "Ccy") protected String ccy; @XmlElement(name = "Nm") protected String nm; /** * Gets th...
} /** * Gets the value of the ccy property. * * @return * possible object is * {@link String } * */ public String getCcy() { return ccy; } /** * Sets the value of the ccy property. * * @param value * allowed object is ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\CashAccount16.java
1
请完成以下Java代码
public static void updateOperations() { UpdateOptions options = new UpdateOptions().upsert(true); UpdateResult updateResult = collection.updateOne(Filters.eq("modelName", "X5"), Updates.combine(Updates.set("companyName", "Hero Honda")), options); System.out.println("updateResult:- " + updateResu...
public static void main(String args[]) { // // Connect to cluster (default is localhost:27017) // setUp(); // // Update with upsert operation // updateOperations(); // // Update with upsert operation using setOnInsert // ...
repos\tutorials-master\persistence-modules\java-mongodb-2\src\main\java\com\baeldung\mongo\update\UpsertOperations.java
1
请完成以下Java代码
public List<HistoricIdentityLink> getHistoricIdentityLinksForProcessInstance(String processInstanceId) { return commandExecutor.execute(new GetHistoricIdentityLinksForTaskCmd(null, processInstanceId)); } @Override public List<HistoricIdentityLink> getHistoricIdentityLinksForTask(String taskId) { ...
commandExecutor.execute(new DeleteHistoricTaskLogEntryByLogNumberCmd(logNumber)); } @Override public HistoricTaskLogEntryBuilder createHistoricTaskLogEntryBuilder(TaskInfo task) { return new HistoricTaskLogEntryBuilderImpl(commandExecutor, task, configuration.getTaskServiceConfiguration()); } ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\HistoryServiceImpl.java
1
请完成以下Java代码
public org.activiti.engine.task.Comment getRawObject() { return activit5Comment; } @Override public void setUserId(String userId) { ((CommentEntity) activit5Comment).setUserId(userId); } @Override public void setTime(Date time) { ((CommentEntity) activit5Comment).setTim...
@Override public void setProcessInstanceId(String processInstanceId) { ((CommentEntity) activit5Comment).setProcessInstanceId(processInstanceId); } @Override public void setType(String type) { ((CommentEntity) activit5Comment).setType(type); } @Override public void setFullM...
repos\flowable-engine-main\modules\flowable5-compatibility\src\main\java\org\flowable\compatibility\wrapper\Flowable5CommentWrapper.java
1
请完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } public AddressEntity getAddress() { return address; } public void setAddress(AddressEntity address) { this.address = address; } public String getName() { return...
this.enabled = enabled; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; UserEntity that = (UserEntity) o; return Objects.equals(id, that.id); } @Override public int hashCode() {...
repos\spring-examples-java-17\spring-data\src\main\java\itx\examples\springdata\entity\UserEntity.java
1
请完成以下Java代码
private void storePDFAndFireEvent( @NonNull final IPrintingQueueSource source, @NonNull final I_C_Printing_Queue item, @NonNull final PrintingData printingDataToStore) { printingDataToPDFFileStorer.storeInFileSystem(printingDataToStore); // // Notify archiveEventManager.firePrintOut( item.getAD_A...
@NonNull final PrintingData printingData) { frontendPrinter.add(printingData); // // Notify archiveEventManager.firePrintOut( item.getAD_Archive(), source.getProcessingInfo().getAD_User_PrintJob_ID(), printingData.getPrinterNames(), IArchiveEventManager.COPIES_ONE, ArchivePrintOutStatus.Su...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\PrintOutputFacade.java
1
请完成以下Java代码
protected QueryVariableValue createQueryVariableValue(String name, Object value, QueryOperator operator, boolean processInstanceScope) { validateVariable(name, value, operator); boolean shouldMatchVariableValuesIgnoreCase = Boolean.TRUE.equals(variableValuesIgnoreCase) && value != null && String.class.isAssign...
if (!getQueryVariableValues().isEmpty()) { ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration(); VariableSerializers variableSerializers = processEngineConfiguration.getVariableSerializers(); String dbType = processEngineConfiguration.getDatabaseType(); ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\AbstractVariableQueryImpl.java
1
请完成以下Java代码
public int getC_BPartner_ID() { return get_ValueAsInt(COLUMNNAME_C_BPartner_ID); } @Override public void setGLN (final @Nullable java.lang.String GLN) { set_Value (COLUMNNAME_GLN, GLN); } @Override public java.lang.String getGLN() { return get_ValueAsString(COLUMNNAME_GLN); } @Override public voi...
public java.lang.String getLookup_Label() { return get_ValueAsString(COLUMNNAME_Lookup_Label); } @Override public void setStoreGLN (final @Nullable java.lang.String StoreGLN) { set_Value (COLUMNNAME_StoreGLN, StoreGLN); } @Override public java.lang.String getStoreGLN() { return get_ValueAsString(COLU...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_C_BPartner_Lookup_BPL_GLN_v.java
1
请完成以下Java代码
private List<ServiceModWithSelector> createServiceModsWithSelectors( @NonNull final InvoiceToExport invoice, @NonNull final List<XmlService> xServices) { final ImmutableList.Builder<ServiceModWithSelector> serviceMods = ImmutableList.builder(); final ImmutableMap<Integer, XmlService> // recordId2xService ...
serviceMods.add(serviceMod.build()); } return serviceMods.build(); } /** attach 2ndary attachments to our XML */ private List<XmlDocument> createDocuments(@NonNull final List<InvoiceAttachment> invoiceAttachments) { final ImmutableList.Builder<XmlDocument> xmldocuments = ImmutableList.builder(); for (fina...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_base\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\base\export\invoice\InvoiceExportClientImpl.java
1
请完成以下Java代码
public void insertByteArray(ByteArrayEntity arr) { arr.setCreateTime(ClockUtil.getCurrentTime()); getDbEntityManager().insert(arr); } public DbOperation addRemovalTimeToByteArraysByRootProcessInstanceId(String rootProcessInstanceId, Date removalTime, Integer batchSize) { Map<String, Object> parameters ...
operations.add(getDbEntityManager() .updatePreserveOrder(ByteArrayEntity.class, "updateDecisionInputsByteArraysByProcessInstanceId", parameters)); operations.add(getDbEntityManager() .updatePreserveOrder(ByteArrayEntity.class, "updateDecisionOutputsByteArraysByProcessInstanceId", parameters)); opera...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\ByteArrayManager.java
1
请完成以下Java代码
private WEBUI_M_HU_Pick_ParametersFiller createNewDefaultParametersFiller() { final HURow row = getSingleHURow(); return WEBUI_M_HU_Pick_ParametersFiller.defaultFillerBuilder() .huId(row.getHuId()) .salesOrderLineId(getSalesOrderLineId()) .build(); } @ProcessParamLookupValuesProvider(// parameter...
.pickingSlotId(pickingSlotId) .build(); final ProcessPickingRequest.ProcessPickingRequestBuilder pickingRequestBuilder = ProcessPickingRequest.builder() .huIds(ImmutableSet.of(huId)) .shipmentScheduleId(shipmentScheduleId) .isTakeWholeHU(isTakeWholeHU); final IView view = getView(); if (view ins...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_HU_Pick.java
1
请完成以下Java代码
public ClientSetup setC_Bank_ID(final int bankId) { if (bankId > 0) { orgBankAccount.setC_Bank_ID(bankId); } return this; } public final int getC_Bank_ID() { return orgBankAccount.getC_Bank_ID(); } public ClientSetup setPhone(final String phone) { if (!Check.isEmpty(phone, true)) { // NOTE:...
if (!Check.isEmpty(email, true)) { // NOTE: we are not setting the Phone, Fax, EMail on C_BPartner_Location because those fields are hidden in BPartner window orgContact.setEMail(email.trim()); } return this; } public final String getEMail() { return orgContact.getEMail(); } public ClientSetup setB...
repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\de\metas\fresh\setup\process\ClientSetup.java
1
请完成以下Java代码
public Title getTitle() { return title; } public void setTitle(Title title) { this.title = title; } public Tooltip getTooltip() { return tooltip; } public void setTooltip(Tooltip tooltip) { this.tooltip = tooltip; } public Legend getLegend() { ...
public XAxis getxAxis() { return xAxis; } public void setxAxis(XAxis xAxis) { this.xAxis = xAxis; } public YAxis getyAxis() { return yAxis; } public void setyAxis(YAxis yAxis) { this.yAxis = yAxis; } public List<Serie> getSeries() { return seri...
repos\SpringBootBucket-master\springboot-echarts\src\main\java\com\xncoding\echarts\api\model\jmh\Option.java
1
请在Spring Boot框架中完成以下Java代码
public class RelatedDocumentsType { @XmlElement(name = "RelatedDocumentReference") protected List<String> relatedDocumentReference; /** * Gets the value of the relatedDocumentReference property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot...
* * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getRelatedDocumentReference() { if (relatedDocumentReference == null) { relatedDocumentReference = new ArrayList<String>(); } r...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\RelatedDocumentsType.java
2
请完成以下Java代码
public boolean isComponent() { return this == Component; } public boolean isPacking() { return this == Packing; } public boolean isComponentOrPacking() { return isComponent() || isPacking(); } public boolean isCoProduct() { return this == CoProduct; } public boolean isByProduct() { return thi...
public boolean isPhantom() { return this == Phantom; } public boolean isTools() { return this == Tools; } // public boolean isReceipt() { return isByOrCoProduct(); } public boolean isIssue() { return !isReceipt(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\eevolution\api\BOMComponentType.java
1
请完成以下Java代码
static JsonDocument insertExample(Bucket bucket) { JsonObject content = JsonObject.empty().put("name", "John Doe").put("type", "Person").put("email", "john.doe@mydomain.com").put("homeTown", "Chicago"); String id = UUID.randomUUID().toString(); JsonDocument document = JsonDocument.create(id, con...
return bucket.get(id); } catch (CouchbaseException e) { List<JsonDocument> list = bucket.getFromReplica(id, ReplicaMode.FIRST); if (!list.isEmpty()) { return list.get(0); } } return null; } static JsonDocument getLatestReplicaVersion(B...
repos\tutorials-master\persistence-modules\couchbase\src\main\java\com\baeldung\couchbase\intro\CodeSnippets.java
1
请完成以下Java代码
public static Map<String, Object> convertParametersMapToJson(@Nullable final Map<?, Object> map, @NonNull final String adLanguage) { if (map == null || map.isEmpty()) { return ImmutableMap.of(); } return map .entrySet() .stream() .map(e -> GuavaCollectors.entry( convertParameterToStringJs...
@NonNull private static String convertParameterToStringJson(@Nullable final Object value, @NonNull final String adLanguage) { if (value == null || Null.isNull(value)) { return "<null>"; } else if (value instanceof ITranslatableString) { return ((ITranslatableString)value).translate(adLanguage); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\rest_api\utils\v2\JsonErrors.java
1
请在Spring Boot框架中完成以下Java代码
public class GolferService { private final GemfireTemplate golfersTemplate; private final GolferRepository golferRepository; public GolferService(@Qualifier("golfersTemplate") GemfireTemplate golfersTemplate, GolferRepository golferRepository) { Assert.notNull(golfersTemplate, "GolfersTemplate must not be n...
// end::cache-put[] public List<Golfer> getAllGolfersFromCache() { Map<String, Golfer> golferMap = CollectionUtils.nullSafeMap(this.golfersTemplate.getAll(resolveKeys(this.golfersTemplate.getRegion()))); return CollectionUtils.sort(new ArrayList<>(golferMap.values())); } public List<Golfer> getAllGolfersF...
repos\spring-boot-data-geode-main\spring-geode-samples\caching\inline-async\src\main\java\example\app\caching\inline\async\client\service\GolferService.java
2
请完成以下Java代码
public void setName(String name) { this.name = name; } public List<Student> getStudents() { return students; } public void setStudents(List<Student> students) { this.students = students; } @GET @Path("{studentId}") public Student getStudent(@PathParam("studentI...
students.remove(student); return Response.ok().build(); } private Student findById(int id) { for (Student student : students) { if (student.getId() == id) { return student; } } return null; } @Override public int hashCode() { ...
repos\tutorials-master\apache-cxf-modules\cxf-jaxrs-implementation\src\main\java\com\baeldung\cxf\jaxrs\implementation\Course.java
1
请在Spring Boot框架中完成以下Java代码
public class RabbitMqConfig { /** * 订单消息实际消费队列所绑定的交换机 */ @Bean DirectExchange orderDirect() { return ExchangeBuilder .directExchange(QueueEnum.QUEUE_ORDER_CANCEL.getExchange()) .durable(true) .build(); } /** * 订单延迟队列所绑定的交换机 ...
/** * 将订单队列绑定到交换机 */ @Bean Binding orderBinding(DirectExchange orderDirect,Queue orderQueue){ return BindingBuilder .bind(orderQueue) .to(orderDirect) .with(QueueEnum.QUEUE_ORDER_CANCEL.getRouteKey()); } /** * 将订单延迟队列绑定到交换机 */ ...
repos\mall-master\mall-portal\src\main\java\com\macro\mall\portal\config\RabbitMqConfig.java
2
请在Spring Boot框架中完成以下Java代码
public JSONObject addUser(@RequestBody JSONObject requestJson) { CommonUtil.hasAllRequired(requestJson, "username, password, nickname, roleIds"); return userService.addUser(requestJson); } @RequiresPermissions("user:update") @PostMapping("/updateUser") public JSONObject updateUser(@Requ...
public JSONObject addRole(@RequestBody JSONObject requestJson) { CommonUtil.hasAllRequired(requestJson, "roleName,permissions"); return userService.addRole(requestJson); } /** * 修改角色 */ @RequiresPermissions("role:update") @PostMapping("/updateRole") public JSONObject updat...
repos\SpringBoot-Shiro-Vue-master\back\src\main\java\com\heeexy\example\controller\UserController.java
2
请完成以下Java代码
public Optional<Car> findByModel(String model) { return stream().where(c -> c.getModel() .equals(model)) .findFirst(); } @Override public List<Car> findByModelAndDescription(String model, String desc) { return stream().where(c -> c.getModel() .equals(mode...
return stream().where(c -> c.getModel() .equals(model)) .count(); } @Override public List<Car> findAll(int skip, int limit) { return stream().skip(skip) .limit(limit) .toList(); } @Override protected Class<Car> entityType() { retu...
repos\tutorials-master\spring-jinq\src\main\java\com\baeldung\spring\jinq\repositories\CarRepositoryImpl.java
1
请完成以下Java代码
public String getFieldName() { return fieldName; } public void setFieldName(String fieldName) { this.fieldName = fieldName; } public String getStringValue() { return stringValue; } public void setStringValue(String stringValue) { this.stringValue = stringValue;...
} public void setExpression(String expression) { this.expression = expression; } public FieldExtension clone() { FieldExtension clone = new FieldExtension(); clone.setValues(this); return clone; } public void setValues(FieldExtension otherExtension) { setFi...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\FieldExtension.java
1
请完成以下Java代码
public class Person { private String name; private FullName fullName; private int age; private Date birthday; private List<String> hobbies; private Map<String, String> clothes; private List<Person> friends; public String getName() { return name; } public void setName(St...
} public Map<String, String> getClothes() { return clothes; } public void setClothes(Map<String, String> clothes) { this.clothes = clothes; } public List<Person> getFriends() { return friends; } public void setFriends(List<Person> friends) { this.friends =...
repos\SpringBootBucket-master\springboot-echarts\src\main\java\com\xncoding\benchmark\json\model\Person.java
1
请在Spring Boot框架中完成以下Java代码
public String xxlJobAdd() { Map<String, Object> jobInfo = Maps.newHashMap(); jobInfo.put("jobGroup", 2); jobInfo.put("jobCron", "0 0/1 * * * ? *"); jobInfo.put("jobDesc", "手动添加的任务"); jobInfo.put("author", "admin"); jobInfo.put("executorRouteStrategy", "ROUND"); jo...
HttpResponse execute = HttpUtil.createGet(baseUri + JOB_INFO_URI + "/remove").form(jobInfo).execute(); log.info("【execute】= {}", execute); return execute.body(); } /** * 测试手动停止任务 */ @GetMapping("/stop") public String xxlJobStop() { Map<String, Object> jobInfo = Maps.ne...
repos\spring-boot-demo-master\demo-task-xxl-job\src\main\java\com\xkcoding\task\xxl\job\controller\ManualOperateController.java
2
请完成以下Java代码
public void setProjectCategory (final @Nullable java.lang.String ProjectCategory) { set_ValueNoCheck (COLUMNNAME_ProjectCategory, ProjectCategory); } @Override public java.lang.String getProjectCategory() { return get_ValueAsString(COLUMNNAME_ProjectCategory); } @Override public void setProjectName (fina...
} @Override public java.lang.String getSalesRep_Name() { return get_ValueAsString(COLUMNNAME_SalesRep_Name); } @Override public void setTaxID (final java.lang.String TaxID) { set_ValueNoCheck (COLUMNNAME_TaxID, TaxID); } @Override public java.lang.String getTaxID() { return get_ValueAsString(COLUM...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Project_Header_v.java
1
请完成以下Java代码
public String getExpressionString() { return "@CustomSequenceNo@"; } @Override public Set<CtxName> getParameters() { return PARAMETERS; } @Override public String evaluate(final Evaluatee ctx, final IExpressionEvaluator.OnVariableNotFound onVariableNotFound) throws ExpressionEvaluationException { final ...
final String sequenceNo = documentNoFactory.forSequenceId(sequenceId) .setFailOnError(onVariableNotFound.equals(IExpressionEvaluator.OnVariableNotFound.Fail)) .setClientId(adClientId) .build(); if (sequenceNo == null && onVariableNotFound == IExpressionEvaluator.OnVariableNotFound.Fail) { throw new ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\DocSequenceAwareFieldStringExpression.java
1