instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public ProductTaxCategory createProductTaxCategory(@NonNull final CreateProductTaxCategoryRequest request) { final I_M_Product_TaxCategory productTaxCategoryRecord = newInstance(I_M_Product_TaxCategory.class); productTaxCategoryRecord.setM_Product_ID(request.getProductId().getRepoId()); productTaxCategoryRecord...
} @NonNull private I_M_Product_TaxCategory toRecord(@NonNull final ProductTaxCategory productTaxCategory) { final I_M_Product_TaxCategory record = Optional.ofNullable(getRecordById(productTaxCategory.getProductTaxCategoryId())) .orElseThrow(() -> new AdempiereException("No Product Tax Category found for ID...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\tax\ProductTaxCategoryRepository.java
1
请完成以下Java代码
public class WebExpressionVoter implements AccessDecisionVoter<FilterInvocation> { private final Log logger = LogFactory.getLog(getClass()); private SecurityExpressionHandler<FilterInvocation> expressionHandler = new DefaultWebSecurityExpressionHandler(); @Override public int vote(Authentication authentication, ...
return null; } @Override public boolean supports(ConfigAttribute attribute) { return attribute instanceof WebExpressionConfigAttribute; } @Override public boolean supports(Class<?> clazz) { return FilterInvocation.class.isAssignableFrom(clazz); } public void setExpressionHandler(SecurityExpressionHandler...
repos\spring-security-main\access\src\main\java\org\springframework\security\web\access\expression\WebExpressionVoter.java
1
请完成以下Java代码
public List<Data> getDataInputs() { return unmodifiableList(this.dataInputs); } public List<Data> getDataOutputs() { return unmodifiableList(this.dataOutputs); } public void addInput(Data data) { this.dataInputs.add(data); } public void addOutput(Data data) { t...
this.dataOutputRefs.add(dataRef); } public String getFirstDataInputName() { return this.dataInputs.get(0).getName(); } public String getFirstDataOutputName() { if (this.dataOutputs != null && !this.dataOutputs.isEmpty()) { return this.dataOutputs.get(0).getName(); }...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\data\IOSpecification.java
1
请完成以下Java代码
public void executeHUReport() { final I_C_OrderLine orderLine = receiptSchedule.getC_OrderLine(); // // service final ISysConfigBL sysConfigBL = Services.get(ISysConfigBL.class); // // Get Process from SysConfig final int reportProcessId = sysConfigBL.getIntValue(SYSCONFIG_ReceiptScheduleHUPOSJasper_Pr...
.setProcessCalledFrom(ProcessCalledFrom.WebUI) // .setAD_PInstance_ID() // NO AD_PInstance => we want a new instance .setRecord(I_C_OrderLine.Table_Name, orderLineId) .setWindowNo(windowNo) .setReportLanguage(bpartnerLaguage) .addParameter(PARA_C_Orderline_ID, orderLineId) .addParameter(PARA_AD_...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\report\HUReceiptScheduleReportExecutor.java
1
请在Spring Boot框架中完成以下Java代码
static class EnableSecurityCondition extends AllNestedConditions { EnableSecurityCondition() { super(ConfigurationPhase.PARSE_CONFIGURATION); } @ConditionalOnProperty(name = CLOUD_SECURITY_ENVIRONMENT_POST_PROCESSOR_ENABLED_PROPERTY, havingValue = "true", matchIfMissing = true) static class SpringBootDa...
static class SpringDataGemFirePropertiesPropertySource extends PropertySource<Properties> { private static final String SPRING_DATA_GEMFIRE_PROPERTIES_PROPERTY_SOURCE_NAME = "spring.data.gemfire.properties"; SpringDataGemFirePropertiesPropertySource(Properties springDataGemFireProperties) { this(SPRING_DATA...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\ClientSecurityAutoConfiguration.java
2
请完成以下Java代码
protected Optional<URI> determineRequestUri(ServerWebExchange exchange, Config config) { try { String url = getUri(exchange, config); URI uri = URI.create(url); if (!uri.isAbsolute()) { log.info("Request url is invalid: url={}, error=URI is not absolute", url); return Optional.ofNullable(null); } ...
public static class Config { private @Nullable String template; public @Nullable String getTemplate() { return template; } public void setTemplate(String template) { this.template = template; } } }
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\SetRequestUriGatewayFilterFactory.java
1
请完成以下Java代码
public I_IMP_Processor getIMP_Procesor() { return impProcessor; } @Override public int getAD_Client_ID() { return impProcessor.getAD_Client_ID(); } @Override public String getName() { return impProcessor.getName(); } @Override public String getDescription() { return impProcessor.getDescription()...
@Override public Timestamp getDateLastRun() { return impProcessor.getDateLastRun(); } @Override public void setDateLastRun(Timestamp dateLastRun) { impProcessor.setDateLastRun(dateLastRun); } @Override public boolean saveOutOfTrx() { InterfaceWrapperHelper.save(impProcessor, ITrx.TRXNAME_None); retu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\server\rpl\api\impl\IMPProcessorAdempiereProcessorAdapter.java
1
请完成以下Java代码
public void actionPerformed(ActionEvent e) { yesAllB_actionPerformed(e); } }); //yesAllB.setFocusable(false); buttonsPanel.setLayout(flowLayout1); panel1.setBorder(border1); areaPanel.setLayout(borderLayout3); areaPanel.setBorder(border2); ...
areaPanel.add(textLabel, BorderLayout.WEST); panel1.add(buttonsPanel, BorderLayout.SOUTH); buttonsPanel.add(yesAllB, null); buttonsPanel.add(noB, null); buttonsPanel.add(cancelB, null); } void yesAllB_actionPerformed(ActionEvent e) { option = YES_TO_ALL_OPTION;...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\net\sf\memoranda\ui\htmleditor\ReplaceOptionsDialog.java
1
请在Spring Boot框架中完成以下Java代码
public Duration getCloseNotifyReadTimeout() { return closeNotifyReadTimeout; } public void setCloseNotifyReadTimeout(Duration closeNotifyReadTimeout) { this.closeNotifyReadTimeout = closeNotifyReadTimeout; } public String getSslBundle() { return sslBundle; } public void setSslBundle(String sslBu...
public Integer getMaxFramePayloadLength() { return this.maxFramePayloadLength; } public void setMaxFramePayloadLength(Integer maxFramePayloadLength) { this.maxFramePayloadLength = maxFramePayloadLength; } public boolean isProxyPing() { return proxyPing; } public void setProxyPing(boolean proxyPi...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\config\HttpClientProperties.java
2
请完成以下Java代码
private IncotermsMap retrieveIncotermsMap() { final ImmutableList<Incoterms> incoterms = queryBL.createQueryBuilder(I_C_Incoterms.class) .addOnlyActiveRecordsFilter() .create() .stream() .map(IncotermsRepository::ofRecord) .collect(ImmutableList.toImmutableList()); return new IncotermsReposito...
{ throw new AdempiereException("Incoterms not found by ID: " + id); } return incoterms; } @Nullable public Incoterms getDefaultByOrgId(@NonNull final OrgId orgId) { return CoalesceUtil.coalesce(defaultByOrgId.get(orgId), defaultByOrgId.get(OrgId.ANY)); } @NonNull Incoterms getByValue(@NonNull...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\incoterms\IncotermsRepository.java
1
请完成以下Java代码
public static DocBaseType ofCode(@NonNull final String code) { return index.ofCode(code); } @Nullable public static DocBaseType ofNullableCode(@Nullable final String code) { return index.ofNullableCode(code); } public static boolean equals(@Nullable final DocBaseType o1, @Nullable final DocBaseType o2) {re...
{ if(isShipment() || isReceipt() || isARReceipt()) return I_M_InOut.Table_Name; else if(isSalesOrder() || isPurchaseOrder()) return I_C_Order.Table_Name; else if(isSalesInvoice() || isPurchaseInvoice() || isPurchaseCreditMemo()) return I_C_Invoice.Table_Name; else throw new AdempiereException("No known tableNam...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\DocBaseType.java
1
请完成以下Java代码
public String createSO(final Properties ctx, final int WindowNo, final GridTab mTab, final GridField mField, final Object value, final Object oldValue) { if (isCalloutActive()) { return ""; } final int bPartnerId = getCalloutId(mTab, I_C_BPartner_Location.COLUMNNAME_C_BPartner_ID); if (bPartnerId ...
private boolean openSOWindow(final int bPartnerId, final int locationShipId, final int locationBillId, final int contactId, final int billContactId) { final AdWindowId SALES_ORDER_WINDOW_ID = AdWindowId.ofRepoId(143); final AWindow soFrame = new AWindow(); final MQuery query = new MQuery(Table_Name); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\callout\BPartnerCockpit.java
1
请完成以下Java代码
public static Map<String, Object> singletonMap(String key, Object value) { Map<String, Object> map = new HashMap<>(1); map.put(key, value); return map; } /** * Helper method to easily create a map. * * Takes as input a varargs containing the key1, value1, key2, value2, e...
} int valuesSize = values.size(); if (valuesSize <= partitionSize) { return Collections.singletonList(valuesList); } List<List<T>> safeValuesList = new ArrayList<>(); consumePartitions(values, partitionSize, safeValuesList::add); return safeValuesList; ...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\util\CollectionUtil.java
1
请在Spring Boot框架中完成以下Java代码
public class PmsMenuDaoImpl extends PermissionBaseDaoImpl<PmsMenu> implements PmsMenuDao { @SuppressWarnings("rawtypes") @Override public List listByRoleIds(String roleIdsStr) { List<String> roldIds = Arrays.asList(roleIdsStr.split(",")); return super.getSessionTemplate().selectList(getStatement("listByRoleIds"...
* @param parentId * . * @return menuList. */ @Override public List<PmsMenu> listByParentId(Long parentId) { return super.getSessionTemplate().selectList(getStatement("listByParentId"), parentId); } /*** * 根据名称和是否叶子节点查询数据 * * @param isLeaf * 是否是叶子节点 * @param name * ...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\permission\dao\impl\PmsMenuDaoImpl.java
2
请完成以下Java代码
public IReturnsInOutProducer setMovementType(final String movementType) { assertConfigurable(); _movementType = movementType; return this; } public IReturnsInOutProducer setManualReturnInOut(final I_M_InOut manualReturnInOut) { assertConfigurable(); _manualReturnInOut = manualReturnInOut; return this...
final Timestamp movementDate = Env.getDate(ctx); // use Login date (08306) return movementDate; } @Override public IReturnsInOutProducer setC_Order(final I_C_Order order) { assertConfigurable(); _order = order; return this; } protected I_C_Order getC_Order() { return _order; } @Override public IR...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inout\returns\AbstractReturnsInOutProducer.java
1
请完成以下Spring Boot application配置
#web server server.port=1130 #spring.jpa.show-sql=true spring.jpa.generate-ddl=true spring.datasource.url=jdbc:mysql://localhost:3308/test?useUnicode=true&characterEncoding=utf-8&useSSL=false spring.datasource.username=root spring.datasource.password=123456 spring.datasource.driver-class-name=com.mysql.jdbc.Driver spr...
ost spring.redis.port=6379 spring.redis.password= spring.redis.pool.max-active=8 spring.redis.pool.max-wait=-1 spring.redis.pool.max-idle=8 spring.redis.pool.min-idle=0 spring.redis.timeout=0
repos\spring-boot-quick-master\quick-oauth2\quick-oauth2-server\src\main\resources\application.properties
2
请完成以下Java代码
public static OrderedDocumentsList newEmpty(@NonNull final DocumentQueryOrderByList orderBys) { return new OrderedDocumentsList(ImmutableList.of(), orderBys); } public ArrayList<Document> toList() { return documents; } public ImmutableMap<DocumentId, Document> toImmutableMap() { return Maps.uniqueIndex(d...
public int size() { return documents.size(); } public boolean isEmpty() { return documents.isEmpty(); } public Document get(final int index) { return documents.get(index); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\OrderedDocumentsList.java
1
请完成以下Java代码
public void addDestination(Node destination, int distance) { adjacentNodes.put(destination, distance); } public String getName() { return name; } public void setName(String name) { this.name = name; } public Map<Node, Integer> getAdjacentNodes() { return adjace...
} public void setDistance(Integer distance) { this.distance = distance; } public List<Node> getShortestPath() { return shortestPath; } public void setShortestPath(LinkedList<Node> shortestPath) { this.shortestPath = shortestPath; } }
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-1\src\main\java\com\baeldung\algorithms\dijkstra\Node.java
1
请在Spring Boot框架中完成以下Java代码
public List<Payment> getPayments() { return payments; } public void setPayments(List<Payment> payments) { this.payments = payments; } public PaymentSummary refunds(List<OrderRefund> refunds) { this.refunds = refunds; return this; } public PaymentSummary addRefundsItem(OrderRefund refundsItem) { ...
return totalDueSeller; } public void setTotalDueSeller(Amount totalDueSeller) { this.totalDueSeller = totalDueSeller; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PaymentSummary paymentSummary ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\PaymentSummary.java
2
请完成以下Java代码
private static class JUnitGeneratedTableInfoMap { private final AtomicInteger nextTableId2 = new AtomicInteger(1); private final HashMap<TableNameKey, TableInfo> tableInfoByTableName = new HashMap<>(); private final HashMap<AdTableId, TableInfo> tableInfoByTableId = new HashMap<>(); public AdTableId getOrCrea...
final I_AD_Table adTable = POJOLookupMap.get().lookup("AD_Table", adTableId.getRepoId()); if (adTable != null) { final String tableName = adTable.getTableName(); if (Check.isBlank(tableName)) { throw new AdempiereException("No TableName set for " + adTable); } return tableName; } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\table\api\impl\TableIdsCache.java
1
请完成以下Java代码
public static JSONObject resultSet2JdbcUsingJOOQDefaultApproach(ResultSet resultSet, Connection dbConnection) throws SQLException { JSONObject result = new JSONObject(DSL.using(dbConnection) .fetch(resultSet) .formatJSON()); return result; } public static JSONArray resul...
} }) .collect(Collectors.toList()); List<JSONObject> json = DSL.using(dbConnection) .fetch(resultSet) .map(new RecordMapper<Record, JSONObject>() { @Override public JSONObject map(Record r) { JSONObject obj = n...
repos\tutorials-master\persistence-modules\core-java-persistence-2\src\main\java\com\baeldung\resultset2json\ResultSet2JSON.java
1
请完成以下Java代码
public int getM_Product_ID() { return ddOrderLine.getM_Product_ID(); } @Override public I_M_AttributeSetInstance getM_AttributeSetInstance() { return isASITo ? ddOrderLine.getM_AttributeSetInstanceTo() : ddOrderLine.getM_AttributeSetInstance(); } @Override public int getM_AttributeSetInstance_ID() { re...
ddOrderLine.setM_AttributeSetInstance(asi); } } @Override public void setM_AttributeSetInstance_ID(final int M_AttributeSetInstance_ID) { if (isASITo) { ddOrderLine.setM_AttributeSetInstanceTo_ID(M_AttributeSetInstance_ID); } else { ddOrderLine.setM_AttributeSetInstance_ID(M_AttributeSetInstance_...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\distribution\ddorder\producer\DDOrderLineAttributeSetInstanceAware.java
1
请完成以下Java代码
public static Object[] getFiledValues(Object o) { String[] fieldNames = getFiledName(o); Object[] value = new Object[fieldNames.length]; for (int i = 0; i < fieldNames.length; i++) { value[i] = getFieldValueByName(fieldNames[i], o); } return value; } /** ...
if (field == null) { List<Field> allFields = getClassFields(clazz); List<Field> searchFields = allFields.stream().filter(a -> a.getName().equals(name)).collect(Collectors.toList()); if(searchFields!=null && searchFields.size()>0){ field = searchFields....
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\ReflectHelper.java
1
请完成以下Java代码
public class MySavedRequestAwareAuthenticationSuccessHandler extends SimpleUrlAuthenticationSuccessHandler { private RequestCache requestCache = new HttpSessionRequestCache(); @Override public void onAuthenticationSuccess(final HttpServletRequest request, final HttpServletResponse response, final Authenti...
return; } clearAuthenticationAttributes(request); // Use the DefaultSavedRequest URL // final String targetUrl = savedRequest.getRedirectUrl(); // logger.debug("Redirecting to DefaultSavedRequest Url: " + targetUrl); // getRedirectStrategy().sendRedirect(request, respon...
repos\tutorials-master\apache-httpclient4\src\main\java\com\baeldung\security\MySavedRequestAwareAuthenticationSuccessHandler.java
1
请在Spring Boot框架中完成以下Java代码
protected VariableInterceptor createVariableInterceptor(PlanItemInstance planItemInstance) { if (restApiInterceptor != null) { return new VariableInterceptor() { @Override public void createVariables(Map<String, Object> variables) { restApiInterce...
void updateVariables(Map<String, Object> variables); } protected static class NoopVariableInterceptor implements VariableInterceptor { static final VariableInterceptor INSTANCE = new NoopVariableInterceptor(); @Override public void createVariables(Map<String, Object> variables) { ...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\caze\BaseVariableResource.java
2
请在Spring Boot框架中完成以下Java代码
public CommonResult delivery(@RequestBody List<OmsOrderDeliveryParam> deliveryParamList) { int count = orderService.delivery(deliveryParamList); if (count > 0) { return CommonResult.success(count); } return CommonResult.failed(); } @ApiOperation("批量关闭订单") @Reques...
return CommonResult.failed(); } @ApiOperation("修改订单费用信息") @RequestMapping(value = "/update/moneyInfo", method = RequestMethod.POST) @ResponseBody public CommonResult updateReceiverInfo(@RequestBody OmsMoneyInfoParam moneyInfoParam) { int count = orderService.updateMoneyInfo(moneyInfoParam);...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\controller\OmsOrderController.java
2
请在Spring Boot框架中完成以下Java代码
public List<Book> selectAllBookByTitle() { StringBuilder sb = new StringBuilder("SELECT * FROM ").append(TABLE_NAME_BY_TITLE); final String query = sb.toString(); ResultSet rs = session.execute(query); List<Book> books = new ArrayList<Book>(); for (Row r : rs) { Bo...
final String query = sb.toString(); session.execute(query); } /** * Delete table. * * @param tableName the name of the table to delete. */ public void deleteTable(String tableName) { StringBuilder sb = new StringBuilder("DROP TABLE IF EXISTS ").append(tableName); ...
repos\tutorials-master\persistence-modules\java-cassandra\src\main\java\com\baeldung\cassandra\java\client\repository\BookRepository.java
2
请在Spring Boot框架中完成以下Java代码
public class GreetController { @RequestMapping(value = "/homePage", method = RequestMethod.GET) public String index() { return "index"; } @RequestMapping(value = "/greet", method = RequestMethod.GET, produces = "application/json") @ResponseBody public Greeting greet() { Greetin...
Greeting greeting = new Greeting(); greeting.setId(1); greeting.setMessage("Hello World " + name + "!!!"); return greeting; } @RequestMapping(value = "/greetWithPost", method = RequestMethod.POST, produces = "application/json") @ResponseBody public Greeting greetWithPost() { ...
repos\tutorials-master\spring-web-modules\spring-mvc-java\src\main\java\com\baeldung\web\controller\GreetController.java
2
请完成以下Java代码
public HUSplitBuilder setSplitOnNoPI(final boolean splitOnNoPI) { this.splitOnNoPI = splitOnNoPI; return this; } @Override public List<I_M_HU> split() { // // Destination: Split HUs final ILUTUProducerAllocationDestination destination = createLUTUProducerDestination(); // // Request is configured w...
destination.setCreateTUsForRemainingQty(true); // create TUs for remaining (i.e. whole qty) } else { // Don't create TUs for remaining Qty (after all required LUs were created) - see 06049 destination.setCreateTUsForRemainingQty(false); } } return destination; } private IHUSplitDefinition cre...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\transfer\impl\HUSplitBuilder.java
1
请完成以下Java代码
public R copyFile(@RequestParam String fileName, @RequestParam String destBucketName, String destFileName) { qiniuTemplate.copyFile(fileName, destBucketName, destFileName); return R.success("操作成功"); } /** * 获取文件信息 * * @param fileName 存储桶对象名称 * @return InputStream */ @SneakyThrows @GetMapping("/stat-f...
/** * 上传文件 * * @param fileName 存储桶对象名称 * @param file 文件 * @return ObjectStat */ @SneakyThrows @PostMapping("/put-file-by-name") public R<BladeFile> putFile(@RequestParam String fileName, @RequestParam MultipartFile file) { BladeFile bladeFile = qiniuTemplate.putFile(fileName, file.getInputStream())...
repos\SpringBlade-master\blade-ops\blade-resource\src\main\java\org\springblade\resource\endpoint\OssEndpoint.java
1
请完成以下Java代码
public class ServicesException extends RuntimeException { public static final ServicesException wrapIfNeeded(final Throwable e) { if (e == null) { return new ServicesException("Unknown service exception"); } else if (e instanceof ServicesException) { return (ServicesException)e; } else if ((e inst...
{ super(message, cause); } public ServicesException(String message) { super(message); } public ServicesException(Throwable cause) { super(cause); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\exceptions\ServicesException.java
1
请在Spring Boot框架中完成以下Java代码
public class C_Flatrate_Term { private final RefundInvoiceCandidateRepository invoiceCandidateRepository; private C_Flatrate_Term(@NonNull final RefundInvoiceCandidateRepository refundInvoiceCandidateRepository) { this.invoiceCandidateRepository = refundInvoiceCandidateRepository; } /** * Note: this method c...
final IQueryFilter<I_C_Invoice_Candidate> dateToInvoiceEffectiveFilter = invoiceCandidateRepository .createDateToInvoiceEffectiveFilter( flatrateTerm.getStartDate(), flatrateTerm.getEndDate()); return Services.get(IQueryBL.class) .createQueryBuilder(I_C_Invoice_Candidate.class) .addOnlyActive...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\refund\interceptor\C_Flatrate_Term.java
2
请完成以下Java代码
public void setMRP_Exclude (final @Nullable java.lang.String MRP_Exclude) { set_Value (COLUMNNAME_MRP_Exclude, MRP_Exclude); } @Override public java.lang.String getMRP_Exclude() { return get_ValueAsString(COLUMNNAME_MRP_Exclude); } @Override public void setName (final java.lang.String Name) { set_Valu...
public void setS_ResourceType_ID (final int S_ResourceType_ID) { if (S_ResourceType_ID < 1) set_Value (COLUMNNAME_S_ResourceType_ID, null); else set_Value (COLUMNNAME_S_ResourceType_ID, S_ResourceType_ID); } @Override public int getS_ResourceType_ID() { return get_ValueAsInt(COLUMNNAME_S_ResourceTy...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_S_Resource.java
1
请完成以下Java代码
public Builder nonce(String nonce) { return this.claim(IdTokenClaimNames.NONCE, nonce); } /** * Use this subject in the resulting {@link OidcIdToken} * @param subject The subject to use * @return the {@link Builder} for further configurations */ public Builder subject(String subject) { return t...
public OidcIdToken build() { Instant iat = toInstant(this.claims.get(IdTokenClaimNames.IAT)); Instant exp = toInstant(this.claims.get(IdTokenClaimNames.EXP)); return new OidcIdToken(this.tokenValue, iat, exp, this.claims); } private Instant toInstant(Object timestamp) { if (timestamp != null) { Ass...
repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\oidc\OidcIdToken.java
1
请完成以下Java代码
public void setAllowFormEncodedBodyParameter(boolean allowFormEncodedBodyParameter) { this.allowFormEncodedBodyParameter = allowFormEncodedBodyParameter; } /** * Set if transport of access token using URI query parameter is supported. Defaults * to {@code false}. * * The spec recommends against using this ...
/** * Set this value to configure what header is checked when resolving a Bearer Token. * This value is defaulted to {@link HttpHeaders#AUTHORIZATION}. * * This allows other headers to be used as the Bearer Token source such as * {@link HttpHeaders#PROXY_AUTHORIZATION} * @param bearerTokenHeaderName the hea...
repos\spring-security-main\oauth2\oauth2-resource-server\src\main\java\org\springframework\security\oauth2\server\resource\web\DefaultBearerTokenResolver.java
1
请完成以下Java代码
protected void loadDocumentDetails() { setNoCurrency(); final I_M_Movement move = getModel(I_M_Movement.class); setDateDoc(move.getMovementDate()); setDateAcct(move.getMovementDate()); // m_Reversal_ID = move.getReversal_ID();// store original (voided/reversed) document // m_DocStatus = move.getDocStatus()...
return ImmutableList.of(fact); } private void createFactsForMovementLine(final Fact fact, final DocLine_Movement line) { final AcctSchema as = fact.getAcctSchema(); final MoveCostsResult costs = line.getCreateCosts(as); // // Inventory CR/DR (from locator) final CostAmount outboundCosts = costs.getOutbo...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\Doc_Movement.java
1
请完成以下Java代码
public class Customer { @Id private String id; private String userName; private String address; public Customer() { } public Customer(String userName, String address) { this.userName = userName; this.address = address; } public String getId() { return this.id; } public void setId(String id) { ...
public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } @Override public String toString() { return String.format("Customer[id=%s, userName='%s', address='%s']", this.id, this.userName, this.address); } }
repos\spring-boot-leaning-master\2.x_data\1-4 Spring Boot 和 Nosql 数据库的使用\spring-boot-elasticsearch\src\main\java\com\neo\model\Customer.java
1
请在Spring Boot框架中完成以下Java代码
public class DefaultAutoDeploymentStrategy extends AbstractProcessAutoDeploymentStrategy { private static final Logger LOGGER = LoggerFactory.getLogger(DefaultAutoDeploymentStrategy.class); /** * The deployment mode this strategy handles. */ public static final String DEPLOYMENT_MODE = "default"...
for (final Resource resource : resources) { addResource(resource, deploymentBuilder); } try { deploymentBuilder.deploy(); } catch (RuntimeException e) { if (isThrowExceptionOnDeploymentFailure()) { throw e; } else { ...
repos\flowable-engine-main\modules\flowable-spring\src\main\java\org\flowable\spring\configurator\DefaultAutoDeploymentStrategy.java
2
请完成以下Java代码
private void importPrices(@NonNull final I_I_Product importRecord) { createAPU(importRecord); createAEP(importRecord); } private void createAPU(@NonNull final I_I_Product importRecord) { final TaxCategoryQuery query = TaxCategoryQuery.builder() .type(VATType.RegularVAT) .countryId(Services.get(ICount...
final ProductPriceImporter command = new ProductPriceImporter(request); command.createProductPrice_And_PriceListVersionIfNeeded(); } private void createAEP(@NonNull final I_I_Product importRecord) { final TaxCategoryQuery query = TaxCategoryQuery.builder() .type(VATType.RegularVAT) .countryId(Services.g...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma\src\main\java\de\metas\impexp\product\PharmaImportProductInterceptor.java
1
请完成以下Java代码
public MTab[] getTabs(final boolean reload, final String trxName) { if (m_tabs != null && !reload) { return m_tabs; } final String sql = "SELECT * FROM AD_Tab WHERE AD_Window_ID=? ORDER BY SeqNo"; final ArrayList<MTab> list = new ArrayList<>(); PreparedStatement pstmt = null; ResultSet rs = null; tr...
{ boolean changed = false; if (node.isActive() != isActive()) { node.setIsActive(isActive()); changed = true; } if (node.isCentrallyMaintained()) { node.setName(getName()); node.setDescription(getDescription()); node.setHelp(getHelp()); changed = true; } if ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MWindow.java
1
请完成以下Java代码
public class ReferencingPOFilter<T extends IPOReferenceAware> implements IQueryFilter<T>, ISqlQueryFilter { private Object referencedModel; /** * * @param referencedModel May not be null; this filter will only accept records that reference the given model. */ public ReferencingPOFilter(@NonNull final Object...
return sqlWhereClause; } @Override public List<Object> getSqlParams(final Properties ctx) { buildSql(); return sqlParams; } private boolean sqlBuilt = false; private String sqlWhereClause = null; private List<Object> sqlParams = null; private final void buildSql() { if (sqlBuilt) { return; } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\ReferencingPOFilter.java
1
请完成以下Java代码
public void tenantLogPointCut() { } @Around("tenantLogPointCut()") public Object aroundMethod(ProceedingJoinPoint joinPoint)throws Throwable { //System.out.println("环绕通知>>>>>>>>>"); MethodSignature signature = (MethodSignature) joinPoint.getSignature(); Method method = signature.g...
LogDTO dto = new LogDTO(); dto.setLogType(logType); dto.setLogContent(content); dto.setOperateType(opType); dto.setTenantId(tenantId); //获取登录用户信息 LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); ...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\aop\TenantPackUserLogAspect.java
1
请完成以下Java代码
public Quantity removeQty(final Quantity qtyToRemove, final Boolean allowNegativeCapacityOverride) { Check.assumeNotNull(qtyToRemove, "qtyToRemove not null"); Check.assume(qtyToRemove.signum() >= 0, "qtyToRemove({}) >= 0", qtyToRemove); final BigDecimal qtyToRemove_Qty = qtyToRemove.toBigDecimal(); final I_C_...
// // Adjust Qty Used adjustQty(qtyToRemoveActualBaseUom.negate()); return new Quantity(qtyToRemoveActual, qtyToRemove_UOM, qtyToRemoveActualBaseUom, baseUOM); } private BigDecimal convertToBaseUOM(final BigDecimal qty, final I_C_UOM qtyUOM) { final I_C_UOM baseUOM = getC_UOM(); final BigDecimal qtyConv...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\quantity\Bucket.java
1
请完成以下Java代码
public boolean isCompleteOrder() { return COMPLETE_ORDER.equals(this); } public boolean isCompleteOrderOrLine() { return COMPLETE_ORDER.equals(this) || COMPLETE_LINE.equals(this); } public boolean isBasedOnDelivery() { return AVAILABILITY.equals(this) || COMPLETE_ORDER.equals(this) || COMPLETE_LINE.equal...
public boolean isAvailability() { return AVAILABILITY.equals(this); } public boolean isForce() { return FORCE.equals(this); } public boolean isManual() { return MANUAL.equals(this); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\order\DeliveryRule.java
1
请完成以下Java代码
public void prepare() { double common = 1; elements = new Double[s]; for (int i = 0; i < s - 1; i++) { elements[i] = common; } elements[s - 1] = pivot; } @Override @TearDown public void clean() { elements = null; } @Override @Benc...
@BenchmarkMode(Mode.AverageTime) public int findPosition() { int index = 0; Double pivotWrapper = pivot; while (!pivotWrapper.equals(elements[index])) { index++; } return index; } @Override public String getSimpleClassName() { return DoubleWr...
repos\tutorials-master\core-java-modules\core-java-lang-2\src\main\java\com\baeldung\primitive\DoubleWrapperLookup.java
1
请完成以下Spring Boot application配置
server: port: 9111 spring: boot: admin: ui: title: JeecgCloud监控中心 client: instance: metadata: tags: environment: local security: user: name: "admin" password: "admin" application: name: jeecg-monitor cloud: nacos: ...
: ${spring.security.user.password} # 服务端点检查 management: httpexchanges: recording: enabled: true endpoints: web: exposure: include: "*" endpoint: health: show-details: always
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-monitor\src\main\resources\application.yml
2
请在Spring Boot框架中完成以下Java代码
public void config(DruidDataSource dataSource) { dataSource.setUrl(url); dataSource.setUsername(username); dataSource.setPassword(password); } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getUse...
return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } }
repos\SpringBootBucket-master\springboot-multisource\src\main\java\com\xncoding\pos\config\properties\MutiDataSourceProperties.java
2
请完成以下Java代码
protected void writeAdditionalAttributes(BaseElement element, BpmnModel model, XMLStreamWriter xtw) throws Exception { ScriptTask scriptTask = (ScriptTask) element; writeDefaultAttribute(ATTRIBUTE_TASK_SCRIPT_FORMAT, scriptTask.getScriptFormat(), xtw); writeQualifiedAttribute(ATTRIBUTE_TASK_SCRI...
didWriteExtensionStartElement = super.writeExtensionChildElements(element, didWriteExtensionStartElement, xtw); didWriteExtensionStartElement = BpmnXMLUtil.writeIOParameters(ELEMENT_IN_PARAMETERS, scriptTask.getInParameters(), didWriteExtensionStartElement, xtw); return didWriteExtension...
repos\flowable-engine-main\modules\flowable-bpmn-converter\src\main\java\org\flowable\bpmn\converter\ScriptTaskXMLConverter.java
1
请完成以下Java代码
private DocumentChange retrieveDocumentChange(final ResultSet rs) throws SQLException { final String operation = rs.getString("operation"); final boolean isRemove = "D".equals(operation); final String esDocumentId = rs.getString("es_documentid"); return DocumentChange.of(isRemove, esDocumentId); } private ...
partnerDAO.getContactIdsByRepoIds(bpartnerContactRepoIds) .stream() .map(BPartnerContactId::getBpartnerId) .forEach(bpartnerIds::add); return bpartnerIds.build(); } @Value(staticConstructor = "of") private static class DocumentChange { boolean isRemove; @NonNull String esDocumentId; } @Value ...
repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java\de\metas\fulltextsearch\indexer\handler\bpartner\BPartnerAdvSearchFTSModelIndexer.java
1
请完成以下Java代码
protected String doIt() { final AttachmentEntryDataResource data = attachmentEntryService.retrieveDataResource(getAttachmentEntryId()); final DataImportResult result = dataImportService.importDataFromResource(DataImportRequest.builder() .data(data) .dataImportConfigId(getDataImportConfigId()) .clientI...
private AttachmentEntryId getAttachmentEntryId() { return p_AD_AttachmentEntry_ID; } private DataImportConfigId getDataImportConfigId() { return DataImportConfigId.ofRepoId(getRecord_ID()); } private void deleteAttachmentEntry() { final AttachmentEntry attachmentEntry = attachmentEntryService.getById(get...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\process\C_DataImport_ImportAttachment.java
1
请完成以下Java代码
public ASICopy filter(final Predicate<I_M_AttributeInstance> filter) { Preconditions.checkNotNull(filter, "filter is null"); if (attributeInstanceFilters == null) { attributeInstanceFilters = new ArrayList<>(); } attributeInstanceFilters.add(filter); return this; } /** * Creates and returns a copy...
} // return toASI; } private boolean isSkip(final I_M_AttributeInstance fromAI) { if (attributeInstanceFilters == null || attributeInstanceFilters.isEmpty()) { return false; // don't skip } for (final Predicate<I_M_AttributeInstance> filter : attributeInstanceFilters) { final boolean accept = ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\api\ASICopy.java
1
请完成以下Java代码
/* package */ Partition loadWithAllRecords(final Partition partition) { if (partition.getDLM_Partition_ID() <= 0) { return partition; // nothing to load } final IDLMService dlmService = Services.get(IDLMService.class); final IQueryBL queryBL = Services.get(IQueryBL.class); final I_DLM_Partition partit...
.addEqualsFilter(I_DLM_Partition_Record_V.COLUMN_AD_Table_ID, tableId) .create() .setOption(IQuery.OPTION_GuaranteedIteratorRequired, true) .setOption(IQuery.OPTION_IteratorBufferSize, 5000) .iterate(I_DLM_Partition_Record_V.class); return new Iterator<WorkQueue>() { @Override public boolean ...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\partitioner\impl\PartitionerService.java
1
请在Spring Boot框架中完成以下Java代码
public class TenantController extends BladeController { private ITenantService tenantService; /** * 详情 */ @GetMapping("/detail") @Operation(summary = "详情", description = "传入tenant") public R<Tenant> detail(Tenant tenant) { Tenant detail = tenantService.getOne(Condition.getQueryWrapper(tenant)); return R....
@GetMapping("/page") @Operation(summary = "分页", description = "传入tenant") public R<IPage<Tenant>> page(Tenant tenant, Query query) { IPage<Tenant> pages = tenantService.selectTenantPage(Condition.getPage(query), tenant); return R.data(pages); } /** * 新增或修改 */ @PostMapping("/submit") @Operation(summary = ...
repos\SpringBlade-master\blade-service\blade-system\src\main\java\org\springblade\system\controller\TenantController.java
2
请在Spring Boot框架中完成以下Java代码
public class HardwarePrinter { @NonNull HardwarePrinterId id; @NonNull String name; @NonNull OutputType outputType; @Nullable ExternalSystemParentConfigId externalSystemParentConfigId; @Nullable URI ippUrl; @NonNull ImmutableMap<HardwareTrayId, HardwareTray> trays; @Builder private HardwarePrinter( @NonNull...
this.ippUrl = ippUrl; this.trays = Maps.uniqueIndex(trays, HardwareTray::getId); } @NonNull public HardwareTray getTray(@NonNull final HardwareTrayId trayId) { final HardwareTray hardwareTray = trays.get(trayId); if (hardwareTray == null) { throw new AdempiereException("This hardwarePrinter does not hav...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\HardwarePrinter.java
2
请完成以下Java代码
class WebFluxWebApplicationTypeDeducer implements WebApplicationType.Deducer { private static final String[] INDICATOR_CLASSES = { "reactor.core.publisher.Mono", "org.springframework.web.reactive.DispatcherHandler" }; @Override public @Nullable WebApplicationType deduceWebApplicationType() { // Guard in case ...
@Override public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) { for (String servletIndicatorClass : INDICATOR_CLASSES) { registerTypeIfPresent(servletIndicatorClass, classLoader, hints); } } private void registerTypeIfPresent(String typeName, @Nullable ClassLoader classLoad...
repos\spring-boot-4.0.1\module\spring-boot-webflux\src\main\java\org\springframework\boot\webflux\WebFluxWebApplicationTypeDeducer.java
1
请完成以下Java代码
private ProcessPreconditionsResolution acceptIfRowNotLockedByOtherUser() { final PackageableRow row = getSingleSelectedRow(); if (row.isNotLocked() || row.isLockedBy(getLoggedUserId())) { return ProcessPreconditionsResolution.accept(); } else { return ProcessPreconditionsResolution.rejectWithInterna...
try { final ProductsToPickView productsToPickView = productsToPickViewFactory.createView(row); getResult().setWebuiViewToOpen(WebuiViewToOpen.builder() .target(ViewOpenTarget.ModalOverlay) .viewId(productsToPickView.getViewId().toJson()) .build()); return MSG_OK; } catch (final Exception...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\packageable\process\PackageablesView_OpenProductsToPick.java
1
请完成以下Java代码
private IHUContext getHUContext() { Check.assumeNotNull(_huContext, "_huContext not null"); return _huContext; } private I_M_ReceiptSchedule getM_ReceiptSchedule() { return _receiptSchedule; } /** * Aggregates and adds given {@link I_M_ReceiptSchedule_Alloc} with its {@link I_M_ReceiptSchedule_Alloc#COL...
receiptLineCandidates.add(receiptLineCandidate); // 06135: don't forget to add the fruits of our labour :-P stale = true; // we need to recompute the amounts } public List<HUReceiptLineCandidate> getHUReceiptLineCandidates() { return receiptLineCandidatesRO; } private final void updateIfStale() { if (!sta...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\inoutcandidate\spi\impl\HUReceiptLineCandidatesBuilder.java
1
请在Spring Boot框架中完成以下Java代码
public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public Date getTime() { return time; } public void setTime(Date time) { this.time = time; } public String getTaskUrl() { return taskUrl;...
public void setProcessInstanceUrl(String processInstanceUrl) { this.processInstanceUrl = processInstanceUrl; } public List<String> getMessage() { return message; } public void setMessage(List<String> message) { this.message = message; } public String getUrl() { ...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\engine\EventResponse.java
2
请完成以下Java代码
public class ParticipantProcess implements HasDIBounds { protected String id; protected String name; protected int x = -1; protected int y = -1; protected int width = -1; protected int height = -1; public void setId(String id) { this.id = id; } public String getId() { return id; } ...
public void setY(int y) { this.y = y; } public int getWidth() { return width; } public void setWidth(int width) { this.width = width; } public int getHeight() { return height; } public void setHeight(int height) { this.height = height; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\process\ParticipantProcess.java
1
请完成以下Java代码
public boolean enableSafeXml() { return cmmnEngineConfiguration.isEnableSafeCmmnXml(); } @Override public String xmlEncoding() { return cmmnEngineConfiguration.getXmlEncoding(); } @Override public boolean validateXml() { // On redeplo...
public boolean validateCmmnModel() { // On redeploy, we assume it is validated at the first deploy return newDeployment && validateXml(); } @Override public CaseValidator caseValidator() { return cmmnEngineConfiguration.getCaseValidator(); } } ...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\deployer\CmmnDeployer.java
1
请完成以下Java代码
public String getName() { return this.name; } public void setName(String name) { this.name = name; } public String getType() { return this.type; } public void setType(String type) { this.type = type; } public String getDescription() { return this.description; } public void setDescription(String...
public void setApplicationName(String applicationName) { this.applicationName = applicationName; } public String getLanguage() { return this.language; } public void setLanguage(String language) { this.language = language; } public String getConfigurationFileFormat() { return this.configurationFileForma...
repos\initializr-main\initializr-web\src\main\java\io\spring\initializr\web\project\ProjectRequest.java
1
请完成以下Java代码
public NamePair getSelectedItem() { return (NamePair)super.getSelectedItem(); } /** * Get Value * @return key as Integer or String value */ @Override public Object getValue() { final NamePair p = getSelectedItem(); if (p == null) { return null; } // if (p instanceof KeyNamePair) ...
} // getDisplay @Override public boolean isSelectionNone() { final Object selectedItem = getSelectedItem(); if (selectedItem == null) { return true; } else if (KeyNamePair.EMPTY.equals(selectedItem)) { return true; } else if (ValueNamePair.EMPTY.equals(selectedItem)) { return true; }...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VComboBox.java
1
请完成以下Java代码
private void postConstruct() { eventBusFactory .getEventBus(C_Location.EVENTS_TOPIC) .subscribeOn(LocationGeocodeEventRequest.class, this::handleEvent); } @SuppressWarnings("WeakerAccess") @VisibleForTesting void handleEvent(@NonNull final LocationGeocodeEventRequest request) { I_C_Location locationR...
} } private GeoCoordinatesRequest createGeoCoordinatesRequest(@NonNull final I_C_Location locationRecord) { final String countryCode2 = countryDAO.retrieveCountryCode2ByCountryId(CountryId.ofRepoId(locationRecord.getC_Country_ID())); final String address = Joiner.on(" ") .skipNulls() .join(locationReco...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\location\geocoding\asynchandler\LocationGeocodeEventHandler.java
1
请完成以下Java代码
class SpringProfileModelHandler extends ModelHandlerBase { private final @Nullable Environment environment; SpringProfileModelHandler(Context context, @Nullable Environment environment) { super(context); this.environment = environment; } @Override public void handle(ModelInterpretationContext intercon, Mode...
try { profileNames[i] = OptionHelper.substVars(profileNames[i], ic, this.context); } catch (ScanException ex) { throw new RuntimeException(ex); } } return this.environment.acceptsProfiles(Profiles.of(profileNames)); } // The array has no nulls in it, but StringUtils.trimArrayElements return // ...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\logging\logback\SpringProfileModelHandler.java
1
请完成以下Java代码
public HashableString hashWithSalt(@Nullable final String salt) { if (hashed) { return this; } HashableString hashedObject = _hashedObject; if (hashedObject == null) { final String valueHashed = hashValue(value, salt); hashedObject = _hashedObject = new HashableString(valueHashed, true, salt); ...
if (other.isPlain()) { return valueEquals(other.value); } else { return hashWithSalt(other.salt).valueEquals(other.value); } } else { if (other.isPlain()) { return other.hashWithSalt(salt).valueEquals(value); } else { return valueEquals(other.value); } } } pri...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\hash\HashableString.java
1
请完成以下Java代码
public frame setMarginHeight(int marginheight) { setMarginHeight(Integer.toString(marginheight)); return this; } /** Sets the marginheight="" attribute @param marginheight the marginheight="" attribute */ public frame setMarginHeight(String marginheight)...
@param hashcode name of element for hash table @param element Adds an Element to the element. */ public frame addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\frame.java
1
请完成以下Java代码
public class MD_Cockpit_PricingConditions extends MaterialCockpitViewBasedProcess { @Override protected ProcessPreconditionsResolution checkPreconditionsApplicable() { final Set<Integer> productIds = getProductIds(); if (productIds.isEmpty()) { return ProcessPreconditionsResolution.rejectBecauseNoSelection(...
{ getResult().setRecordsToOpen(I_M_Product.Table_Name, getProductIds(), ProductPricingConditionsViewFactory.WINDOW_ID_STRING); return MSG_OK; } private Set<Integer> getProductIds() { return streamSelectedRows() .map(MaterialCockpitRow::getProductId) .map(ProductId::toRepoId) .filter(productId -> p...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\process\MD_Cockpit_PricingConditions.java
1
请完成以下Java代码
public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getText() { return text; } public void setText(String text) { this.text = text; } public String getCategory() {
return category; } public void setCategory(String category) { this.category = category; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } }
repos\tutorials-master\spring-boot-modules\spring-boot-graphql-2\src\main\java\com\baeldung\returnnull\Post.java
1
请完成以下Java代码
public class Article { @JestId private Integer id; private String author; private String title; private String content; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getAuthor() { return author; ...
this.title = title; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } @Override public String toString() { final StringBuilder sb = new StringBuilder( "{\"Article\":{" ); sb.append( "\"id\":"...
repos\SpringBootLearning-master (1)\springboot-elasticsearch\src\main\java\com\gf\entity\Article.java
1
请完成以下Java代码
public void setM_IolCandHandler_ID (final int M_IolCandHandler_ID) { if (M_IolCandHandler_ID < 1) set_ValueNoCheck (COLUMNNAME_M_IolCandHandler_ID, null); else set_ValueNoCheck (COLUMNNAME_M_IolCandHandler_ID, M_IolCandHandler_ID); } @Override public int getM_IolCandHandler_ID() { return get_ValueA...
else set_Value (COLUMNNAME_Record_ID, Record_ID); } @Override public int getRecord_ID() { return get_ValueAsInt(COLUMNNAME_Record_ID); } @Override public void setStatus (final @Nullable java.lang.String Status) { set_Value (COLUMNNAME_Status, Status); } @Override public java.lang.String getStatus...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inoutcandidate\model\X_M_IolCandHandler_Log.java
1
请完成以下Java代码
private I_M_InOutLine getM_InOutLine() { return _receiptLine; } @Override public ReceiptScheduleAllocBuilder setM_InOutLine(@Nullable final I_M_InOutLine receiptLine) { this._receiptLine = receiptLine; return this; } private StockQtyAndUOMQty getQtyToAllocate() { Check.assumeNotNull(_qtyToAllocate, "q...
} @Override public ReceiptScheduleAllocBuilder setQtyWithIssues(@NonNull final StockQtyAndUOMQty qtyWithIssues) { this._qtyWithIssues = qtyWithIssues; return this; } private StockQtyAndUOMQty getQtyWithIssues() { if (_qtyWithIssues == null) { return _qtyToAllocate.toZero(); } return _qtyWithIssue...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\api\impl\ReceiptScheduleAllocBuilder.java
1
请完成以下Java代码
public boolean isUsageVariance() { return this == UsageVariance; } public boolean isMaterialUsageVariance(@Nullable final PPOrderBOMLineId orderBOMLineId) { return this == UsageVariance && orderBOMLineId != null; } public boolean isResourceUsageVariance(@Nullable final PPOrderRoutingActivityId activityId) ...
public boolean isRateVariance() { return this == RateVariance; } public boolean isMethodChangeVariance() { return this == MethodChangeVariance; } public boolean isMaterialMethodChangeVariance(@Nullable final PPOrderBOMLineId orderBOMLineId) { return this == MethodChangeVariance && orderBOMLineId != null;...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\api\CostCollectorType.java
1
请完成以下Java代码
public void setM_InOutLine_ID (int M_InOutLine_ID) { if (M_InOutLine_ID < 1) set_Value (COLUMNNAME_M_InOutLine_ID, null); else set_Value (COLUMNNAME_M_InOutLine_ID, Integer.valueOf(M_InOutLine_ID)); } /** Get Shipment/Receipt Line. @return Line on Shipment or Receipt document */ public int getM_In...
if (ii == null) return 0; return ii.intValue(); } /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Process Now. @return Process Now */ public boolean isProcessing () ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_LandedCost.java
1
请完成以下Java代码
public String[] getParameterValues(String name) { if (name != null) { validateAllowedParameterName(name); } String[] values = super.getParameterValues(name); if (values != null) { for (String value : values) { validateAllowedParameterValue(name, value); } } return values; } priva...
} private void validateAllowedParameterValue(String name, String value) { if (!StrictHttpFirewall.this.allowedParameterValues.test(value)) { throw new RequestRejectedException("The request was rejected because the parameter: \"" + name + " \" has a value \"" + value + "\" that is not allowed."); } ...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\firewall\StrictHttpFirewall.java
1
请完成以下Java代码
public static Charset getCharset() { final String charsetName = getProperty(P_CHARSET); if (Check.isBlank(charsetName)) { return Charset.defaultCharset(); } try { return Charset.forName(charsetName); } catch (final Exception ignored) { } return Charset.defaultCharset(); }
public static String getPropertyFileName() { return s_propertyFileName; } // public static class IsNotSwingClient implements Condition // { // @Override // public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) // { // return Ini.getRunMode() != RunMode.SWING_CLIENT; // } // } } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\Ini.java
1
请完成以下Java代码
public List<String> getTenantIds() { return tenantIds; } public List<List<String>> getSafeProcessInstanceIds() { return safeProcessInstanceIds; } public void setSafeProcessInstanceIds(List<List<String>> safeProcessInstanceIds) { this.safeProcessInstanceIds = safeProcessInstance...
return calledProcessInstanceIds; } public void setCalledProcessInstanceIds(Set<String> calledProcessInstanceIds) { this.calledProcessInstanceIds = calledProcessInstanceIds; } public List<List<String>> getSafeCalledProcessInstanceIds() { return safeCalledProcessInstanceIds; } p...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\HistoricActivityInstanceQueryImpl.java
1
请完成以下Java代码
public static void addOpaque(JComponent c, final boolean opaque) { ContainerAdapter ca = new ContainerAdapter() { @Override public void componentAdded(ContainerEvent e) { setOpaque(e.getChild()); } private void setOpaque(Component c) { //ignores all selectable items, like buttons ...
if(c == o.getKeyChar()) { if(c == o.getKeyChar()) { if(o.getModifiers() != Event.SHIFT_MASK+Event.CTRL_MASK) { m = Event.SHIFT_MASK+Event.CTRL_MASK; } else if(o.getModifiers() != Event.SHIFT_MASK+Event.ALT_MASK) { m = Event.SHIFT_MASK+Event.ALT_MASK; } else ...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\tools\swing\SwingTool.java
1
请完成以下Java代码
public void setOrg_ID (int Org_ID) { if (Org_ID < 1) set_Value (COLUMNNAME_Org_ID, null); else set_Value (COLUMNNAME_Org_ID, Integer.valueOf(Org_ID)); } /** Get Organization. @return Organizational entity within client */ public int getOrg_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_Org...
Integer ii = (Integer)get_Value(COLUMNNAME_PA_Goal_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Goal Restriction. @param PA_GoalRestriction_ID Performance Goal Restriction */ public void setPA_GoalRestriction_ID (int PA_GoalRestriction_ID) { if (PA_GoalRestriction_ID < 1) se...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_GoalRestriction.java
1
请完成以下Java代码
public static JsonExpirationDate ofLocalDate(@NonNull final LocalDate date) { return new JsonExpirationDate(toYYMMDD(date), date); } public static JsonExpirationDate ofNullableLocalDate(@Nullable final LocalDate date) { return date != null ? ofLocalDate(date) : null; } private static final DateTimeFormatter...
else { return FORMAT_yyMMdd.format(localDate); } } @JsonValue public String toJson() { return toYYMMDDString(); } public String toYYMMDDString() { return yyMMdd; } public LocalDate toLocalDate() { return localDate; } public Timestamp toTimestamp() { return TimeUtil.asTimestamp(toLocalDat...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java\de\metas\vertical\pharma\securpharm\client\schema\JsonExpirationDate.java
1
请完成以下Java代码
public ImmutableMap<ReceiptScheduleId, ReceiptSchedule> getByIds(@NonNull final ImmutableSet<ReceiptScheduleId> receiptScheduleIds) { final List<I_M_ReceiptSchedule> records = loadByRepoIdAwares(receiptScheduleIds, I_M_ReceiptSchedule.class); final ImmutableMap.Builder<ReceiptScheduleId, ReceiptSchedule> result = ...
@NonNull @Builder.Default QueryLimit limit = QueryLimit.NO_LIMIT; Instant canBeExportedFrom; APIExportStatus exportStatus; @Builder.Default boolean includeWithQtyToDeliverZero = false; @Builder.Default boolean includeProcessed = false; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\ReceiptScheduleRepository.java
1
请在Spring Boot框架中完成以下Java代码
public class DemoConsumerApplication { public static void main(String[] args) { SpringApplication.run(DemoConsumerApplication.class, args); } @Configuration public class RestTemplateConfiguration { @Bean public RestTemplate restTemplate() { return new RestTemplate(...
if (true) { // 获取服务 `demo-provider` 对应的实例列表 List<ServiceInstance> instances = discoveryClient.getInstances("demo-provider"); // 选择第一个 instance = instances.size() > 0 ? instances.get(0) : null; } else { instance = loadBalancerCli...
repos\SpringBoot-Labs-master\labx-01-spring-cloud-alibaba-nacos-discovery\labx-01-sca-nacos-discovery-demo01-consumer\src\main\java\cn\iocoder\springcloudalibaba\labx01\nacosdemo\consumer\DemoConsumerApplication.java
2
请完成以下Java代码
public Iterator<DDOrderCandidateAlloc> iterator() { return list.iterator(); } public Map<DDOrderCandidateId, DDOrderCandidateAllocList> groupByCandidateId() { if (list.isEmpty()) { return ImmutableMap.of(); } return list.stream().collect(Collectors.groupingBy(DDOrderCandidateAlloc::getDdOrderCandidat...
} public Set<Integer> getIds() { if (list.isEmpty()) { return ImmutableSet.of(); } return list.stream() .map(DDOrderCandidateAlloc::getId) .filter(id -> id > 0) .collect(ImmutableSet.toImmutableSet()); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddordercandidate\DDOrderCandidateAllocList.java
1
请完成以下Java代码
public void setPostAccount(String value) { this.postAccount = value; } /** * Gets the value of the iban property. * * @return * possible object is * {@link String } * */ public String getIban() { return iban; } /** * Sets the va...
/** * Sets the value of the codingLine1 property. * * @param value * allowed object is * {@link String } * */ public void setCodingLine1(String value) { this.codingLine1 = value; } /** * Gets the value of the codingLine2 property. * *...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\EsrRedType.java
1
请在Spring Boot框架中完成以下Java代码
private MaterialDescriptor createSupplyMaterialDescriptor( @NonNull final AbstractDDOrderEvent ddOrderEvent, @NonNull final DDOrderLine ddOrderLine) { final MaterialDescriptorBuilder materialDescriptorBuilder = initCommonDescriptorBuilder(ddOrderLine); return materialDescriptorBuilder .date(computeDate(...
{ if (ddOrderCreatedEvent.getDdOrder().isSimulated()) { return; } final OrgId orgId = ddOrderCreatedEvent.getOrgId(); final ZoneId timeZone = orgDAO.getTimeZone(orgId); final DDOrderMainDataHandler mainDataUpdater = DDOrderMainDataHandler.builder() .ddOrderDetailRequestHandler(ddOrderDetailRequestH...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\ddorder\DDOrderAdvisedOrCreatedHandler.java
2
请完成以下Java代码
public int getId() { return id; } public void setId(int id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { thi...
this.role = role; } public String getPermission() { return permission; } public void setPermission(String permission) { this.permission = permission; } // plugin public boolean validPermission(int jobGroup){ if (this.role == 1) { return true; } else { if (StringUtils.hasText(this.permission)) { ...
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\model\XxlJobUser.java
1
请在Spring Boot框架中完成以下Java代码
public Page<ArticlePreviewDto> previewForPublicHomePage(Pageable pageable) { return articleRepository.findWithUserAndAttachedFilesByStatus(ArticleStatus.PUBLISHED, pageable) .map(ArticleMapper.INSTANCE::mapForPreviewListing); } @Cacheable(cacheNames = "previewAllWithFilesByUser") public...
return articleRepository.findCreatedByUserIdById(articleId); } public Optional<Article> handleReview(ArticleReviewResultDto dto) { return articleRepository.findWithModifiedUserByIdAndStatus(dto.getId(), ArticleStatus.FLAGGED_FOR_MANUAL_REVIEW) .map(n -> { transactionTemplate...
repos\spring-boot-web-application-sample-master\main-app\main-webapp\src\main\java\gt\app\modules\article\ArticleService.java
2
请完成以下Java代码
public LookupValuesList removeAll(final LookupValuesList valuesToRemove) { // If nothing to remove, we can return this if (valuesToRemove.isEmpty()) { return this; } // If this list is empty, we can return it if (valuesById.isEmpty()) { return this; } // Create a new values map which does not...
* @see #isOrdered() */ public LookupValuesList notOrdered() { return ordered(false); } public LookupValuesPage pageByOffsetAndLimit(final int offset, final int limit) { final int size = valuesById.size(); final int lastIndex = size - 1; final int pageFirstIndex = Math.max(offset, 0); final int pageLa...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\LookupValuesList.java
1
请完成以下Java代码
public Document initializeAsNewDocument(final IntSupplier newDocumentIdSupplier, final String version) { return initializeAsNewDocument(new SimpleDocumentValuesSupplier(DocumentId.supplier(newDocumentIdSupplier), version)); } public Document initializeAsExistingRecord(@NonNull final DocumentValuesSupplier doc...
private boolean isWritable() { final Document parentDocument = getParentDocument(); if (parentDocument == null) { return isNewDocument(); } else { return parentDocument.isWritable(); } } private ReentrantReadWriteLock createLock() { // don't create locks for any other entity whi...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\Document.java
1
请完成以下Java代码
public void setM_Tour_Instance(de.metas.tourplanning.model.I_M_Tour_Instance M_Tour_Instance) { set_ValueFromPO(COLUMNNAME_M_Tour_Instance_ID, de.metas.tourplanning.model.I_M_Tour_Instance.class, M_Tour_Instance); } /** Set Tour Instance. @param M_Tour_Instance_ID Tour Instance */ @Override public void setM...
set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); } /** Get Verarbeitet. @return Checkbox sagt aus, ob der Beleg verarbeitet wurde. */ @Override public boolean isProcessed () { Object oo = get_Value(COLUMNNAME_Processed); if (oo != null) { if (oo instanceof Boolean) return ((Bo...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\tourplanning\model\X_M_DeliveryDay.java
1
请完成以下Java代码
public Mono<Authentication> convert(ServerWebExchange serverWebExchange) { // @formatter:off return this.authorizationRequestRepository.removeAuthorizationRequest(serverWebExchange) .switchIfEmpty(oauth2AuthorizationException(AUTHORIZATION_REQUEST_NOT_FOUND_ERROR_CODE)) .flatMap((authorizationRequest) -> au...
return this.clientRegistrationRepository.findByRegistrationId(id); }) .switchIfEmpty(oauth2AuthorizationException(CLIENT_REGISTRATION_NOT_FOUND_ERROR_CODE)) .map((clientRegistration) -> { OAuth2AuthorizationResponse authorizationResponse = convertResponse(exchange); OAuth2AuthorizationCodeAuthenti...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\web\server\ServerOAuth2AuthorizationCodeAuthenticationTokenConverter.java
1
请在Spring Boot框架中完成以下Java代码
public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog> implements ISysLogService { @Resource private SysLogMapper sysLogMapper; /** * @功能:清空所有日志记录 */ @Override public void removeAll() { sysLogMapper.removeAll(); } @Override public Long findTotalVisitCount() { return sysLogMapper.fi...
public Long findTodayVisitCount(Date dayStart, Date dayEnd) { return sysLogMapper.findTodayVisitCount(dayStart,dayEnd); } @Override public Long findTodayIp(Date dayStart, Date dayEnd) { return sysLogMapper.findTodayIp(dayStart,dayEnd); } @Override public List<Map<String,Object>> findVisitCount(Date dayStart...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\service\impl\SysLogServiceImpl.java
2
请完成以下Java代码
public void setIsSOTrx (final @Nullable java.lang.String IsSOTrx) { set_ValueNoCheck (COLUMNNAME_IsSOTrx, IsSOTrx); } @Override public java.lang.String getIsSOTrx() { return get_ValueAsString(COLUMNNAME_IsSOTrx); } @Override public void setPOReference (final @Nullable java.lang.String POReference) { s...
@Override public void setTaxAmtSource (final @Nullable BigDecimal TaxAmtSource) { set_ValueNoCheck (COLUMNNAME_TaxAmtSource, TaxAmtSource); } @Override public BigDecimal getTaxAmtSource() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_TaxAmtSource); return bd != null ? bd : BigDecimal.ZERO; } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.datev\src\main\java-gen\de\metas\datev\model\X_RV_DATEV_Export_Fact_Acct_Invoice.java
1
请完成以下Java代码
public List<DataEntryRecordField<?>> deserialize(@NonNull final String recordString) { final ImmutableList.Builder<DataEntryRecordField<?>> result = ImmutableList.builder(); final JSONDataEntryRecord record = delegate.readValue(recordString); final Map<Integer, CreatedUpdatedInfo> createdUpdatedInfos = record.g...
DataEntryFieldId.ofRepoId(data.getKey()), createdUpdatedInfos.get(data.getKey()), data.getValue()); result.add(dataEntryRecordField); } for (final Entry<Integer, String> data : record.getStrings().entrySet()) { final DataEntryRecordFieldString dataEntryRecordField = DataEntryRecordFieldString .o...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dataentry\data\json\JSONDataEntryRecordMapper.java
1
请完成以下Java代码
public class ASCIIArt implements Runnable { // |2| @Option(names = { "-s", "--font-size" }, description = "Font size") // |3| int fontSize = 14; @Parameters(paramLabel = "<word>", defaultValue = "Hello, picocli", // |4| description = "Words to be translated into ASCII art.") private St...
graphics2D.drawString(String.join(" ", words), 6, 24); for (int y = 0; y < 32; y++) { StringBuilder builder = new StringBuilder(); for (int x = 0; x < 144; x++) builder.append(image.getRGB(x, y) == -16777216 ? " " : image.getRGB(x, y) == -1 ? "#" : "*"); if (...
repos\springboot-demo-master\picocli\src\main\java\com\et\picocli\command\ASCIIArt.java
1
请完成以下Java代码
public void jobsToAcquire(String processEngine, int numJobsToAcquire) { logDebug("034", "Attempting to acquire {} jobs for the process engine '{}'", numJobsToAcquire, processEngine); } public void rejectedJobExecutions(String processEngine, int numJobsRejected) { logDebug("035", "Jobs execution rejections ...
public void numJobsInQueue(String processEngine, int numJobsInQueue, int maxQueueSize) { logDebug("038", "Jobs currently in queue to be executed for the process engine '{}' : {} (out of the max queue size : {})", processEngine, numJobsInQueue, maxQueueSize); } public void availableThreadsCalcul...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\JobExecutorLogger.java
1
请在Spring Boot框架中完成以下Java代码
public int getMinIdle() { return this.minIdle; } public void setMinIdle(int minIdle) { this.minIdle = minIdle; } public Duration getMaxIdleTime() { return this.maxIdleTime; } public void setMaxIdleTime(Duration maxIdleTime) { this.maxIdleTime = maxIdleTime; } public @Nullable Duration ge...
} public int getMaxSize() { return this.maxSize; } public void setMaxSize(int maxSize) { this.maxSize = maxSize; } public @Nullable String getValidationQuery() { return this.validationQuery; } public void setValidationQuery(@Nullable String validationQuery) { this.validationQuery = validat...
repos\spring-boot-4.0.1\module\spring-boot-r2dbc\src\main\java\org\springframework\boot\r2dbc\autoconfigure\R2dbcProperties.java
2
请完成以下Java代码
public MessageEventSubscriptionEntity findMessageStartEventSubscriptionByName(String messageName, String tenantId) { Map<String, String> params = new HashMap<String, String>(); params.put("eventName", messageName); if (tenantId != null && !tenantId.equals(ProcessEngineConfiguration.NO_TENANT_ID)...
} protected List<SignalEventSubscriptionEntity> toSignalEventSubscriptionEntityList( List<EventSubscriptionEntity> result ) { List<SignalEventSubscriptionEntity> signalEventSubscriptionEntities = new ArrayList< SignalEventSubscriptionEntity >(result.size()); for (Eve...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\data\impl\MybatisEventSubscriptionDataManager.java
1
请完成以下Java代码
public StringElement reset() { setTagText(""); return this; } /** * Set Tag Text * @param text text * @return Element */ public Element setTagText (String text) { if (text != null && text.length() > 0) { StringCharacterIterator sci = new StringCharacterIterator(text); ...
public StringElement addElement(String element) { addElement(Integer.toString(element.hashCode()),element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public StringElement addElement(Element element) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\StringElement.java
1
请在Spring Boot框架中完成以下Java代码
OtlpHttpSpanExporter otlpHttpSpanExporter(OtlpTracingProperties properties, OtlpTracingConnectionDetails connectionDetails, ObjectProvider<MeterProvider> meterProvider, ObjectProvider<OtlpHttpSpanExporterBuilderCustomizer> customizers) { OtlpHttpSpanExporterBuilder builder = OtlpHttpSpanExporter.builder() ...
ObjectProvider<OtlpGrpcSpanExporterBuilderCustomizer> customizers) { OtlpGrpcSpanExporterBuilder builder = OtlpGrpcSpanExporter.builder() .setEndpoint(connectionDetails.getUrl(Transport.GRPC)) .setTimeout(properties.getTimeout()) .setConnectTimeout(properties.getConnectTimeout()) .setCompression(prop...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-tracing-opentelemetry\src\main\java\org\springframework\boot\micrometer\tracing\opentelemetry\autoconfigure\otlp\OtlpTracingConfigurations.java
2
请完成以下Java代码
public Collection<ConfigAttribute> getAttributes(Method method, @Nullable Class<?> targetClass) { DefaultCacheKey cacheKey = new DefaultCacheKey(method, targetClass); synchronized (this.attributeCache) { Collection<ConfigAttribute> cached = this.attributeCache.get(cacheKey); // Check for canonical value indic...
private final Method method; private final @Nullable Class<?> targetClass; DefaultCacheKey(Method method, @Nullable Class<?> targetClass) { this.method = method; this.targetClass = targetClass; } @Override public boolean equals(Object other) { DefaultCacheKey otherKey = (DefaultCacheKey) other; ...
repos\spring-security-main\access\src\main\java\org\springframework\security\access\method\DelegatingMethodSecurityMetadataSource.java
1