instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public void setBytes(byte[] bytes) { this.bytes = bytes; } public String getDeploymentId() { return deploymentId; } public void setDeploymentId(String deploymentId) { this.deploymentId = deploymentId; } public Object getPersistentState() { return ResourceEntity...
this.generated = generated; } /** * Indicated whether or not the resource has been generated while deploying rather than being actual part of the deployment. */ public boolean isGenerated() { return generated; } // common methods //////////////////////////////////////////////////...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ResourceEntityImpl.java
1
请完成以下Java代码
public LocalDate getDocumentDate(final DocumentTableFields docFields) { final I_C_RemittanceAdvice remittanceAdvice = extractRemittanceAdvice(docFields); return TimeUtil.asLocalDate(remittanceAdvice.getDateDoc()); } @Override public String completeIt(final DocumentTableFields docFields) { final I_C_Remitta...
public void reactivateIt(final DocumentTableFields docFields) { final I_C_RemittanceAdvice remittanceAdvice = extractRemittanceAdvice(docFields); if (remittanceAdvice.getC_Payment_ID() > 0) { throw new AdempiereException("A payment was already created!"); } remittanceAdvice.setProcessed(false); remitt...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\remittanceadvice\document\C_RemittanceAdvice_DocHandler.java
1
请完成以下Java代码
public void setCarrier_Product_ID (final int Carrier_Product_ID) { if (Carrier_Product_ID < 1) set_ValueNoCheck (COLUMNNAME_Carrier_Product_ID, null); else set_ValueNoCheck (COLUMNNAME_Carrier_Product_ID, Carrier_Product_ID); } @Override public int getCarrier_Product_ID() { return get_ValueAsInt(CO...
@Override public int getM_Shipper_ID() { return get_ValueAsInt(COLUMNNAME_M_Shipper_ID); } @Override public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Carrier_Product.java
1
请完成以下Java代码
public int hashCode() { int prime = 31; int result = 1; result = prime * result + ((model == null) ? 0 : model.hashCode()); result = prime * result + ((typeName == null) ? 0 : typeName.hashCode()); result = prime * result + ((typeNamespace == null) ? 0 : typeNamespace.hashCode()); return result;...
return false; } } else if (!model.equals(other.model)) { return false; } if (typeName == null) { if (other.typeName != null) { return false; } } else if (!typeName.equals(other.typeName)) { return false; } if (typeNamespace == null) { if (other.typeNam...
repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\type\ModelElementTypeImpl.java
1
请完成以下Java代码
public void setDescription (String Description) { set_Value (COLUMNNAME_Description, Description); } /** Get Description. @return Optional short description of the record */ public String getDescription () { return (String)get_Value(COLUMNNAME_Description); } /** Set Confirmed. @param IsConfirmed ...
if (bd == null) return Env.ZERO; return bd; } /** Set Resource Assignment. @param S_ResourceAssignment_ID Resource Assignment */ public void setS_ResourceAssignment_ID (int S_ResourceAssignment_ID) { if (S_ResourceAssignment_ID < 1) set_ValueNoCheck (COLUMNNAME_S_ResourceAssignment_ID, null); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_S_ResourceAssignment.java
1
请在Spring Boot框架中完成以下Java代码
static class CloudPlatformSecurityContextCondition { } @ConditionalOnProperty({ "spring.data.gemfire.security.username", "spring.data.gemfire.security.password", }) static class SpringDataGeodeSecurityContextCondition { } @ConditionalOnProperty({ "gemfire.security-username", "gemfire.security-pass...
} SpringDataGemFirePropertiesPropertySource(String name, Properties springDataGemFireProperties) { super(name, springDataGemFireProperties); } @Nullable @Override public Object getProperty(String name) { return getSource().getProperty(name); } @Override public boolean containsProperty(String name...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\ClientSecurityAutoConfiguration.java
2
请完成以下Java代码
public void postProcessEngineBuild(ProcessEngine processEngine) { if(!authorizationEnabled) { return; } final AuthorizationService authorizationService = processEngine.getAuthorizationService(); if(administratorGroupName != null && administratorGroupName.length()>0) { // create ADMIN autho...
// getter / setters //////////////////////////////////// public String getAdministratorGroupName() { return administratorGroupName; } public void setAdministratorGroupName(String administratorGroupName) { this.administratorGroupName = administratorGroupName; } public String getAdministratorUserName...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\plugin\AdministratorAuthorizationPlugin.java
1
请完成以下Java代码
public String getSaleRefNb() { return saleRefNb; } /** * Sets the value of the saleRefNb property. * * @param value * allowed object is * {@link String } * */ public void setSaleRefNb(String value) { this.saleRefNb = value; } /** ...
} /** * Sets the value of the pdct property. * * @param value * allowed object is * {@link Product2 } * */ public void setPdct(Product2 value) { this.pdct = value; } /** * Gets the value of the vldtnDt property. * * @return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\CardIndividualTransaction1.java
1
请完成以下Java代码
public boolean isSkipIoMappings() { return skipIoMappings; } public void setSkipIoMappings(boolean skipIoMappings) { this.skipIoMappings = skipIoMappings; } public boolean isSkipCustomListeners() { return skipCustomListeners; } public void setSkipCustomListeners(boolean skipCustomListeners) {...
} public String getAnnotation() { return annotation; } public void setAnnotation(String annotation) { this.annotation = annotation; } public HistoricProcessInstanceQueryDto getHistoricProcessInstanceQuery() { return historicProcessInstanceQuery; } public void setHistoricProcessInstanceQuer...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\ModificationDto.java
1
请在Spring Boot框架中完成以下Java代码
public class ConvertListToMapService { public Map<Integer, Animal> convertListBeforeJava8(List<Animal> list) { Map<Integer, Animal> map = new HashMap<>(); for (Animal animal : list) { map.put(animal.getId(), animal); } return map; } public Map<Integer, Animal>...
public Map<Integer, Animal> convertListWithGuava(List<Animal> list) { Map<Integer, Animal> map = Maps.uniqueIndex(list, Animal::getId); return map; } public Map<Integer, Animal> convertListWithApacheCommons(List<Animal> list) { Map<Integer, Animal> map = new HashMap<>(); MapU...
repos\tutorials-master\core-java-modules\core-java-collections-conversions\src\main\java\com\baeldung\convertlisttomap\ConvertListToMapService.java
2
请在Spring Boot框架中完成以下Java代码
public String getTenantId() { return tenantId; } @Override public void setTenantId(String tenantId) { this.tenantId = tenantId; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.has...
.append(", eventType=").append(eventType); if (activityId != null) { sb.append(", activityId=").append(activityId); } if (executionId != null) { sb.append(", processInstanceId=").append(processInstanceId) .append(", executionId=").append(executionId)...
repos\flowable-engine-main\modules\flowable-eventsubscription-service\src\main\java\org\flowable\eventsubscription\service\impl\persistence\entity\EventSubscriptionEntityImpl.java
2
请完成以下Java代码
public String getProofPics() { return proofPics; } public void setProofPics(String proofPics) { this.proofPics = proofPics; } public String getHandleNote() { return handleNote; } public void setHandleNote(String handleNote) { this.handleNote = handleNote; }...
sb.append(", productId=").append(productId); sb.append(", orderSn=").append(orderSn); sb.append(", createTime=").append(createTime); sb.append(", memberUsername=").append(memberUsername); sb.append(", returnAmount=").append(returnAmount); sb.append(", returnName=").append(returnN...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\OmsOrderReturnApply.java
1
请在Spring Boot框架中完成以下Java代码
private TaxCategoryId getTaxCategoryId( @NonNull final I_C_Invoice invoice, @NonNull final I_C_InvoiceLine invoiceLine, @NonNull final CountryId taxCountryId) { final BPartnerId bPartnerId = BPartnerId.ofRepoId(invoice.getC_BPartner_ID()); final I_C_UOM uom = uomDAO.getById(invoiceLine.getPrice_UOM_ID())...
private static class InvoiceVerificationRunResult { @NonNull Tax invoiceTax; @Nullable Tax resultingTax; @NonNull InvoiceVerificationSetLineId setLineId; @NonNull OrgId orgId; @Nullable String log; @Builder public InvoiceVerificationRunResult(final @NonNull Tax invoiceTax, final @Nulla...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\service\impl\InvoiceVerificationBL.java
2
请在Spring Boot框架中完成以下Java代码
protected void setOwner(TenantId tenantId, Customer customer, IdProvider idProvider) { customer.setTenantId(tenantId); } @Override protected Customer prepare(EntitiesImportCtx ctx, Customer customer, Customer old, EntityExportData<Customer> exportData, IdProvider idProvider) { if (customer....
return customerDao.save(ctx.getTenantId(), customer); } } @Override protected Customer deepCopy(Customer customer) { return new Customer(customer); } @Override public EntityType getEntityType() { return EntityType.CUSTOMER; } }
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\sync\ie\importing\impl\CustomerImportService.java
2
请完成以下Java代码
final class RootContextMenuAction extends AbstractContextMenuAction { public static final RootContextMenuAction EMPTY = new RootContextMenuAction(); private final List<IContextMenuAction> actions; /** * Empty constructor */ private RootContextMenuAction() { super(); this.actions = Collections.emptyList()...
public boolean isRunnable() { return true; } @Override public List<IContextMenuAction> getChildren() { return actions; } @Override public void run() { // shall not be invoked throw new UnsupportedOperationException(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\ui\impl\RootContextMenuAction.java
1
请在Spring Boot框架中完成以下Java代码
public class Employee implements Serializable { private static final long serialVersionUID = 1L; private Integer id; private String name; private Long salary; // constructors public Employee() { } public Employee(final Integer id, final String name, final Long salary) { super(...
final Employee other = (Employee) obj; if (id == null) { if (other.id != null) { return false; } } else if (!id.equals(other.id)) { return false; } return true; } public Integer getId() { return id; } public vo...
repos\tutorials-master\persistence-modules\hibernate-queries\src\main\java\com\baeldung\hibernate\criteria\model\Employee.java
2
请完成以下Java代码
private static SortedSet<LocalDateTime> newSortedSet(final Collection<LocalDateTime> values) { if (values == null || values.isEmpty()) { return new TreeSet<>(); } else { return new TreeSet<>(values); } } private static SortedSet<LocalDateTime> newReverseSortedSet(final Collection<LocalDateTime> va...
{ return CalendarIncrementors.eachNthWeek(frequency.getEveryNthWeek(), DayOfWeek.MONDAY); } else if (frequency.isMonthly()) { return CalendarIncrementors.eachNthMonth(frequency.getEveryNthMonth(), 1); // every given month, 1st day } else { throw new IllegalArgumentException("Frequency type...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\time\generator\DateSequenceGenerator.java
1
请完成以下Java代码
public void onAfterQuery(final ICalloutRecord calloutRecord) { try { tabCallout.onAfterQuery(calloutRecord); } catch (final Exception e) { handleException("onAfterQuery", calloutRecord, e); } } private static final class StatefulExceptionHandledTabCallout extends ExceptionHandledTabCallout impleme...
} @Override public void onInit(final ICalloutRecord calloutRecord) { try { ((IStatefulTabCallout)tabCallout).onInit(calloutRecord); } catch (final Exception e) { handleException("onInit", calloutRecord, e); } } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\ui\spi\ExceptionHandledTabCallout.java
1
请完成以下Java代码
private Optional<Cell> getCommonValue(@NonNull final String columnName) { if (rowsList.isEmpty()) { return Optional.empty(); } final Cell firstValue = rowsList.get(0).getCell(columnName); for (int i = 1; i < rowsList.size(); i++) { final Cell value = rowsList.get(i).getCell(columnName); if (!Obj...
} public TablePrinter toPrint() { return new TablePrinter(this); } public String toTabularString() { return toPrint().toString(); } @Override @Deprecated public String toString() {return toTabularString();} }
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\text\tabular\Table.java
1
请完成以下Java代码
public Builder tokenRevocationEndpoint(String tokenRevocationEndpoint) { return setting(ConfigurationSettingNames.AuthorizationServer.TOKEN_REVOCATION_ENDPOINT, tokenRevocationEndpoint); } /** * Sets the OAuth 2.0 Token Introspection endpoint. * @param tokenIntrospectionEndpoint the Token Introspecti...
/** * Sets the OpenID Connect 1.0 Logout endpoint. * @param oidcLogoutEndpoint the OpenID Connect 1.0 Logout endpoint * @return the {@link Builder} for further configuration */ public Builder oidcLogoutEndpoint(String oidcLogoutEndpoint) { return setting(ConfigurationSettingNames.AuthorizationServer.OI...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\settings\AuthorizationServerSettings.java
1
请完成以下Java代码
protected Map<String, Object> extractAttributes(HttpSession session) { return createMigratedAttributeMap(session); } @Override final HttpSession applySessionFixation(HttpServletRequest request) { HttpSession session = request.getSession(); String originalSessionId = session.getId(); this.logger.debug(LogMes...
} attributesToMigrate.put(key, session.getAttribute(key)); } return attributesToMigrate; } /** * Defines whether attributes should be migrated to a new session or not. Has no * effect if you override the {@code extractAttributes} method. * <p> * Attributes used by Spring Security (to store cached requ...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\session\SessionFixationProtectionStrategy.java
1
请在Spring Boot框架中完成以下Java代码
public void write(JsonWriter out, java.sql.Date date) throws IOException { if (date == null) { out.nullValue(); } else { String value; if (dateFormat != null) { value = dateFormat.format(date); } else { value = date.toString(); } out.value(value); } } ...
String value; if (dateFormat != null) { value = dateFormat.format(date); } else { value = ISO8601Utils.format(date, true); } out.value(value); } } @Override public Date read(JsonReader in) throws IOException { try { switch (in.peek()) { case NULL: ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\invoker\JSON.java
2
请完成以下Java代码
public void setName(String name) { this.name = name; } @Override public String getName() { return name; } @Override public VariableType getVariableType() { return variableType; } @Override public void setVariableType(VariableType variableType) { thi...
sb.append("id=").append(id); sb.append(", name=").append(name); sb.append(", type=").append(variableType != null ? variableType.getTypeName() : "null"); if (longValue != null) { sb.append(", longValue=").append(longValue); } if (doubleValue != null) { sb.a...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\HistoricDetailVariableInstanceUpdateEntityImpl.java
1
请完成以下Java代码
private IDunnableSource createSource(Class<? extends IDunnableSource> sourceClass) { final IDunnableSource source; try { source = sourceClass.newInstance(); return source; } catch (Exception e) { throw new DunningException("Cannot create dunning source for " + sourceClass, e); } } @Override ...
{ if (dunnableSources.containsKey(clazz)) { return; } final IDunnableSource source = createSource(clazz); dunnableSources.put(clazz, source); } @Override public String toString() { return "DefaultDunnableSourceFactory [dunnableSources=" + dunnableSources + "]"; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\api\impl\DefaultDunnableSourceFactory.java
1
请完成以下Java代码
public abstract class ValuedDataObject extends DataObject { protected Object value; public Object getValue() { return value; } public abstract void setValue(Object value); public abstract ValuedDataObject clone(); public void setValues(ValuedDataObject otherElement) { super....
ValuedDataObject otherObject = (ValuedDataObject) o; if (!otherObject.getItemSubjectRef().getStructureRef().equals(this.itemSubjectRef.getStructureRef())) { return false; } if (!otherObject.getId().equals(this.id)) { return false; } if (!otherObject.getNa...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\ValuedDataObject.java
1
请在Spring Boot框架中完成以下Java代码
public class ConfigPropertiesController { @Value("${baeldung.archaius.properties.one:not found!}") private String propertyOneWithValue; @Value("${baeldung.archaius.properties.two:not found!}") private String propertyTwoWithValue; @Value("${baeldung.archaius.properties.three:not found!}") priv...
@GetMapping("/properties-from-value") public Map<String, String> getPropertiesFromValue() { Map<String, String> properties = new HashMap<>(); properties.put("baeldung.archaius.properties.one", propertyOneWithValue); properties.put("baeldung.archaius.properties.two", propertyTwoWithValue); ...
repos\tutorials-master\spring-cloud-modules\spring-cloud-archaius\spring-cloud-archaius-extra-configs\src\main\java\com\baeldung\spring\cloud\archaius\extraconfigs\controllers\ConfigPropertiesController.java
2
请在Spring Boot框架中完成以下Java代码
public class ProactiveNotification { protected int channel; @XmlElement(required = true) protected String value; protected int rule; @XmlElement(required = true) protected String language; /** * Gets the value of the channel property. * */ public int getChannel() { ...
} /** * Gets the value of the rule property. * */ public int getRule() { return rule; } /** * Sets the value of the rule property. * */ public void setRule(int value) { this.rule = value; } /** * Gets the value of the language property....
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\ProactiveNotification.java
2
请完成以下Java代码
private void extractCandidateUsersAndGroups(org.activiti.engine.task.Task source, TaskImpl destination) { List<IdentityLink> candidates = taskService.getIdentityLinksForTask(source.getId()); destination.setCandidateGroups(extractCandidatesBy(candidates, IdentityLink::getGroupId)); destination.se...
} return result; } private Task.TaskStatus calculateStatus(org.activiti.engine.task.Task source) { if (source instanceof TaskEntity && (((TaskEntity) source).isDeleted() || ((TaskEntity) source).isCanceled())) { return Task.TaskStatus.CANCELLED; } else if (source.isSuspended...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-task-runtime-impl\src\main\java\org\activiti\runtime\api\model\impl\APITaskConverter.java
1
请完成以下Java代码
public String toString() { return MoreObjects.toStringHelper(this) .addValue(rules) .toString(); } public static List<IValidationRule> unbox(@Nullable final IValidationRule rule) { if (rule == null || NullValidationRule.isNull(rule)) { return ImmutableList.of(); } final ArrayList<IValidationR...
return this; } public Builder addExploded(final IValidationRule rule) { add(rule, true); return this; } private Builder add(final IValidationRule rule, final boolean explodeComposite) { // Don't add null rules if (NullValidationRule.isNull(rule)) { return this; } // Don't add if ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\validationRule\impl\CompositeValidationRule.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonProduct { @NonNull ProductId id; @NonNull String name; @NonNull BigDecimal price; @NonNull String currencySymbol; @NonNull UomId uomId; @NonNull String uomSymbol; @Nullable UomId catchWeightUomId; @Nullable String catchWeightUomSymbol; @Nullable BigDecimal catchWeight; @NonNull TaxCategoryId ...
.catchWeightUomId(product.getCatchWeightUom() != null ? product.getCatchWeightUom().getUomId() : null) .catchWeightUomSymbol(product.getCatchWeightUom() != null ? product.getCatchWeightUom().getUomSymbol() : null) .catchWeight(product.getCatchWeight()) .taxCategoryId(product.getTaxCategoryId()) .build()...
repos\metasfresh-new_dawn_uat\backend\de.metas.pos.rest-api\src\main\java\de\metas\pos\rest_api\json\JsonProduct.java
2
请完成以下Java代码
public ResponseEntity<Object> createServerDeploy(@Validated @RequestBody ServerDeploy resources){ serverDeployService.create(resources); return new ResponseEntity<>(HttpStatus.CREATED); } @Log("修改服务器") @ApiOperation(value = "修改服务器") @PutMapping @PreAuthorize("@el.check('serverDeploy...
@ApiOperation(value = "删除Server") @DeleteMapping @PreAuthorize("@el.check('serverDeploy:del')") public ResponseEntity<Object> deleteServerDeploy(@RequestBody Set<Long> ids){ serverDeployService.delete(ids); return new ResponseEntity<>(HttpStatus.OK); } @Log("测试连接服务器") @ApiOperat...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\maint\rest\ServerDeployController.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isEnrichWithDynatraceMetadata() { return this.enrichWithDynatraceMetadata; } public void setEnrichWithDynatraceMetadata(Boolean enrichWithDynatraceMetadata) { this.enrichWithDynatraceMetadata = enrichWithDynatraceMetadata; } public @Nullable String getMetricKeyPrefix() { return this.me...
public void setUseDynatraceSummaryInstruments(boolean useDynatraceSummaryInstruments) { this.useDynatraceSummaryInstruments = useDynatraceSummaryInstruments; } public boolean isExportMeterMetadata() { return this.exportMeterMetadata; } public void setExportMeterMetadata(boolean exportMeterMetadata) { ...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\dynatrace\DynatraceProperties.java
2
请完成以下Java代码
public Collection<I_M_ShippingPackage> getBy(final @NonNull ShippingPackageQuery query) { return toShippingPackageQueryBuilder(query) .create() .list(); } private IQuery<I_M_Package> toPackageSqlQuery(final @NonNull ShippingPackageQuery query) { final IQueryBuilder<I_M_ShippingPackage> builder = toShip...
final IQueryBuilder<I_M_ShippingPackage> builder = queryBL.createQueryBuilder(I_M_ShippingPackage.class) .addOnlyActiveRecordsFilter(); final Collection<OrderId> orderIds = query.getOrderIds(); if (!orderIds.isEmpty()) { builder.addInArrayFilter(I_M_ShippingPackage.COLUMNNAME_C_Order_ID, orderIds); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\shipping\PurchaseOrderToShipperTransportationRepository.java
1
请在Spring Boot框架中完成以下Java代码
public class MD5 { /** * 签名字符串 * @param text 需要签名的字符串 * @param key 密钥 * @param input_charset 编码格式 * @return 签名结果 */ public static String sign(String text, String key, String input_charset) { text = text + key; return DigestUtils.md5Hex(getContentBytes(text, input_char...
return false; } } /** * @param content * @param charset * @return * @throws SignatureException * @throws UnsupportedEncodingException */ private static byte[] getContentBytes(String content, String charset) { if (charset == null || "".equals(charset)) { ...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\utils\alipay\MD5.java
2
请完成以下Java代码
public static HalCaseDefinition fromCaseDefinition(CaseDefinition caseDefinition, ProcessEngine processEngine) { HalCaseDefinition halCaseDefinition = new HalCaseDefinition(); halCaseDefinition.id = caseDefinition.getId(); halCaseDefinition.key = caseDefinition.getKey(); halCaseDefinition.category = ca...
public String getName() { return name; } public int getVersion() { return version; } public String getResource() { return resource; } public String getDeploymentId() { return deploymentId; } public String getContextPath() { return contextPath; } }
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\hal\caseDefinition\HalCaseDefinition.java
1
请在Spring Boot框架中完成以下Java代码
private HuId getHuIdToPick(@NonNull final DistributionJobLine line) { if (_huIdToPick == null) { _huIdToPick = resolveHuIdToPick(line); } return _huIdToPick; } @NonNull private HuId resolveHuIdToPick(@NonNull final DistributionJobLine line) { final JsonDistributionEvent.PickFrom pickFrom = Check.assu...
} } @NonNull private HuId splitQty( @NonNull final DistributionJobLine line, @NonNull final HuId pickFromVHUId, @NonNull final Quantity qty) { final PackToHUsProducer.PackToInfo packToInfo = packToHUsProducer.extractPackToInfo(PackToSpec.VIRTUAL, line.getPickFromLocatorId()) .withPackForShipping(fal...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\job\service\commands\pick_from\DistributionJobPickFromCommand.java
2
请完成以下Java代码
public void setGetter(Method getter) { this.getter = getter; } public Method getSetter() { return setter; } public void setSetter(Method setter) { this.setter = setter; } @Override public String toString() { retur...
this.operation = operation; } public String getDescription() { return description; } public Method getOperation() { return operation; } @Override public String toString() { return "ManagedOperationInfo: [" + operation + "]";...
repos\flowable-engine-main\modules\flowable-jmx\src\main\java\org\flowable\management\jmx\MBeanInfoAssembler.java
1
请在Spring Boot框架中完成以下Java代码
public class ChainRequestGatewayFilterFactory extends AbstractGatewayFilterFactory<ChainRequestGatewayFilterFactory.Config> { final Logger logger = LoggerFactory.getLogger(ChainRequestGatewayFilterFactory.class); private final WebClient client; public ChainRequestGatewayFilterFactory(WebClient client) { ...
.flatMap(chain::filter); }; } public static class Config { private String languageServiceEndpoint; private String defaultLanguage; public Config() { } public String getLanguageServiceEndpoint() { return languageServiceEndpoint; } p...
repos\tutorials-master\spring-cloud-modules\spring-cloud-gateway\src\main\java\com\baeldung\springcloudgateway\customfilters\gatewayapp\filters\factories\ChainRequestGatewayFilterFactory.java
2
请完成以下Java代码
public void updateProcessBusinessKeyInHistory(ExecutionEntity processInstance) { for (HistoryManager historyManager : historyManagers) { historyManager.updateProcessBusinessKeyInHistory(processInstance); } } @Override public void updateProcessBusinessStatusInHistory(ExecutionEnt...
} @Override public void createHistoricActivityInstance(ActivityInstance activityInstance) { for (HistoryManager historyManager : historyManagers) { historyManager.createHistoricActivityInstance(activityInstance); } } @Override public void recordHistoricUserTaskLogEntry(...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\history\CompositeHistoryManager.java
1
请完成以下Java代码
public void setUomCode(final @NonNull String uomCode) { this.uomCode = uomCode; this.uomCodeSet = true; } public void setEan(final String ean) { this.ean = ean; this.eanSet = true; } public void setGtin(final String gtin) { this.gtin = gtin; this.gtinSet = true; } public void setDescription(fina...
} public void setProductCategoryIdentifier(final String productCategoryIdentifier) { this.productCategoryIdentifier = productCategoryIdentifier; this.productCategoryIdentifierSet = true; } public void setSyncAdvise(final SyncAdvise syncAdvise) { this.syncAdvise = syncAdvise; } public void setBpartnerPro...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-product\src\main\java\de\metas\common\product\v2\request\JsonRequestProduct.java
1
请完成以下Java代码
public final class ALoginRes_pt extends ListResourceBundle { /** Translation Content */ //Characters encoded to UTF8 Hex, so no more problems with svn commits //Fernando Lucktemberg - CenturuyOn Consultoria static final Object[][] contents = new String[][] { { "Connection", "Conex\u00e3o" }, { "Def...
{ "Ok", "Ok" }, { "Cancel", "Cancelar" }, { "VersionConflict", "Conflito de Vers\u00f5es:" }, { "VersionInfo", "Servidor <> Cliente" }, { "PleaseUpgrade", "Favor executar o programa de atualiza��o" } }; /** * Get Contents * @return context */ public Object[][] ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\apps\ALoginRes_pt.java
1
请完成以下Java代码
public class ResourceRef implements Serializable { private static final long serialVersionUID = 1L; private String id; private String name; private EventResourceEntity entity; protected boolean deleted; public ResourceRef() { } // Only intended to be used by ByteArrayRefTypeHandler ...
public EventResourceEntity getEntity() { ensureInitialized(); return entity; } public void delete() { if (!deleted && id != null) { if (entity != null) { // if the entity has been loaded already, // we might as well use the safer optimistic lo...
repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\persistence\entity\ResourceRef.java
1
请完成以下Java代码
public int getC_OrderLine_ID() { return get_ValueAsInt(COLUMNNAME_C_OrderLine_ID); } @Override public void setCostAmount (final BigDecimal CostAmount) { set_Value (COLUMNNAME_CostAmount, CostAmount); } @Override public BigDecimal getCostAmount() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAM...
@Override public void setM_Product_ID (final int M_Product_ID) { if (M_Product_ID < 1) set_Value (COLUMNNAME_M_Product_ID, null); else set_Value (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override publi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Order_Cost_Detail.java
1
请完成以下Java代码
private DocTypeId getInventoryDocTypeId(@NonNull final I_M_Warehouse warehouse) { if (request.getInternalUseInventoryDocTypeId() != null) { return request.getInternalUseInventoryDocTypeId(); } return docTypeDAO.getDocTypeId( DocTypeQuery.builder() .docBaseType(DocBaseType.MaterialPhysicalInventor...
private List<I_M_HU> getTopLevelHUs() { final List<I_M_HU> hus = request.getHus(); if (hus.isEmpty()) { throw new AdempiereException("No HUs for internal use inventory"); } return handlingUnitsBL.getTopLevelHUs(TopLevelHusQuery.builder() .hus(hus) .includeAll(false) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\internaluse\HUInternalUseInventoryProducer.java
1
请完成以下Java代码
public String getTraceId() { final DemandDetail demandDetail = getDemandDetail(); return demandDetail != null ? demandDetail.getTraceId() : null; } /** * This is enabled by the current usage of {@link #parentId} */ public boolean isStockCandidateOfThisCandidate(@NonNull final Candidate potentialStockCandid...
} /** * The qty is always stored as an absolute value on the candidate, but we're interested if the candidate is adding or subtracting qty to the stock. */ public BigDecimal getStockImpactPlannedQuantity() { switch (getType()) { case DEMAND: case UNEXPECTED_DECREASE: case INVENTORY_DOWN: return...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\candidate\Candidate.java
1
请完成以下Java代码
public PageData<Job> findJobsByFilter(TenantId tenantId, JobFilter filter, PageLink pageLink) { PageData<Job> jobs = jobDao.findByTenantIdAndFilter(tenantId, filter, pageLink); Set<EntityId> entityIds = jobs.getData().stream() .map(Job::getEntityId) .collect(Collectors.t...
@Override public Optional<HasId<?>> findEntity(TenantId tenantId, EntityId entityId) { return Optional.ofNullable(findJobById(tenantId, (JobId) entityId)); } @Override public FluentFuture<Optional<HasId<?>>> findEntityAsync(TenantId tenantId, EntityId entityId) { return FluentFuture.fro...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\job\DefaultJobService.java
1
请完成以下Java代码
public boolean isMatchAfter() { return this.matchAfter; } @Override protected String getDescription() { Filter filter = getFilter(); Assert.notNull(filter, "'filter' must not be null"); return "filter " + getOrDeduceName(filter); } @Override protected Dynamic addRegistration(String description, ServletC...
* @return the filter name * @since 3.2.0 */ public String getFilterName() { return getOrDeduceName(getFilter()); } @Override public String toString() { StringBuilder builder = new StringBuilder(getOrDeduceName(this)); if (this.servletNames.isEmpty() && this.urlPatterns.isEmpty()) { builder.append(" ur...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\web\servlet\AbstractFilterRegistrationBean.java
1
请完成以下Java代码
void failed(@Nullable ConfigurableApplicationContext context, Throwable exception) { doWithListeners("spring.boot.application.failed", (listener) -> callFailedListener(listener, context, exception), (step) -> { step.tag("exception", exception.getClass().toString()); String message = exception.getMessage...
message = (message != null) ? message : "no error message"; this.log.warn("Error handling failed (" + message + ")"); } } } private void doWithListeners(String stepName, Consumer<SpringApplicationRunListener> listenerAction) { doWithListeners(stepName, listenerAction, null); } private void doWithListen...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\SpringApplicationRunListeners.java
1
请完成以下Java代码
protected VariableMap collectLastVariables(CommandContext commandContext, HistoricProcessInstance processInstance) { HistoryService historyService = commandContext.getProcessEngineConfiguration() .getHistoryService(); List<HistoricVariableInstance> historicV...
ensureNotNull("startActivityId", startActivityId); List<HistoricActivityInstance> historicActivityInstances = historyService .createHistoricActivityInstanceQuery() .processInstanceId(processInstanceId) .activityId(startActivityId) .orderPartiallyByOccurrence() .asc() ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\RestartProcessInstancesCmd.java
1
请完成以下Java代码
public static class OpenSingleDocument implements ResultAction { @NonNull DocumentPath documentPath; @Builder.Default ProcessExecutionResult.RecordsToOpen.TargetTab targetTab = ProcessExecutionResult.RecordsToOpen.TargetTab.NEW_TAB; } @lombok.Value @lombok.Builder public static class SelectViewRowsAction...
@lombok.Value @lombok.Builder public static class DisplayQRCodeAction implements ResultAction { @NonNull String code; } @lombok.Value @lombok.Builder public static class NewRecordAction implements ResultAction { @NonNull String windowId; @NonNull @Singular Map<String, String> fieldValues; @NonNull @Bu...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\ProcessInstanceResult.java
1
请完成以下Java代码
public class TbMsgCountNode implements TbNode { private AtomicLong messagesProcessed = new AtomicLong(0); private final Gson gson = new Gson(); private UUID nextTickId; private long delay; private String telemetryPrefix; private long lastScheduledTs; @Override public void init(TbContex...
} else { messagesProcessed.incrementAndGet(); ctx.ack(msg); } } private void scheduleTickMsg(TbContext ctx, TbMsg msg) { long curTs = System.currentTimeMillis(); if (lastScheduledTs == 0L) { lastScheduledTs = curTs; } lastScheduledTs =...
repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\action\TbMsgCountNode.java
1
请完成以下Spring Boot application配置
spring.datasource.url=jdbc:h2:mem:testdb spring.datasource.driverClassName=org.h2.Driver spring.datasource.username=sa spring.datasource.password=password spring.jpa.database-p
latform=org.hibernate.dialect.H2Dialect spring.jpa.hibernate.ddl-auto=update
repos\tutorials-master\persistence-modules\spring-data-jpa-query-5\src\main\resources\application-h2.properties
2
请完成以下Java代码
private boolean isDeleteEmptyAndJustCreatedAggregatedTUs() { if (deleteEmptyAndJustCreatedAggregatedTUs != null) { return deleteEmptyAndJustCreatedAggregatedTUs; } else if (baseAllocationRequest != null) { return baseAllocationRequest.isDeleteEmptyAndJustCreatedAggregatedTUs(); } return false; } ...
final ProductId productId = getProductIdToUse(); final Quantity quantity = getQuantityToUse(); final ZonedDateTime date = getDateToUse(); final TableRecordReference fromTableRecord = getFromReferencedTableRecordToUse(); final boolean forceQtyAllocation = isForceQtyAllocationToUse(); final ClearanceStatusInfo ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\AllocationRequestBuilder.java
1
请完成以下Java代码
default CompletableFuture<Output> execute(DelegateExecution execution, AsyncTaskInvoker taskInvoker) { Input inputData = prepareExecutionData(execution); return taskInvoker.submit(() -> execute(inputData)); } /** * Method invoked before doing the execution to extract needed that from the e...
*/ Output execute(Input inputData); /** * Method invoked with the result from {@link #execute(Object)}. * This should be used to set data on the {@link DelegateExecution}. * This is on the same thread as {@link #prepareExecutionData(DelegateExecution)} and participates in the process transaction...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\delegate\FlowableFutureJavaDelegate.java
1
请完成以下Java代码
public class KotlinJpaMavenBuildCustomizer implements BuildCustomizer<MavenBuild> { private final BuildMetadataResolver buildMetadataResolver; public KotlinJpaMavenBuildCustomizer(InitializrMetadata metadata, ProjectDescription projectDescription) { this.buildMetadataResolver = new BuildMetadataResolver(metadata,...
compilerPlugins.add("plugin", "all-open"); }); configuration.configure("pluginOptions", (option) -> { option.add("option", "all-open:annotation=jakarta.persistence.Entity"); option.add("option", "all-open:annotation=jakarta.persistence.MappedSuperclass"); option.add("option", "all-open:annot...
repos\initializr-main\initializr-generator-spring\src\main\java\io\spring\initializr\generator\spring\code\kotlin\KotlinJpaMavenBuildCustomizer.java
1
请完成以下Java代码
public final class JavaFieldDeclaration implements Annotatable { private final AnnotationContainer annotations = new AnnotationContainer(); private final int modifiers; private final String name; private final String returnType; private final Object value; private final boolean initialized; private JavaFi...
* Builder for creating a {@link JavaFieldDeclaration}. */ public static final class Builder { private final String name; private String returnType; private int modifiers; private Object value; private boolean initialized; private Builder(String name) { this.name = name; } /** * Sets the ...
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\java\JavaFieldDeclaration.java
1
请完成以下Java代码
public BigDecimal getQty() { // TODO: why not using getQtyEnteredTU? // yes, why not indeed? final BigDecimal qtyItemCapacity = orderLine.getQtyItemCapacity(); if (qtyItemCapacity.signum() == 0) { return BigDecimal.ZERO; } final BigDecimal qtyOrdered = orderLine.getQtyOrdered(); return qtyOrdered...
return null; } return packingMaterialDAO.getLUPIItemForHUPI(BPartnerId.ofRepoId(orderLine.getC_BPartner_ID()), luPIId) .map(HuPackingMaterial::getProductId) .orElse(null); } @Override public BigDecimal getQtyLU() { return orderLine.getQtyLU(); } @Override public String toString() { return Obje...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\order\api\impl\OrderLinePackingMaterialDocumentLineSource.java
1
请完成以下Java代码
public ChangeActivityStateBuilder localVariables(String startActivityId, Map<String, Object> localVariables) { if (this.localVariables == null) { this.localVariables = new HashMap<>(); } this.localVariables.put(startActivityId, localVariables); return this; } @Over...
public List<MoveActivityIdContainer> getMoveActivityIdList() { return moveActivityIdList; } public List<EnableActivityIdContainer> getEnableActivityIdList() { return enableActivityIdList; } public Map<String, Object> getProcessInstanceVariables() { return processVariables; ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\runtime\ChangeActivityStateBuilderImpl.java
1
请完成以下Java代码
private List<String> getRoleNames(Resource webXml, NodeList securityRoles) { ArrayList<String> roleNames = new ArrayList<>(); for (int i = 0; i < securityRoles.getLength(); i++) { Element securityRoleElement = (Element) securityRoles.item(i); NodeList roles = securityRoleElement.getElementsByTagName("role-nam...
aStream.close(); } catch (IOException ex) { this.logger.warn("Failed to close input stream for web.xml", ex); } } } /** * We do not need to resolve external entities, so just return an empty String. */ private static final class MyEntityResolver implements EntityResolver { @Override public I...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\preauth\j2ee\WebXmlMappableAttributesRetriever.java
1
请完成以下Java代码
private void setQtyConv(final BigDecimal qtyConv) { fieldQtyConv.setValue(qtyConv, true); } private void setDescription(final String description) { fieldDescription.setValue(description, true); } private <T> T toModel(final Class<T> modelClass, final Object idObj) { final int id = toID(idObj); if (id <...
final I_C_UOM uomFrom = getC_UOM(); final I_C_UOM uomTo = getC_UOM_To(); if (uomFrom == null || uomTo == null) { return; } final I_M_Product product = getM_Product(); final BigDecimal qty = getQty(); try { final BigDecimal qtyConv; if (product != null) { final UOMConversionContext conv...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\de\metas\uom\form\UOMConversionCheckFormPanel.java
1
请完成以下Java代码
public boolean isObligation() { if (obligation == null) { return true; } else { return obligation; } } /** * Sets the value of the obligation property. * * @param value * allowed object is * {@link Boolean } * */ ...
/** * Gets the value of the serviceAttributes property. * * @return * possible object is * {@link Long } * */ public long getServiceAttributes() { if (serviceAttributes == null) { return 0L; } else { return serviceAttributes; ...
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\RecordServiceType.java
1
请在Spring Boot框架中完成以下Java代码
public BigInteger getTimeForPayment() { return timeForPayment; } /** * Sets the value of the timeForPayment property. * * @param value * allowed object is * {@link BigInteger } * */ public void setTimeForPayment(BigInteger value) { this.timeF...
public String getConsignmentReference() { return consignmentReference; } /** * Sets the value of the consignmentReference property. * * @param value * allowed object is * {@link String } * */ public void setConsignmentReference(String value) { ...
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\RECADVExtensionType.java
2
请完成以下Java代码
public String getEmployeeId() { return employeeId; } public void setEmployeeId(String employeeId) { this.employeeId = employeeId; } public String getCompanyId() { return companyId; } public void setCompanyId(String companyId) { this.companyId = companyId; } @Override public int hashCode() { final int...
return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; EmployeeIdentity other = (EmployeeIdentity) obj; if (companyId == null) { if (other.companyId != null) return false; } else if (!companyId.equals(other.companyId)) return false; if (employeeId == null...
repos\Spring-Boot-Advanced-Projects-main\springboot-hibernate-composite-key-demo\src\main\java\net\alanbinu\springboot\entity\EmployeeIdentity.java
1
请完成以下Java代码
public VariableInstanceResource getVariableInstance(String id) { return new VariableInstanceResourceImpl(id, getProcessEngine()); } @Override public List<VariableInstanceDto> getVariableInstances(UriInfo uriInfo, Integer firstResult, Integer maxResults, boolean deserializeObjectValues) { VariableInstance...
VariableInstanceDto resultInstance = VariableInstanceDto.fromVariableInstance(instance); instanceResults.add(resultInstance); } return instanceResults; } @Override public CountResultDto getVariableInstancesCount(UriInfo uriInfo) { VariableInstanceQueryDto queryDto = new VariableInstanceQueryDto...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\VariableInstanceRestServiceImpl.java
1
请完成以下Java代码
public void actionPerformed (final ActionEvent e) { if(m_editor == null) { return; } if (e.getSource() != m_editor) { return; } if(log.isTraceEnabled()) log.trace(m_mField.getColumnName() + ": Value=" + m_editor.getValue()); // // When user presses enter, automatically stop editing ...
return false; } if (!super.stopCellEditing()) { return false; } clearCurrentEditing(); return true; } @Override public void cancelCellEditing() { if (!canStopEditing()) { return ; } clearCurrentEditing(); super.cancelCellEditing(); } private void clearCurrentEditing() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VCellEditor.java
1
请完成以下Java代码
public ErrorInfo handleIllegalState(FlowableIllegalStateException e, HttpServletRequest request) { if (logger.isDebugEnabled()) { logger.debug("Illegal state. Message: {}, Request: {} {}", e.getMessage(), request.getMethod(), request.getRequestURI()); } return new ErrorInfo("Bad requ...
} return new ErrorInfo("Task was already claimed", e); } // Fall back @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) // 500 @ExceptionHandler(Exception.class) @ResponseBody public ErrorInfo handleOtherException(Exception e, HttpServletRequest request) { if (sendFullErrorExce...
repos\flowable-engine-main\modules\flowable-common-rest\src\main\java\org\flowable\common\rest\exception\BaseExceptionHandlerAdvice.java
1
请完成以下Java代码
private void createTable(XSLFSlide slide) { XSLFTable tbl = slide.createTable(); tbl.setAnchor(new Rectangle(50, 50, 450, 300)); int numColumns = 3; int numRows = 5; // header XSLFTableRow headerRow = tbl.addRow(); headerRow.setHeight(50); for (int i = ...
// data for (int rownum = 0; rownum < numRows; rownum++) { XSLFTableRow tr = tbl.addRow(); tr.setHeight(50); for (int i = 0; i < numColumns; i++) { XSLFTableCell cell = tr.addCell(); XSLFTextParagraph p = cell.addNewTextParagraph(); ...
repos\tutorials-master\apache-poi-2\src\main\java\com\baeldung\poi\powerpoint\PowerPointHelper.java
1
请完成以下Java代码
private void addTextMsg(@Nullable final Throwable ex) { if (ex == null) { return; } addTextMsg(AdempiereException.extractMessage(ex)); final AdempiereException metasfreshException = AdempiereException.wrapIfNeeded(ex); final AdIssueId adIssueId = context.createIssue(metasfreshException); setIssueId(...
} void setProcessingResultMessage(@NonNull final Throwable ex) { this.processingResultMessage = AdempiereException.extractMessage(ex); this.processingResultException = ex; addTextMsg(ex); } @Nullable public String getProcessingResultMessage() { return processingResultMessage; } @Nullable public Throwabl...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\workflow\execution\WFProcess.java
1
请完成以下Java代码
private boolean isApplyUserGroupRecordAccess( @NonNull final RoleId roleId, @NonNull final String tableName) { return configs .getByRoleId(roleId) .isTableHandled(tableName); } public boolean hasRecordPermission( @NonNull final UserId userId, @NonNull final RoleId roleId, @NonNull final Ta...
.build(); return recordAccessRepository.query(query) .addOnlyActiveRecordsFilter() .create() .anyMatch(); } private Set<Principal> getPrincipals(@NonNull final UserId userId) { final ImmutableSet.Builder<Principal> principals = ImmutableSet.builder(); principals.add(Principal.userId(userId)); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\record_access\RecordAccessService.java
1
请完成以下Java代码
public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPassword() { return password; } public void setPassword(String password) { this.passwo...
return age; } public void setAge(int age) { this.age = age; } @Override public String toString() { return "User{" + "id=" + id + ", name='" + name + '\'' + ", password='" + password + '\'' + ", age=" + age + ...
repos\spring-boot-leaning-master\2.x_42_courses\第 3-1 课: Spring Boot 使用 JDBC 操作数据库\spring-boot-jdbc\src\main\java\com\neo\model\User.java
1
请在Spring Boot框架中完成以下Java代码
public Job xmlFileItemWriterJob() throws Exception { return jobBuilderFactory.get("xmlFileItemWriterJob") .start(step()) .build(); } private Step step() throws Exception { return stepBuilderFactory.get("step") .<TestData, TestData>chunk(2) ...
Map<String,Class<TestData>> map = new HashMap<>(1); map.put("test", TestData.class); marshaller.setAliases(map); // 设置xml标签 writer.setRootTagName("tests"); // 设置根标签 writer.setMarshaller(marshaller); FileSystemResource file = new FileSystemResource("/Users/mrbird/Desktop/file.x...
repos\SpringAll-master\69.spring-batch-itemwriter\src\main\java\cc\mrbird\batch\job\XmlFileItemWriterDemo.java
2
请完成以下Java代码
public I_C_Activity getC_Activity() throws RuntimeException { return (I_C_Activity)MTable.get(getCtx(), I_C_Activity.Table_Name) .getPO(getC_Activity_ID(), get_TrxName()); } /** Set Activity. @param C_Activity_ID Business Activity */ public void setC_Activity_ID (int C_Activity_ID) { if (C_Activi...
/** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName(...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_Department.java
1
请完成以下Java代码
public CostPrice withComponentsCostPrice(final CostAmount componentsCostPrice) { return toBuilder().componentsCostPrice(componentsCostPrice).build(); } public CostPrice add(final CostPrice costPrice) { if (!UomId.equals(this.getUomId(), costPrice.getUomId())) { throw new AdempiereException("UOM does not m...
@NonNull final TemporalUnit durationUnit) { final BigDecimal durationBD = DurationUtils.toBigDecimal(duration, durationUnit); return toCostAmount().multiply(durationBD); } public CostPrice convertAmounts( @NonNull final UomId toUomId, @NonNull final UnaryOperator<CostAmount> converter) { if (UomId.equa...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\CostPrice.java
1
请完成以下Java代码
public boolean isCreateMovementOnComplete() { return sysConfigBL.getBooleanValue(SYSCONFIG_IsCreateMovementOnComplete, false); } public Quantity getQtyToShip(final I_DD_OrderLine_Or_Alternative ddOrderLineOrAlt) { return ddOrderLowLevelService.getQtyToShip(ddOrderLineOrAlt); } public void assignToResponsibl...
unassignFromResponsibleAndSave(ddOrder); } public void removeAllNotStartedSchedules(final DDOrderId ddOrderId) { ddOrderMoveScheduleService.removeNotStarted(ddOrderId); } private void unassignFromResponsibleAndSave(final I_DD_Order ddOrder) { ddOrder.setAD_User_Responsible_ID(-1); save(ddOrder); } publ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\distribution\ddorder\DDOrderService.java
1
请在Spring Boot框架中完成以下Java代码
private static class StringLookupValueDocumentFieldValueLoader implements DocumentFieldValueLoader { @NonNull String sqlColumnName; @NonNull String sqlDisplayColumnName; @Override @Nullable public StringLookupValue retrieveFieldValue( @NonNull final ResultSet rs, final boolean isDisplayColumnAvaila...
} else { return ImmutableList.of(); } } } @Builder @Value private static class ColorDocumentFieldValueLoader implements DocumentFieldValueLoader { @NonNull String sqlColumnName; @Override @Nullable public Object retrieveFieldValue( @NonNull final ResultSet rs, final boolean isDispl...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\DocumentFieldValueLoaders.java
2
请完成以下Java代码
public void logSqlMigrationContextInfo(final I_AD_Menu record) { if (MigrationScriptFileLoggerHolder.isDisabled()) { return; } MigrationScriptFileLoggerHolder.logComment("Name: " + record.getName()); final String action = record.getAction(); MigrationScriptFileLoggerHolder.logComment("Action Type: " +...
final ADProcessName processName = Names.ADProcessName_Loader.retrieve(adProcessId); MigrationScriptFileLoggerHolder.logComment("Process: " + processName.toShortString()); } } else if (X_AD_Menu.ACTION_Report.equals(action)) { final AdProcessId adProcessId = AdProcessId.ofRepoIdOrNull(record.getAD_Proces...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\validator\sql_migration_context_info\interceptor\AD_Menu.java
1
请完成以下Java代码
public boolean isNoDeliveryPossible() { return this.equals(KEINE_LIEFERUNG_ABER_DISPO_MOEGLICH) || this.equals(KEINE_LIEFERUNG_ABER_NACHLIEFERUNG_MOEGLICH) || this.equals(KEINE_LIEFERUNG_ABER_NORMAL_MOEGLICH) || this.equals(KEINE_LIEFERUNG_ABER_VERBUND_MOEGLICH) || this.equals(NICHT_LIEFERBAR);...
Quantity qty; @JsonProperty("type") Type type; @JsonProperty("deliveryDate") ZonedDateTime deliveryDate; @JsonProperty("defectReason") OrderDefectReason defectReason; @JsonProperty("tour") String tour; @JsonProperty("tourId") String tourId; @JsonProperty("tourDeviation") boolean tourDeviation; @Buil...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.commons\src\main\java\de\metas\vertical\pharma\msv3\protocol\order\OrderResponsePackageItemPart.java
1
请完成以下Java代码
public Builder issuedAt(Instant issuedAt) { return claim(OAuth2TokenClaimNames.IAT, issuedAt); } /** * Sets the ID {@code (jti)} claim, which provides a unique identifier for the * OAuth 2.0 Token. * @param jti the unique identifier for the OAuth 2.0 Token * @return the {@link Builder} */ publi...
*/ public Builder claims(Consumer<Map<String, Object>> claimsConsumer) { claimsConsumer.accept(this.claims); return this; } /** * Builds a new {@link OAuth2TokenClaimsSet}. * @return a {@link OAuth2TokenClaimsSet} */ public OAuth2TokenClaimsSet build() { Assert.notEmpty(this.claims, "claims c...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\token\OAuth2TokenClaimsSet.java
1
请完成以下Java代码
public void setVolume (final @Nullable BigDecimal Volume) { set_Value (COLUMNNAME_Volume, Volume); } @Override public BigDecimal getVolume() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Volume); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setWarehouse_temperature (fina...
@Override public void setWeight_UOM_ID (final int Weight_UOM_ID) { if (Weight_UOM_ID < 1) set_Value (COLUMNNAME_Weight_UOM_ID, null); else set_Value (COLUMNNAME_Weight_UOM_ID, Weight_UOM_ID); } @Override public int getWeight_UOM_ID() { return get_ValueAsInt(COLUMNNAME_Weight_UOM_ID); } @Overrid...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product.java
1
请在Spring Boot框架中完成以下Java代码
public class UserDetail { @Id @GeneratedValue private Long id; @Column(nullable = false, unique = true) private Long userId; private Integer age; private String realName; private String status; private String hobby; private String introduction; private String lastLoginIp; ...
this.status = status; } public String getHobby() { return hobby; } public void setHobby(String hobby) { this.hobby = hobby; } public String getIntroduction() { return introduction; } public void setIntroduction(String introduction) { this.introduction ...
repos\spring-boot-leaning-master\2.x_42_courses\第 3-4 课: Spring Data JPA 的基本使用\spring-boot-jpa\src\main\java\com\neo\model\UserDetail.java
2
请完成以下Java代码
public class MWithholding extends X_C_Withholding { /** * */ private static final long serialVersionUID = 7734620609620104180L; /** * Standard Constructor * @param ctx context * @param C_Withholding_ID id * @param trxName transaction */ public MWithholding (Properties ctx, int C_Withholding_ID, Str...
/** * After Save * @param newRecord new * @param success success * @return success */ protected boolean afterSave (boolean newRecord, boolean success) { if (newRecord && success) insert_Accounting("C_Withholding_Acct", "C_AcctSchema_Default", null); return success; } // afterSave /** * Before...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MWithholding.java
1
请在Spring Boot框架中完成以下Java代码
public void saveByELEvaluation() { firstName = (String) evaluateEL("#{firstName.value}", String.class); FacesContext ctx = FacesContext.getCurrentInstance(); FacesMessage theMessage = new FacesMessage("Name component Evaluated: " + firstName); theMessage.setSeverity(FacesMessage.SEVERITY...
} /** * @param lastName the lastName to set */ public void setLastName(String lastName) { this.lastName = lastName; } /** * @return the pageDescription */ public String getPageDescription() { return pageDescription; } /** * @param pageDescription t...
repos\tutorials-master\web-modules\jsf\src\main\java\com\baeldung\springintegration\controllers\ELSampleBean.java
2
请完成以下Java代码
public int hashCode() { long bits = Double.doubleToLongBits(width); bits ^= Double.doubleToLongBits(height) * 31; return (((int) bits) ^ ((int) (bits >> 32))); } // hashCode /** * Equals * @param obj object * @return true if w/h is same */ public boolean equals (Object obj) { if (obj != null &&...
} return false; } // equals /** * String Representation * @return info */ public String toString() { StringBuffer sb = new StringBuffer(); sb.append("Dimension2D[w=").append(width).append(",h=").append(height).append("]"); return sb.toString(); } // toString } // Dimension2DImpl
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\layout\Dimension2DImpl.java
1
请在Spring Boot框架中完成以下Java代码
public static class JitterConfig { private double randomFactor = 0.5; public void validate() { Assert.isTrue(randomFactor >= 0 && randomFactor <= 1, "random factor must be between 0 and 1 (default 0.5)"); } public JitterConfig() { } public JitterConfig(double randomFactor) { this.randomFactor...
} public void setRandomFactor(double randomFactor) { this.randomFactor = randomFactor; } @Override public String toString() { return new ToStringCreator(this).append("randomFactor", randomFactor).toString(); } } }
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RetryGatewayFilterFactory.java
2
请完成以下Java代码
public class GL_JournalBatch { private final IGLJournalDAO glJournalDAO = Services.get(IGLJournalDAO.class); @Init public void init() { CopyRecordFactory.enableForTableName(I_GL_JournalBatch.Table_Name); } @ModelChange(timings = { ModelValidator.TYPE_BEFORE_CHANGE }, ifColumnsChanged = { I_GL_JournalBatch...
final Timestamp dateDoc = journalBatch.getDateDoc(); for (final I_GL_Journal journal : journals) { // Don't change processed journals if (journal.isProcessed()) { continue; } journal.setDateAcct(dateAcct); journal.setDateDoc(dateDoc); InterfaceWrapperHelper.save(journal); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\interceptor\GL_JournalBatch.java
1
请在Spring Boot框架中完成以下Java代码
public void setMail(String mail) { this.mail = mail; } public String getLicencePic() { return licencePic; } public void setLicencePic(String licencePic) { this.licencePic = licencePic; } public Integer getUserType() { return userType; }
public void setUserType(Integer userType) { this.userType = userType; } @Override public String toString() { return "RegisterReq{" + "username='" + username + '\'' + ", password='" + password + '\'' + ", phone='" + phone + '\'' + ...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\req\user\RegisterReq.java
2
请在Spring Boot框架中完成以下Java代码
public String getAcceptingPartyGLN() { return acceptingPartyGLN; } /** * Sets the value of the acceptingPartyGLN property. * * @param value * allowed object is * {@link String } * */ public void setAcceptingPartyGLN(String value) { this.accep...
this.thm = value; } /** * Gets the value of the nonReturnableContainer property. * * @return * possible object is * {@link Boolean } * */ public Boolean isNonReturnableContainer() { return nonReturnableContainer; } /** * Sets the value ...
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\INVOICListLineItemExtensionType.java
2
请完成以下Java代码
private ScriptEngine getEngine() { return _engine; } public ScriptExecutor putContext(final Properties ctx, final int windowNo) { Check.assumeNotNull(ctx, "Parameter ctx is not null"); final ScriptEngine engine = getEngine(); for (final Enumeration<?> en = ctx.propertyNames(); en.hasMoreElements();) { ...
Check.assumeNotEmpty(name, "name is not empty"); getEngine().put(PARAMETERS_PREFIX + name, value); return this; } public static String convertToEngineKey(final String key, final int windowNo) { final String keyPrefix = windowNo + "|"; if (key.startsWith(keyPrefix)) { String retValue = WINDOW_CONTEXT_PR...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\script\ScriptExecutor.java
1
请完成以下Java代码
public List<HistoricDetailEntity> findHistoricDetailsByProcessInstanceId(String processInstanceId) { return getDbSqlSession().selectList("selectHistoricDetailByProcessInstanceId", processInstanceId); } @Override @SuppressWarnings("unchecked") public List<HistoricDetailEntity> findHistoricDetail...
int maxResults ) { return getDbSqlSession().selectListWithRawParameter( "selectHistoricDetailByNativeQuery", parameterMap, firstResult, maxResults ); } @Override public long findHistoricDetailCountByNativeQuery(Map<String, Object> paramete...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\data\impl\MybatisHistoricDetailDataManager.java
1
请完成以下Java代码
private void notifyCandidateStarterUserAddedListeners( ProcessCandidateStarterUserAddedEvent processCandidateStarterUserAddedEvent ) { for (ProcessRuntimeEventListener< ProcessCandidateStarterUserAddedEvent > listener : candidateStarterUserListeners) { listener.onEven...
new ProcessCandidateStarterGroupImpl(identityLink.getProcessDefinitionId(), identityLink.getGroupId()) ); } private void publishCandidateStarterEvents( List<ProcessCandidateStarterUserAddedEvent> candidateStarterUserAddedEvents, List<ProcessCandidateStarterGroupAddedEvent> candidateStar...
repos\Activiti-develop\activiti-core\activiti-spring-boot-starter\src\main\java\org\activiti\spring\ProcessCandidateStartersEventProducer.java
1
请完成以下Java代码
public class MergeMaps { private static Map<String, Employee> map1 = new HashMap<>(); private static Map<String, Employee> map2 = new HashMap<>(); public static void main(String[] args) { initialize(); mergeFunction(); streamConcat(); streamOf(); streamEx(); ...
result.entrySet().forEach(System.out::println); } private static void mergeFunction() { Map<String, Employee> map3 = new HashMap<>(map1); map2.forEach( (key, value) -> map3.merge(key, value, (v1, v2) -> new Employee(v1.getId(), v2.getName())) ); ...
repos\tutorials-master\core-java-modules\core-java-collections-maps-2\src\main\java\com\baeldung\map\mergemaps\MergeMaps.java
1
请完成以下Java代码
protected boolean isBpmnResource(String resourceName) { for (String suffix : BPMN_RESOURCE_SUFFIXES) { if (resourceName.endsWith(suffix)) { return true; } } return false; } public ExpressionManager getExpressionManager() { return expressio...
} public void setBpmnParser(BpmnParser bpmnParser) { this.bpmnParser = bpmnParser; } public IdGenerator getIdGenerator() { return idGenerator; } public void setIdGenerator(IdGenerator idGenerator) { this.idGenerator = idGenerator; } }
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\deployer\BpmnDeployer.java
1
请完成以下Java代码
void setGreaterThan(Date date) { query.createdAfter(date); } @Override void setLowerThan(Date date) { query.createdBefore(date); } @Override String fieldName() { return "create time"; } }.run(createTimes); } if (!Coll...
query.orderByExecutionId(); } else if (sortBy.equals(SORT_BY_PROCESS_INSTANCE_ID_VALUE)) { query.orderByProcessInstanceId(); } else if (sortBy.equals(SORT_BY_PROCESS_DEFINITION_ID_VALUE)) { query.orderByProcessDefinitionId(); } else if (sortBy.equals(SORT_BY_PROCESS_DEFINITION_KEY_VALUE)) { ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\JobQueryDto.java
1
请在Spring Boot框架中完成以下Java代码
public String getHandleStatus() { return handleStatus; } public void setHandleStatus(String handleStatus) { this.handleStatus = handleStatus == null ? null : handleStatus.trim(); } public String getHandleValue() { return handleValue; } public void setHandleValue(String handleValue) { this.handleValue =...
public String getOperatorName() { return operatorName; } public void setOperatorName(String operatorName) { this.operatorName = operatorName == null ? null : operatorName.trim(); } public String getOperatorAccountNo() { return operatorAccountNo; } public void setOperatorAccountNo(String operatorAccountNo...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\entity\RpAccountCheckMistake.java
2
请在Spring Boot框架中完成以下Java代码
public class AccountId implements RepoIdAware { @JsonCreator @NonNull public static AccountId ofRepoId(final int repoId) { return new AccountId(repoId); } @Nullable public static AccountId ofRepoIdOrNull(final int repoId) { if (repoId <= 0) { return null; } else { return ofRepoId(repoId); }...
} int repoId; private AccountId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "C_ValidCombination_ID"); } @Override @JsonValue public int getRepoId() { return repoId; } public static boolean equals( @Nullable final AccountId id1, @Nullable final AccountId id2) { return...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\acct\api\AccountId.java
2
请在Spring Boot框架中完成以下Java代码
public class OrderCreateResponse { public static OrderCreateResponse ok(final OrderResponse order) { return _builder().order(order).build(); } public static OrderCreateResponse error(Id orderId, BPartnerId bpartnerId, String errorMsg) { return _builder() .error(OrderCreateError.builder().orderId(orderId)....
{ throw new IllegalArgumentException("either order or error shall be set"); } this.error = error; this.order = order; } public boolean isError() { return error != null; } public OrderCreateError getError() { if (error == null) { throw new RuntimeException("Not an error response: " + this); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.commons\src\main\java\de\metas\vertical\pharma\msv3\protocol\order\OrderCreateResponse.java
2
请完成以下Java代码
public Map<String, String> initParams() { initParams.put(VALUE_PARAM, null); initParams.put(DISABLED_PARAM, null); return initParams; } @Override public void parseParams() { String disabled = initParams.get(DISABLED_PARAM); if (ServletFilterUtil.isEmpty(disabled)) { setDisabled(false)...
return value .trim() .replaceAll("\\s+", " "); // replaces [\t\n\x0B\f\r] } @Override public String getHeaderName() { return HEADER_NAME; } @Override public String getHeaderValue(final ServletContext servletContext) { final String nonce = generateNonce(); servletContext.setAttribut...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\security\filter\headersec\provider\impl\ContentSecurityPolicyProvider.java
1
请在Spring Boot框架中完成以下Java代码
private void addStockChangeDetailToFilter( @NonNull final CandidatesQuery query, @NonNull final IQueryBuilder<I_MD_Candidate> builder) { final StockChangeDetailQuery stockChangeDetail = query.getStockChangeDetailQuery(); if (stockChangeDetail != null) { stockChangeDetail.augmentQueryBuilder(builder); ...
case ONLY_SIMULATED: builder.addEqualsFilter(I_MD_Candidate.COLUMNNAME_MD_Candidate_Status, X_MD_Candidate.MD_CANDIDATE_STATUS_Simulated); break; case EXCLUDE_SIMULATED: builder.addNotEqualsFilter(I_MD_Candidate.COLUMNNAME_MD_Candidate_Status, X_MD_Candidate.MD_CANDIDATE_STATUS_Simulated); break; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\repository\repohelpers\RepositoryCommons.java
2
请在Spring Boot框架中完成以下Java代码
protected JmsProperties getJmsProperties() { Assert.state(this.jmsProperties != null, "'jmsProperties' must not be null"); return this.jmsProperties; } /** * Configure the specified jms listener container factory. The factory can be further * tuned and default settings can be overridden. * @param factory t...
JmsProperties.Listener listenerProperties = properties.getListener(); Session sessionProperties = listenerProperties.getSession(); factory.setConnectionFactory(connectionFactory); PropertyMapper map = PropertyMapper.get(); map.from(properties::isPubSubDomain).to(factory::setPubSubDomain); map.from(properties:...
repos\spring-boot-main\module\spring-boot-jms\src\main\java\org\springframework\boot\jms\autoconfigure\AbstractJmsListenerContainerFactoryConfigurer.java
2
请完成以下Java代码
public static DDOrderMoveScheduleId ofRepoIdOrNull(@Nullable final Integer repoId) { return repoId != null && repoId > 0 ? new DDOrderMoveScheduleId(repoId) : null; } public static DDOrderMoveScheduleId ofJson(@NonNull final String string) { try { return ofRepoId(Integer.parseInt(string)); } catch (Ex...
} private DDOrderMoveScheduleId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "DD_Order_MoveSchedule_ID"); } @JsonValue public int toJson() {return getRepoId();} public static boolean equals(@Nullable final DDOrderMoveScheduleId id1, @Nullable final DDOrderMoveScheduleId id2) { ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\distribution\ddorder\movement\schedule\DDOrderMoveScheduleId.java
1