instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public class BottomCategory implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String name; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "middle_category_id") private Mid...
} @Override public int hashCode() { return 2018; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof BottomCategory)) { return false; } return id != null && id.equals(((Bott...
repos\Hibernate-SpringBoot-master\HibernateSpringBootDtoSqlResultSetMapping\src\main\java\com\app\entity\BottomCategory.java
2
请完成以下Java代码
public int compareTo(final HUTopLevel other) { if (this == other) { return 0; } if (other == null) { return +1; // nulls last } return hashKey.compareTo(other.hashKey); } /** * @return top level HU; never return <code>null</code> */ public I_M_HU getM_HU_TopLevel()
{ return topLevelHU; } public I_M_HU getM_LU_HU() { return luHU; } public I_M_HU getM_TU_HU() { return tuHU; } public I_M_HU getVHU() { return vhu; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\util\HUTopLevel.java
1
请在Spring Boot框架中完成以下Java代码
public ReferenceType getOrdrspReference() { return ordrspReference; } /** * Sets the value of the ordrspReference property. * * @param value * allowed object is * {@link ReferenceType } * */ public void setOrdrspReference(ReferenceType value) { ...
/** * Gets the value of the supplierOrderReference property. * * @return * possible object is * {@link ReferenceType } * */ public ReferenceType getSupplierOrderReference() { return supplierOrderReference; } /** * Sets the value of the supplierO...
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\DESADVExtensionType.java
2
请完成以下Java代码
public int hashCode() { final int prime = 31; int result = 1; result = (prime * result) + ((id == null) ? 0 : id.hashCode()); result = (prime * result) + ((name == null) ? 0 : name.hashCode()); return result; } @Override public boolean equals(Object obj) { if...
return false; } } else if (!id.equals(other.id)) { return false; } if (name == null) { if (other.name != null) { return false; } } else if (!name.equals(other.name)) { return false; } return true;...
repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\custom\persistence\model\Foo.java
1
请完成以下Java代码
public void setAD_Language (final java.lang.String AD_Language) { set_ValueNoCheck (COLUMNNAME_AD_Language, AD_Language); } @Override public java.lang.String getAD_Language() { return get_ValueAsString(COLUMNNAME_AD_Language); } @Override public org.compiere.model.I_AD_Process getAD_Process() { return...
{ return get_ValueAsString(COLUMNNAME_Description); } @Override public void setHelp (final java.lang.String Help) { set_Value (COLUMNNAME_Help, Help); } @Override public java.lang.String getHelp() { return get_ValueAsString(COLUMNNAME_Help); } @Override public void setIsTranslated (final boolean Is...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Process_Trl.java
1
请完成以下Java代码
public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Tag tag = (Tag) o; ...
StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each...
repos\tutorials-master\spring-swagger-codegen-modules\spring-openapi-generator-api-client\src\main\java\com\baeldung\petstore\client\model\Tag.java
1
请完成以下Java代码
public static Class<?> forType(String type) { return forType(type, ObjectValue.class); } public static Class<?> forType(String type, Class<?> defaultType) { return typeRegistry.getOrDefault(type, defaultType); } public static String forClass(Class<?> clazz) { return classRegist...
public static Optional<Class<?>> getContainerType(Class<?> clazz, Object value) { return Stream.of(containerTypes) .filter(type -> type.isInstance(value)) .findFirst(); } public static boolean canConvert(Object value) { Class<?> clazz = value.getClass(); return ...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\ProcessVariablesMapTypeRegistry.java
1
请在Spring Boot框架中完成以下Java代码
public class PmsOperatorLog extends PermissionBaseEntity { private static final long serialVersionUID = 742891253537618199L; private Long operatorId; // 操作员ID private String operatorName; // 操作员登录名 private String operateType; // 操作类型(参与枚举:OperatorLogTypeEnum,1:增加,2:修改,3:删除,4:查询,5:登录) private String ip; // IP地址 ...
return ip; } public void setIp(String ip) { this.ip = ip; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } }
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\permission\entity\PmsOperatorLog.java
2
请在Spring Boot框架中完成以下Java代码
public class ExponentialBackoffRetryService { private final RestTemplate restTemplate; private int maxRetries = 5; private long initialDelay = 1000; public ExponentialBackoffRetryService(RestTemplate restTemplate) { this.restTemplate = restTemplate; } public String makeRequestWithExpo...
try { Thread.sleep(delay); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); throw new RuntimeException("Retry interrupted", ie); } } } throw new RuntimeException("Unexpected err...
repos\tutorials-master\spring-boot-modules\spring-boot-retries\src\main\java\com\baeldung\retries\service\ExponentialBackoffRetryService.java
2
请完成以下Java代码
public ServletOutputStream getOutputStream() throws IOException { return new ServletOutputStream() { @Override public void write(int b) throws IOException { builder.append(Character.valueOf((char) b)); } @Override public void setWriteListener(WriteListener listener) { } @Override public...
@Override public int read() throws IOException { return body.read(); } @Override public void setReadListener(ReadListener listener) { } @Override public boolean isReady() { return true; } @Override public boolean isFinished() { return body.available() <= 0; } }; } }
repos\spring-cloud-gateway-main\spring-cloud-gateway-proxyexchange-webmvc\src\main\java\org\springframework\cloud\gateway\mvc\ProxyExchange.java
1
请完成以下Java代码
public class BpmnMailActivityDelegate extends BaseMailActivityDelegate<DelegateExecution> implements JavaDelegate { @Override public void execute(DelegateExecution execution) { prepareAndExecuteRequest(execution); } @Override protected FlowableMailClient getMailClient(DelegateExecu...
} return mailClient; } @Override protected Expression createExpression(String expressionText) { return CommandContextUtil.getProcessEngineConfiguration().getExpressionManager().createExpression(expressionText); } @Override protected ContentService getContentService() { ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\mail\BpmnMailActivityDelegate.java
1
请完成以下Spring Boot application配置
spring: application: name: user-service # Spring 应用名 cloud: nacos: # Nacos 作为注册中心的配置项 discovery: server-addr: 127.0.0.1:8848 # Nacos 服务器地址 "'lb://'+serviceId" server:
port: ${random.int[10000,19999]} # 服务器端口。默认为 8080 # port: 18080 # 服务器端口。默认为 8080
repos\SpringBoot-Labs-master\labx-08-spring-cloud-gateway\labx-08-sc-user-service\src\main\resources\application.yaml
2
请完成以下Java代码
public class SetRemovalTimeToHistoricBatchesDto extends AbstractSetRemovalTimeDto { protected String[] historicBatchIds; protected HistoricBatchQueryDto historicBatchQuery; protected boolean hierarchical; public String[] getHistoricBatchIds() { return historicBatchIds; } public void setHistoricBatchI...
return historicBatchQuery; } public void setHistoricBatchQuery(HistoricBatchQueryDto historicBatchQuery) { this.historicBatchQuery = historicBatchQuery; } public boolean isHierarchical() { return hierarchical; } public void setHierarchical(boolean hierarchical) { this.hierarchical = hierarchi...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\batch\removaltime\SetRemovalTimeToHistoricBatchesDto.java
1
请完成以下Java代码
public class DelegateExpressionCaseExecutionListener implements CaseExecutionListener { protected Expression expression; private final List<FieldDeclaration> fieldDeclarations; public DelegateExpressionCaseExecutionListener(Expression expression, List<FieldDeclaration> fieldDeclarations) { this.expression =...
} } /** * returns the expression text for this execution listener. Comes in handy if you want to * check which listeners you already have. */ public String getExpressionText() { return expression.getExpressionText(); } public List<FieldDeclaration> getFieldDeclarations() { return fieldDecla...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\listener\DelegateExpressionCaseExecutionListener.java
1
请完成以下Java代码
public void handle(AddProductCommand command) { if (orderConfirmed) { throw new OrderAlreadyConfirmedException(orderId); } String productId = command.getProductId(); if (orderLines.containsKey(productId)) { throw new DuplicateOrderLineException(productId); ...
} @EventSourcingHandler public void on(OrderConfirmedEvent event) { this.orderConfirmed = true; } @EventSourcingHandler public void on(ProductAddedEvent event) { String productId = event.getProductId(); this.orderLines.put(productId, new OrderLine(productId)); } @E...
repos\tutorials-master\patterns-modules\axon\src\main\java\com\baeldung\axon\commandmodel\order\OrderAggregate.java
1
请在Spring Boot框架中完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } public String getProdName() { return prodName; } public void setProdName(String prodName) { this.prodName = prodName; } public String getMarketPrice() { return ...
} public void setSubCategEntityID(String subCategEntityID) { this.subCategEntityID = subCategEntityID; } public String getBrandEntityID() { return brandEntityID; } public void setBrandEntityID(String brandEntityID) { this.brandEntityID = brandEntityID; } public In...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\req\product\ProdInsertReq.java
2
请完成以下Java代码
public String getRootProcessInstanceId() { return rootProcessInstanceId; } public void setRootProcessInstanceId(String rootProcessInstanceId) { this.rootProcessInstanceId = rootProcessInstanceId; } public String getExternalTaskId() { return externalTaskId; } public void setExternalTaskId(Stri...
+ ", jobDefinitionId=" + jobDefinitionId + ", batchId=" + batchId + ", operationId=" + operationId + ", operationType=" + operationType + ", userId=" + userId + ", timestamp=" + timestamp + ", property=" + property + ", orgValue=" + orgValue + ", newValue=...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\UserOperationLogEntryEventEntity.java
1
请在Spring Boot框架中完成以下Java代码
public void setDefaultRedisSerializer(RedisSerializer<Object> defaultRedisSerializer) { this.defaultRedisSerializer = defaultRedisSerializer; } @Autowired(required = false) public void setSessionRepositoryCustomizer( ObjectProvider<ReactiveSessionRepositoryCustomizer<ReactiveRedisSessionRepository>> sessionRep...
String redisNamespaceValue = attributes.getString("redisNamespace"); if (StringUtils.hasText(redisNamespaceValue)) { this.redisNamespace = this.embeddedValueResolver.resolveStringValue(redisNamespaceValue); } this.saveMode = attributes.getEnum("saveMode"); } private ReactiveRedisTemplate<String, Object> cre...
repos\spring-session-main\spring-session-data-redis\src\main\java\org\springframework\session\data\redis\config\annotation\web\server\RedisWebSessionConfiguration.java
2
请完成以下Java代码
public LookupValuesPage getFieldTypeahead(final String fieldName, final String query) { return lookups.getFieldTypeahead(fieldName, query); } public LookupValuesList getFieldDropdown(final String fieldName) { return lookups.getFieldDropdown(fieldName); } public BPartnerId getBpartnerId() { return BPartne...
public String getBpartnerDisplayName() { return bpartner.getDisplayName(); } public boolean isVendor() { return !isCustomer(); } public CurrencyId getCurrencyId() { return CurrencyId.ofRepoId(currency.getIdAsInt()); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\pricingconditions\view\PricingConditionsRow.java
1
请完成以下Java代码
public class Evaluator { public static double[] evaluate(String testPath, String predictedPath, HashSet<String> puncTags) throws IOException { CoNLLReader goldReader = new CoNLLReader(testPath); CoNLLReader predictedReader = new CoNLLReader(predictedPath); ArrayList<CompactTree> goldCon...
if (ph == gh) { unlabMatch++; if (pl.equals(gl)) labMatch++; else { fullMatch = false; } } ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dependency\perceptron\accessories\Evaluator.java
1
请在Spring Boot框架中完成以下Java代码
private ApiAuditConfigsMap retrieveMap() { return ApiAuditConfigsMap.ofList( queryBL.createQueryBuilder(I_API_Audit_Config.class) .create() .stream() .map(ApiAuditConfigRepository::fromRecord) .collect(ImmutableList.toImmutableList())); } @NonNull private static ApiAuditConfig fromRec...
.forceProcessedAsync(record.isForceProcessedAsync()) .keepRequestDays(record.getKeepRequestDays()) .keepRequestBodyDays(record.getKeepRequestBodyDays()) .keepResponseDays(record.getKeepResponseDays()) .keepResponseBodyDays(record.getKeepResponseBodyDays()) .keepErroredRequestDays(record.getKeepError...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\audit\apirequest\config\ApiAuditConfigRepository.java
2
请完成以下Java代码
public String getTaxId() { return taxId; } /** * Sets the value of the taxId property. * * @param value * allowed object is * {@link String } * */ public void setTaxId(String value) { this.taxId = value; } /** * Gets the value o...
* {@link String } * */ public void setTaxTp(String value) { this.taxTp = value; } /** * Gets the value of the authstn property. * * @return * possible object is * {@link TaxAuthorisation1 } * */ public TaxAuthorisation1 getAuth...
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\TaxParty2.java
1
请完成以下Java代码
public boolean isSortControlSupported() { return sortControlSupported; } public void setSortControlSupported(boolean sortControlSupported) { this.sortControlSupported = sortControlSupported; } public String getGroupIdAttribute() { return groupIdAttribute; } public void setGroupIdAttribute(Str...
} public boolean isAllowAnonymousLogin() { return allowAnonymousLogin; } public void setAllowAnonymousLogin(boolean allowAnonymousLogin) { this.allowAnonymousLogin = allowAnonymousLogin; } public boolean isAuthorizationCheckEnabled() { return authorizationCheckEnabled; } public void setAut...
repos\camunda-bpm-platform-master\engine-plugins\identity-ldap\src\main\java\org\camunda\bpm\identity\impl\ldap\LdapConfiguration.java
1
请完成以下Java代码
public class JaxbDateUnmarshalling { public static final String DEFAULT_DATE_UNMARSHALLING_FILE = "default-date-unmarshalling.xml"; public static final String CUSTOM_DATE_UNMARSHALLING_FILE = "custom-date-unmarshalling.xml"; public static Book unmarshalDates(InputStream inputFile) throws JAXBException { ...
} public static InputStream getInputStream(String file) { ClassLoader classLoader = JaxbDateUnmarshalling.class.getClassLoader(); return classLoader.getResourceAsStream(file); } public static void main(String[] args) throws JAXBException { Book book = unmarshalDates(getInputStream(...
repos\tutorials-master\xml-modules\jaxb\src\main\java\com\baeldung\jaxb\dateunmarshalling\JaxbDateUnmarshalling.java
1
请完成以下Java代码
public static byte[] encrypt(byte[] content, byte[] aesKey) { return aes(Pkcs7Encoder.encode(content), aesKey, Cipher.ENCRYPT_MODE); } /** * 加密 * * @param encrypted 内容 * @param aesKey 密钥 * @return byte[] */ public static byte[] decrypt(byte[] encrypted, byte[] aesKey) { return Pkcs7Encoder.decode...
// 获得补位所用的字符 byte pad = (byte) (amountToPad & 0xFF); byte[] pads = new byte[amountToPad]; for (int index = 0; index < amountToPad; index++) { pads[index] = pad; } int length = count + amountToPad; byte[] dest = new byte[length]; System.arraycopy(src, 0, dest, 0, count); System.arraycopy(pads...
repos\SpringBlade-master\blade-gateway\src\main\java\org\springblade\gateway\utils\JwtCrypto.java
1
请完成以下Java代码
public void setSumDeliveredInStockingUOM (final BigDecimal SumDeliveredInStockingUOM) { set_Value (COLUMNNAME_SumDeliveredInStockingUOM, SumDeliveredInStockingUOM); } @Override public BigDecimal getSumDeliveredInStockingUOM() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_SumDeliveredInStockingUOM)...
public BigDecimal getSumOrderedInStockingUOM() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_SumOrderedInStockingUOM); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setUserFlag (final @Nullable java.lang.String UserFlag) { set_Value (COLUMNNAME_UserFlag, UserFlag); } @Over...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_Desadv.java
1
请完成以下Java代码
public void setDecisionLogic(DmnDecisionLogic decisionLogic) { this.decisionLogic = decisionLogic; } public DmnDecisionLogic getDecisionLogic() { return decisionLogic; } public void setRequiredDecision(List<DmnDecision> requiredDecision) { this.requiredDecision = requiredDecision; } @Override...
@Override public boolean isDecisionTable() { return decisionLogic != null && decisionLogic instanceof DmnDecisionTableImpl; } @Override public String toString() { return "DmnDecisionTableImpl{" + " key= "+ key + ", name= "+ name + ", requiredDecision=" + requiredDecision + ", de...
repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DmnDecisionImpl.java
1
请完成以下Java代码
private int getItemsPerBatch() { return sysConfigBL.getIntValue(SYSCONFIG_ItemsPerBatch, DEFAULT_ItemsPerBatch); } /** * IC update result. * * @author metas-dev <dev@metasfresh.com> */ private static final class ICUpdateResult { private int countOk = 0; private int countErrors = 0; public void ad...
/** * IC update exception handler */ private final class ICTrxItemExceptionHandler extends FailTrxItemExceptionHandler { private final ICUpdateResult result; public ICTrxItemExceptionHandler(@NonNull final ICUpdateResult result) { this.result = result; } /** * Resets the given IC to its old valu...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceCandInvalidUpdater.java
1
请在Spring Boot框架中完成以下Java代码
public class DruidConfig { @Bean @ConfigurationProperties(prefix = "spring.datasource") public DataSource getDataSource(){ return new DruidDataSource(); } // 配置Druid监控 // 配置一个管理后台的Servlet @Bean public ServletRegistrationBean statViewServlet(){ ServletRegistrationBean bean...
bean.setInitParameters(initParams); return bean; } //2、配置一个web监控的filter @Bean public FilterRegistrationBean webStatFilter(){ FilterRegistrationBean bean = new FilterRegistrationBean(); bean.setFilter(new WebStatFilter()); Map<String,String> initParams = new HashMap<>(); ...
repos\springboot-demo-master\druid\src\main\java\com\et\druid\config\DruidConfig.java
2
请完成以下Java代码
public org.eevolution.model.I_PP_Cost_Collector getPP_Cost_Collector() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_PP_Cost_Collector_ID, org.eevolution.model.I_PP_Cost_Collector.class); } @Override public void setPP_Cost_Collector(org.eevolution.model.I_PP_Cost_Collector PP_Cost_Collector) { set...
else set_Value (COLUMNNAME_PP_Cost_Collector_ID, Integer.valueOf(PP_Cost_Collector_ID)); } /** Get Manufacturing Cost Collector. @return Manufacturing Cost Collector */ @Override public int getPP_Cost_Collector_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_PP_Cost_Collector_ID); if (ii == null) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Transaction.java
1
请完成以下Java代码
public boolean isReady() { return true; } @Override public void setWriteListener(WriteListener writeListener) { } @Override public void write(int b) { outputStream.write(b); } }; } @Ove...
public PrintWriter getWriter() { return writer; } @Override public void flushBuffer() throws IOException { super.flushBuffer(); writer.flush(); } public String getBodyAsString() { writer.flush(); return outputStream.toString(); } }
repos\tutorials-master\logging-modules\log-all-requests\src\main\java\com\baeldung\logallrequests\ResponseWrapper.java
1
请完成以下Java代码
public void setCopyright(String value) { this.copyright = value; } /** * Gets the value of the description property. * * @return * possible object is * {@link String } * */ public String getDescription() { return description; } /** ...
* possible object is * {@link Long } * */ public long getId() { if (id == null) { return 0L; } else { return id; } } /** * Sets the value of the id property. * * @param value * allowed object is * ...
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\DependsOnType.java
1
请在Spring Boot框架中完成以下Java代码
private void assertValidApiKey(final String apiKey) { if (!Objects.equals(this.apiKey, apiKey)) { throw new NotLoggedInException(i18n.get("LoginService.error.notLoggedIn")); } } @GetMapping("/pullFromAppServer") public void pullFromAppServer( @RequestHeader("apiKey") final String apiKey) { assertVal...
private void pushWeeklyReports( final long bpartnerId, final long productId, final LocalDate dateFrom, final LocalDate dateTo) { final List<WeekSupply> records = productSuppliesService.getWeeklySupplies( bpartnerId, productId, dateFrom, dateTo); senderToMetasfreshService.pushWeeklyRepo...
repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\rest\MetasfreshSyncRestController.java
2
请完成以下Java代码
public class InvokeOtherAction extends InvokeExternalSystemProcess { @Override protected IExternalSystemChildConfigId getExternalChildConfigId() { // dev-note: for "Other" external system there is no "real" ChildConfig, so when `childConfigId` process param is set // (i.e. only from the AD_Scheduler) it is actua...
else if (context.isNoSelection()) { return ProcessPreconditionsResolution.rejectBecauseNoSelection(); } final ExternalSystemParentConfigId parentConfigId = ExternalSystemParentConfigId.ofRepoId(context.getSingleSelectedRecordId()); if (!ExternalSystemType.Other.getValue().equals(externalSystemConfigDAO.get...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\process\InvokeOtherAction.java
1
请完成以下Java代码
public void initialize(@NonNull final ModelValidationEngine engine, @Nullable final MClient client) { if (client != null) { m_AD_Client_ID = client.getAD_Client_ID(); } final String tableName = getTableName(); if (isDocument()) { engine.addDocValidate(tableName, this); } else { engine.addMo...
} private void executeInvokeScriptedExportConversionAction( @NonNull final ExternalSystemScriptedExportConversionConfig config, final int recordId) { final int configTableId = tableDAO.retrieveTableId(I_ExternalSystem_Config_ScriptedExportConversion.Table_Name); try { trxManager.runAfterCommit(() -> {...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\scriptedexportconversion\interceptor\ExternalSystemScriptedExportConversionInterceptor.java
1
请完成以下Java代码
private static final class ProcessInfoParameterDocumentValuesSupplier implements DocumentValuesSupplier { private final DocumentId adPInstanceId; private final Map<String, ProcessInfoParameter> processInfoParameters; public ProcessInfoParameterDocumentValuesSupplier(final DocumentId adPInstanceId, final Map<Str...
} @Override public String getVersion() { return VERSION_DEFAULT; } @Override public Object getValue(final DocumentFieldDescriptor parameterDescriptor) { return extractParameterValue(processInfoParameters, parameterDescriptor); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\adprocess\ADProcessParametersRepository.java
1
请完成以下Java代码
public IHUStorageDAO getHUStorageDAO() { return getHUStorageFactory().getHUStorageDAO(); } @Override public IHUStorageFactory getHUStorageFactory() { Check.assumeNotNull(huStorageFactory, "IHUStorageFactory member of AbstractAttributeStorageFactory {} is not null", this); return huStorageFactory; } @Over...
@Override public String toString() { final ToStringHelper stringHelper = MoreObjects.toStringHelper(this); toString(stringHelper); return stringHelper.toString(); } protected void toString(final ToStringHelper stringHelper) { // nothing on this level } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\AbstractAttributeStorageFactory.java
1
请完成以下Java代码
public Integer getYear() { return year; } /** * @param year the year to set */ public void setYear(Integer year) { this.year = year; } /** * @return the sku */ public String getSku() { return sku; } /** * @param sku the sku to set ...
*/ @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; CarModel other = (CarModel) obj; if (id == null) { if (other.id !=...
repos\tutorials-master\apache-olingo\src\main\java\com\baeldung\examples\olingo2\domain\CarModel.java
1
请完成以下Java代码
public void train(String folderPath) throws IOException { train(folderPath, "UTF-8"); } @Override public Map<String, Double> predict(Document document) { AbstractModel model = getModel(); if (model == null) { throw new IllegalStateException("未训练模型!无法执行预测!...
{ throw new IllegalArgumentException("参数 text == null"); } double[] probs = categorize(document); double max = Double.NEGATIVE_INFINITY; int best = -1; for (int i = 0; i < probs.length; i++) { if (probs[i] > max) { max ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\classification\classifiers\AbstractClassifier.java
1
请在Spring Boot框架中完成以下Java代码
public void refreshAccessToken() { lock.lock(); try { if (System.currentTimeMillis() > getTokenExpires()) { AdminSettings settings = ctx.getAdminSettingsService().findAdminSettingsByKey(TenantId.SYS_TENANT_ID, "mail"); JsonNode jsonValue = settings.getJsonValu...
} } catch (Exception e) { log.error("Unable to retrieve access token: {}", e.getMessage()); throw new RuntimeException("Error while retrieving access token: " + e.getMessage()); } finally { lock.unlock(); } } private int parsePort(String strPort) { ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\mail\TbMailSender.java
2
请完成以下Java代码
public Amount convertToRealValue(@NonNull final Amount amount) { final int toRealValueMultiplier = getToRealValueMultiplier(); return toRealValueMultiplier > 0 ? amount : amount.negate(); } public Money convertToRealValue(@NonNull final Money money) { final int toRealValueMultiplier = getToRealValueMultiplie...
return multiplier > 0 ? money : money.negate(); } private int computeFromNotAdjustedAmountMultiplier() { int multiplier = 1; // Do we have to SO adjust? if (isAPAdjusted) { final int multiplierAP = soTrx.isPurchase() ? -1 : +1; multiplier *= multiplierAP; } // Do we have to adjust by Credit Memo...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\InvoiceAmtMultiplier.java
1
请完成以下Java代码
public void setIsManual (final boolean IsManual) { set_Value (COLUMNNAME_IsManual, IsManual); } @Override public boolean isManual() { return get_ValueAsBoolean(COLUMNNAME_IsManual); } @Override public void setIsSOTrx (final boolean IsSOTrx) { set_Value (COLUMNNAME_IsSOTrx, IsSOTrx); } @Override pu...
} /** * PaymentRule AD_Reference_ID=195 * Reference name: _Payment Rule */ public static final int PAYMENTRULE_AD_Reference_ID=195; /** Cash = B */ public static final String PAYMENTRULE_Cash = "B"; /** CreditCard = K */ public static final String PAYMENTRULE_CreditCard = "K"; /** DirectDeposit = T */ p...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_PaySelectionLine.java
1
请完成以下Java代码
public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getCurrency() { return currency; } public void setCurrency(String currency) { this.currency = currency; } public Double getPrice()...
public void setStock(Integer stock) { this.stock = stock; } @Override public String toString() { return "ProductModel{" + "name='" + name + '\'' + ", description='" + description + '\'' + ", status='" + status + '\'' + ", curre...
repos\tutorials-master\spring-boot-modules\spring-boot-graphql-2\src\main\java\com\baeldung\graphqlvsrest\model\ProductModel.java
1
请完成以下Java代码
public List<CustomProperty> getCustomProperties() { return customProperties; } public void setCustomProperties(List<CustomProperty> customProperties) { this.customProperties = customProperties; } public String getSkipExpression() { return skipExpression; } public void ...
setSameDeployment(otherElement.isSameDeployment()); setDueDate(otherElement.getDueDate()); setPriority(otherElement.getPriority()); setCategory(otherElement.getCategory()); setTaskIdVariableName(otherElement.getTaskIdVariableName()); setTaskCompleterVariableName(otherElement.getT...
repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\UserTask.java
1
请完成以下Java代码
public void setA_RegistrationAttribute_ID (int A_RegistrationAttribute_ID) { if (A_RegistrationAttribute_ID < 1) set_ValueNoCheck (COLUMNNAME_A_RegistrationAttribute_ID, null); else set_ValueNoCheck (COLUMNNAME_A_RegistrationAttribute_ID, Integer.valueOf(A_RegistrationAttribute_ID)); } /** Get Registrat...
/** Set Product. @param M_Product_ID Product, Service, Item */ public void setM_Product_ID (int M_Product_ID) { if (M_Product_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Product_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); } /** Get Product. @return Pr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_RegistrationProduct.java
1
请完成以下Java代码
public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final SingleParameterStringExpression other = (SingleParameterStringExpression)obj; return Objects.equals(parameter, other.pa...
{ return StringExpressionsHelper.evaluateParam(parameter, ctx, onVariableNotFound); } catch (final Exception e) { throw ExpressionEvaluationException.wrapIfNeeded(e) .addExpression(this); } } @Override public IStringExpression resolvePartial(final Evaluatee ctx) throws ExpressionEvaluationExcepti...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\impl\SingleParameterStringExpression.java
1
请完成以下Java代码
public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Reihenfolge. @return Method of ordering records; lowest number comes first */ public int getSeqNo () { Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); if (ii == null) return 0; return ii.intValu...
public String getColumnName () { return (String)get_Value(COLUMNNAME_ColumnName); } /** Set Query Criteria Function. @param QueryCriteriaFunction column used for adding a sql function to query criteria */ public void setQueryCriteriaFunction (String QueryCriteriaFunction) { set_Value (COLUMNNAME_Query...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_InfoColumn.java
1
请完成以下Java代码
public void setDescription (final @Nullable java.lang.String Description) { set_Value (COLUMNNAME_Description, Description); } @Override public java.lang.String getDescription() { return get_ValueAsString(COLUMNNAME_Description); } @Override public void setInternalName (final java.lang.String InternalNam...
if (Mobile_Application_Action_ID < 1) set_ValueNoCheck (COLUMNNAME_Mobile_Application_Action_ID, null); else set_ValueNoCheck (COLUMNNAME_Mobile_Application_Action_ID, Mobile_Application_Action_ID); } @Override public int getMobile_Application_Action_ID() { return get_ValueAsInt(COLUMNNAME_Mobile_Appl...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Mobile_Application_Action.java
1
请完成以下Java代码
public Object getVariable(String variableName) { return getVariableLocal(variableName); } public Object getVariableLocal(String variableName) { return wrappedScope.getVariableLocal(variableName); } public <T extends TypedValue> T getVariableTyped(String variableName) { return getVariableLocalTyped...
} public boolean hasVariables() { return hasVariablesLocal(); } public boolean hasVariablesLocal() { return wrappedScope.hasVariablesLocal(); } public boolean hasVariable(String variableName) { return hasVariableLocal(variableName); } public boolean hasVariableLocal(String variableName) { ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\core\variable\scope\VariableScopeLocalAdapter.java
1
请完成以下Java代码
public String getJobDefinitionConfiguration() { return jobDefinitionConfiguration; } public void setJobDefinitionConfiguration(String jobDefinitionConfiguration) { this.jobDefinitionConfiguration = jobDefinitionConfiguration; } public String getActivityId() { return activityId; } public void ...
public boolean isSuccessLog() { return state == JobState.SUCCESSFUL.getStateCode(); } public boolean isDeletionLog() { return state == JobState.DELETED.getStateCode(); } public String getRootProcessInstanceId() { return rootProcessInstanceId; } public void setRootProcessInstanceId(String root...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricJobLogEvent.java
1
请在Spring Boot框架中完成以下Java代码
public static Book map(InputStream is) { try(JsonReader jsonReader = Json.createReader(is)) { JsonObject jsonObject = jsonReader.readObject(); Book book = new Book(); book.setId(getStringFromJson("id", jsonObject)); book.setIsbn(getStringFromJson("isbn", jsonObjec...
} } return returnedString; } private static Integer getIntFromJson(String key, JsonObject json) { Integer returnedValue = null; if (json.containsKey(key)) { JsonNumber value = json.getJsonNumber(key); if (value != null) { returnedValue = v...
repos\tutorials-master\microservices-modules\helidon\helidon-mp\src\main\java\com\baeldung\microprofile\util\BookMapper.java
2
请完成以下Java代码
private final IAllocationResult allocateOnVirtualMaterialItem( @NonNull final I_M_HU_Item vhuItem, @NonNull final IAllocationRequest request) { // // Create Actual Allocation Request depending on vhuItem's (remaining) capacity final IAllocationRequest requestActual = createActualRequest(vhuItem, request); ...
* Create transaction candidate which when it will be processed it will change the storage quantity. * * @param requestActual request (used to get Product, UOM, Date, Qty etc) * @param vhuItem Virtual HU item on which we actually allocated/deallocated */ @NonNull private final IHUTransactionCandidate createHUT...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\strategy\AbstractAllocationStrategy.java
1
请在Spring Boot框架中完成以下Java代码
public GrpcServiceDiscoverer defaultGrpcServiceDiscoverer() { return new AnnotationGrpcServiceDiscoverer(); } @ConditionalOnBean(CompressorRegistry.class) @Bean public GrpcServerConfigurer compressionServerConfigurer(final CompressorRegistry registry) { return builder -> builder.compres...
@Bean public List<GrpcServerConfigurer> defaultServerConfigurers() { return Collections.emptyList(); } @ConditionalOnMissingBean @ConditionalOnBean(GrpcServerFactory.class) @Bean public GrpcServerLifecycle grpcServerLifecycle( final GrpcServerFactory factory, fin...
repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\autoconfigure\GrpcServerAutoConfiguration.java
2
请完成以下Java代码
public void run(String... args) throws Exception { // Start the clock long start = System.currentTimeMillis(); // Kick of multiple, asynchronous lookups CompletableFuture<User> page1 = gitHubLookupService.findUser("vector4wang"); CompletableFuture<User> page2 = gitHubLookupServi...
// Wait until they are all done CompletableFuture.allOf(page1,page2,page3).join(); // Print results, including elapsed time logger.info("Elapsed time: " + (System.currentTimeMillis() - start)); logger.info("--> " + page1.get()); logger.info("--> " + page2.get()); logger....
repos\spring-boot-quick-master\quick-async\src\main\java\com\async\init\AppRunner.java
1
请完成以下Java代码
public class SystemTime { private static final TimeSource defaultTimeSource = new SystemTimeSource(); @Nullable private static TimeSource timeSource; private static TimeSource getTimeSource() { return timeSource == null ? defaultTimeSource : timeSource; } /** * After invocation of this method, the time re...
public static Instant asInstant() { return Instant.ofEpochMilli(millis()); } public static LocalDateTime asLocalDateTime() { return asZonedDateTime().toLocalDateTime(); } @NonNull public static LocalDate asLocalDate() { return asLocalDate(zoneId()); } @NonNull public static LocalDate asLocalDate(@No...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-util\src\main\java\de\metas\common\util\time\SystemTime.java
1
请完成以下Java代码
public class BouncyCastleAesCbcBytesEncryptor extends BouncyCastleAesBytesEncryptor { public BouncyCastleAesCbcBytesEncryptor(String password, CharSequence salt) { super(password, salt); } public BouncyCastleAesCbcBytesEncryptor(String password, CharSequence salt, BytesKeyGenerator ivGenerator) { super(passwor...
byte[] buf = new byte[blockCipher.getOutputSize(in.length)]; int bytesWritten = blockCipher.processBytes(in, 0, in.length, buf, 0); try { bytesWritten += blockCipher.doFinal(buf, bytesWritten); } catch (InvalidCipherTextException ex) { throw new IllegalStateException("unable to encrypt/decrypt", ex); } ...
repos\spring-security-main\crypto\src\main\java\org\springframework\security\crypto\encrypt\BouncyCastleAesCbcBytesEncryptor.java
1
请完成以下Java代码
public class SocketServer { private static Logger logger = LoggerFactory.getLogger(SocketServer.class); public static void main(String[] args) throws IOException { //创建一个ServerSocket在端口4700监听客户请求 try (ServerSocket server = new ServerSocket(4700)) { while (true) { //使...
os.flush(); line = is.readLine(); } // 关闭连接 socket.close(); } catch (Exception e) { e.printStackTrace(); } }); } } catch...
repos\spring-boot-student-master\spring-boot-student-netty\src\main\java\com\xiaolyuh\bio\SocketServer.java
1
请完成以下Java代码
protected final boolean isNotReceivableService(final I_C_Invoice_Candidate ic) { final IProductDAO productDAO = Services.get(IProductDAO.class); final IProductBL productBL = Services.get(IProductBL.class); final I_M_Product product = productDAO.getById(ic.getM_Product_ID()); // If no product, consider it as ...
ic.setDeliveryDate(firstInOut.getMovementDate()); ic.setFirst_Ship_BPLocation_ID(firstInOut.getC_BPartner_Location_ID()); // C_BPartner_Location ic.setC_Shipping_Location_ID(firstInOut.getC_BPartner_Location_Value_ID()); // C_Location } } /** * Assumes that the given {@code icRecord}'s {@code AD_Client_ID}...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\spi\AbstractInvoiceCandidateHandler.java
1
请完成以下Java代码
public String getCityList(final Model model) { model.addAttribute("cityList", cityService.findAll()); return CITY_LIST_PATH_NAME; } @RequestMapping(value = "/create", method = RequestMethod.GET) public String createCityForm(final Model model) { model.addAttribute("city", new City())...
public String getCity(@PathVariable Long id, final Model model) { final Mono<City> city = cityService.findById(id); model.addAttribute("city", city); model.addAttribute("action", "update"); return CITY_FORM_PATH_NAME; } @RequestMapping(value = "/update", method = RequestMethod.P...
repos\springboot-learning-example-master\springboot-webflux-10-book-manage-sys\src\main\java\demo\springboot\web\CityController.java
1
请完成以下Java代码
public void setC_Region(final org.compiere.model.I_C_Region C_Region) { set_ValueFromPO(COLUMNNAME_C_Region_ID, org.compiere.model.I_C_Region.class, C_Region); } @Override public void setC_Region_ID (final int C_Region_ID) { if (C_Region_ID < 1) set_Value (COLUMNNAME_C_Region_ID, null); else set_Val...
return bd != null ? bd : BigDecimal.ZERO; } @Override public void setM_DiscountSchema_Calculated_Surcharge_Price_ID (final int M_DiscountSchema_Calculated_Surcharge_Price_ID) { if (M_DiscountSchema_Calculated_Surcharge_Price_ID < 1) set_ValueNoCheck (COLUMNNAME_M_DiscountSchema_Calculated_Surcharge_Price_ID,...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_DiscountSchema_Calculated_Surcharge_Price.java
1
请完成以下Java代码
private SecretKey loadSecretKeyFromResource(Resource resource) { byte[] secretKeyBytes = Base64.getDecoder().decode(getResourceBytes(resource)); return new SecretKeySpec(secretKeyBytes, "AES"); } /** * <p>generateSecretKey.</p> * * @return a {@link javax.crypto.SecretKey} object ...
@SneakyThrows public static SecretKey getAESKeyFromPassword(char[] password, SaltGenerator saltGenerator, int iterations, String algorithm){ SecretKeyFactory factory = SecretKeyFactory.getInstance(algorithm); KeySpec spec = new PBEKeySpec(password, saltGenerator.generateSalt(AES_KEY_PASSWORD_SALT_LE...
repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\encryptor\SimpleGCMByteEncryptor.java
1
请在Spring Boot框架中完成以下Java代码
public FilterRegistrationBean<Filter> processEngineAuthenticationFilter(JerseyApplicationPath applicationPath) { FilterRegistrationBean<Filter> registration = new FilterRegistrationBean<>(); registration.setName("camunda-auth"); registration.setFilter(new ProcessEngineAuthenticationFilter()); registrati...
registration.addInitParameter(CorsFilter.PARAM_CORS_SUPPORT_CREDENTIALS, String.valueOf(camundaBpmRunProperties.getCors().getAllowCredentials())); registration.addInitParameter(CorsFilter.PARAM_CORS_PREFLIGHT_MAXAGE, camundaBpmRunProperties.getCors...
repos\camunda-bpm-platform-master\distro\run\core\src\main\java\org\camunda\bpm\run\CamundaBpmRunRestConfiguration.java
2
请完成以下Java代码
public int getAD_User_Login_ID() { return get_ValueAsInt(COLUMNNAME_AD_User_Login_ID); } @Override public void setHostKey (java.lang.String HostKey) { set_Value (COLUMNNAME_HostKey, HostKey); } @Override public java.lang.String getHostKey() { return (java.lang.String)get_Value(COLUMNNAME_HostKey); }...
public java.lang.String getPassword() { return (java.lang.String)get_Value(COLUMNNAME_Password); } @Override public void setUserName (java.lang.String UserName) { set_Value (COLUMNNAME_UserName, UserName); } @Override public java.lang.String getUserName() { return (java.lang.String)get_Value(COLUMNNA...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_AD_User_Login.java
1
请完成以下Java代码
public Optional<Manufacturer> findManufacturerByModel(String model) { return stream().where(c -> c.getModel() .equals(model)) .select(c -> c.getManufacturer()) .findFirst(); } @Override public List<Pair<Manufacturer, Car>> findCarsPerManufacturer() { retu...
} @Override public List<Car> findAll(int skip, int limit) { return stream().skip(skip) .limit(limit) .toList(); } @Override protected Class<Car> entityType() { return Car.class; } }
repos\tutorials-master\spring-jinq\src\main\java\com\baeldung\spring\jinq\repositories\CarRepositoryImpl.java
1
请完成以下Java代码
public void setC_BP_Group_ID (int C_BP_Group_ID) { if (C_BP_Group_ID < 1) set_ValueNoCheck (COLUMNNAME_C_BP_Group_ID, null); else set_ValueNoCheck (COLUMNNAME_C_BP_Group_ID, Integer.valueOf(C_BP_Group_ID)); } /** Get Geschäftspartnergruppe. @return Geschäftspartnergruppe */ @Override public int g...
return get_ValueAsPO(COLUMNNAME_CS_Creditpass_Config_ID, de.metas.vertical.creditscore.creditpass.model.I_CS_Creditpass_Config.class); } @Override public void setCS_Creditpass_Config(de.metas.vertical.creditscore.creditpass.model.I_CS_Creditpass_Config CS_Creditpass_Config) { set_ValueFromPO(COLUMNNAME_CS_Credit...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.creditscore\creditpass\src\main\java-gen\de\metas\vertical\creditscore\creditpass\model\X_CS_Creditpass_BP_Group.java
1
请在Spring Boot框架中完成以下Java代码
public Batch create() { if (commandExecutor != null) { BatchBuilder selfBatchBuilder = this; return commandExecutor.execute(new Command<>() { @Override public Batch execute(CommandContext commandContext) { return batchServiceConfigurat...
@Override public String getSearchKey2() { return searchKey2; } @Override public String getStatus() { return status; } @Override public String getBatchDocumentJson() { return batchDocumentJson; } @Override public String getTenantId() { return...
repos\flowable-engine-main\modules\flowable-batch-service\src\main\java\org\flowable\batch\service\impl\BatchBuilderImpl.java
2
请在Spring Boot框架中完成以下Java代码
public class SecondDataSourceConfig { /** * 扫描spring.datasource.second开头的配置信息 * * @return 数据源配置信息 */ @Bean(name = "secondDataSourceProperties") @ConfigurationProperties(prefix = "spring.datasource.second") public DataSourceProperties dataSourceProperties() { return new DataS...
public DataSource dataSource(@Qualifier("secondDataSourceProperties") DataSourceProperties dataSourceProperties) { return dataSourceProperties.initializeDataSourceBuilder().build(); } /** * 该方法仅在需要使用JdbcTemplate对象时选用 * * @param dataSource 注入名为secondDataSource的bean * @return 数据源JdbcT...
repos\spring-boot-demo-master\demo-multi-datasource-jpa\src\main\java\com\xkcoding\multi\datasource\jpa\config\SecondDataSourceConfig.java
2
请完成以下Java代码
private List<I_C_Period> getPeriodsOfCalendar(final I_C_Calendar calendar) { final Properties ctx = InterfaceWrapperHelper.getCtx(calendar); final String trxName = InterfaceWrapperHelper.getTrxName(calendar); final List<I_C_Year> years = Services.get(ICalendarDAO.class).retrieveYearsOfCalendar(calendar); fina...
.excludeWeekendDays(excludeWeekendDays) .build(); } @Override @NonNull public CalendarId getOrgCalendarOrDefault(final @NonNull OrgId orgId) { final OrgInfo orgInfo = orgDAO.getOrgInfoByIdInTrx(orgId); if (orgInfo.getCalendarId() != null) { return orgInfo.getCalendarId(); } final I_C_Calendar ca...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\calendar\impl\CalendarBL.java
1
请在Spring Boot框架中完成以下Java代码
public class AccountReduceBalanceDTO { /** * 用户编号 */ private Long userId; /** * 扣减金额 */ private Integer price; public Long getUserId() { return userId; }
public AccountReduceBalanceDTO setUserId(Long userId) { this.userId = userId; return this; } public Integer getPrice() { return price; } public AccountReduceBalanceDTO setPrice(Integer price) { this.price = price; return this; } }
repos\SpringBoot-Labs-master\lab-52\lab-52-seata-at-httpclient-demo\lab-52-seata-at-httpclient-demo-account-service\src\main\java\cn\iocoder\springboot\lab52\accountservice\dto\AccountReduceBalanceDTO.java
2
请完成以下Java代码
public List<CaseInstance> findWithVariablesByCriteria(CaseInstanceQueryImpl query) { setSafeInValueLists(query); return getDbSqlSession().selectListNoCacheLoadAndStore("selectCaseInstanceWithVariablesByQueryCriteria", query, getManagedEntityClass()); } @Override public long countByCriteria(...
@Override public void clearAllLockTimes(String lockOwner) { HashMap<String, Object> params = new HashMap<>(); params.put("lockOwner", lockOwner); getDbSqlSession().directUpdate("clearAllCaseInstanceLockTimes", params); } protected void setSafeInValueLists(CaseInstanceQueryImpl caseI...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\data\impl\MybatisCaseInstanceDataManagerImpl.java
1
请完成以下Java代码
public void trigger(DelegateExecution execution, String triggerName, Object triggerData) { ExecutionEntity executionEntity = deleteMessageEventSubScription(execution); leaveIntermediateCatchEvent(executionEntity); } @Override public void eventCancelledByEventGateway(DelegateExecution execut...
ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext); EventSubscriptionService eventSubscriptionService = processEngineConfiguration.getEventSubscriptionServiceConfiguration().getEventSubscriptionService(); List<EventSubscriptionEnt...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\behavior\IntermediateCatchMessageEventActivityBehavior.java
1
请完成以下Java代码
private ImmutableList<DunningAttachment> createDunningAttachments(@NonNull final DunningDocId dunningDocId) { final ImmutableList.Builder<DunningAttachment> dunningAttachments = ImmutableList.builder(); final List<I_C_Invoice> dunnedInvoiceRecords = dunningService.retrieveDunnedInvoices(dunningDocId); for (fina...
} } return dunningAttachments.build(); } private MetasfreshVersion createMetasfreshVersion() { final SoftwareVersion metasfreshBuildVersion = Adempiere.getBuildVersion(); final MetasfreshVersion metasfreshVersion = MetasfreshVersion.builder() .major(metasfreshBuildVersion.getMajor()) .minor(metasf...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\export\DunningToExportFactory.java
1
请在Spring Boot框架中完成以下Java代码
public PageResult getCategoryPage(PageQueryUtil pageUtil) { List<NewsCategory> categoryList = newsCategoryMapper.findCategoryList(pageUtil); int total = newsCategoryMapper.getTotalCategories(pageUtil); PageResult pageResult = new PageResult(categoryList, total, pageUtil.getLimit(), pageUtil.getP...
if (newsCategory != null) { newsCategory.setCategoryName(categoryName); return newsCategoryMapper.updateByPrimaryKeySelective(newsCategory) > 0; } return false; } @Override public Boolean deleteBatchByIds(Integer[] ids) { if (ids.length < 1) { ret...
repos\spring-boot-projects-main\SpringBoot咨询发布系统实战项目源码\springboot-project-news-publish-system\src\main\java\com\site\springboot\core\service\impl\CategoryServiceImpl.java
2
请完成以下Java代码
public void setMsgText (final @Nullable java.lang.String MsgText) { set_Value (COLUMNNAME_MsgText, MsgText); } @Override public java.lang.String getMsgText() { return get_ValueAsString(COLUMNNAME_MsgText); } @Override public void setSource_Record_ID (final int Source_Record_ID) { if (Source_Record_ID ...
return get_ValueAsInt(COLUMNNAME_Source_Table_ID); } @Override public void setTarget_Record_ID (final int Target_Record_ID) { if (Target_Record_ID < 1) set_Value (COLUMNNAME_Target_Record_ID, null); else set_Value (COLUMNNAME_Target_Record_ID, Target_Record_ID); } @Override public int getTarget_Rec...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_BusinessRule_Log.java
1
请在Spring Boot框架中完成以下Java代码
public class CustomerServiceApplication { public static void main(String[] args) { new SpringApplicationBuilder(CustomerServiceApplication.class) .web(WebApplicationType.NONE) .build() .run(args); } @Bean ApplicationRunner runner(CustomerRepository customerRepository) { return args -> { assertT...
jonDoe = customerRepository.save(jonDoe); assertThat(jonDoe).isNotNull(); assertThat(jonDoe.getId()).isEqualTo(1L); assertThat(jonDoe.getName()).isEqualTo("Jon Doe"); assertThat(customerRepository.count()).isEqualTo(1); System.err.println("Querying for Customer [SELECT * FROM /Customers WHERE name LIKE...
repos\spring-boot-data-geode-main\spring-geode-samples\boot\configuration\src\main\java\example\app\crm\CustomerServiceApplication.java
2
请完成以下Java代码
public CaseInstanceEntity getCaseInstance() { return caseInstance; } public void setCaseInstance(CaseInstanceEntity caseInstance) { this.caseInstance = caseInstance; } public Map<String, Object> getVariables() { return variables; } public void setVariables(Map<String, ...
public void setCaseModel(Case caseModel) { this.caseModel = caseModel; } public CaseDefinition getCaseDefinition() { return caseDefinition; } public void setCaseDefinition(CaseDefinition caseDefinition) { this.caseDefinition = caseDefinition; } public CmmnModel getCmmn...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\interceptor\AbstractStartCaseInstanceAfterContext.java
1
请完成以下Java代码
public static HuPackingInstructionsVersionId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? ofRepoId(repoId) : null; } public static int toRepoId(final HuPackingInstructionsVersionId HuPackingInstructionsVersionId) { return HuPackingInstructionsVersionId != null ? HuPackingInstructionsVersionId.getRepo...
public boolean isRealPackingInstructions() { return isRealPackingInstructionsRepoId(repoId); } public static boolean isRealPackingInstructionsRepoId(final int repoId) { return repoId > 0 && !isTemplateRepoId(repoId) && !isVirtualRepoId(repoId); } public HuPackingInstructionsId getKnownPackingInstruc...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\HuPackingInstructionsVersionId.java
1
请完成以下Java代码
public void setAD_Role_OrgAccess_ID (int AD_Role_OrgAccess_ID) { if (AD_Role_OrgAccess_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_Role_OrgAccess_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_Role_OrgAccess_ID, Integer.valueOf(AD_Role_OrgAccess_ID)); } /** Get AD_Role_OrgAccess. @return AD_Role_OrgAcces...
/** Get Schreibgeschützt. @return Field is read only */ @Override public boolean isReadOnly () { Object oo = get_Value(COLUMNNAME_IsReadOnly); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Role_OrgAccess.java
1
请完成以下Java代码
public void setAD_Role_ID (final int AD_Role_ID) { if (AD_Role_ID < 0) set_Value (COLUMNNAME_AD_Role_ID, null); else set_Value (COLUMNNAME_AD_Role_ID, AD_Role_ID); } @Override public int getAD_Role_ID() { return get_ValueAsInt(COLUMNNAME_AD_Role_ID); } @Override public void setAD_Role_TableOrg_...
} @Override public void setAD_Table_ID (final int AD_Table_ID) { if (AD_Table_ID < 1) set_Value (COLUMNNAME_AD_Table_ID, null); else set_Value (COLUMNNAME_AD_Table_ID, AD_Table_ID); } @Override public int getAD_Table_ID() { return get_ValueAsInt(COLUMNNAME_AD_Table_ID); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Role_TableOrg_Access.java
1
请完成以下Java代码
protected void done() { logger.debug("Done processing: {}", this); try { final ResultType result = get(); // => throw exceptions if any runnable.finallyUpdateUI(this, result); } catch (final InterruptedException ex) { handleExceptionInUI(ex); } catch (final ExecutionException ex) ...
if (rootPaneContainer == null) { comp = null; } else if (rootPaneContainer instanceof Window) { return (Window)rootPaneContainer; } else if (rootPaneContainer instanceof Component) { comp = (Component)rootPaneContainer; } else { comp = rootPaneContainer.getRootPane(); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\de\metas\adempiere\form\swing\SwingClientUIAsyncInvoker.java
1
请完成以下Java代码
public String getDatum() { return datum; } /** * Sets the value of the datum property. * * @param value * allowed object is * {@link String } * */ public void setDatum(String value) { this.datum...
public void setUhrzeitVon(String value) { this.uhrzeitVon = value; } /** * Gets the value of the uhrzeitBis property. * * @return * possible object is * {@link String } * */ public String getUhrzeitBis() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.go\src\main\java-xjc\de\metas\shipper\gateway\go\schema\Sendung.java
1
请完成以下Java代码
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; User user = (User) o; return Objects.equals(firstName, user.firstName) && Objects.equals(uId, user.uId) && Objects.equals(lastName, user.lastNa...
public void setLastName(String lastName) { this.lastName = lastName; } public String getAlias() { return alias; } public void setAlias(String alias) { this.alias = alias; } public void generateMyUser() { this.setAlias("007"); this.setFirstName("James");...
repos\tutorials-master\libraries-data-3\src\main\java\com\baeldung\objecthydration\User.java
1
请完成以下Java代码
public String getId() { return idAttribute.getValue(this); } public void setId(String id) { idAttribute.setValue(this, id); } public Collection<Documentation> getDocumentations() { return documentationCollection.get(this); } public ExtensionElements getExtensionElements() { return extensi...
public Collection<Reference> getIncomingReferencesByType(Class<? extends ModelElementInstance> referenceSourceTypeClass) { Collection<Reference> references = new ArrayList<Reference>(); // we traverse all incoming references in reverse direction for (Reference<?> reference : idAttribute.getIncomingReference...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\BaseElementImpl.java
1
请在Spring Boot框架中完成以下Java代码
class MetadataCollectors { private final ProcessingEnvironment processingEnvironment; private final TypeUtils typeUtils; private final MetadataStore metadataStore; private final MetadataCollector metadataCollector; private final Set<String> processedSourceTypes = new HashSet<>(); private final Map<TypeEleme...
MetadataCollector getMetadataCollector(TypeElement element) { return this.metadataTypeCollectors.computeIfAbsent(element, (ignored) -> new MetadataCollector(this::shouldBeMerged, this.metadataStore.readMetadata(element))); } Set<TypeElement> getSourceTypes() { return this.metadataTypeCollectors.keySet(); } ...
repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\MetadataCollectors.java
2
请完成以下Java代码
private static @Nullable String getCustomStackTracePrinter(StructuredLoggingJsonProperties properties) { StackTrace stackTrace = properties.stackTrace(); return (stackTrace != null && stackTrace.hasCustomPrinter()) ? stackTrace.printer() : null; } private static final class AotContribution implements BeanFactory...
} @Override public void applyTo(GenerationContext generationContext, BeanFactoryInitializationCode beanFactoryInitializationCode) { ReflectionHints reflection = generationContext.getRuntimeHints().reflection(); this.customizers.forEach((customizer) -> reflection.registerType(customizer, MemberCatego...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\logging\structured\StructuredLoggingJsonPropertiesBeanFactoryInitializationAotProcessor.java
1
请完成以下Java代码
public final class OrderCheckupBarcode { public static OrderCheckupBarcode ofC_OrderLine_ID(final int orderLineId) { return new OrderCheckupBarcode(VERSION_1, C_OrderLine_Table_ID, orderLineId); } public static OrderCheckupBarcode fromBarcodeString(final String barcode) { final List<String> barcodeParts = Spl...
/** @see I_C_OrderLine#Table_ID */ private static final transient int C_OrderLine_Table_ID = 260; private final String version; private final int adTableId; private final int recordId; private OrderCheckupBarcode(final String version, final int adTableId, final int recordId) { Preconditions.checkArgument(vers...
repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\de\metas\fresh\ordercheckup\OrderCheckupBarcode.java
1
请完成以下Java代码
private static Money extractPayAmt(@NonNull final I_C_Payment payment) { final CurrencyId currencyId = CurrencyId.ofRepoId(payment.getC_Currency_ID()); return Money.of(payment.getPayAmt(), currencyId); } @Override public BankStatementLineMultiPaymentLinkResult linkMultiPayments(@NonNull final BankStatementLine...
@NonNull final ZonedDateTime evaluationDate) { final InvoiceToAllocateQuery query = InvoiceToAllocateQuery.builder() .currencyId(paymentCurrencyId) .evaluationDate(evaluationDate) .onlyInvoiceId(invoiceId) .build(); return paymentAllocationService.retrieveInvoicesToAllocate(query) .stream() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\impl\BankStatementPaymentBL.java
1
请完成以下Java代码
public void setQtyProcessed (final BigDecimal QtyProcessed) { set_Value (COLUMNNAME_QtyProcessed, QtyProcessed); } @Override public BigDecimal getQtyProcessed() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyProcessed); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQ...
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyToProcess); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setSupplyDate (final java.sql.Timestamp SupplyDate) { set_Value (COLUMNNAME_SupplyDate, SupplyDate); } @Override public java.sql.Timestamp getSupplyDate() { return get...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_DD_Order_Candidate.java
1
请在Spring Boot框架中完成以下Java代码
public String training(@RequestParam(defaultValue = "/home/djl-test/images-test") String datasetRoot, @RequestParam(defaultValue = "/home/djl-test/models") String modePath) throws TranslateException, IOException { return imageClassificationService.training(d...
return ResponseEntity.notFound().build(); } HttpHeaders headers = new HttpHeaders(); headers.add(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + file.getFileName().toString()); headers.add(HttpHeaders.CONTENT_TYPE, MediaType.IMAGE_JPEG_VALUE); try { return...
repos\springboot-demo-master\djl\src\main\java\com\et\controller\ImageClassificationController.java
2
请在Spring Boot框架中完成以下Java代码
public class GlobalQRCode { @NonNull GlobalQRCodeType type; @Builder.Default @NonNull GlobalQRCodeVersion version = GlobalQRCodeVersion.ofInt(1); @NonNull String payloadAsJson; private static final String SEPARATOR = "#"; public static GlobalQRCode of( @NonNull final GlobalQRCodeType type, @NonNull fina...
} type = GlobalQRCodeType.ofString(remainingString.substring(0, idx)); remainingString = remainingString.substring(idx + 1); } // // Extract version final GlobalQRCodeVersion version; { int idx = remainingString.indexOf(SEPARATOR); if (idx <= 0) { return GlobalQRCodeParseResult.error("Inva...
repos\metasfresh-new_dawn_uat\backend\de.metas.global_qrcode.api\src\main\java\de\metas\global_qrcodes\GlobalQRCode.java
2
请完成以下Java代码
public Boolean getWaitFlag() { return waitFlag; } public void setWaitFlag(Boolean waitFlag) { this.waitFlag = waitFlag; } public Boolean getCleanEnvBoolan() { return cleanEnvBoolan; } public Boolean getRedirectErrorFlag() { return redirectErrorFlag; } ...
return resultVariableStr; } public String getErrorCodeVariableStr() { return errorCodeVariableStr; } public List<String> getArgList() { return argList; } public void setArgList(List<String> argList) { this.argList = argList; } }
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\util\ShellExecutorContext.java
1
请完成以下Java代码
public static boolean hasTrueCondition(SequenceFlow sequenceFlow, DelegateExecution execution) { String conditionExpression = null; if (CommandContextUtil.getProcessEngineConfiguration().isEnableProcessDefinitionInfoCache()) { ObjectNode elementProperties = BpmnOverrideContext.getBpmnOverrid...
} else { condition = new ScriptCondition(conditionExpression, conditionLanguage); } return condition.evaluate(elementId, execution); } protected static String getActiveValue(String originalValue, String propertyName, ObjectNode elementProperties) { String activeValue = originalValue; if (el...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\util\condition\ConditionUtil.java
1
请完成以下Java代码
public byte[] encrypt(byte[] bytes) { synchronized (this.encryptor) { byte[] iv = this.ivGenerator.generateKey(); CipherUtils.initCipher(this.encryptor, Cipher.ENCRYPT_MODE, this.secretKey, this.alg.getParameterSpec(iv)); byte[] encrypted = CipherUtils.doFinal(this.encryptor, bytes); return (this.ivGenera...
CBC(AES_CBC_ALGORITHM, NULL_IV_GENERATOR), GCM(AES_GCM_ALGORITHM, KeyGenerators.secureRandom(16)); private BytesKeyGenerator ivGenerator; private String name; CipherAlgorithm(String name, BytesKeyGenerator ivGenerator) { this.name = name; this.ivGenerator = ivGenerator; } @Override public Strin...
repos\spring-security-main\crypto\src\main\java\org\springframework\security\crypto\encrypt\AesBytesEncryptor.java
1
请完成以下Java代码
public class BatchRequest { @NotNull private HttpMethod method; @NotNull private String relativeUrl; @NotNull private JsonNode data; public JsonNode getData() { return data; } public @NotNull String getRelativeUrl() { return relativeUrl; } public void setRe...
this.relativeUrl = relativeUrl; } public void setData(@NotNull JsonNode data) { this.data = data; } public @NotNull HttpMethod getMethod() { return method; } public void setMethod(@NotNull HttpMethod method) { this.method = method; } }
repos\tutorials-master\spring-web-modules\spring-rest-http-3\src\main\java\com\baeldung\bulkandbatchapi\request\BatchRequest.java
1
请完成以下Java代码
private static final class IndexedCountries { /** * contains also inactive countries */ private final ImmutableList<I_C_Country> countries; /** * contains also inactive countries */ private final ImmutableMap<CountryId, I_C_Country> countriesById; /** * contains only active countries */ ...
public I_C_Country getByCountryCode(final String countryCode) { final I_C_Country country = getByCountryCodeOrNull(countryCode); if (country == null) { throw new AdempiereException("No active country found for countryCode=" + countryCode); } return country; } /** * @return the country with ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\location\impl\CountryDAO.java
1
请完成以下Java代码
public void setAuthentication(String userId, List<String> groups) { setAuthentication(new Authentication(userId, groups)); } public void setAuthentication(String userId, List<String> groups, List<String> tenantIds) { setAuthentication(new Authentication(userId, groups, tenantIds)); } public void clear...
public Account getUserAccount(String userId, String userPassword, String accountName) { return commandExecutor.execute(new GetUserAccountCmd(userId, userPassword, accountName)); } public void setUserAccount(String userId, String userPassword, String accountName, String accountUsername, String accountPassword, ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\IdentityServiceImpl.java
1
请完成以下Java代码
private void updateLogDocStatus(@NonNull final TableRecordReference tableRecordReference, @Nullable final DocStatus docStatus) { final ICompositeQueryUpdater<I_C_Doc_Outbound_Log> queryUpdater = queryBL.createCompositeQueryUpdater(I_C_Doc_Outbound_Log.class) .addSetColumnValue(I_C_Doc_Outbound_Log.COLUMNNAME_Doc...
.collect(ImmutableSet.toImmutableSet()); final Map<Integer, List<I_C_Doc_Outbound_Log_Line>> linesByLogId = queryBL.createQueryBuilder(I_C_Doc_Outbound_Log_Line.class) .addInArrayFilter(I_C_Doc_Outbound_Log_Line.COLUMNNAME_C_Doc_Outbound_Log_ID, ids) .create() .list() .stream() .collect(Collector...
repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java\de\metas\document\archive\api\impl\DocOutboundDAO.java
1
请完成以下Java代码
public class RabbitMessageReceiverContext extends ReceiverContext<Message> { private final String listenerId; private final Message message; @SuppressWarnings("this-escape") public RabbitMessageReceiverContext(Message message, String listenerId) { super((carrier, key) -> carrier.getMessageProperties().getHeade...
public Message getCarrier() { return this.message; } public String getListenerId() { return this.listenerId; } /** * Return the source (queue) for this message. * @return the source. */ public @Nullable String getSource() { return this.message.getMessageProperties().getConsumerQueue(); } }
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\support\micrometer\RabbitMessageReceiverContext.java
1
请完成以下Java代码
public ExtensionElements getExtensionElements() { return extensionElementsChild.getChild(this); } public void setExtensionElements(ExtensionElements extensionElements) { extensionElementsChild.setChild(this, extensionElements); } public static void registerType(ModelBuilder modelBuilder) { ModelEl...
labelAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_LABEL) .build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); descriptionChild = sequenceBuilder.element(Description.class) .build(); extensionElementsChild = sequenceBuilder.element(ExtensionElements.class) .build(...
repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\DmnElementImpl.java
1
请完成以下Java代码
private HuId performPickCU() { final HuId huIdToSplit = retrieveHUIdToSplit(); final ProductId productId = getProductId(); // validating the attributes here because it doesn't make sense to split the HU if it can't be used huAttributesBL.validateMandatoryPickingAttributes(huIdToSplit, productId); final Li...
} private void autoProcessPicking(final HuId splitCUId) { final ShipmentScheduleId shipmentScheduleId = null; pickingCandidateService.processForHUIds(ImmutableSet.of(splitCUId), shipmentScheduleId); } private HuId retrieveHUIdToSplit() { return retrieveEligibleHUEditorRows() .map(HUEditorRow::getHuId)...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\husToPick\process\WEBUI_HUsToPick_PickCU.java
1