instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public List<Process> getProcesses() { return processes; } public void setProcesses(List<Process> processes) { this.processes = processes; } public List<Association> getAssociations() { return associations; } public void setAssociations(List<Association> associations) { ...
for (ExtensionAttribute attribute : attributes) { if (namespace.equals(attribute.getNamespace())) { return attribute.getValue(); } } } return null; } public void addDefinitionsAttribute(ExtensionAttribute attribute) { if (a...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\CmmnModel.java
1
请完成以下Java代码
public static void main(String[] args) { initialize(getSnapshotFilePath()); pollEvents(); } private static void initialize(final Path snapshotPath) { publisher = new HollowFilesystemPublisher(snapshotPath); announcer = new HollowFilesystemAnnouncer(snapshotPath); produce...
try { Thread.sleep(milliseconds); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } private static Path getSnapshotFilePath() { String moduleDir = System.getProperty("user.dir"); String snapshotDir = moduleDir + "/.hollow/snapshot...
repos\tutorials-master\netflix-modules\hollow\src\main\java\com\baeldung\hollow\producer\MonitoringEventProducer.java
1
请完成以下Java代码
private PickingJobStepPickFromMap withChangedPickFrom( @NonNull PickingJobStepPickFromKey key, @NonNull UnaryOperator<PickingJobStepPickFrom> pickFromMapper) { if (!map.containsKey(key)) { throw new AdempiereException("No PickFrom " + key + " found in " + this); } final ImmutableMap<PickingJobStepPic...
public List<HuId> getPickedHUIds() { return map.values() .stream() .map(PickingJobStepPickFrom::getPickedTo) .filter(Objects::nonNull) .filter(pickedTo -> pickedTo.getQtyPicked().signum() > 0) .map(PickingJobStepPickedTo::getPickedHuIds) .flatMap(List::stream) .collect(ImmutableList.toImm...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\PickingJobStepPickFromMap.java
1
请完成以下Java代码
public HttpHeaders getHeaders() { HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.setContentType(MediaType.APPLICATION_JSON); return httpHeaders; } } private <T> T deserializePart(HttpServletRequest httpServletRequest, String name, Type type) { try {...
private static Map<String, MultipartFile> readMultipartFiles(HttpServletRequest httpServletRequest) { Assert.isInstanceOf(MultipartHttpServletRequest.class, httpServletRequest, "Request should be of type MultipartHttpServletRequest"); MultipartHttpServletRequest multipartHttpServletRequest = (MultipartH...
repos\tutorials-master\spring-boot-modules\spring-boot-graphql-2\src\main\java\com\baeldung\graphql\fileupload\MultipartGraphQlHttpHandler.java
1
请在Spring Boot框架中完成以下Java代码
public class OrderCandidate { @NonNull @JsonProperty("jsonOrder") JsonOrder jsonOrder; @NonNull @JsonProperty("orderNode") JsonNode orderNode; @Nullable @JsonProperty("salesRepId") String salesRepId; @NonNull @JsonProperty("customer") Customer customer; @Builder
public OrderCandidate( @JsonProperty("jsonOrder") @NonNull final JsonOrder jsonOrder, @JsonProperty("orderNode") @NonNull final JsonNode orderNode, @JsonProperty("salesRepId") @Nullable final String salesRepId) { this.jsonOrder = jsonOrder; this.orderNode = orderNode; this.salesRepId = salesRepId; th...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-shopware6\src\main\java\de\metas\camel\externalsystems\shopware6\api\model\order\OrderCandidate.java
2
请完成以下Java代码
private static void registerWellKnownModulesIfAvailable(ObjectMapper objectMapper) { if (JDK8_MODULE_PRESENT) { objectMapper.registerModule(Jdk8ModuleProvider.MODULE); } if (PARAMETER_NAMES_MODULE_PRESENT) { objectMapper.registerModule(ParameterNamesProvider.MODULE); } if (JAVA_TIME_MODULE_PRESENT) { ...
new com.fasterxml.jackson.module.paramnames.ParameterNamesModule(); } private static final class JavaTimeModuleProvider { static final com.fasterxml.jackson.databind.Module MODULE = new com.fasterxml.jackson.datatype.jsr310.JavaTimeModule(); } private static final class JodaModuleProvider { static fin...
repos\spring-amqp-main\spring-amqp\src\main\java\org\springframework\amqp\support\converter\JacksonUtils.java
1
请完成以下Spring Boot application配置
#云计算环境下习惯使用YAML 配置此处我们也是用YAML 配置 server: port: 8761 eureka: instance: #当前Eureka Server 的hostname 为 localhost hostname: localhost #当前服务不需要到Eureka Serve
r 上注册 client: register-with-eureka: false fetch-registry: false
repos\springBoot-master\springboot-springCloud\discovery\src\main\resources\application.yml
2
请完成以下Java代码
private void executePostponedRequests() { final List<IPostponedExecutable> executables = migrationCtx.popPostponedExecutables(); for (IPostponedExecutable executable : executables) { executable.execute(); } } private void disableConstraints(final String trxName) { final String sql = "SET CONSTRAINTS A...
else { return new ArrayList<>(executionErrors); } } private final void log(String msg, String resolution, boolean isError) { if (isError && !logger.isErrorEnabled()) { return; } if (!isError && !logger.isInfoEnabled()) { return; } final StringBuffer sb = new StringBuffer(); sb.append(S...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\executor\impl\MigrationExecutor.java
1
请在Spring Boot框架中完成以下Java代码
public class ProductRepositoryImpl implements ProductRepository { private static final List<Product> PRODUCT_LIST = new ArrayList<>(); public ProductRepositoryImpl() { for (int i = 1; i <= 10; i++) { Product product = new Product(); product.setId(i); product.setName...
.findFirst().orElse(null); } @Override public Product save(ProductModel productModel) { Product product = new Product(PRODUCT_LIST.size() + 1, productModel); PRODUCT_LIST.add(product); return product; } @Override public Product update(Integer productId, ProductModel pro...
repos\tutorials-master\spring-boot-modules\spring-boot-graphql-2\src\main\java\com\baeldung\graphqlvsrest\repository\impl\ProductRepositoryImpl.java
2
请完成以下Java代码
public class C_Phonecall_Schema_GenerateSchedules extends JavaProcess implements IProcessPrecondition { private final PhonecallScheduleService phonecallScheduleService = SpringContextHolder.instance.getBean(PhonecallScheduleService.class); private final PhonecallSchemaRepository schemaRepo = SpringContextHolder.insta...
return MSG_OK; } @Override public ProcessPreconditionsResolution checkPreconditionsApplicable(final IProcessPreconditionsContext context) { if(!context.isSingleSelection()) { return ProcessPreconditionsResolution.rejectBecauseNotSingleSelection(); } return ProcessPreconditionsResolution.accept(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\phonecall\process\C_Phonecall_Schema_GenerateSchedules.java
1
请完成以下Java代码
public java.math.BigDecimal getOfferAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_OfferAmt); if (bd == null) return BigDecimal.ZERO; return bd; } /** Set Menge. @param Qty Quantity */ @Override public void setQty (java.math.BigDecimal Qty) {
set_Value (COLUMNNAME_Qty, Qty); } /** Get Menge. @return Quantity */ @Override public java.math.BigDecimal getQty () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty); if (bd == null) return BigDecimal.ZERO; return bd; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java-gen\de\metas\rfq\model\X_C_RfQLineQty.java
1
请在Spring Boot框架中完成以下Java代码
protected void validateDataImpl(TenantId tenantId, ApiKey apiKey) { if (apiKey.getId() != null) { if (apiKey.getUuidId() == null) { throw new DataValidationException("API Key UUID should be specified!"); } if (apiKey.getId().isNullUid()) { thro...
@Override protected ApiKey validateUpdate(TenantId tenantId, ApiKey apiKey) { ApiKey old = apiKeyDao.findById(tenantId, apiKey.getUuidId()); if (old == null) { throw new DataValidationException("Cannot update non-existent API key!"); } if (!old.getUserId().equals(apiKey.g...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\service\validator\ApiKeyDataValidator.java
2
请在Spring Boot框架中完成以下Java代码
private boolean isStockForSupplyCandidate(@NonNull final Candidate stock, @NonNull final Candidate supplyCandidate) { Check.assume(CandidateId.isRegularNonNull(supplyCandidate.getParentId()), "Supply Candidates have the stock candidate as parent!"); return stock.getId().equals(supplyCandidate.getParentId()); } ...
@Value @Builder private static class ProductionTimingResult { @NonNull Instant datePromised; @NonNull BigDecimal qtyRequired; @NonNull Instant missingQtySolvedTime; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\ppordercandidate\PPOrderCandidateAdvisedHandler.java
2
请完成以下Java代码
public Optional<IDocumentLocationAdapter> getDocumentLocationAdapterIfHandled(final Object record) { for (final DocumentLocationAdapterFactory factory : factories) { final Optional<IDocumentLocationAdapter> adapter = factory.getDocumentLocationAdapterIfHandled(record); if (adapter.isPresent()) { retur...
public Optional<IDocumentDeliveryLocationAdapter> getDocumentDeliveryLocationAdapter(final Object record) { for (final DocumentLocationAdapterFactory factory : factories) { final Optional<IDocumentDeliveryLocationAdapter> adapter = factory.getDocumentDeliveryLocationAdapter(record); if (adapter.isPresent()) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\location\adapter\CompositeDocumentLocationAdapterFactory.java
1
请完成以下Java代码
private DocumentQueryOrderByList getDefaultOrderBys() { return defaultOrderBys != null ? defaultOrderBys : DocumentQueryOrderByList.EMPTY; } public Builder setDefaultOrderBys(final DocumentQueryOrderByList defaultOrderBys) { this.defaultOrderBys = defaultOrderBys; return this; } public Set<String...
} allowedViewCloseActions.add(viewCloseAction); return this; } private ImmutableSet<ViewCloseAction> getAllowedViewCloseActions() { return allowedViewCloseActions != null ? ImmutableSet.copyOf(allowedViewCloseActions) : DEFAULT_allowedViewCloseActions; } public Builder setHasTreeSupport...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\descriptor\ViewLayout.java
1
请完成以下Java代码
public boolean isBalanceSheet() { String accountType = getAccountType(); return (ACCOUNTTYPE_Asset.equals(accountType) || ACCOUNTTYPE_Liability.equals(accountType) || ACCOUNTTYPE_OwnerSEquity.equals(accountType)); } // isBalanceSheet /** * Is this an Activa Account * * @return boolean */ pub...
.setParameters(getC_ElementValue_ID()) .scroll(); try { while (rs.hasNext()) { rs.next().deleteEx(true); } } finally { DB.close(rs); } } return true; } // beforeSave @Override protected boolean afterSave(boolean newRecord, boolean success) { // Value/Name change...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MElementValue.java
1
请完成以下Java代码
public void setM_Picking_Job(final de.metas.handlingunits.model.I_M_Picking_Job M_Picking_Job) { set_ValueFromPO(COLUMNNAME_M_Picking_Job_ID, de.metas.handlingunits.model.I_M_Picking_Job.class, M_Picking_Job); } @Override public void setM_Picking_Job_ID (final int M_Picking_Job_ID) { if (M_Picking_Job_ID < 1)...
} @Override public void setPickFrom_Locator_ID (final int PickFrom_Locator_ID) { if (PickFrom_Locator_ID < 1) set_Value (COLUMNNAME_PickFrom_Locator_ID, null); else set_Value (COLUMNNAME_PickFrom_Locator_ID, PickFrom_Locator_ID); } @Override public int getPickFrom_Locator_ID() { return get_Value...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_Picking_Job_HUAlternative.java
1
请完成以下Java代码
public class ShipmentScheduleHUAllocations extends AbstractHUAllocations { // // Services private final IHUShipmentScheduleBL huShipmentScheduleBL = Services.get(IHUShipmentScheduleBL.class); public ShipmentScheduleHUAllocations(final de.metas.inoutcandidate.model.I_M_ShipmentSchedule shipmentSchedule, final IProd...
} @Override protected final void deleteAllocations(final Collection<I_M_HU> husToUnassign) { final I_M_ShipmentSchedule shipmentSchedule = getDocumentLineModel(); for (final I_M_HU hu : husToUnassign) { huShipmentScheduleBL.unallocateTU(shipmentSchedule, hu, getTrxName()); } } @Override protected fi...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipmentschedule\api\impl\ShipmentScheduleHUAllocations.java
1
请在Spring Boot框架中完成以下Java代码
public class OrderLineWithGrossProfitPriceRepository { // services private final IOrderDAO ordersRepo = Services.get(IOrderDAO.class); public Optional<Money> getProfitBasePrice(@NonNull final OrderAndLineId orderLineId) { return getProfitMinBasePrice(ImmutableList.of(orderLineId)); } /** * Gets the minimum ...
if (profitBasePrices.isEmpty()) { return Optional.empty(); } else if (profitBasePrices.size() == 1) { return Optional.of(profitBasePrices.iterator().next()); } else if (!Money.isSameCurrency(profitBasePrices)) { return Optional.empty(); } else { return profitBasePrices.stream().reduce(Mo...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\grossprofit\OrderLineWithGrossProfitPriceRepository.java
2
请完成以下Java代码
public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** 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 KeyNam...
/** Set Group. @param R_Group_ID Request Group */ public void setR_Group_ID (int R_Group_ID) { if (R_Group_ID < 1) set_ValueNoCheck (COLUMNNAME_R_Group_ID, null); else set_ValueNoCheck (COLUMNNAME_R_Group_ID, Integer.valueOf(R_Group_ID)); } /** Get Group. @return Request Group */ public i...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_Group.java
1
请在Spring Boot框架中完成以下Java代码
public Result<?> deleteBatch(@RequestParam(name = "ids") String ids) { List<String> idList = Arrays.asList(ids.split(",")); idList.forEach(item->{ SysDataSource sysDataSource = sysDataSourceService.getById(item); DataSourceCachePool.removeCache(sysDataSource.getCode()); }...
@RequestMapping(value = "/exportXls") public ModelAndView exportXls(HttpServletRequest request, SysDataSource sysDataSource) { //------------------------------------------------------------------------------------------------ //是否开启系统管理模块的多租户数据隔离【SAAS多租户模式】 if(MybatisPlusSaasConfig.OPEN_SYST...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\controller\SysDataSourceController.java
2
请完成以下Java代码
public String getHelp () { return (String)get_Value(COLUMNNAME_Help); } /** Set Default. @param IsDefault Default value */ public void setIsDefault (boolean IsDefault) { set_Value (COLUMNNAME_IsDefault, Boolean.valueOf(IsDefault)); } /** Get Default. @return Default value */ public boolean i...
{ Object oo = get_Value(COLUMNNAME_IsUserUpdateable); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_UserDef_Win.java
1
请完成以下Java代码
public void setPolicy(CrossOriginOpenerPolicy openerPolicy) { Assert.notNull(openerPolicy, "openerPolicy cannot be null"); this.delegate = createDelegate(openerPolicy); } @Override public Mono<Void> writeHttpHeaders(ServerWebExchange exchange) { return (this.delegate != null) ? this.delegate.writeHttpHeaders(...
SAME_ORIGIN("same-origin"); private final String policy; CrossOriginOpenerPolicy(String policy) { this.policy = policy; } public String getPolicy() { return this.policy; } } }
repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\header\CrossOriginOpenerPolicyServerHttpHeadersWriter.java
1
请完成以下Java代码
public static Document getDocument() throws SAXException, IOException, ParserConfigurationException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); Document document = factory.newDocumentBuilder() .parse(new InputSource(new StringReader(FRUIT_XML))); return d...
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); StringWriter stringWriter = new StringWriter(); transformer.transform(new DOMS...
repos\tutorials-master\xml-modules\xml\src\main\java\com\baeldung\xml\xml2string\XmlDocumentToString.java
1
请完成以下Java代码
public List<IHUDocument> createHUDocuments(final ProcessInfo pi) { Check.assumeNotNull(pi, "process info not null"); final String tableName = pi.getTableNameOrNull(); Check.assumeNotNull(tableName, "tableName not null ({})", pi); final IHUDocumentFactory factory = getHUDocumentFactory(tableName); return fa...
public List<IHUDocument> createHUDocumentsFromModel(final Object model) { Check.assumeNotNull(model, "model not null"); final String tableName = InterfaceWrapperHelper.getModelTableName(model); final IHUDocumentFactory factory = getHUDocumentFactory(tableName); return factory.createHUDocumentsFromModel(model);...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\document\impl\HUDocumentFactoryService.java
1
请完成以下Spring Boot application配置
spring.application.name=realworld-backend-spring spring.h2.console.enabled=true spring.jackson.deserialization.unwrap_root_value=true spring.web.error.include-message=always spring.web.error.include-binding-errors=always management.endpoints.web.exposure.include=info,health,prometheus,startup springdoc.show-actuato
r=true springdoc.swagger-ui.operationsSorter=alpha api.version=/api security.jwt.secret=MWY1MmQ2NTItODIxNC00ZGM0LWFiODQtOGFiNGZmMjlhZjdj
repos\realworld-backend-spring-master\service\src\main\resources\application.properties
2
请完成以下Java代码
public String getNextParcelNumber() { final String parcelNumberWithoutCheckDigit = documentNoBuilder.build(); return computeAndAppendCheckDigit(parcelNumberWithoutCheckDigit); } @VisibleForTesting String computeAndAppendCheckDigit(@NonNull final String parcelNumberWithoutCheckDigit) { // See #3991; Check....
// odd if (i % 2 == 0) { sumOdd += Integer.parseInt(Character.toString(parcelNumberWithoutCheckDigit.charAt(i))); } else { sumEven += Integer.parseInt(Character.toString(parcelNumberWithoutCheckDigit.charAt(i))); } } int result = 3 * sumOdd + sumEven; result = (10 - result % 10) % 10;...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.derkurier\src\main\java\de\metas\shipper\gateway\derkurier\misc\ParcelNumberGenerator.java
1
请完成以下Java代码
public boolean existsByTenantIdAndStatusAndTargetId(TenantId tenantId, NotificationRequestStatus status, NotificationTargetId targetId) { return notificationRequestRepository.existsByTenantIdAndStatusAndTargetsContaining(tenantId.getId(), status, targetId.getId().toString()); } @Override public boo...
@Override protected Class<NotificationRequestEntity> getEntityClass() { return NotificationRequestEntity.class; } @Override protected JpaRepository<NotificationRequestEntity, UUID> getRepository() { return notificationRequestRepository; } @Override public EntityType getEnti...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\notification\JpaNotificationRequestDao.java
1
请完成以下Java代码
protected String doIt() throws Exception { log.info("C_Invoice_ID=" + p_C_Invoice_ID + ", M_Warehouse_ID=" + p_M_Warehouse_ID); if (p_C_Invoice_ID <= 0) { throw new FillMandatoryException("C_Invoice_ID"); } if (p_M_Warehouse_ID == 0) { throw new FillMandatoryException(PARAM_M_Warehouse_ID); } // ...
} /** * Create shipment/receipt line * * @return shipment/receipt line */ private MInOutLine createLine(MInvoice invoice, MInvoiceLine invoiceLine) { final IInvoiceBL invoiceBL = Services.get(IInvoiceBL.class); final MatchInvoiceService matchInvoiceService = MatchInvoiceService.get(); final StockQtyA...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\process\InvoiceCreateInOut.java
1
请完成以下Java代码
public void setC_Queue_WorkPackage_ID (int C_Queue_WorkPackage_ID) { if (C_Queue_WorkPackage_ID < 1) set_ValueNoCheck (COLUMNNAME_C_Queue_WorkPackage_ID, null); else set_ValueNoCheck (COLUMNNAME_C_Queue_WorkPackage_ID, Integer.valueOf(C_Queue_WorkPackage_ID)); } /** Get WorkPackage Queue. @return Work...
{ Integer ii = (Integer)get_Value(COLUMNNAME_C_Queue_WorkPackage_Log_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Message Text. @param MsgText Textual Informational, Menu or Error Message */ @Override public void setMsgText (java.lang.String MsgText) { set_ValueNoCheck (COLUM...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java-gen\de\metas\async\model\X_C_Queue_WorkPackage_Log.java
1
请完成以下Java代码
protected String doIt() throws Exception { retrieveSelectedAndEligibleHUEditorRows().forEach(this::createSourceHU); return MSG_OK; } private void createSourceHU(final HUEditorRow row) { Check.assume(row.isTopLevel(), "Only top level rows are allowed"); // shall not happen final HuId topLevelHUId = row.ge...
protected void postProcess(boolean success) { if (!success) { return; } // PP_Order invalidateParentView(); // HU Editor getView().removeHUIdsAndInvalidate(topLevelHUIdsProcessed); // invalidateView(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pporder\process\WEBUI_PP_Order_HUEditor_Create_M_Source_HUs.java
1
请在Spring Boot框架中完成以下Java代码
public class BatchRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRepository<T, ID> implements BatchRepository<T, ID> { private final EntityManager entityManager; public BatchRepositoryImpl(JpaEntityInformation entityInformation, EntityManager entityManager) { super(ent...
if (entities == null) { throw new IllegalArgumentException("The given Iterable of entities cannot be null!"); } BatchExecutor batchExecutor = SpringContext.getBean(BatchExecutor.class); try { batchExecutor.saveInBatch(entities); } catch (InterruptedException ex) ...
repos\Hibernate-SpringBoot-master\HibernateSpringBootBatchInsertsCompletableFuture\src\main\java\com\bookstore\impl\BatchRepositoryImpl.java
2
请完成以下Java代码
static @Nullable UomId extractUomIdOrNull(final @NotNull I_M_HU_PI_Item_Product itemProduct) { return UomId.ofRepoIdOrNull(itemProduct.getC_UOM_ID()); } static I_C_UOM extractUOM(@NonNull final I_M_HU_PI_Item_Product itemProduct) { final I_C_UOM uom = extractUOMOrNull(itemProduct); if (uom == null) { th...
} static Quantity getQtyCUsPerTUInStockUOM(final @NonNull I_C_OrderLine orderLineRecord, final @NonNull Quantity stockQty, final I_M_HU_LUTU_Configuration lutuConfigurationInStockUOM) { final Quantity qtyCUsPerTUInStockUOM; if (orderLineRecord.getQtyItemCapacity().signum() > 0) { // we use the capacity whic...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\IHUPIItemProductBL.java
1
请完成以下Java代码
public @NonNull ViewHeaderProperties computeHeaderProperties(@NonNull final IView view) { ViewHeaderProperties result = ViewHeaderProperties.EMPTY; for (final ViewHeaderPropertiesProvider provider : providers) { final ViewHeaderProperties properties = provider.computeHeaderProperties(view); result = resul...
if (partialResult.isComputed()) { computedHeaderProperties = partialResult.getComputeHeaderProperties(); } else if (partialResult.isFullRecomputeRequired()) { return ViewHeaderPropertiesIncrementalResult.fullRecomputeRequired(); } else { throw new AdempiereException("Unknow partial resu...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\CompositeViewHeaderPropertiesProvider.java
1
请完成以下Java代码
public class ApplicationContextMembershipListener extends MembershipListenerAdapter<ApplicationContextMembershipListener> { private final ConfigurableApplicationContext applicationContext; /** * Constructs a new instance of {@link ConfigurableApplicationContext} initialized with * the given {@link Configurabl...
/** * Handles the {@link MembershipEvent membership event} when a {@link DistributedMember peer member} * departs from the {@link DistributedSystem cluster} by calling {@link ConfigurableApplicationContext#close()}. * * @param event {@link MemberDepartedEvent} to handle. * @see org.springframework.geode.distr...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\distributed\event\ApplicationContextMembershipListener.java
1
请完成以下Java代码
public DmnDeploymentQueryImpl parentDeploymentIdLike(String parentDeploymentIdLike) { if (parentDeploymentIdLike == null) { throw new FlowableIllegalArgumentException("parentDeploymentIdLike is null"); } this.parentDeploymentIdLike = parentDeploymentIdLike; return this; }...
public String getName() { return name; } public String getNameLike() { return nameLike; } public String getCategory() { return category; } public String getCategoryNotEquals() { return categoryNotEquals; } public String getTenantId() { return t...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\DmnDeploymentQueryImpl.java
1
请完成以下Java代码
public static IUserQueryRestriction newInstance() { return new UserQueryRestriction(); } public static enum Join { AND("AND"), OR("OR"); private static final ImmutableMap<String, Join> codeToJoin = ImmutableMap.<String, Join> builder() .put(AND.getCode(), AND) .put(OR.getCode(), OR) .build(); ...
//@formatter:off IUserQueryField getSearchField(); void setSearchField(final IUserQueryField searchField); //@formatter:on //@formatter:off void setOperator(Operator operator); Operator getOperator(); //@formatter:on //@formatter:off Object getValue(); void setValue(Object value); //@formatter:on //@form...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\apps\search\IUserQueryRestriction.java
1
请完成以下Java代码
public int getC_SubscrDiscount_Line_ID() { return get_ValueAsInt(COLUMNNAME_C_SubscrDiscount_Line_ID); } @Override public void setDiscount (final BigDecimal Discount) { set_Value (COLUMNNAME_Discount, Discount); } @Override public BigDecimal getDiscount() { final BigDecimal bd = get_ValueAsBigDecimal...
else set_Value (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public void setSeqNo (final int SeqNo) { set_Value (COLUMNNAME_SeqNo, SeqNo); } @Override public int getSeqNo() { return get_ValueAsIn...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_SubscrDiscount_Line.java
1
请完成以下Java代码
public void setDHL_ShipmentOrderRequest(final de.metas.shipper.gateway.dhl.model.I_DHL_ShipmentOrderRequest DHL_ShipmentOrderRequest) { set_ValueFromPO(COLUMNNAME_DHL_ShipmentOrderRequest_ID, de.metas.shipper.gateway.dhl.model.I_DHL_ShipmentOrderRequest.class, DHL_ShipmentOrderRequest); } @Override public void s...
{ return get_ValueAsBoolean(COLUMNNAME_IsError); } @Override public void setRequestMessage (final @Nullable java.lang.String RequestMessage) { set_Value (COLUMNNAME_RequestMessage, RequestMessage); } @Override public java.lang.String getRequestMessage() { return get_ValueAsString(COLUMNNAME_RequestMess...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dhl\src\main\java-gen\de\metas\shipper\gateway\dhl\model\X_Dhl_ShipmentOrder_Log.java
1
请完成以下Java代码
public WarehouseId getWarehouseId(@NonNull final de.metas.inoutcandidate.model.I_M_ShipmentSchedule schedule) { return shipmentScheduleEffectiveBL.getWarehouseId(schedule); } @Override public BPartnerId getBPartnerId(@NonNull final de.metas.inoutcandidate.model.I_M_ShipmentSchedule schedule) { return shipment...
@Override public void flagForRecompute(@NonNull final Set<ShipmentScheduleId> shipmentScheduleIds) { if (shipmentScheduleIds.isEmpty()) {return;} final IShipmentScheduleInvalidateBL invalidSchedulesService = Services.get(IShipmentScheduleInvalidateBL.class); invalidSchedulesService.flagForRecompute(shipmentSch...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipmentschedule\api\impl\HUShipmentScheduleBL.java
1
请完成以下Java代码
public boolean isSameChunk(final IT item) { // If we are about to exceed the maximum number of items per batch // => return false (we need a new chunk/batch) if (itemsPerBatch >= maxItemsPerBatch) { return false; } // // Ask processor is the item is on the same chunk, if this is allowed. if (!ignor...
itemsPerBatch = 0; processor.newChunk(item); } @Override public void completeChunk() { processor.completeChunk(); } @Override public void cancelChunk() { processor.cancelChunk(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\processor\api\impl\FixedBatchTrxItemProcessor.java
1
请完成以下Java代码
public static long distance(CommonSynonymDictionary.SynonymItem itemA, CommonSynonymDictionary.SynonymItem itemB) { return itemA.distance(itemB); } /** * 判断两个单词之间的语义距离 * @param A * @param B * @return */ public static long distance(String A, String B) { Commo...
CommonSynonymDictionary.SynonymItem item = get(term.word); if (item == null) { if (withUndefinedItem) { item = CommonSynonymDictionary.SynonymItem.createUndefined(term.word); synonymItemList.add(item); } ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dictionary\CoreSynonymDictionary.java
1
请完成以下Java代码
public static MetasfreshId ofNullable(@Nullable final RepoIdAware id) { return id != null ? new MetasfreshId(id.getRepoId()) : null; } public static int toValue(@Nullable final MetasfreshId id) { if (id == null) { return -1; } return id.getValue(); } @JsonCreator private MetasfreshId(final int val...
return false; } return otherId.getRepoId() == value; } public static boolean equals(@Nullable final MetasfreshId id1, @Nullable final MetasfreshId id2) { return Objects.equals(id1, id2); } @NonNull public <T extends RepoIdAware> T mapToRepoId(@NonNull final Function<Integer, T> mappingFunction) { retur...
repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\rest_api\utils\MetasfreshId.java
1
请完成以下Java代码
public static class InboundEventPayloadXmlExtractorBuilderImpl implements InboundEventPayloadXmlExtractorBuilder { protected InboundEventProcessingPipelineBuilderImpl<Document> inboundEventProcessingPipelineBuilder; public InboundEventPayloadXmlExtractorBuilderImpl(InboundEventProcessingPipelineBuilde...
public InboundEventTransformerBuilderImpl(InboundEventProcessingPipelineBuilderImpl inboundEventProcessingPipelineBuilder) { this.inboundEventProcessingPipelineBuilder = inboundEventProcessingPipelineBuilder; } @Override public InboundChannelModelBuilder transformer(String delegateE...
repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\model\InboundChannelDefinitionBuilderImpl.java
1
请完成以下Java代码
public java.lang.String getSenderHouseNo () { return (java.lang.String)get_Value(COLUMNNAME_SenderHouseNo); } /** Set Name 1 Absender. @param SenderName1 Name 1 Absender */ @Override public void setSenderName1 (java.lang.String SenderName1) { set_Value (COLUMNNAME_SenderName1, SenderName1); } /** Get...
/** Get PLZ Absender. @return PLZ Absender */ @Override public java.lang.String getSenderZipCode () { return (java.lang.String)get_Value(COLUMNNAME_SenderZipCode); } /** Set Versandlager. @param SendingDepot Versandlager */ @Override public void setSendingDepot (java.lang.String SendingDepot) { se...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-gen\de\metas\shipper\gateway\dpd\model\X_DPD_StoreOrder.java
1
请完成以下Java代码
private String readDataField(int minLength, int maxLength) { int length = 0; int endIndex = position; while (length < maxLength && endIndex < sequence.length()) { if (sequence.charAt(endIndex) == SEPARATOR_CHAR) { break; } endIndex++; length++; } if (length < minLength && minLength == ma...
} private char readChar() { return sequence.charAt(position++); } public String read(int length) { String s = peek(length); position += length; return s; } public String peek(int length) { return sequence.substring(position, position + length); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\gs1\GS1SequenceReader.java
1
请完成以下Java代码
public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", orderId=").append(orderId); sb.append(", orderSn=").appe...
sb.append(", productSkuCode=").append(productSkuCode); sb.append(", productCategoryId=").append(productCategoryId); sb.append(", promotionName=").append(promotionName); sb.append(", promotionAmount=").append(promotionAmount); sb.append(", couponAmount=").append(couponAmount); sb....
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\OmsOrderItem.java
1
请完成以下Java代码
protected ViewId getBanksStatementReconciliationViewId() { return getView().getBankStatementViewId(); } protected final BankStatementReconciliationView getBanksStatementReconciliationView() { final ViewId bankStatementViewId = getBanksStatementReconciliationViewId(); final IViewsRepository viewsRepo = getVi...
protected final BankStatementLineRow getSingleSelectedBankStatementRowOrNull() { final ViewRowIdsSelection selection = getParentViewRowIdsSelection(); if (selection == null || selection.isEmpty()) { return null; } final ImmutableList<BankStatementLineRow> rows = getBanksStatementReconciliationView() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\bankstatement_reconciliation\process\PaymentsToReconcileViewBasedProcess.java
1
请完成以下Java代码
public void afterConnectionEstablished(WebSocketSession session) throws Exception { logger.info("Connected ... " + session.getId()); sessions.add(session); } @Override public void afterConnectionClosed(WebSocketSession session, CloseStatus status) throws Exception { if (session.isOp...
try { // isOpen()在线就发送 if (user.isOpen()) { user.sendMessage(message); } } catch (IOException e) { e.printStackTrace(); } } } /** * 发送消息给指定的用户 */ private void sendMessageToUser(WebS...
repos\SpringBootBucket-master\springboot-websocket\src\main\java\com\xncoding\jwt\handler\SocketHandler.java
1
请完成以下Java代码
public Control[] getResponseControls() { try { return initialContext.getResponseControls(); } catch (NamingException e) { throw new IdentityProviderException("Error occurred while getting the response controls from the LDAP server.", e); } } public static void addPaginationControl(List<Cont...
return (String) attribute.get(); } catch (NamingException e) { throw new IdentityProviderException("Error occurred while retrieving the value.", e); } } else { return null; } } @SuppressWarnings("unchecked") public static NamingEnumeration<String> getAllMembers(String attributeI...
repos\camunda-bpm-platform-master\engine-plugins\identity-ldap\src\main\java\org\camunda\bpm\identity\impl\ldap\LdapClient.java
1
请在Spring Boot框架中完成以下Java代码
public int delete(Long id) { //删除优惠券 int count = couponMapper.deleteByPrimaryKey(id); //删除商品关联 deleteProductRelation(id); //删除商品分类关联 deleteProductCategoryRelation(id); return count; } private void deleteProductCategoryRelation(Long id) { SmsCoupon...
} deleteProductCategoryRelation(id); productCategoryRelationDao.insertList(couponParam.getProductCategoryRelationList()); } return count; } @Override public List<SmsCoupon> list(String name, Integer type, Integer pageSize, Integer pageNum) { SmsCouponExample ...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\service\impl\SmsCouponServiceImpl.java
2
请在Spring Boot框架中完成以下Java代码
public class PharmaBPartnerRepository { public PharmaBPartner getById(@NonNull final BPartnerId bpartnerId) { final IBPartnerDAO bPartnersRepo = Services.get(IBPartnerDAO.class); final I_C_BPartner bPartner = InterfaceWrapperHelper.create(bPartnersRepo.getById(bpartnerId), I_C_BPartner.class); final PharmaCus...
final String shipmentPermissionCode = bPartner.getShipmentPermissionPharma(); if (shipmentPermissionCode == null) { return null; } return PharmaShipmentPermission.forCode(shipmentPermissionCode); } @Nullable private PharmaReceiptPermission extractPharmaReceiptPermission(final I_C_BPartner bPartner){ fi...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma\src\main\java\de\metas\vertical\pharma\PharmaBPartnerRepository.java
2
请完成以下Java代码
public static <T extends Comparable<T>> void printAllOrdered(T[] elements, char delimiter) { Arrays.sort(elements); boolean hasNext = true; while(hasNext) { printArray(elements, delimiter); int k = 0, l = 0; hasNext = false; for (int i = elements...
private static <T> void printArray(T[] elements, char delimiter) { String delimiterSpace = delimiter + " "; for(int i = 0; i < elements.length; i++) { System.out.print(elements[i] + delimiterSpace); } System.out.print('\n'); } public static void main(String[] argv) ...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-1\src\main\java\com\baeldung\algorithms\permutation\Permutation.java
1
请完成以下Java代码
protected final ImmutableList<PaymentRow> getPaymentRowsSelectedForAllocation() { ImmutableList<PaymentRow> paymentRowsSelectedForAllocation = this._paymentRowsSelectedForAllocation; if (paymentRowsSelectedForAllocation == null) { paymentRowsSelectedForAllocation = this._paymentRowsSelectedForAllocation = com...
.collect(ImmutableList.toImmutableList()); } else { return invoicesView .streamByIds(getSelectedInvoiceRowIds()) .collect(ImmutableList.toImmutableList()); } } protected final void invalidatePaymentsAndInvoicesViews() { final InvoicesView invoicesView = getInvoicesView(); invoicesView.unma...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\payment_allocation\process\PaymentsViewBasedProcess.java
1
请在Spring Boot框架中完成以下Java代码
public class XmlRecordServiceType implements XmlService { /** * expecting default = 1 */ @Nullable XmlXtraDrg xtraDrg; @Nullable XmlXtraDrug xtraDrug; @NonNull int recordId; @NonNull String tariffType; @NonNull String code; @Nullable String refCode; @NonNull String name; @Nullable Integer se...
@Nullable String remark; @Nullable Long serviceAttributes; @Override public Integer getRecordId() { return recordId; } @Override public XmlService withMod(@Nullable final ServiceModWithSelector.ServiceMod serviceMod) { if (serviceMod == null) { return this; } return withModNonNull(serviceMod);...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_xversion\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_xversion\request\model\payload\body\service\XmlRecordServiceType.java
2
请完成以下Java代码
public abstract class PvmAtomicOperationActivityInstanceEnd extends AbstractPvmEventAtomicOperation { private final static PvmLogger LOG = ProcessEngineLogger.PVM_LOGGER; @Override protected PvmExecutionImpl eventNotificationsStarted(PvmExecutionImpl execution) { execution.incrementSequenceCounter(); /...
execution.setTransition(null); return execution; } @Override protected void eventNotificationsFailed(PvmExecutionImpl execution, Exception e) { execution.activityInstanceEndListenerFailure(); super.eventNotificationsFailed(execution, e); } @Override protected boolean isSkipNotifyListeners(Pv...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\runtime\operation\PvmAtomicOperationActivityInstanceEnd.java
1
请在Spring Boot框架中完成以下Java代码
public int getAcquireRetry() { return this.acquireRetry; } public void setAcquireRetry(int acquireRetry) { this.acquireRetry = acquireRetry; } public @Nullable Duration getMaxCreateConnectionTime() { return this.maxCreateConnectionTime; } public void setMaxCreateConnectionTime(@Nullable Duration...
} public ValidationDepth getValidationDepth() { return this.validationDepth; } public void setValidationDepth(ValidationDepth validationDepth) { this.validationDepth = validationDepth; } public boolean isEnabled() { return this.enabled; } public void setEnabled(boolean enabled) { this.enab...
repos\spring-boot-4.0.1\module\spring-boot-r2dbc\src\main\java\org\springframework\boot\r2dbc\autoconfigure\R2dbcProperties.java
2
请完成以下Java代码
public java.lang.String getCode () { return (java.lang.String)get_Value(COLUMNNAME_Code); } /** Set Beschreibung. @param Description Beschreibung */ @Override public void setDescription (java.lang.String Description) { set_Value (COLUMNNAME_Description, Description); } /** Get Beschreibung. @return...
/** Set Name. @param Name Alphanumeric identifier of the entity */ @Override public void setName (java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ @Override public java.lang.String getName () { return (java.lang.Strin...
repos\metasfresh-new_dawn_uat\backend\de.metas.aggregation\src\main\java-gen\de\metas\aggregation\model\X_C_Aggregation_Attribute.java
1
请完成以下Java代码
public static AggregationParams calendar(Aggregation aggregationType, IntervalType intervalType, String tzIdStr) { return calendar(aggregationType, intervalType, getZoneId(tzIdStr)); } public static AggregationParams calendar(Aggregation aggregationType, IntervalType intervalType, ZoneId tzId) { ...
case QUARTER: return TimeUnit.DAYS.toMillis(90); default: return interval; } } } private static ZoneId getZoneId(String tzIdStr) { if (StringUtils.isEmpty(tzIdStr)) { return ZoneId.systemDefault(); } ...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\kv\AggregationParams.java
1
请完成以下Java代码
public int size() { if (springCache.getNativeCache() instanceof Ehcache) { Ehcache ehcache = (Ehcache) springCache.getNativeCache(); return ehcache.getSize(); } throw new UnsupportedOperationException("invoke spring cache abstract size method not supported"); } @SuppressWarnings("unchecked") @Ov...
Ehcache ehcache = (Ehcache) springCache.getNativeCache(); List keys = ehcache.getKeys(); if (!CollectionUtils.isEmpty(keys)) { List values = new ArrayList(keys.size()); for (Object key : keys) { Object value = get(key); if (value != null) { values.add(value); } } ret...
repos\roncoo-pay-master\roncoo-pay-web-boss\src\main\java\com\roncoo\pay\permission\shiro\spring\SpringCacheManagerWrapper.java
1
请完成以下Java代码
public boolean isOfferQty () { Object oo = get_Value(COLUMNNAME_IsOfferQty); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Purchase Quantity. @param IsPurchaseQty This quantity is used in the Purchase...
public java.math.BigDecimal getMargin () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Margin); if (bd == null) return BigDecimal.ZERO; return bd; } /** Set Offer Amount. @param OfferAmt Amount of the Offer */ @Override public void setOfferAmt (java.math.BigDecimal OfferAmt) { set_Value...
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java-gen\de\metas\rfq\model\X_C_RfQLineQty.java
1
请完成以下Java代码
protected void parseUniqueWorkerRequestParam(String uniqueWorkerRequestParam) { if (uniqueWorkerRequestParam != null) { isUniqueWorkerRequest = Boolean.parseBoolean(uniqueWorkerRequestParam); } else { isUniqueWorkerRequest = false; // default configuration } } protected void initializeQueue...
if (parsedCapacity <= 0) { throw new NumberFormatException("Parameter " + BLOCKING_QUEUE_CAPACITY_PARAM_NAME + " has to be greater than zero"); } capacity = parsedCapacity; } catch (NumberFormatException e) { LOG.log(Level.WARNING, "Invalid blocking queue capacity parameter: [" +...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\FetchAndLockHandlerImpl.java
1
请完成以下Java代码
public Map<String, ResourceEntity> getResources() { if (resources == null && id != null) { List<ResourceEntity> resourcesList = Context .getCommandContext() .getResourceEntityManager() .findResourcesByDeploymentId(id); resources...
this.category = category; } @Override public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } public void setResources(Map<String, ResourceEntity> resources) { this.resources = resources; } @O...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\DeploymentEntity.java
1
请完成以下Java代码
public PageData<Asset> findAssetsByTenantIdAndEdgeId(TenantId tenantId, EdgeId edgeId, PageLink pageLink) { log.trace("Executing findAssetsByTenantIdAndEdgeId, tenantId [{}], edgeId [{}], pageLink [{}]", tenantId, edgeId, pageLink); validateId(tenantId, id -> INCORRECT_TENANT_ID + id); validateI...
@Override public Optional<HasId<?>> findEntity(TenantId tenantId, EntityId entityId) { return Optional.ofNullable(findAssetById(tenantId, new AssetId(entityId.getId()))); } @Override public FluentFuture<Optional<HasId<?>>> findEntityAsync(TenantId tenantId, EntityId entityId) { return F...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\asset\BaseAssetService.java
1
请完成以下Java代码
private void writeThread(PrintWriter writer, ThreadInfo info) { writer.printf("\"%s\" - Thread t@%d%n", info.getThreadName(), info.getThreadId()); writer.printf(" %s: %s%n", Thread.State.class.getCanonicalName(), info.getThreadState()); writeStackTrace(writer, info, info.getLockedMonitors()); writer.println()...
} else { writer.printf("\t- parking to wait for %s%n", format(lockInfo)); } } } writeMonitors(writer, lockedMonitors); } private String format(LockInfo lockInfo) { return String.format("<%x> (a %s)", lockInfo.getIdentityHashCode(), lockInfo.getClassName()); } private void writeMonitors(Print...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\management\PlainTextThreadDumpFormatter.java
1
请在Spring Boot框架中完成以下Java代码
public ServiceRepairProjectTask withRepairOrderId(@NonNull final PPOrderId repairOrderId) { return toBuilder() .repairOrderId(repairOrderId) .build() .withUpdatedStatus(); } public ServiceRepairProjectTask withRepairOrderDone( @Nullable final String repairOrderSummary, @Nullable final ProductId ...
.build() .withUpdatedStatus(); } public ServiceRepairProjectTask withRepairOrderNotDone() { return toBuilder() .isRepairOrderDone(false) .repairOrderSummary(null) .repairServicePerformedId(null) .build() .withUpdatedStatus(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\project\model\ServiceRepairProjectTask.java
2
请完成以下Java代码
protected void afterPost() { postDependingMatchInvsIfNeeded(); } private void postDependingMatchInvsIfNeeded() { if (!services.getSysConfigBooleanValue(SYSCONFIG_PostMatchInvs, DEFAULT_PostMatchInvs)) { return; } final Set<InvoiceAndLineId> invoiceAndLineIds = new HashSet<>(); for (final DocLine_In...
public static void unpostIfNeeded(final I_C_Invoice invoice) { if (!invoice.isPosted()) { return; } // Make sure the period is open final Properties ctx = InterfaceWrapperHelper.getCtx(invoice); MPeriod.testPeriodOpen(ctx, invoice.getDateAcct(), invoice.getC_DocType_ID(), invoice.getAD_Org_ID()); Se...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\Doc_Invoice.java
1
请完成以下Java代码
public void setName (java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ @Override public java.lang.String getName () { return (java.lang.String)get_Value(COLUMNNAME_Name); } /** * RuleType AD_Reference_ID=53235 * Referenc...
public void setScript (java.lang.String Script) { set_Value (COLUMNNAME_Script, Script); } /** Get Skript. @return Dynamic Java Language Script to calculate result */ @Override public java.lang.String getScript () { return (java.lang.String)get_Value(COLUMNNAME_Script); } /** Set Suchschlüssel. @p...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Rule.java
1
请在Spring Boot框架中完成以下Java代码
public class UserUtility { public static User recreateUserState(EventStore store, String userId) { User user = null; List<Event> events = store.getEvents(userId); for (Event event : events) { if (event instanceof UserCreatedEvent) { UserCreatedEvent e = (UserCre...
.remove(address); } if (event instanceof UserContactAddedEvent) { UserContactAddedEvent e = (UserContactAddedEvent) event; Contact contact = new Contact(e.getContactType(), e.getContactDetails()); if (user != null) user.getConta...
repos\tutorials-master\patterns-modules\cqrs-es\src\main\java\com\baeldung\patterns\es\service\UserUtility.java
2
请在Spring Boot框架中完成以下Java代码
public class MaterialProductRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { from(direct(MF_RETRIEVE_MATERIAL_PRODUCT_INFO_V2_CAMEL_ROUTE_ID)) .routeId(MF_RETRIEVE_MATERIAL_PRODUCT_INFO_V2_CAMEL_ROUTE_ID) .streamCache("true") .log("Route invoked!") .process(...
private void validateAndAttachHeaders(@NonNull final Exchange exchange) { final Object request = exchange.getIn().getBody(); if (!(request instanceof RetrieveProductCamelRequest)) { throw new RuntimeCamelException("The route " + ExternalSystemCamelConstants.MF_RETRIEVE_MATERIAL_PRODUCT_INFO_V2_CAMEL_ROUTE_ID ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\core\src\main\java\de\metas\camel\externalsystems\core\to_mf\v2\MaterialProductRouteBuilder.java
2
请完成以下Java代码
public final class AccessPredicateConfigAttribute implements ConfigAttribute { private static final long serialVersionUID = 2906954441251029428L; private final AccessPredicate accessPredicate; /** * Creates a new AccessPredicateConfigAttribute with the given {@link AccessPredicate}. * * @p...
public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final AccessPredicateConfigAttribute other = (AccessPredicateConf...
repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\security\check\AccessPredicateConfigAttribute.java
1
请完成以下Java代码
public void setHeaderAggregationKey(@NonNull final I_C_Invoice_Candidate ic) { // If the invoice candidate is flagged as "IsToClear", we shall reset the header aggregation key and invoicing group ASAP (08637) if (ic.isToClear()) { resetHeaderAggregationKey(ic); return; } // // Build and set the calc...
ic.setHeaderAggregationKeyBuilder_ID(AggregationId.toRepoId(headerAggregationKeyCalculated.getAggregationId())); // C_Aggregation_ID } } @Override public void resetHeaderAggregationKey(final I_C_Invoice_Candidate ic) { ic.setHeaderAggregationKey_Calc(null); ic.setHeaderAggregationKey(null); // // Reset ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\AggregationBL.java
1
请完成以下Java代码
private CostPrice convertCostPrice( @NonNull final CostPrice costPrice, @NonNull final ProductId productId, @NonNull final UomId targetUomId) { final UomId uomId = costPrice.getUomId(); final CurrencyPrecision costingPrecision = currencyRepository.getCostingPrecision(costPrice.getCurrencyId()); return ...
.coProductCostDistributionPercent(coProductCostDistributionPercent) .costSegmentAndElement(costSegmentAndElement) .price(CostPrice.zero(currencyId, candidate.getUomId())) .accumulatedQty(Quantity.zero(uom)) .build(); } private Set<CostingMethod> getCostingMethodsWhichRequiredBOMRollup() { return I...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\api\impl\CreatePPOrderCostsCommand.java
1
请完成以下Java代码
public void setC_VAT_SmallBusiness_ID (int C_VAT_SmallBusiness_ID) { if (C_VAT_SmallBusiness_ID < 1) set_ValueNoCheck (COLUMNNAME_C_VAT_SmallBusiness_ID, null); else set_ValueNoCheck (COLUMNNAME_C_VAT_SmallBusiness_ID, Integer.valueOf(C_VAT_SmallBusiness_ID)); } /** Get Kleinunternehmer-Steuerbefreiung ...
{ set_Value (COLUMNNAME_ValidTo, ValidTo); } /** Get Gültig bis. @return Gültig bis inklusiv (letzter Tag) */ @Override public java.sql.Timestamp getValidTo () { return (java.sql.Timestamp)get_Value(COLUMNNAME_ValidTo); } /** Set Umsatzsteuer-ID. @param VATaxID Umsatzsteuer-ID */ @Override publ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\tax\model\X_C_VAT_SmallBusiness.java
1
请完成以下Java代码
public void setPickFrom_MovementLine_ID (final int PickFrom_MovementLine_ID) { if (PickFrom_MovementLine_ID < 1) set_Value (COLUMNNAME_PickFrom_MovementLine_ID, null); else set_Value (COLUMNNAME_PickFrom_MovementLine_ID, PickFrom_MovementLine_ID); } @Override public int getPickFrom_MovementLine_ID() ...
@Override public java.lang.String getRejectReason() { return get_ValueAsString(COLUMNNAME_RejectReason); } /** * Status AD_Reference_ID=541435 * Reference name: DD_OrderLine_Schedule_Status */ public static final int STATUS_AD_Reference_ID=541435; /** NotStarted = NS */ public static final String STAT...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_DD_OrderLine_HU_Candidate.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isLoggingSessionEnabled() { return loggingSessionEnabled; } public VariableServiceConfiguration setLoggingSessionEnabled(boolean loggingSessionEnabled) { this.loggingSessionEnabled = loggingSessionEnabled; return this; } public boolean isSerializableVariableTypeT...
public VariableJsonMapper getVariableJsonMapper() { return variableJsonMapper; } public void setVariableJsonMapper(VariableJsonMapper variableJsonMapper) { this.variableJsonMapper = variableJsonMapper; } public VariableInstanceValueModifier getVariableInstanceValueModifier() { ...
repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\VariableServiceConfiguration.java
2
请完成以下Java代码
public ResponseEntity<?> createShippingPackages(@RequestBody final JsonCreateShippingPackagesRequest request) { log.debug("*** createShippingPackages: Started with request: {}", request); try { trxManager.runInNewTrx(() -> shippingPackageService.generateShippingPackages(request)); log.debug("*** createSh...
} @ApiResponses(value = { @ApiResponse(code = 200, message = "PDF retrieved for shipment"), @ApiResponse(code = 401, message = "You are not authorized to see the shipment PDF"), @ApiResponse(code = 404, message = "No archive found for the shipment") }) @GetMapping(path = "/{shipmentId}/pdf") public Respon...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\shipping\ShipmentRestController.java
1
请在Spring Boot框架中完成以下Java代码
public class Swagger2 { /** * 创建API应用 * apiInfo() 增加API相关信息 * 通过select()函数返回一个ApiSelectorBuilder实例,用来控制哪些接口暴露给Swagger来展现, * 本例采用指定扫描的包路径来定义指定要建立API的目录。 * * @return */ @Bean public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) ...
/** * 创建该API的基本信息(这些基本信息会展现在文档页面中) * 访问地址:http://项目实际地址/swagger-ui.html * @return */ private ApiInfo apiInfo() { return new ApiInfoBuilder() .title("Spring Boot中使用Swagger2构建RESTful APIs") .description("更多请关注https://blog.csdn.net/u012373815") ...
repos\springBoot-master\springboot-swagger-ui\src\main\java\com\abel\example\Swagger2.java
2
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setAD_User_ID (final int AD_User_ID) { if (AD_User_ID < 0) set_Value (COLUMNNAME_AD_User_ID, null); else set_Value (COLUMNNAME_AD_User_ID, AD_User_ID); ...
{ set_ValueFromPO(COLUMNNAME_MKTG_Channel_ID, de.metas.marketing.base.model.I_MKTG_Channel.class, MKTG_Channel); } @Override public void setMKTG_Channel_ID (final int MKTG_Channel_ID) { if (MKTG_Channel_ID < 1) set_Value (COLUMNNAME_MKTG_Channel_ID, null); else set_Value (COLUMNNAME_MKTG_Channel_ID, ...
repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java-gen\de\metas\marketing\base\model\X_AD_User_MKTG_Channels.java
1
请完成以下Java代码
public class McpClientApp2 { private static final Logger log = LoggerFactory.getLogger(McpClientApp2.class); public static void main(String[] args) { String jarPath = new java.io.File("java-mcp/target/java-mcp-1.0.0-SNAPSHOT.jar").getAbsolutePath(); ServerParameters params = ServerParameters.b...
client.initialize(); ListToolsResult tools = client.listTools(); McpClientApp2.log.info("Tools exposed by the server:"); tools.tools() .forEach(tool -> System.out.println(" - " + tool.name())); McpClientApp2.log.info("\nCalling 'logPrompt' tool..."); CallToolResult ...
repos\tutorials-master\java-mcp\src\main\java\mcp\McpClientApp2.java
1
请完成以下Java代码
public void setUseForwardHeaders(boolean useForwardHeaders) { this.useForwardHeaders = useForwardHeaders; } /** * Set the {@link ReactorResourceFactory} to get the shared resources from. * @param resourceFactory the server resources */ public void setResourceFactory(@Nullable ReactorResourceFactory resource...
} private HttpProtocol[] listProtocols() { List<HttpProtocol> protocols = new ArrayList<>(); protocols.add(HttpProtocol.HTTP11); if (getHttp2() != null && getHttp2().isEnabled()) { if (getSsl() != null && getSsl().isEnabled()) { protocols.add(HttpProtocol.H2); } else { protocols.add(HttpProtoco...
repos\spring-boot-4.0.1\module\spring-boot-reactor-netty\src\main\java\org\springframework\boot\reactor\netty\NettyReactiveWebServerFactory.java
1
请完成以下Java代码
protected ITranslatableString buildMessage() { final TranslatableStringBuilder message = TranslatableStrings.builder(); message.append(super.buildMessage()); if (targetObject != null) { message.append("\n Target object: ").append(targetObject.toString()); } if (methodArgs != null) { message.appen...
resetMessageBuilt(); return this; } public CacheGetException setInvalidParameter(final int parameterIndex, final Object parameter) { this.parameterIndex = parameterIndex; this.parameter = parameter; this.parameterSet = true; resetMessageBuilt(); return this; } public CacheGetException setAnnotation(f...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\interceptor\CacheGetException.java
1
请完成以下Java代码
public Integer parse(Case caseElement, String definitionKey, boolean skipEnforceTtl) { String historyTimeToLiveString = caseElement.getCamundaHistoryTimeToLiveString(); return parseAndValidate(historyTimeToLiveString, definitionKey, skipEnforceTtl); } public Integer parse(Decision decision, String definit...
} protected class HTTLParsedResult { protected final boolean systemDefaultConfigWillBeUsed; protected final String value; protected final Integer valueAsInteger; public HTTLParsedResult(String historyTimeToLiveString) { this.systemDefaultConfigWillBeUsed = (historyTimeToLiveString == null); ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoryTimeToLiveParser.java
1
请在Spring Boot框架中完成以下Java代码
public void updateEmail(String username, String email) { userRepository.updateEmail(username, email); flushCache(username); } @Override public void download(List<UserDto> queryAll, HttpServletResponse response) throws IOException { List<Map<String, Object>> list = new ArrayList<>();...
* 清理缓存 * * @param id / */ public void delCaches(Long id, String username) { redisUtils.del(CacheKey.USER_ID + id); flushCache(username); } /** * 清理 登陆时 用户缓存信息 * * @param username / */ private void flushCache(String username) { userCacheManager....
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\service\impl\UserServiceImpl.java
2
请完成以下Java代码
public class ProcessTaskXmlConverter extends TaskXmlConverter { @Override public String getXMLElementName() { return CmmnXmlConstants.ELEMENT_PROCESS_TASK; } @Override protected CmmnElement convert(XMLStreamReader xtr, ConversionHelper conversionHelper) { ProcessTask processTas...
String fallbackToDefaultTenantValue = xtr.getAttributeValue(CmmnXmlConstants.FLOWABLE_EXTENSIONS_NAMESPACE, CmmnXmlConstants.ATTRIBUTE_FALLBACK_TO_DEFAULT_TENANT); if (fallbackToDefaultTenantValue != null) { processTask.setFallbackToDefaultTenant(Boolean.parseBoolean(fallbackToDefaultTenantValue)); ...
repos\flowable-engine-main\modules\flowable-cmmn-converter\src\main\java\org\flowable\cmmn\converter\ProcessTaskXmlConverter.java
1
请完成以下Java代码
public org.compiere.model.I_AD_Sequence getAD_Sequence() { return get_ValueAsPO(COLUMNNAME_AD_Sequence_ID, org.compiere.model.I_AD_Sequence.class); } @Override public void setAD_Sequence(final org.compiere.model.I_AD_Sequence AD_Sequence) { set_ValueFromPO(COLUMNNAME_AD_Sequence_ID, org.compiere.model.I_AD_Se...
@Override public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public void setPP_ComponentGenerator_ID (final int PP_ComponentGenerator_ID) { if (PP_ComponentGenerator_ID < 1) set_ValueNoCheck (COLUMNNAME_PP_ComponentGenerator_ID, null); else set_ValueNoCheck ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PP_ComponentGenerator.java
1
请完成以下Java代码
public void keyReleased(final KeyEvent e) { if (LogManager.isLevelFinest()) { log.trace("Key=" + e.getKeyCode() + " - " + e.getKeyChar() + " -> " + m_text.getText()); } // ESC if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { m_text.setText(m_initialText); } else if (e.getKeyChar() == KeyEvent.CHAR_UND...
{ } m_setting = false; } // metas @Override public boolean isAutoCommit() { return true; } @Override public final ICopyPasteSupportEditor getCopyPasteSupport() { return m_text == null ? NullCopyPasteSupportEditor.instance : m_text.getCopyPasteSupport(); } } // VFile
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VFile.java
1
请完成以下Java代码
public class EncryptedCitizen { private String name; private Binary email; private Binary birthYear; public String getName() { return name; } public void setName(String name) { this.name = name; } public Binary getEmail() { return email; }
public void setEmail(Binary email) { this.email = email; } public Binary getBirthYear() { return birthYear; } public void setBirthYear(Binary birthYear) { this.birthYear = birthYear; } @Override public String toString() { return "Citizen [name=" + name + ",...
repos\tutorials-master\persistence-modules\spring-boot-persistence-mongodb-3\src\main\java\com\baeldung\boot\csfle\data\EncryptedCitizen.java
1
请完成以下Java代码
HUReceiptLinePartAttributes getAttributes() { return _attributes; } /** * @return qty & quality; never returns null */ public final ReceiptQty getQtyAndQuality() { updateIfStale(); return _qtyAndQuality; } public int getSubProducer_BPartner_ID() { updateIfStale(); return _subProducerBPartnerId; ...
public Object getAttributeStorageAggregationKey() { updateIfStale(); return _attributeStorageAggregationKey; } /** * Get the quality note linked with the part candidate * * @return */ public I_M_QualityNote getQualityNote() { return _qualityNote; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\inoutcandidate\spi\impl\HUReceiptLinePartCandidate.java
1
请在Spring Boot框架中完成以下Java代码
public class MyStringWebSocketHandler extends TextWebSocketHandler { private Logger log = LoggerFactory.getLogger(this.getClass()); @Override public void afterConnectionEstablished(WebSocketSession session) { log.info("和客户端建立连接"); } @Override public void handleTransportError(WebSocket...
String receiveMessage = message.getPayload(); log.info(receiveMessage); // 发送消息给客户端 session.sendMessage(new TextMessage(fakeAi(receiveMessage))); // 关闭连接 // session.close(CloseStatus.NORMAL); } private static String fakeAi(String input) { if (input == null || ""....
repos\SpringAll-master\76.spring-boot-websocket-socketjs\src\main\java\cc\mrbird\socket\handler\MyStringWebSocketHandler.java
2
请完成以下Java代码
protected void invokeVariableLifecycleListenersUpdate(CoreVariableInstance variableInstance, AbstractVariableScope sourceScope, List<VariableInstanceLifecycleListener<CoreVariableInstance>> lifecycleListeners) { for (VariableInstanceLifecycleListener<CoreVariableInstance> lifecycleListener : lifecycleListener...
CoreVariableInstance variableInstance = getVariableStore().getVariable(variableName); invokeVariableLifecycleListenersDelete(variableInstance, sourceActivityExecution); getVariableStore().removeVariable(variableName); } } public ELContext getCachedElContext() { return cachedElContext; } p...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\core\variable\scope\AbstractVariableScope.java
1
请完成以下Java代码
public String getBatchType() { return batchType; } public void setBatchType(String batchType) { this.batchType = batchType; } @Override public Integer getHistoryTimeToLive() { return historyTimeToLive; } public void setHistoryTimeToLive(Integer historyTimeToLive) { this.historyTimeToLiv...
return cleanableBatchesCount; } public void setCleanableBatchesCount(long cleanableBatchCount) { this.cleanableBatchesCount = cleanableBatchCount; } @Override public String toString() { return this.getClass().getSimpleName() + "[batchType = " + batchType + ", historyTimeToLive = " + ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\CleanableHistoricBatchesReportResultEntity.java
1
请完成以下Java代码
public class FoodDelivery { private static final Logger logger = Logger.getLogger(FoodDelivery.class.getName()); private final String FILE_PATH = "src/main/resources/foodfile.bin"; public FoodDelivery() { } public Food.FoodDelivery buildData() { Food.FoodDelivery.Builder foodData = Food....
return Food.FoodDelivery.parseFrom(fis); } catch (FileNotFoundException e) { logger.severe(String.format("File not found: %s location", FILE_PATH)); return Food.FoodDelivery.newBuilder() .build(); } catch (IOException e) { logger.warning(String.format(...
repos\tutorials-master\google-protocol-buffer\src\main\java\com\baeldung\mapinprotobuf\FoodDelivery.java
1
请完成以下Java代码
public String getHelp () { return (String)get_Value(COLUMNNAME_Help); } /** Set Unique. @param IsUnique Unique */ public void setIsUnique (boolean IsUnique) { set_Value (COLUMNNAME_IsUnique, Boolean.valueOf(IsUnique)); } /** Get Unique. @return Unique */ public boolean isUnique () { Object oo...
} /** Set Sql WHERE. @param WhereClause Fully qualified SQL WHERE clause */ public void setWhereClause (String WhereClause) { set_Value (COLUMNNAME_WhereClause, WhereClause); } /** Get Sql WHERE. @return Fully qualified SQL WHERE clause */ public String getWhereClause () { return (String)get_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Index_Table.java
1
请在Spring Boot框架中完成以下Java代码
public void setUserId(String userId) { this.userId = userId; } @ApiModelProperty(example = "sales") public String getGroupId() { return groupId; } public void setGroupId(String groupId) { this.groupId = groupId; } @ApiModelProperty(example = "null") public Stri...
@ApiModelProperty(example = "5") public String getCaseInstanceId() { return caseInstanceId; } public void setCaseInstanceId(String caseInstanceId) { this.caseInstanceId = caseInstanceId; } @ApiModelProperty(example = "http://localhost:8182/cmmn-history/historic-case-instances/5") ...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\task\HistoricIdentityLinkResponse.java
2
请完成以下Java代码
public final class MInOutLineValidator implements ModelValidator { private int ad_Client_ID = -1; public int getAD_Client_ID() { return ad_Client_ID; } public final void initialize(final ModelValidationEngine engine, final MClient client) { if (client != null) { ad_Client_ID = client.getAD_Client_ID()...
public String login(int AD_Org_ID, int AD_Role_ID, int AD_User_ID) { return null; } public String modelChange(final PO po, final int type) throws Exception { //nothing to do return null; } public String docValidate(PO po, int timing) { // nothing to do return null; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\adempiere\inout\modelvalidator\MInOutLineValidator.java
1
请完成以下Java代码
public ISideActionsGroupModel getModel() { return model; } private Container getActionsPanel() { if (_actionsPanel == null) { final Container contentPane = getContentPane(); contentPane.setLayout(new MigLayout("fill, flowy")); _actionsPanel = contentPane; } return _actionsPanel; } private voi...
else { throw new IllegalArgumentException("Unknown action type: " + type); } } protected void updateActionComponent(final Component actionComp, final ISideAction action) { // TODO Auto-generated method stub } private final boolean hasActions() { return model != null && model.getActions().getSize() > ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\ui\sideactions\swing\SideActionsGroupPanel.java
1
请完成以下Java代码
public void setC_DocType_Sequence_ID (int C_DocType_Sequence_ID) { if (C_DocType_Sequence_ID < 1) set_ValueNoCheck (COLUMNNAME_C_DocType_Sequence_ID, null); else set_ValueNoCheck (COLUMNNAME_C_DocType_Sequence_ID, Integer.valueOf(C_DocType_Sequence_ID)); } /** Get Document Type Sequence assignment. @r...
@Override public void setDocNoSequence_ID (int DocNoSequence_ID) { if (DocNoSequence_ID < 1) set_Value (COLUMNNAME_DocNoSequence_ID, null); else set_Value (COLUMNNAME_DocNoSequence_ID, Integer.valueOf(DocNoSequence_ID)); } /** Get Nummernfolgen für Belege. @return Document sequence determines the num...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_DocType_Sequence.java
1
请完成以下Java代码
public class ProprietaryParty2 { @XmlElement(name = "Tp", required = true) protected String tp; @XmlElement(name = "Pty", required = true) protected PartyIdentification32 pty; /** * Gets the value of the tp property. * * @return * possible object is * {@link Strin...
/** * Gets the value of the pty property. * * @return * possible object is * {@link PartyIdentification32 } * */ public PartyIdentification32 getPty() { return pty; } /** * Sets the value of the pty property. * * @param value * ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\ProprietaryParty2.java
1
请完成以下Java代码
protected InvoiceId extractSingleSelectedInvoiceId(@NonNull final IProcessPreconditionsContext context) { final DocOutboundLogId docOutboundLogId = DocOutboundLogId.ofRepoIdOrNull(context.getSingleSelectedRecordId()); if (docOutboundLogId == null) { return null; } final de.metas.document.archive.model.I_...
return InvoiceId.ofRepoIdOrNull(reference.getRecord_ID()); } @Override @NonNull protected IQueryBuilder<I_C_Invoice> createSelectedInvoicesQueryBuilder() { return queryBL .createQueryBuilder(I_C_Doc_Outbound_Log.class) .filter(getProcessInfo().getQueryFilterOrElseFalse()) .addOnlyActiveRecordsFilter...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\process\export\json\C_Doc_Outbound_Log_Selection_Export_JSON.java
1