instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public class Publisher implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private int urc; private String name; public Long getId() { return id; } public void...
} @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Publishe...
repos\Hibernate-SpringBoot-master\HibernateSpringBootCompositeKeyEmbeddableMapRel\src\main\java\com\bookstore\entity\Publisher.java
2
请完成以下Java代码
public boolean isInfiniteCapacityTU(final IHUPackingAware huPackingAware) { final IHUPIItemProductBL piItemProductBL = Services.get(IHUPIItemProductBL.class); final HUPIItemProductId piItemProductId = HUPIItemProductId.ofRepoIdOrNone(huPackingAware.getM_HU_PI_Item_Product_ID()); return piItemProductBL.isInfinit...
} final BigDecimal capacity = calculateLUCapacity(record); if (capacity == null) { return; } final BigDecimal qtyLUs = qtyTUs.divide(capacity, RoundingMode.UP); record.setQtyLU(qtyLUs); } @Override public void validateLUQty(final BigDecimal luQty) { final int maxLUQty = sysConfigBL.getIntValue(SY...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\impl\HUPackingAwareBL.java
1
请完成以下Java代码
public void setRef_Order(final org.eevolution.model.I_DD_Order Ref_Order) { set_ValueFromPO(COLUMNNAME_Ref_Order_ID, org.eevolution.model.I_DD_Order.class, Ref_Order); } @Override public void setRef_Order_ID (final int Ref_Order_ID) { if (Ref_Order_ID < 1) set_Value (COLUMNNAME_Ref_Order_ID, null); else...
public void setUser2(final org.compiere.model.I_C_ElementValue User2) { set_ValueFromPO(COLUMNNAME_User2_ID, org.compiere.model.I_C_ElementValue.class, User2); } @Override public void setUser2_ID (final int User2_ID) { if (User2_ID < 1) set_Value (COLUMNNAME_User2_ID, null); else set_Value (COLUMNNA...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_DD_Order.java
1
请在Spring Boot框架中完成以下Java代码
public class AuthConfigUtil { private static final Logger logger = LoggerFactory.getLogger(AuthConfigUtil.class); private static Properties properties = new Properties(); private static final String CONF_URL = "auth_config.properties"; public static String PAYKEY = ""; public static String PAYSE...
// 从类路径下读取属性文件 properties.load(AlipayConfigUtil.class.getClassLoader().getResourceAsStream(CONF_URL)); init(); } catch (IOException e) { logger.error("鉴权配置文件加载失败!{}", e); } } private static void init() { PAYKEY = properties.getProperty("pay_key"); ...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\utils\auth\AuthConfigUtil.java
2
请完成以下Java代码
public boolean isProcessed () { Object oo = get_Value(COLUMNNAME_Processed); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Verarbeiten. @param Processing Verarbeiten */ @Override public void setProce...
/** Set Summe Zeilen. @param TotalLines Total of all document lines */ @Override public void setTotalLines (java.math.BigDecimal TotalLines) { set_Value (COLUMNNAME_TotalLines, TotalLines); } /** Get Summe Zeilen. @return Total of all document lines */ @Override public java.math.BigDecimal getTot...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Requisition.java
1
请完成以下Java代码
public class RetryQueues { private Queue[] queues; private long initialInterval; private double factor; private long maxWait; public RetryQueues(long initialInterval, double factor, long maxWait, Queue... queues) { this.queues = queues; this.initialInterval = initialInterval; ...
} public String getQueueName(int retry) { return queues[retry].getName(); } public long getTimeToWait(int retry) { double time = initialInterval * Math.pow(factor, (double) retry); if (time > maxWait) { return maxWait; } return (long) time; } }
repos\tutorials-master\messaging-modules\spring-amqp\src\main\java\com\baeldung\springamqp\exponentialbackoff\RetryQueues.java
1
请完成以下Java代码
public Builder append(@NonNull final SqlAndParamsExpression sqlToAppend) { sql.append(sqlToAppend.getSql()); sqlParams.addAll(sqlToAppend.getSqlParams()); return this; } public Builder append(@NonNull final SqlAndParamsExpression.Builder sqlToAppend) { sql.append(sqlToAppend.sql); sqlParams.addA...
public Builder appendSqlList(@NonNull final String sqlColumnName, @NonNull final Collection<?> values) { final String sqlToAppend = DB.buildSqlList(sqlColumnName, values, sqlParams); sql.append(sqlToAppend); return this; } public boolean isEmpty() { return sql.isEmpty() && sqlParams.isEmpty(); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\descriptor\SqlAndParamsExpression.java
1
请完成以下Java代码
public int hashCode() { if (hashcode == 0) { hashcode = new HashcodeBuilder() .append(31) // seed .append(resource) .append(accesses) .toHashcode(); } return hashcode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } final TableColumnPermi...
public Builder setFrom(final TableColumnPermission columnPermission) { setResource(columnPermission.getResource()); setAccesses(columnPermission.accesses); return this; } public Builder setResource(final TableColumnResource resource) { this.resource = resource; return this; } public final B...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\TableColumnPermission.java
1
请完成以下Java代码
public void putResult(@NonNull final ResultSet rs) { if (writer != null) { throw new AdempiereException("putResult method was called more than once"); } try { final int columnCount = Math.min( getColumnHeaders().size(), rs.getMetaData().getColumnCount()); writer = createWriter(); // ...
return row; } private CSVWriter createWriter() { final File outputFile; try { outputFile = File.createTempFile("Report_", ".csv"); } catch (final IOException ex) { throw new AdempiereException("Failed creating temporary CSV file", ex); } return CSVWriter.builder() .outputFile(outputFile) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\spreadsheet\csv\JdbcCSVExporter.java
1
请完成以下Java代码
public class GetHistoricIdentityLinksForTaskCmd implements Command<List<HistoricIdentityLink>>, Serializable { private static final long serialVersionUID = 1L; protected String taskId; protected String processInstanceId; public GetHistoricIdentityLinksForTaskCmd(String taskId, String processInstanceId...
identityLink.setTaskId(task.getId()); identityLink.setType(IdentityLinkType.ASSIGNEE); identityLinks.add(identityLink); } if (task.getOwner() != null) { HistoricIdentityLinkEntity identityLink = commandContext.getHistoricIdentityLinkEntityManager().create(); ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\GetHistoricIdentityLinksForTaskCmd.java
1
请完成以下Java代码
public UomId getUomIdByTemporalUnit(@NonNull final TemporalUnit temporalUnit) { final X12DE355 x12de355 = X12DE355.ofTemporalUnit(temporalUnit); try { return getUomIdByX12DE355(x12de355); } catch (final Exception ex) { throw AdempiereException.wrapIfNeeded(ex) .setParameter("temporalUnit", tempo...
final I_C_UOM uom = getById(uomId); return UOMType.ofNullableCodeOrOther(uom.getUOMType()); } @Override public @NonNull Optional<I_C_UOM> getBySymbol(@NonNull final String uomSymbol) { return Optional.ofNullable(queryBL.createQueryBuilder(I_C_UOM.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\uom\impl\UOMDAO.java
1
请完成以下Java代码
protected <T extends AppPlugin> CharSequence createPluginDependenciesStr(String appName) { final List<T> plugins = getPlugins(appName); StringBuilder builder = new StringBuilder(); for (T plugin : plugins) { if (builder.length() > 0) { builder.append(", ").append("\n"); } String...
if (COCKPIT_APP_NAME.equals(appName)) { return (List<T>) cockpitRuntimeDelegate.getAppPluginRegistry().getPlugins(); } else if (ADMIN_APP_NAME.equals(appName)) { return (List<T>) adminRuntimeDelegate.getAppPluginRegistry().getPlugins(); } else if (TASKLIST_APP_NAME.equals(appName)) { retur...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\engine\ProcessEnginesFilter.java
1
请完成以下Java代码
private Step step1() { return stepBuilderFactory.get("step1") .tasklet((stepContribution, chunkContext) -> { System.out.println("执行步骤一操作。。。"); return RepeatStatus.FINISHED; }).build(); } private Step step2() { return stepBu...
private Step step3() { return stepBuilderFactory.get("step3") .tasklet((stepContribution, chunkContext) -> { System.out.println("执行步骤三操作。。。"); return RepeatStatus.FINISHED; }).build(); } private Step step4() { return stepB...
repos\SpringAll-master\67.spring-batch-start\src\main\java\cc\mrbird\batch\job\DeciderJobDemo.java
1
请完成以下Java代码
public class CmsSubjectComment implements Serializable { private Long id; private Long subjectId; private String memberNickName; private String memberIcon; private String content; private Date createTime; private Integer showStatus; private static final long serialVersionUID = 1L;...
public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Integer getShowStatus() { return showStatus; } public void setShowStatus(Integer showStatus) { this.showStatus = showStatus; ...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\CmsSubjectComment.java
1
请在Spring Boot框架中完成以下Java代码
public class SecurityConfig { private final JwtMappingProperties mappingProps; private final AccountService accountService; public SecurityConfig(JwtMappingProperties mappingProps, AccountService accountService) { this.mappingProps = mappingProps; this.accountService = accountServi...
@Bean public Converter<Jwt,AbstractAuthenticationToken> customJwtAuthenticationConverter(AccountService accountService) { return new CustomJwtAuthenticationConverter( accountService, jwtGrantedAuthoritiesConverter(), mappingProps.getPrincipalClaimName()); } @Bean S...
repos\tutorials-master\spring-security-modules\spring-security-oidc\src\main\java\com\baeldung\openid\oidc\jwtauthorities\config\SecurityConfig.java
2
请在Spring Boot框架中完成以下Java代码
public void setLINENUMBER(String value) { this.linenumber = value; } /** * Gets the value of the measurequal property. * * @return * possible object is * {@link String } * */ public String getMEASUREQUAL() { return measurequal; } /**...
} /** * Sets the value of the measureunit property. * * @param value * allowed object is * {@link String } * */ public void setMEASUREUNIT(String value) { this.measureunit = value; } /** * Gets the value of the measurevalue property. *...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\DMESU1.java
2
请完成以下Java代码
public org.eevolution.model.I_DD_Order getDD_Order() { return get_ValueAsPO(COLUMNNAME_DD_Order_ID, org.eevolution.model.I_DD_Order.class); } @Override public void setDD_Order(final org.eevolution.model.I_DD_Order DD_Order) { set_ValueFromPO(COLUMNNAME_DD_Order_ID, org.eevolution.model.I_DD_Order.class, DD_Or...
else set_ValueNoCheck (COLUMNNAME_DD_OrderLine_ID, DD_OrderLine_ID); } @Override public int getDD_OrderLine_ID() { return get_ValueAsInt(COLUMNNAME_DD_OrderLine_ID); } @Override public void setQty (final BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } @Override public BigDecimal getQty() {...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_DD_Order_Candidate_DDOrder.java
1
请完成以下Java代码
public void setReversal(org.compiere.model.I_GL_JournalBatch Reversal) { set_ValueFromPO(COLUMNNAME_Reversal_ID, org.compiere.model.I_GL_JournalBatch.class, Reversal); } /** Set Reversal ID. @param Reversal_ID ID of document reversal */ @Override public void setReversal_ID (int Reversal_ID) { if (Rev...
@Override public java.math.BigDecimal getTotalCr () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalCr); if (bd == null) return Env.ZERO; return bd; } /** Set Total Debit. @param TotalDr Total debit in document currency */ @Override public void setTotalDr (java.math.BigDecimal TotalDr)...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_GL_JournalBatch.java
1
请完成以下Java代码
public double getCount() { return count; } public void setCount(double count) { this.count = count; } public int getControlBehavior() { return controlBehavior; } public void setControlBehavior(int controlBehavior) { this.controlBehavior = controlBehavior; }...
@Override public Long getId() { return id; } @Override public void setId(Long id) { this.id = id; } @Override public String getApp() { return app; } public void setApp(String app) { this.app = app; } @Override public String getIp() { ...
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-sentinel\src\main\java\com\alibaba\csp\sentinel\dashboard\rule\nacos\entity\ParamFlowRuleCorrectEntity.java
1
请完成以下Java代码
public float norm() { float ret = 0.0f; for (int i = 0; i < size(); ++i) { ret += elementArray[i] * elementArray[i]; } return (float) Math.sqrt(ret); } /** * 夹角的余弦<br> * 认为this和other都是单位向量,所以方法内部没有除以两者的模。 * * @param other * @retur...
return this; } public Vector divideToSelf(float f) { for (int i = 0; i < elementArray.length; i++) { elementArray[i] = elementArray[i] / f; } return this; } /** * 自身归一化 * * @return */ public Vector normalize() { divide...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\Vector.java
1
请在Spring Boot框架中完成以下Java代码
public class DependencyResolver { private final ConfigurableListableBeanFactory beanFactory; @Autowired public DependencyResolver(ConfigurableListableBeanFactory beanFactory) { this.beanFactory = beanFactory; } public Set<String> getAllDependencies(String beanName) { Set<String> d...
try { Class<?> beanClass = Class.forName(beanDefinition.getBeanClassName()); Field[] fields = beanClass.getDeclaredFields(); for (Field field : fields) { if (field.isAnnotationPresent(Autowired.class)) { dependencies.add(field.getType().getName());...
repos\springboot-demo-master\dag\src\main\java\com\et\config\DependencyResolver.java
2
请完成以下Java代码
public FileValue readValue(TypedValueField value, boolean deserializeValue) { Map<String, Object> valueInfo = value.getValueInfo(); String filename = (String) valueInfo.get(VALUE_INFO_FILE_NAME); DeferredFileValueImpl fileValue = new DeferredFileValueImpl(filename, engineClient); String mimeType = (St...
typedValueField.setValueInfo(valueInfo); byte[] bytes = ((FileValueImpl) fileValue).getByteArray(); if (bytes != null) { typedValueField.setValue(Base64.encodeBase64String(bytes)); } } protected boolean canWriteValue(TypedValue typedValue) { if (typedValue == null || typedValue.getType() =...
repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\variable\impl\mapper\FileValueMapper.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable Boolean getSerializeNulls() { return this.serializeNulls; } public void setSerializeNulls(@Nullable Boolean serializeNulls) { this.serializeNulls = serializeNulls; } public @Nullable Boolean getEnableComplexMapKeySerialization() { return this.enableComplexMapKeySerialization; } public vo...
public @Nullable String getDateFormat() { return this.dateFormat; } public void setDateFormat(@Nullable String dateFormat) { this.dateFormat = dateFormat; } /** * Enumeration of levels of strictness. Values are the same as those on * {@link com.google.gson.Strictness} that was introduced in Gson 2.11. To ...
repos\spring-boot-4.0.1\module\spring-boot-gson\src\main\java\org\springframework\boot\gson\autoconfigure\GsonProperties.java
2
请完成以下Java代码
/* package */class HUPackingMaterialMovementLineBuilder { // task 07734: we don't want to track M_MaterialTrackings, so we don't need to provide a HU context. private final IHUPackingMaterialsCollector<IHUPackingMaterialCollectorSource> packingMaterialsCollector = new HUPackingMaterialsCollector(null); private final...
packingMaterialsCollector.releasePackingMaterialForHURecursively(huAssignments); } public List<HUPackingMaterialDocumentLineCandidate> getAndClearCandidates() { return packingMaterialsCollector.getAndClearCandidates(); } /** * Sets a shared "seen list" for added HUs. * * To be used in case you have multi...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\movement\api\impl\HUPackingMaterialMovementLineBuilder.java
1
请完成以下Java代码
public int getM_HU_Item_ID() { return get_ValueAsInt(COLUMNNAME_M_HU_Item_ID); } @Override public void setM_HU_Item_Storage_ID (final int M_HU_Item_Storage_ID) { if (M_HU_Item_Storage_ID < 1) set_ValueNoCheck (COLUMNNAME_M_HU_Item_Storage_ID, null); else set_ValueNoCheck (COLUMNNAME_M_HU_Item_Stora...
public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public void setQty (final BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } @Override public BigDecimal getQty() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty); return bd != null ? bd : BigD...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Item_Storage.java
1
请完成以下Java代码
public void setIsAutoSequence (final boolean IsAutoSequence) { set_Value (COLUMNNAME_IsAutoSequence, IsAutoSequence); } @Override public boolean isAutoSequence() { return get_ValueAsBoolean(COLUMNNAME_IsAutoSequence); } @Override public void setIsTableID (final boolean IsTableID) { set_Value (COLUMNNA...
public static final String RESTARTFREQUENCY_Day = "D"; @Override public void setRestartFrequency (final @Nullable java.lang.String RestartFrequency) { set_Value (COLUMNNAME_RestartFrequency, RestartFrequency); } @Override public java.lang.String getRestartFrequency() { return get_ValueAsString(COLUMNNAME_R...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Sequence.java
1
请完成以下Java代码
public DeviceAccessorsHub getDeviceAccessorsHub( @NonNull final IHostIdentifier clientHost, @NonNull final ClientId adClientId, @NonNull final OrgId adOrgId) { return hubsByKey.computeIfAbsent( DeviceAccessorsHubKey.of(clientHost, adClientId, adOrgId), this::createDeviceAccessorsHub); } private D...
return new DeviceAccessorsHub(deviceConfigPool); } public void cacheReset() { hubsByKey.clear(); } @Value(staticConstructor = "of") private static class DeviceAccessorsHubKey { @NonNull IHostIdentifier clientHost; @NonNull ClientId adClientId; @NonNull OrgId adOrgId; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.device.adempiere\src\main\java\de\metas\device\accessor\DeviceAccessorsHubFactory.java
1
请完成以下Java代码
public ELContext getElContext(VariableScope variableScope) { ELContext elContext = null; if (variableScope instanceof VariableScopeImpl) { VariableScopeImpl variableScopeImpl = (VariableScopeImpl) variableScope; elContext = variableScopeImpl.getCachedElContext(); } ...
elResolver.add(new ReadOnlyMapELResolver(beans)); } elResolver.add(new ArrayELResolver()); elResolver.add(new ListELResolver()); elResolver.add(new MapELResolver()); elResolver.add(new JsonNodeELResolver()); elResolver.add(new DynamicBeanPropertyELResolver(ItemInstance.c...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\el\ExpressionManager.java
1
请在Spring Boot框架中完成以下Java代码
public class UserService { private final UserRepository repository; private final String issuer; public UserService(final UserRepository repository, final @ConfigProperty(name = "mp.jwt.verify.issuer") String issuer) { this.repository = repository; this.issuer = iss...
if (roles.size() != userDto.roles().size()) { throw new InvalidRolesProvidedException("Unknown role provided"); } final var user = new User(); user.setUsername(userDto.username()); user.setPassword(BcryptUtil.bcryptHash(userDto.password())); user.setRoles(new HashSe...
repos\tutorials-master\quarkus-modules\quarkus-rbac\src\main\java\com\baeldung\quarkus\rbac\users\UserService.java
2
请完成以下Spring Boot application配置
spring: application: name: demo-consumer # Spring 应用名 cloud: nacos: # Nacos 作为注册中心的配置项,对应 NacosDiscoveryProperties 配置类 discovery: server-addr: 127.0.0.1:8848 # Nacos 服务器地址 loadbalancer: # Spring Cloud Loadbalancer 重启配置,对应 LoadBalancerRetryProperties 配置类 retry: ena...
超时时间,单位:毫秒。默认为 1000 ReadTimeout: 1 # 请求的读取超时时间,单位:毫秒。默认为 1000 OkToRetryOnAllOperations: true # 是否对所有操作都进行重试,默认为 false。 MaxAutoRetries: 0 # 对当前服务的重试次数,默认为 0 次。 MaxAutoRetriesNextServer: 1 # 重新选择服务实例的次数,默认为 1 次。注意,不包含第 1 次哈。
repos\SpringBoot-Labs-master\labx-02-spring-cloud-netflix-ribbon\labx-02-scn-ribbon-demo06-consumer\src\main\resources\application.yaml
2
请完成以下Java代码
private ObjectModel getObjectModelDynamic(Integer objectId, String version) { String key = getKeyIdVer(objectId, version); ObjectModel objectModel = tenantId != null ? models.get(tenantId).get(key) : null; if (tenantId != null && objectModel == null) { modelsLock.lock...
} finally { modelsLock.unlock(); } } return objectModel; } private ObjectModel getObjectModel(String key) { Optional<TbResource> tbResource = context.getTransportResourceCache().get(this.tenantId, LWM2M_MODEL, key); re...
repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\server\LwM2mVersionedModelProvider.java
1
请完成以下Java代码
public String getLabel(int index) { return Msg.translate(Env.getCtx(), "SponsorNo"); } @Override public int getParameterCount() { return 1; } @Override public Object getParameterToComponent(int index) { return null; } @Override public Object getParameterValue(int index, boolean returnValueTo) { ...
if (sno == null && !Check.isEmpty(searchText, true)) return new String[]{"1=2"}; if (sno == null) return null; final Timestamp date = TimeUtil.trunc(Env.getContextAsDate(Env.getCtx(), "#Date"), TimeUtil.TRUNC_DAY); // final String whereClause = "EXISTS (SELECT 1 FROM C_Sponsor_Salesrep ssr" + " JOIN ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\compiere\apps\search\InfoQueryCriteriaBPSonsorAbstract.java
1
请完成以下Java代码
public void apply(final Object model) { if (!InterfaceWrapperHelper.isInstanceOf(model, I_C_OrderLine.class)) { logger.debug("Skip applying because it's not an order line: {}", model); return; } final I_C_OrderLine orderLine = InterfaceWrapperHelper.create(model, I_C_OrderLine.class); apply(orderLine)...
orderLine.setQtyEntered(qty); orderLine.setQtyOrdered(qty); } @Override public boolean isCreateNewRecord() { return true; } @Override public String toString() { return ObjectUtils.toString(this); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\gui\search\OrderLineProductQtyGridRowBuilder.java
1
请完成以下Java代码
private GraphQLQueryRequest createRequest() { Assert.state(this.projectionNode != null || this.coercingMap == null, "Coercing map provided without projection"); GraphQLQueryRequest request; if (this.coercingMap != null && this.projectionNode != null) { request = new GraphQLQueryRequest(this.query, th...
operationName = (this.query.getName() != null) ? this.query.getName() : null; } return DgsGraphQlClient.this.graphQlClient.document(document) .operationName(operationName) .attributes((map) -> { if (this.attributes != null) { map.putAll(this.attributes); } }); } private Str...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\client\DgsGraphQlClient.java
1
请完成以下Java代码
public class InvoiceRowReducers { public static InvoiceRow reduce( @NonNull final InvoiceRow row, @NonNull final List<JSONDocumentChangedEvent> fieldChangeRequests) { final InvoiceRowBuilder rowBuilder = row.toBuilder(); for (final JSONDocumentChangedEvent fieldChangeRequest : fieldChangeRequests) { f...
final CurrencyCode currencyCode = row.getCurrencyCode(); final Amount serviceFeeAmt = Amount.of(serviceFeeAmtBD, currencyCode); rowBuilder.serviceFeeAmt(serviceFeeAmt); } else if (InvoiceRow.FIELD_BankFeeAmt.contentEquals(fieldName)) { final BigDecimal bankFeeAmtBD = fieldChangeRequest.getValueAsBi...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\payment_allocation\InvoiceRowReducers.java
1
请在Spring Boot框架中完成以下Java代码
private void parameters(SwaggerOperation operation, OpenApi openApi) { List<SwaggerOperationParameter> parameters = new ArrayList<>(); if (openApi.getParamsJson()!=null) { List<OpenApiParam> openApiParams = JSON.parseArray(openApi.getParamsJson(), OpenApiParam.class); for (OpenAp...
license.setUrl("http://www.apache.org/licenses/LICENSE-2.0.html"); info.setLicense(license); return info; } /** * 生成接口路径 * @return */ @GetMapping("genPath") public Result<String> genPath() { Result<String> r = new Result<String>(); r.setSuccess(true); ...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\openapi\controller\OpenApiController.java
2
请完成以下Java代码
public APIExportAudit<ReceiptScheduleExportAuditItem> getByTransactionId(@NonNull final String transactionId) { final StagingData stagingData = retrieveStagingData(transactionId); final APIExportAuditBuilder<ReceiptScheduleExportAuditItem> result = APIExportAudit .<ReceiptScheduleExportAuditItem>builder() ...
{ return cache.getOrLoad(transactionId, this::retrieveStagingData0); } @NonNull private StagingData retrieveStagingData0(@NonNull final String transactionId) { final ImmutableList<I_M_ReceiptSchedule_ExportAudit> exportAuditRecord = queryBL.createQueryBuilder(I_M_ReceiptSchedule_ExportAudit.class) .addOnly...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\exportaudit\ReceiptScheduleAuditRepository.java
1
请完成以下Java代码
public class Movie { private String imdbId; private String director; private List<ActorJackson> actors; public Movie(String imdbId, String director, List<ActorJackson> actors) { super(); this.imdbId = imdbId; this.director = director; this.actors = actors; } pu...
this.imdbId = imdbId; } public String getDirector() { return director; } public void setDirector(String director) { this.director = director; } public List<ActorJackson> getActors() { return actors; } public void setActors(List<ActorJackson> actors) { ...
repos\tutorials-master\jackson-modules\jackson-core\src\main\java\com\baeldung\jackson\jacksonvsgson\Movie.java
1
请完成以下Java代码
public class SimpleStructureDefinition implements FieldBaseStructureDefinition { protected String id; protected List<String> fieldNames; protected List<Class<?>> fieldTypes; protected List<Class<?>> fieldParameterTypes; public SimpleStructureDefinition(String id) { this.id = id; ...
this.fieldTypes.set(index, type); this.fieldParameterTypes.set(index, parameterType); } private void growListToContain(int index, List<?> list) { if (!(list.size() - 1 >= index)) { for (int i = list.size(); i <= index; i++) { list.add(null); } } ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\data\SimpleStructureDefinition.java
1
请完成以下Java代码
public static Response sendRestrictedHeaderThroughDefaultTransportConnector(String headerKey, String headerValue) { ClientConfig clientConfig = new ClientConfig().connectorProvider(new ApacheConnectorProvider()); Client client = ClientBuilder.newClient(clientConfig); System.setProperty("sun.net....
WebTarget webTarget = client.target(TARGET) .path(MAIN_RESOURCE) .path("events"); SseEventSource sseEventSource = SseEventSource.target(webTarget).build(); sseEventSource.register(JerseyClientHeaders::receiveEvent); sseEventSource.open(); Thread.sleep(3_0...
repos\tutorials-master\web-modules\jersey\src\main\java\com\baeldung\jersey\client\JerseyClientHeaders.java
1
请完成以下Java代码
public class ProcessTask extends ChildTask { protected String processRefExpression; protected String processRef; protected Boolean fallbackToDefaultTenant; protected boolean sameDeployment; protected String processInstanceIdVariableName; protected Process process; public String getProcess...
return fallbackToDefaultTenant; } public boolean isSameDeployment() { return sameDeployment; } public void setSameDeployment(boolean sameDeployment) { this.sameDeployment = sameDeployment; } public String getProcessInstanceIdVariableName() { return processInstanceIdVar...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\ProcessTask.java
1
请完成以下Spring Boot application配置
okta.oauth2.client-id=0oae63uvgLWOdNLkv4x6 okta.oauth2.client-secret=dbBI1gQrgwp1Lb7iH5BWytQXtWlorIeR7PG7JzvG okta.oauth2.issuer= https://dev-364536.okta.com/oauth2/default spring.main.allow-bean-definition-overriding=true security.oauth2.client.clientId= 0oae63uvgLWOdNLkv4x6 security.oauth2.client.clientSecret= dbBI...
icationScheme = query security.oauth2.client.clientAuthenticationScheme = form security.oauth2.client.scope = myindexuz@gmail.com security.oauth2.resource.userInfoUri = https://www.googleapis.com/userinfo/v2/me security.oauth2.resource.preferTokenInfo = false
repos\SpringBoot-Projects-FullStack-master\Part-6 Spring Boot Security\13.Outh2Okta\src\main\resources\application.properties
2
请完成以下Java代码
public int getReversalLine_ID() { return get_ValueAsInt(COLUMNNAME_ReversalLine_ID); } @Override public de.metas.handlingunits.model.I_M_HU_Item getVHU_Item() { return get_ValueAsPO(COLUMNNAME_VHU_Item_ID, de.metas.handlingunits.model.I_M_HU_Item.class); } @Override public void setVHU_Item(final de.metas...
@Override public void setVHU_Item_ID (final int VHU_Item_ID) { if (VHU_Item_ID < 1) set_Value (COLUMNNAME_VHU_Item_ID, null); else set_Value (COLUMNNAME_VHU_Item_ID, VHU_Item_ID); } @Override public int getVHU_Item_ID() { return get_ValueAsInt(COLUMNNAME_VHU_Item_ID); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Trx_Line.java
1
请在Spring Boot框架中完成以下Java代码
public class BPartnerLocationCandidate { @Nullable String bpartnerName; @Nullable String name; @Nullable String address1; @Nullable String address2; @Nullable String address3; @Nullable String postal; @Nullable String city; @Nullable String countryCode; @Nullable Boolean billTo; @Nullable B...
.address1(orderDeliveryAddress.getAddress()) .address2(orderDeliveryAddress.getAdditionalAddress()) .address3(orderDeliveryAddress.getAdditionalAddress2()) .postal(orderDeliveryAddress.getPostalCode()) .city(orderDeliveryAddress.getCity()) .countryCode(GetPatientsRouteConstants.COUNTRY_CODE_DE) ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\de-metas-camel-alberta-camelroutes\src\main\java\de\metas\camel\externalsystems\alberta\common\util\BPartnerLocationCandidate.java
2
请完成以下Java代码
public void setQtyInvoiced (BigDecimal QtyInvoiced) { set_Value (COLUMNNAME_QtyInvoiced, QtyInvoiced); } /** Get Quantity Invoiced. @return Invoiced Quantity */ public BigDecimal getQtyInvoiced () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyInvoiced); if (bd == null) return Env.ZERO; r...
/** Get Request. @return Request from a Business Partner or Prospect */ public int getR_Request_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_R_Request_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Request Update. @param R_RequestUpdate_ID Request Updates */ public vo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_RequestUpdate.java
1
请完成以下Spring Boot application配置
#spring.cache.redis.time-to-live=10 # debugging purpose spring.jpa.properties.hibernate.format_sql=true logging.level.org.hibernate.SQL=DEBUG logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE logging.level.org.springframework.jdbc.core.JdbcTemplate=DEBUG logging.level.org.springframework.jdbc.core.State...
#The SQL dialect makes Hibernate generate better SQL for the chosen database spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect spring.jpa.hibernate.ddl-auto=update logging.level.org.hibernate.sql=DEBUG logging.level.org.hibernate.type=TRACE server.port=8080
repos\SpringBoot-Projects-FullStack-master\Part-9.SpringBoot-React-Projects\Project-5.Spring-ReactJS-Ecommerce-Shopping\fullstack\backend\model\src\main\resources\application.properties
2
请完成以下Java代码
public MicrosoftTeamsDeliveryMethodNotificationTemplate copy() { return new MicrosoftTeamsDeliveryMethodNotificationTemplate(this); } @Data @NoArgsConstructor public static class Button { private boolean enabled; private String text; private LinkType linkType; pr...
public Button(Button other) { this.enabled = other.enabled; this.text = other.text; this.linkType = other.linkType; this.link = other.link; this.dashboardId = other.dashboardId; this.dashboardState = other.dashboardState; this.setEntity...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\notification\template\MicrosoftTeamsDeliveryMethodNotificationTemplate.java
1
请在Spring Boot框架中完成以下Java代码
public Foo findById(@PathVariable("id") final Long id, final HttpServletResponse response) { try { final Foo resourceById = RestPreconditions.checkFound(service.findById(id)); eventPublisher.publishEvent(new SingleResourceRetrievedEvent(this, response)); return resourceById;...
// write @PostMapping @ResponseStatus(HttpStatus.CREATED) public Foo create(@RequestBody final Foo resource, final HttpServletResponse response) { Preconditions.checkNotNull(resource); final Foo foo = service.create(resource); final Long idOfCreatedResource = foo.getId(); e...
repos\tutorials-master\spring-web-modules\spring-boot-rest-2\src\main\java\com\baeldung\hateoas\web\controller\FooController.java
2
请完成以下Java代码
@Override public void enterMulDiv(LabeledExprParser.MulDivContext ctx) { } /** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ @Override public void exitMulDiv(LabeledExprParser.MulDivContext ctx) { } /** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ @...
@Override public void enterInt(LabeledExprParser.IntContext ctx) { } /** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ @Override public void exitInt(LabeledExprParser.IntContext ctx) { } /** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ @Override pu...
repos\springboot-demo-master\ANTLR\src\main\java\com\et\antlr\LabeledExprBaseListener.java
1
请完成以下Java代码
public class LetsChatNotifier extends AbstractContentNotifier { private static final String DEFAULT_MESSAGE = "*#{name}* (#{id}) is *#{status}*"; private RestTemplate restTemplate; /** * Host URL for Let´s Chat */ @Nullable private URI url; /** * Name of the room */ @Nullable private String room; ...
} public void setRestTemplate(RestTemplate restTemplate) { this.restTemplate = restTemplate; } @Nullable public URI getUrl() { return url; } public void setUrl(@Nullable URI url) { this.url = url; } public String getUsername() { return username; } public void setUsername(String username) { this...
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\notify\LetsChatNotifier.java
1
请完成以下Java代码
public void setExportStatus (final java.lang.String ExportStatus) { set_Value (COLUMNNAME_ExportStatus, ExportStatus); } @Override public java.lang.String getExportStatus() { return get_ValueAsString(COLUMNNAME_ExportStatus); } @Override public void setForwardedData (final @Nullable java.lang.String Forw...
if (M_ShipmentSchedule_ExportAudit_ID < 1) set_ValueNoCheck (COLUMNNAME_M_ShipmentSchedule_ExportAudit_ID, null); else set_ValueNoCheck (COLUMNNAME_M_ShipmentSchedule_ExportAudit_ID, M_ShipmentSchedule_ExportAudit_ID); } @Override public int getM_ShipmentSchedule_ExportAudit_ID() { return get_ValueAsI...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inoutcandidate\model\X_M_ShipmentSchedule_ExportAudit.java
1
请完成以下Java代码
public void setUsernameParameter(String usernameParameter) { this.usernameParameter = usernameParameter; } /** * Allows the role of the switchAuthority to be customized. * @param switchAuthorityRole the role name. Defaults to * {@link #ROLE_PREVIOUS_ADMINISTRATOR} */ public void setSwitchAuthorityRole(Str...
* {@link RequestAttributeSecurityContextRepository}. * @param securityContextRepository the {@link SecurityContextRepository} to use. * Cannot be null. * @since 5.7.7 */ public void setSecurityContextRepository(SecurityContextRepository securityContextRepository) { Assert.notNull(securityContextRepository, "...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\switchuser\SwitchUserFilter.java
1
请完成以下Java代码
public void setMax(double max) { this.max = max; } public double getFree() { return NumberUtil.div(free, (1024 * 1024), 2); } public void setFree(double free) { this.free = free; } public double getUsed() { return NumberUtil.div(total - free, (1024 * 1024), 2);...
this.home = home; } public void setStartTime(String startTime) { this.startTime = startTime; } public String getStartTime() { return DateUtil.formatDateTime(new Date(ManagementFactory.getRuntimeMXBean().getStartTime())); } public void setRunTime(String runTime) { this...
repos\spring-boot-demo-master\demo-websocket\src\main\java\com\xkcoding\websocket\model\server\Jvm.java
1
请完成以下Java代码
public void setLayoutSection (final java.lang.String LayoutSection) { set_Value (COLUMNNAME_LayoutSection, LayoutSection); } @Override public java.lang.String getLayoutSection() { return get_ValueAsString(COLUMNNAME_LayoutSection); } @Override public org.compiere.model.I_MobileUI_HUManager getMobileUI_HU...
@Override public void setMobileUI_HUManager_LayoutSection_ID (final int MobileUI_HUManager_LayoutSection_ID) { if (MobileUI_HUManager_LayoutSection_ID < 1) set_ValueNoCheck (COLUMNNAME_MobileUI_HUManager_LayoutSection_ID, null); else set_ValueNoCheck (COLUMNNAME_MobileUI_HUManager_LayoutSection_ID, Mobile...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_MobileUI_HUManager_LayoutSection.java
1
请完成以下Java代码
public static void putCacheBasicDataSource(String dbKey, DruidDataSource db) { dbSources.put(dbKey, db); } /** * 清空数据源缓存 */ public static void cleanAllCache() { //关闭数据源连接 for(Map.Entry<String, DruidDataSource> entry : dbSources.entrySet()){ String dbkey = entry...
} public static void removeCache(String dbKey) { //关闭数据源连接 DruidDataSource druidDataSource = dbSources.get(dbKey); if(druidDataSource!=null && druidDataSource.isEnable()){ druidDataSource.close(); } //清空redis缓存 getRedisTemplate().delete(CacheConstant.SYS_...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\dynamic\db\DataSourceCachePool.java
1
请在Spring Boot框架中完成以下Java代码
private boolean isCmmnEnabled(CommandContext commandContext) { return commandContext .getProcessEngineConfiguration() .isCmmnEnabled(); } // getters //////////////////////////////////////////// public String getId() { return id; } public String[] getIds() { return ids; ...
return keyLike; } public String getResourceName() { return resourceName; } public String getResourceNameLike() { return resourceNameLike; } public Integer getVersion() { return version; } public boolean isLatest() { return latest; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\entity\repository\CaseDefinitionQueryImpl.java
2
请完成以下Java代码
public class SearchCriteria { private String key; private String operation; private Object value; public SearchCriteria() { } public SearchCriteria(final String key, final String operation, final Object value) { super(); this.key = key; this.operation = operation; ...
this.key = key; } public String getOperation() { return operation; } public void setOperation(final String operation) { this.operation = operation; } public Object getValue() { return value; } public void setValue(final Object value) { this.value = val...
repos\tutorials-master\spring-web-modules\spring-rest-query-language\src\main\java\com\baeldung\web\util\SearchCriteria.java
1
请完成以下Java代码
public void deleteEditorSourceExtra(ModelEntity model) { if (model.getEditorSourceExtraValueId() != null) { ByteArrayRef ref = new ByteArrayRef(model.getEditorSourceExtraValueId()); ref.delete(); } } @Override public void insertEditorSourceExtraForModel(String modelI...
@Override public byte[] findEditorSourceExtraByModelId(String modelId) { ModelEntity model = findById(modelId); if (model == null || model.getEditorSourceExtraValueId() == null) { return null; } ByteArrayRef ref = new ByteArrayRef(model.getEditorSourceExtraValueId()); ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ModelEntityManagerImpl.java
1
请完成以下Java代码
public void setAD_Val_Rule_ID (int AD_Val_Rule_ID) { if (AD_Val_Rule_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_Val_Rule_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_Val_Rule_ID, Integer.valueOf(AD_Val_Rule_ID)); } /** Get Dynamische Validierung. @return Regel für die dynamische Validierung */ pu...
Validation rule to be included. */ public void setIncluded_Val_Rule_ID (int Included_Val_Rule_ID) { if (Included_Val_Rule_ID < 1) set_ValueNoCheck (COLUMNNAME_Included_Val_Rule_ID, null); else set_ValueNoCheck (COLUMNNAME_Included_Val_Rule_ID, Integer.valueOf(Included_Val_Rule_ID)); } /** Get Includ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Val_Rule_Included.java
1
请在Spring Boot框架中完成以下Java代码
public ScannableCodeFormat create(@NotNull final ScannableCodeFormatCreateRequest request) { final I_C_ScannableCode_Format record = InterfaceWrapperHelper.newInstance(I_C_ScannableCode_Format.class); record.setName(request.getName()); record.setDescription(request.getDescription()); InterfaceWrapperHelper.sav...
{ final I_C_ScannableCode_Format_Part record = InterfaceWrapperHelper.newInstance(I_C_ScannableCode_Format_Part.class); record.setC_ScannableCode_Format_ID(formatId.getRepoId()); record.setStartNo(part.getStartPosition()); record.setEndNo(part.getEndPosition()); record.setDataType(part.getType().getCode()); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\scannable_code\format\repository\ScannableCodeFormatLoaderAndSaver.java
2
请完成以下Java代码
private I_M_HU getM_LU_HU() { return _luHU; } public HUReceiptScheduleAllocBuilder setM_LU_HU(final I_M_HU luHU) { _luHU = luHU; return this; } private I_M_HU getM_TU_HU() { return _tuHU; } public HUReceiptScheduleAllocBuilder setM_TU_HU(final I_M_HU tuHU)
{ _tuHU = tuHU; return this; } private I_M_HU getVHU() { return _vhu; } public HUReceiptScheduleAllocBuilder setVHU(final I_M_HU vhu) { _vhu = vhu; return this; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\receiptschedule\impl\HUReceiptScheduleAllocBuilder.java
1
请在Spring Boot框架中完成以下Java代码
public String getAddress() { return this.address; } public void setAddress(String address) { this.address = address; } public @Nullable String getUsername() { return this.username; } public void setUsername(@Nullable String username) { this.username = username; } public @Nullable String ...
public void setScheme(Scheme scheme) { this.scheme = scheme; } public @Nullable String getToken() { return this.token; } public void setToken(@Nullable String token) { this.token = token; } public Format getFormat() { return this.format; } public void setFormat(Format format) { this.f...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\prometheus\PrometheusProperties.java
2
请完成以下Java代码
private LookupValue extractProduct(@NonNull final I_M_ShipmentSchedule record) { final ProductId productId = ProductId.ofRepoId(record.getM_Product_ID()); return productsLookup.findById(productId); } @VisibleForTesting static PackingInfo extractPackingInfo(@NonNull final I_M_ShipmentSchedule record) { final...
.getCatchQtyOverride(record) .map(qty -> qty.toBigDecimal()) .orElse(null); } private int extractSalesOrderLineNo(final I_M_ShipmentSchedule record) { final OrderAndLineId salesOrderAndLineId = extractSalesOrderAndLineId(record); if (salesOrderAndLineId == null) { return 0; } final I_C_OrderLi...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\shipment_candidates_editor\ShipmentCandidateRowsLoader.java
1
请完成以下Java代码
protected void restoreModelAsNew(final SnapshotModelType modelSnapshot) { throw new HUException("Restoring model from ashes is not supported for " + modelSnapshot); } protected abstract SnapshotModelType retrieveModelSnapshot(final ModelType model); protected final void restoreModelsFromSnapshotsByParent(final ...
restoreModelFromSnapshot(model, modelSnapshot); } } /** * @param modelSnapshot * @return Model's ID from given snapshot */ protected abstract int getModelId(final SnapshotModelType modelSnapshot); /** * @param modelSnapshot * @return model retrieved using {@link #getModelId(Object)}. */ protected a...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\snapshot\impl\AbstractSnapshotHandler.java
1
请完成以下Java代码
public String getRole() { return role; } /** * Sets the value of the role property. * * @param value * allowed object is * {@link String } * */ public void setRole(String value) { this.role = value; } /** * Gets the value of the...
* possible object is * {@link String } * */ public String getPlace() { return place; } /** * Sets the value of the place property. * * @param value * allowed object is * {@link String } * */ public void setPlace(String...
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\BodyType.java
1
请完成以下Java代码
public static List<JsonNode> filterOutJsonNodes(List<JsonLookupResult> lookupResults) { List<JsonNode> jsonNodes = new ArrayList<JsonNode>(lookupResults.size()); for (JsonLookupResult lookupResult : lookupResults) { jsonNodes.add(lookupResult.getJsonNode()); } return jsonNode...
public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public JsonNode getJsonNode() { return jsonNode; } public voi...
repos\Activiti-develop\activiti-core\activiti-json-converter\src\main\java\org\activiti\editor\language\json\converter\util\JsonConverterUtil.java
1
请在Spring Boot框架中完成以下Java代码
public void setTotalAmount(BigDecimal totalAmount) { this.totalAmount = totalAmount; } /** * 交易总笔数 * * @return */ public Integer getTotalCount() { return totalCount; } /** * 交易总笔数 * * @param totalCount */ public void setTotalCount(Integer totalCount) { this.totalCount = totalCount; } ...
return settStatus; } /** * 结算状态(参考枚举:SettDailyCollectStatusEnum) * * @param settStatus */ public void setSettStatus(String settStatus) { this.settStatus = settStatus; } /** * 风险预存期 */ public Integer getRiskDay() { return riskDay; } /** * 风险预存期 */ public void setRiskDay(Integer riskDay) ...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\account\entity\RpSettDailyCollect.java
2
请在Spring Boot框架中完成以下Java代码
public final I_C_UOM getC_UOM() { return uom; } @Override public boolean isSameAs(final IPackingItem item) { return Util.same(this, item); } @Override public BPartnerId getBPartnerId() { return getBPartnerLocationId().getBpartnerId(); } @Override public BPartnerLocationId getBPartnerLocationId() {...
return parts.map(PackingItemPart::getShipmentScheduleId).collect(ImmutableSet.toImmutableSet()); } @Override public IPackingItem subtractToPackingItem( @NonNull final Quantity subtrahent, @Nullable final Predicate<PackingItemPart> acceptPartPredicate) { final PackingItemParts subtractedParts = subtract(sub...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\picking\service\PackingItem.java
2
请完成以下Java代码
public Object around(ProceedingJoinPoint point) throws Throwable { Signature signature = point.getSignature(); MethodSignature methodSignature = null; if (!(signature instanceof MethodSignature)) { throw new IllegalArgumentException("该注解只能用于方法"); } methodSignature = ...
try { return point.proceed(); } finally { log.debug("清空数据源信息!"); DataSourceContextHolder.clearDataSourceType(); } } /** * aop的顺序要早于spring的事务 */ @Override public int getOrder() { return 1; } }
repos\SpringBootBucket-master\springboot-multisource\src\main\java\com\xncoding\pos\common\aop\MultiSourceExAop.java
1
请完成以下Java代码
class ErrorControllerAdvice { @ExceptionHandler(Throwable.class) @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) public String exception(final Throwable throwable, final Model model) { if(!(throwable instanceof NoHandlerFoundException)){ log.error("Exception during execution of applic...
public String storageException(final StorageException throwable, final Model model) { log.error("Exception during execution of application", throwable); model.addAttribute("errorMessage", "Failed to store file"); return "error"; } @ExceptionHandler(RetrievalException.class) @Respons...
repos\spring-boot-web-application-sample-master\main-app\main-webapp\src\main\java\gt\app\web\mvc\ErrorControllerAdvice.java
1
请完成以下Java代码
public void registerBundle(String name, SslBundle bundle) { Assert.notNull(name, "'name' must not be null"); Assert.notNull(bundle, "'bundle' must not be null"); RegisteredSslBundle previous = this.registeredBundles.putIfAbsent(name, new RegisteredSslBundle(name, bundle)); Assert.state(previous == null, () -> "...
this.bundle = bundle; } void update(SslBundle updatedBundle) { Assert.notNull(updatedBundle, "'updatedBundle' must not be null"); this.bundle = updatedBundle; if (this.updateHandlers.isEmpty()) { logger.warn(LogMessage.format( "SSL bundle '%s' has been updated but may be in use by a technology t...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\ssl\DefaultSslBundleRegistry.java
1
请完成以下Java代码
public ImmutableTableNamesGroupsIndex replacingGroup(@NonNull final TableNamesGroup groupToAdd) { if (groupsById.isEmpty()) { return new ImmutableTableNamesGroupsIndex(ImmutableList.of(groupToAdd)); } final ArrayList<TableNamesGroup> newGroups = new ArrayList<>(groupsById.size() + 1); boolean added = fal...
} else { newGroups.add(group); } } if (!added) { newGroups.add(groupToAdd); added = true; } return new ImmutableTableNamesGroupsIndex(newGroups); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\ImmutableTableNamesGroupsIndex.java
1
请完成以下Java代码
public void addCheckingPaths(TreePath[] paths) { getCheckingModel().addCheckingPaths(paths); } /** * Add a path in the checking. */ public void addCheckingPath(TreePath path) { getCheckingModel().addCheckingPath(path); } /** * Set path in the checking. */ ...
*/ public void expandAll() { expandSubTree(getPathForRow(0)); } private void expandSubTree(TreePath path) { expandPath(path); Object node = path.getLastPathComponent(); int childrenNumber = getModel().getChildCount(node); TreePath[] childrenPath = new TreePath[childrenNumber]; for (int childIndex = 0...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\it\cnr\imaa\essi\lablib\gui\checkboxtree\CheckboxTree.java
1
请在Spring Boot框架中完成以下Java代码
public StaticResourceServerWebExchange excluding(StaticResourceLocation first, StaticResourceLocation... rest) { return excluding(EnumSet.of(first, rest)); } /** * Return a new {@link StaticResourceServerWebExchange} based on this one but * excluding the specified locations. * @param locations the loca...
private Stream<String> getPatterns() { return this.locations.stream().flatMap(StaticResourceLocation::getPatterns); } @Override public Mono<MatchResult> matches(ServerWebExchange exchange) { return new OrServerWebExchangeMatcher(getDelegateMatchers().toList()).matches(exchange); } private Stream<Serve...
repos\spring-boot-4.0.1\module\spring-boot-security\src\main\java\org\springframework\boot\security\autoconfigure\web\reactive\StaticResourceRequest.java
2
请完成以下Java代码
protected void applyFilters(BatchStatisticsQuery query) { if (batchId != null) { query.batchId(batchId); } if (type != null) { query.type(type); } if (TRUE.equals(withoutTenantId)) { query.withoutTenantId(); } if (tenantIds != null && !tenantIds.isEmpty()) { query.ten...
if (TRUE.equals(withoutFailures)) { query.withoutFailures(); } } protected void applySortBy(BatchStatisticsQuery query, String sortBy, Map<String, Object> parameters, ProcessEngine engine) { if (sortBy.equals(SORT_BY_BATCH_ID_VALUE)) { query.orderById(); } else if (sortBy.equals(SORT_BY...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\batch\BatchStatisticsQueryDto.java
1
请完成以下Java代码
public int getC_Charge_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID); if (ii == null) return 0; return ii.intValue(); } public I_C_ValidCombination getCh_Expense_A() throws RuntimeException { return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) .ge...
} public I_C_ValidCombination getCh_Revenue_A() throws RuntimeException { return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) .getPO(getCh_Revenue_Acct(), get_TrxName()); } /** Set Charge Revenue. @param Ch_Revenue_Acct Charge Revenue Account */ public void setCh_Rev...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Charge_Acct.java
1
请完成以下Java代码
public class RunAsImplAuthenticationProvider implements InitializingBean, AuthenticationProvider, MessageSourceAware { protected MessageSourceAccessor messages = SpringSecurityMessageSource.getAccessor(); @SuppressWarnings("NullAway.Init") private @Nullable String key; @Override public void afterPropertiesSet()...
public void setKey(String key) { this.key = key; } @Override public void setMessageSource(MessageSource messageSource) { this.messages = new MessageSourceAccessor(messageSource); } @Override public boolean supports(Class<?> authentication) { return RunAsUserToken.class.isAssignableFrom(authentication); }...
repos\spring-security-main\access\src\main\java\org\springframework\security\access\intercept\RunAsImplAuthenticationProvider.java
1
请在Spring Boot框架中完成以下Java代码
public ProductAvailableStocks newAvailableStocksProvider(@NonNull final Workplace workplace) { final Set<LocatorId> pickFromLocatorIds = warehouseService.getPickFromLocatorIds(workplace); if (pickFromLocatorIds.isEmpty()) { return null; } return ProductAvailableStocks.builder() .handlingUnitsBL(handl...
{ return getHUProductStorage(huId, productId) .map(IHUProductStorage::getQty) .map(Quantity::isPositive) .orElse(false); } private Optional<IHUProductStorage> getHUProductStorage(final @NotNull HuId huId, final @NotNull ProductId productId) { final I_M_HU hu = handlingUnitsBL.getById(huId); final...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\service\external\hu\PickingJobHUService.java
2
请在Spring Boot框架中完成以下Java代码
public String getScopeDefinitionId() { return scopeDefinitionId; } public String getScopeType() { return scopeType; } public String getReferenceScopeId() { return referenceScopeId; } public String getReferenceScopeDefinitionId() { return referenceScopeDefinitio...
if (param.referenceScopeId != null && !param.referenceScopeId.equals(entity.getReferenceScopeId())) { return false; } if (param.referenceScopeDefinitionId != null && !param.referenceScopeDefinitionId.equals(entity.getReferenceScopeDefinitionId())) { return false; } ...
repos\flowable-engine-main\modules\flowable-entitylink-service\src\main\java\org\flowable\entitylink\service\impl\InternalEntityLinkQueryImpl.java
2
请在Spring Boot框架中完成以下Java代码
private ExecutorService initDispatcherExecutor(String dispatcherName, int poolSize) { if (poolSize == 0) { int cores = Runtime.getRuntime().availableProcessors(); poolSize = Math.max(1, cores / 2); } if (poolSize == 1) { return Executors.newSingleThreadExecuto...
appActor.tellWithHighPriority(new PartitionChangeMsg(event.getServiceType())); } @Override protected boolean filterTbApplicationEvent(PartitionChangeEvent event) { return event.getServiceType() == ServiceType.TB_RULE_ENGINE || event.getServiceType() == ServiceType.TB_CORE; } @PreDestroy ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\actors\service\DefaultActorService.java
2
请完成以下Java代码
public final class IssueReportableExceptions { /** * Marks given exception and all of it's causes chain as issue reported. * * @param exception * @param adIssueId */ public static void markReportedIfPossible(@NonNull final Throwable exception, @NonNull final AdIssueId adIssueId) { // NOTE: we are markin...
{ if (currentEx instanceof IIssueReportableAware) { final IIssueReportableAware issueReportable = (IIssueReportableAware)currentEx; if (issueReportable.isIssueReported()) { return true; } } currentEx = currentEx.getCause(); } return false; } @Nullable public static AdIssueId g...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\exceptions\IssueReportableExceptions.java
1
请完成以下Java代码
public void setValue(ELContext context, Object value) throws ELException { node.setValue(bindings, context, value); } /** * @return <code>true</code> if this is a literal text expression */ @Override public boolean isLiteralText() { return node.isLiteralText(); } @Ove...
TreeValueExpression other = (TreeValueExpression) obj; if (!builder.equals(other.builder)) { return false; } if (type != other.type) { return false; } return (getStructuralId().equals(other.getStructuralId()) && bindings.equals(...
repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\TreeValueExpression.java
1
请完成以下Java代码
private static ImmutableSet<ProductId> extractProductIds(final Collection<I_M_Product> records) { return records.stream() .mapToInt(I_M_Product::getM_Product_ID) .distinct() .mapToObj(ProductId::ofRepoId) .collect(ImmutableSet.toImmutableSet()); } private JsonProduct toJsonProduct(final I_M_Produc...
{ final IModelTranslationMap trls = InterfaceWrapperHelper.getModelTranslationMap(record); return JsonProductBPartner.builder() .bpartnerId(BPartnerId.ofRepoId(record.getC_BPartner_ID())) // .productNo(record.getProductNo()) .productName(trls.getColumnTrl(I_C_BPartner_Product.COLUMNNAME_ProductName...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\product\command\GetProductsCommand.java
1
请完成以下Java代码
public static void batchExecute(Connection connection, List<String> sqlList) { try (Statement st = connection.createStatement()) { for (String sql : sqlList) { // 去除末尾的分号 if (sql.endsWith(";")) { sql = sql.substring(0, sql.length() - 1); } // 检查 SQL 语句是否为空 if (!sql.trim().isEmpty()) { ...
} catch (Exception e) { log.error("读取SQL文件时发生异常: {}", e.getMessage()); } return sqlList; } /** * 去除不安全的参数 * @param jdbcUrl / * @return / */ private static String sanitizeJdbcUrl(String jdbcUrl) { // 定义不安全参数和其安全替代值 String[][] unsafeParams = { // allowLoadLocalInfile:允许使用 LOAD DATA LOCAL INFILE...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\maint\util\SqlUtils.java
1
请完成以下Java代码
public static ExternalSystemId ofRepoIdOrNull(@Nullable final Integer repoId) { return repoId != null && repoId > 0 ? new ExternalSystemId(repoId) : null; } @Nullable public static ExternalSystemId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? new ExternalSystemId(repoId) : null; } public static O...
{ return id != null ? id.getRepoId() : -1; } private ExternalSystemId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, I_ExternalSystem.COLUMNNAME_ExternalSystem_ID); } @JsonValue public int toJson() { return getRepoId(); } public static boolean equals(@Nullable final ExternalSyst...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\externalsystem\ExternalSystemId.java
1
请在Spring Boot框架中完成以下Java代码
public class MembershipOrderCreateCommand { private final IOrderBL orderBL = Services.get(IOrderBL.class); private final IOrderLineBL orderLineBL = Services.get(IOrderLineBL.class); private final IOrderDAO orderDAO = Services.get(IOrderDAO.class); private final IDocumentBL documentBL = Services.get(IDocumentBL.cla...
orderDAO.save(orderLine); documentBL.processEx(newSalesOrder, IDocument.ACTION_Complete, IDocument.STATUS_Completed); } private I_C_Order copyOrderHeader(@NonNull final I_C_Order initialMembershipOrder) { final I_C_Order newSalesOrder = InterfaceWrapperHelper.copy() .setFrom(initialMembershipOrder) .s...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\bpartner\service\MembershipOrderCreateCommand.java
2
请在Spring Boot框架中完成以下Java代码
public Integer getPort() { return this.port; } public void setPort(Integer port) { this.port = port; } public StatsdProtocol getProtocol() { return this.protocol; } public void setProtocol(StatsdProtocol protocol) { this.protocol = protocol; } public Integer getMaxPacketLength() { return this.maxP...
return this.step; } public void setStep(Duration step) { this.step = step; } public boolean isPublishUnchangedMeters() { return this.publishUnchangedMeters; } public void setPublishUnchangedMeters(boolean publishUnchangedMeters) { this.publishUnchangedMeters = publishUnchangedMeters; } public boolean ...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\statsd\StatsdProperties.java
2
请完成以下Java代码
public void setIsValid (final boolean IsValid) { set_Value (COLUMNNAME_IsValid, IsValid); } @Override public boolean isValid() { return get_ValueAsBoolean(COLUMNNAME_IsValid); } @Override public void setLineNo (final int LineNo) { set_Value (COLUMNNAME_LineNo, LineNo); } @Override public int getLi...
public java.sql.Timestamp getPaymentDate() { return get_ValueAsTimestamp(COLUMNNAME_PaymentDate); } @Override public void setProcessed (final boolean Processed) { set_Value (COLUMNNAME_Processed, Processed); } @Override public boolean isProcessed() { return get_ValueAsBoolean(COLUMNNAME_Processed); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-gen\de\metas\payment\esr\model\X_ESR_ImportLine.java
1
请在Spring Boot框架中完成以下Java代码
public InvoiceTotal subtractRealValue(@Nullable final Money realValueToSubtract) { if (realValueToSubtract == null || realValueToSubtract.signum() == 0) { return this; } final Money resultRealValue = toRealValueAsMoney().subtract(realValueToSubtract); final Money resultRelativeValue = multiplier.convertT...
} else if (multiplier.isAP()) { return new InvoiceTotal(relativeValue.negate(), multiplier.withAPAdjusted(false)); } else { return new InvoiceTotal(relativeValue, multiplier.withAPAdjusted(false)); } } public InvoiceTotal withCMAdjusted(final boolean isCMAdjusted) { return isCMAdjusted ? withCMA...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\service\impl\InvoiceTotal.java
2
请在Spring Boot框架中完成以下Java代码
public Result<List<SysPositionSelectTreeVo>> getPositionByDepartId(@RequestParam(name = "parentId") String parentId, @RequestParam(name = "departId",required = false) String departId, ...
/** * 更新改变后的部门数据 * * @param changeDepartVo * @return */ @PutMapping("/updateChangeDepart") @RequiresPermissions("system:depart:updateChange") @RequiresRoles({"admin"}) public Result<String> updateChangeDepart(@RequestBody SysChangeDepartVo changeDepartVo) { sysDepartSer...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\controller\SysDepartController.java
2
请完成以下Java代码
public Boolean getActive() { return active; } public Long getId() { return id; } public List<Item> getItems() { return items; } public Long getItemsSold() { return itemsSold; } public Location getLocation() { return location; } public ...
public void setActive(Boolean active) { this.active = active; } public void setId(Long id) { this.id = id; } public void setItems(List<Item> items) { this.items = items; } public void setItemsSold(Long itemsSold) { this.itemsSold = itemsSold; } public ...
repos\tutorials-master\persistence-modules\spring-data-jpa-repo-2\src\main\java\com\baeldung\boot\domain\Store.java
1
请完成以下Java代码
public void setSum(BigDecimal value) { this.sum = value; } /** * Gets the value of the ttlNetNtryAmt property. * * @return * possible object is * {@link BigDecimal } * */ public BigDecimal getTtlNetNtryAmt() { return ttlNetNtryAmt; } ...
*/ public CreditDebitCode getCdtDbtInd() { return cdtDbtInd; } /** * Sets the value of the cdtDbtInd property. * * @param value * allowed object is * {@link CreditDebitCode } * */ public void setCdtDbtInd(CreditDebitCode value) { this.cdt...
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\NumberAndSumOfTransactions2.java
1
请完成以下Java代码
default void handleBatch(Exception thrownException, ConsumerRecords<?, ?> data, Consumer<?, ?> consumer, MessageListenerContainer container, Runnable invokeListener) { logger().error(thrownException, "'handleBatch' is not implemented by this handler"); } /** * Common error handler logger. * @return the log...
} /** * Optional method to clear thread state; will be called just before a consumer * thread terminates. */ default void clearThreadState() { } /** * Return true if the offset should be committed for a handled error (no exception * thrown). * @return true to commit. */ default boolean isAckAfterHa...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\CommonErrorHandler.java
1
请在Spring Boot框架中完成以下Java代码
public class AD_Process { public AD_Process() { Services.get(IProgramaticCalloutProvider.class).registerAnnotatedCallout(this); } @ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFORE_CHANGE }, ifColumnsChanged = I_AD_Process.COLUMNNAME_Type) @CalloutMethod(columnNames = I_AD_Proce...
} // NOTE: in case of JSON jasper report, accept JSONPath to be empty. // In that case we expect JSON data will be provided as process parameter (usually programatically) } @CalloutMethod(columnNames = I_AD_Process.COLUMNNAME_IsReport) public void setDefaultReportProcessClassName(@NonNull final I_AD_Process pr...
repos\metasfresh-new_dawn_uat\backend\de.metas.report\de.metas.report.jasper.client\src\main\java\de\metas\report\jasper\client\interceptor\AD_Process.java
2
请在Spring Boot框架中完成以下Java代码
private JsonRemittanceAdvice buildJsonRemittanceAdvice(@NonNull final DocumentType document, @Nullable final String sendDate) { final List<JsonRemittanceAdviceLine> lines = extractLinesFromDocument(document); final JsonRemittanceAdviceProducer jsonRemittanceAdviceProducer = JsonRemittanceAdviceProducer.builder() ...
final Supplier<RuntimeException> missingMandatoryDataExSupplier = () -> new RuntimeException("Missing mandatory data! ListLineItemType: " + lineItemType); if (lineItemType.getListLineItemExtension() == null || lineItemType.getListLineItemExtension().getListLineItemExtension() == null) { throw missingMan...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\remadvimport\ecosio\RemadvXmlToJsonProcessor.java
2
请完成以下Java代码
private CommissionPoints computeEarnedCommissionPointsForSalesRep( @NonNull final CommissionPoints customerBasedCommissionPointsSum, @NonNull final CommissionPoints customerBasedCPointsPerUnit, @NonNull final CommissionPoints salesRepBasedCPointsPerUnit, @NonNull final Integer pointsPrecision) { final Bi...
{ final ComputeSalesRepPriceRequest request = ComputeSalesRepPriceRequest.builder() .salesRepId(share.getBeneficiary().getBPartnerId()) .soTrx(SOTrx.SALES) .productId(commissionTriggerData.getProductId()) .qty(commissionTriggerData.getTotalQtyInvolved()) .customerCurrencyId(commissionTriggerData.g...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\businesslogic\margin\MarginAlgorithm.java
1
请在Spring Boot框架中完成以下Java代码
private void createAndStoreSyncConfirmRecord(final AbstractSyncConfirmAwareEntity abstractEntity) { final SyncConfirm syncConfirmRecord = new SyncConfirm(); syncConfirmRecord.setEntryType(abstractEntity.getClass().getSimpleName()); syncConfirmRecord.setEntryUuid(abstractEntity.getUuid()); syncConfirmRecor...
{ final List<WeekSupply> weeklySupplies = ImmutableList.copyOf(this.weeklySupplies); this.weeklySupplies.clear(); pushWeeklyReportsAsync(weeklySupplies); } // // Sync RfQ changes { final List<Rfq> rfqs = ImmutableList.copyOf(this.rfqs); this.rfqs.clear(); pushRfqsAsync(rfqs); } ...
repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\sync\SenderToMetasfreshService.java
2
请完成以下Java代码
public class FactAcctChangesApplier { private final ArrayListMultimap<AcctSchemaId, FactAcctChanges> linesToAddGroupedByAcctSchemaId; private final HashMap<FactLineMatchKey, FactAcctChanges> linesToChangeByKey; private final HashMap<FactLineMatchKey, FactAcctChanges> linesToRemoveByKey; public FactAcctChangesAppli...
} } private void addLinesTo(@NonNull final Fact fact) { final AcctSchemaId acctSchemaId = fact.getAcctSchemaId(); final List<FactAcctChanges> additions = linesToAddGroupedByAcctSchemaId.removeAll(acctSchemaId); additions.forEach(addition -> addLine(fact, addition)); } public void addLine(@NonNull final Fac...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\factacct_userchanges\FactAcctChangesApplier.java
1
请完成以下Java代码
public class PPOrderCostBL implements IPPOrderCostBL { private final IPPOrderCostDAO orderCostsRepo = Services.get(IPPOrderCostDAO.class); @Override public void createOrderCosts(@NonNull final I_PP_Order ppOrder) { new CreatePPOrderCostsCommand(ppOrder) .execute(); } @Override public boolean hasPPOrderCo...
public PPOrderCosts getByOrderId(@NonNull final PPOrderId orderId) { return orderCostsRepo.getByOrderId(orderId); } @Override public void deleteByOrderId(@NonNull final PPOrderId orderId) { orderCostsRepo.deleteByOrderId(orderId); } @Override public void save(@NonNull final PPOrderCosts orderCosts) { o...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\api\impl\PPOrderCostBL.java
1
请完成以下Java代码
public String byteToHex(byte num) { char[] hexDigits = new char[2]; hexDigits[0] = Character.forDigit((num >> 4) & 0xF, 16); hexDigits[1] = Character.forDigit((num & 0xF), 16); return new String(hexDigits); } public byte hexToByte(String hexString) { int firstDigit = toD...
} public String encodeUsingDataTypeConverter(byte[] bytes) { return DatatypeConverter.printHexBinary(bytes); } public byte[] decodeUsingDataTypeConverter(String hexString) { return DatatypeConverter.parseHexBinary(hexString); } public String encodeUsingApacheCommons(byte[] bytes) ...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-1\src\main\java\com\baeldung\algorithms\conversion\HexStringConverter.java
1