instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
class MailSenderPropertiesConfiguration { @Bean @ConditionalOnMissingBean(JavaMailSender.class) JavaMailSenderImpl mailSender(MailProperties properties, ObjectProvider<SslBundles> sslBundles) { JavaMailSenderImpl sender = new JavaMailSenderImpl(); applyProperties(properties, sender, sslBundles.getIfAvailable())...
Assert.state(sslBundles != null, "'sslBundles' must not be null"); SslBundle sslBundle = sslBundles.getBundle(ssl.getBundle()); javaMailProperties.put("mail." + protocol + ".ssl.socketFactory", sslBundle.createSslContext().getSocketFactory()); } if (!javaMailProperties.isEmpty()) { sender.setJavaMailP...
repos\spring-boot-4.0.1\module\spring-boot-mail\src\main\java\org\springframework\boot\mail\autoconfigure\MailSenderPropertiesConfiguration.java
2
请完成以下Java代码
protected Result getDefaultResult() { return _defaultResult; } @Override public void setHUIterator(final IHUIterator iterator) { if (this.iterator != null && iterator != null && this.iterator != iterator) { throw new AdempiereException("Changing the iterator from " + this.iterator + " to " + iterator + "...
public Result afterHU(final I_M_HU hu) { return getDefaultResult(); } @Override public Result beforeHUItem(final IMutable<I_M_HU_Item> item) { return getDefaultResult(); } @Override public Result afterHUItem(final I_M_HU_Item item) { return getDefaultResult(); } @Override public Result beforeHUItem...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\HUIteratorListenerAdapter.java
1
请完成以下Java代码
class ReactiveWebServerApplicationContextLocalTestWebServerProvider implements LocalTestWebServer.Provider { private final @Nullable ReactiveWebServerApplicationContext context; ReactiveWebServerApplicationContextLocalTestWebServerProvider(ApplicationContext context) { this.context = getWebServerApplicationContex...
int port = this.context.getEnvironment().getProperty("local.server.port", Integer.class, 8080); String path = this.context.getEnvironment().getProperty("spring.webflux.base-path", ""); return new BaseUriDetails(port, path); }); } private boolean isSslEnabled(ReactiveWebServerApplicationContext context) { t...
repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\reactive\context\ReactiveWebServerApplicationContextLocalTestWebServerProvider.java
1
请在Spring Boot框架中完成以下Java代码
public class EmailServiceImpl implements EmailService { private static final String NOREPLY_ADDRESS = "noreply@baeldung.com"; @Autowired private JavaMailSender emailSender; @Autowired private SimpleMailMessage template; public void sendSimpleMessage(String to, String subject, String text) { ...
} } @Override public void sendMessageWithInputStreamAttachment( String to, String subject, String text, String attachmentName, InputStream attachmentStream) { try { MimeMessage message = emailSender.createMimeMessage(); MimeMessageHelper helper = new MimeMessageHelp...
repos\tutorials-master\spring-web-modules\spring-mvc-basics\src\main\java\com\baeldung\spring\mail\EmailServiceImpl.java
2
请完成以下Java代码
protected final BigDecimal extractAmountFromString(final String amountString, final List<String> collectedErrors) { BigDecimal amount = BigDecimal.ZERO; try { amount = NumberUtils.asBigDecimal(amountString); } catch (final NumberFormatException e) { final String wrongNumberFormatAmount = msgBL.ge...
final DateFormat df = new SimpleDateFormat("yyMMdd"); final Date date; try { date = df.parse(dateStr); return TimeUtil.asTimestamp(date); } catch (final ParseException e) { final String wrongDate = msgBL.getMsg(Env.getCtx(), failMessage, new Object[] { dateStr }); collectedErrors.add(wrongDate);...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java\de\metas\payment\spi\impl\AbstractESRPaymentStringParser.java
1
请完成以下Java代码
private ILock getOrAcquireLock() { assertNotClosed(); if (_lock == null) { final IQueryFilter<ET> filter = createFilter(); final LockOwner lockOwner = LockOwner.newOwner(getClass().getSimpleName()); _lock = lockManager.lock() .setOwner(lockOwner) .setAutoCleanup(true) .setFailIfNothingLo...
{ // already closed return; } // // Unlock all if (_lock != null) { _lock.close(); _lock = null; } // // Close iterator if (_iterator != null) { IteratorUtils.closeQuietly(_iterator); _iterator = null; } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\event\impl\EventSource.java
1
请完成以下Java代码
protected String getXMLElementName() { return ELEMENT_DECISION_SERVICE; } @Override protected DmnElement convertXMLToElement(XMLStreamReader xtr, ConversionHelper conversionHelper) throws Exception { DecisionService decisionService = new DecisionService(); decisionService.setId(xtr....
DmnElementReference ref = new DmnElementReference(); ref.setHref(xtr.getAttributeValue(null, ATTRIBUTE_HREF)); decisionService.addInputData(ref); } else if (xtr.isEndElement() && getXMLElementName().equalsIgnoreCase(xtr.getLocalName())) { ready...
repos\flowable-engine-main\modules\flowable-dmn-xml-converter\src\main\java\org\flowable\dmn\xml\converter\DecisionServiceXMLConverter.java
1
请完成以下Java代码
public void setSecurityContextHolderStrategy(SecurityContextHolderStrategy securityContextHolderStrategy) { Assert.notNull(securityContextHolderStrategy, "securityContextHolderStrategy cannot be null"); this.securityContextHolderStrategy = securityContextHolderStrategy; } public void setLogoutHandlers(LogoutHand...
* @since 4.2 */ private static final class ResponseBodySessionInformationExpiredStrategy implements SessionInformationExpiredStrategy { @Override public void onExpiredSessionDetected(SessionInformationExpiredEvent event) throws IOException { HttpServletResponse response = event.getResponse(); response....
repos\spring-security-main\web\src\main\java\org\springframework\security\web\session\ConcurrentSessionFilter.java
1
请完成以下Java代码
protected ProcessApplicationInfoImpl createProcessApplicationInfo(final AbstractProcessApplication processApplication, final Map<String, DeployedProcessArchive> processArchiveDeploymentMap) { // populate process application info ProcessApplicationInfoImpl processApplicationInfo = new ProcessApplicationInf...
} } processApplicationInfo.setDeploymentInfo(deploymentInfoList); return processApplicationInfo; } protected void notifyBpmPlatformPlugins(PlatformServiceContainer serviceContainer, AbstractProcessApplication processApplication) { JmxManagedBpmPlatformPlugins plugins = serviceContainer.ge...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\deployment\StartProcessApplicationServiceStep.java
1
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName)...
public void setInstructorDetail(InstructorDetail instructorDetail) { this.instructorDetail = instructorDetail; } @Override public String toString() { return "Instructor [id=" + id + ", firstName=" + firstName + ", lastName=" + lastName + ", email=" + email + ", instructorDetail=" + instructorDetail + "]"; ...
repos\Spring-Boot-Advanced-Projects-main\springboot-jpa-one-to-one-example\src\main\java\net\alanbinu\springboot\jpa\model\Instructor.java
1
请在Spring Boot框架中完成以下Java代码
IncludeExcludeEndpointFilter<ExposableJmxEndpoint> jmxIncludeExcludePropertyEndpointFilter() { JmxEndpointProperties.Exposure exposure = this.properties.getExposure(); return new IncludeExcludeEndpointFilter<>(ExposableJmxEndpoint.class, exposure.getInclude(), exposure.getExclude(), EndpointExposure.JMX.getDefa...
jmxEndpointsSupplier.getEndpoints()); } } @Configuration(proxyBeanMethods = false) @ConditionalOnClass(ObjectMapper.class) @ConditionalOnMissingClass("tools.jackson.databind.json.JsonMapper") @Deprecated(since = "4.0.0", forRemoval = true) @SuppressWarnings("removal") static class JmxJackson2EndpointConfigur...
repos\spring-boot-4.0.1\module\spring-boot-actuator-autoconfigure\src\main\java\org\springframework\boot\actuate\autoconfigure\endpoint\jmx\JmxEndpointAutoConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public void checkPermission(SecurityUser user, Resource resource, Operation operation) throws ThingsboardException { PermissionChecker permissionChecker = getPermissionChecker(user.getAuthority(), resource); if (!permissionChecker.hasPermission(user, operation)) { permissionDenied(); ...
var permissionChecker = getPermissionChecker(user.getAuthority(), resource); return permissionChecker.hasPermission(user, operation, entityId, entity); } private PermissionChecker getPermissionChecker(Authority authority, Resource resource) throws ThingsboardException { Permissions permissions ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\security\permission\DefaultAccessControlService.java
2
请完成以下Java代码
public VerfuegbarkeitDefektgrund getGrund() { return grund; } /** * Sets the value of the grund property. * * @param value * allowed object is * {@link VerfuegbarkeitDefektgrund } * */ public void setGrund(VerfuegbarkeitDefektgrund value) { t...
* */ public long getLieferPzn() { return lieferPzn; } /** * Sets the value of the lieferPzn property. * */ public void setLieferPzn(long value) { this.lieferPzn = value; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v1\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v1\VerfuegbarkeitSubstitution.java
1
请在Spring Boot框架中完成以下Java代码
public String getInjectionType() { return injectionType; } public void setInjectionType(String injectionType) { this.injectionType = injectionType; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName(...
public String getTaskId() { return taskId; } public void setTaskId(String taskId) { this.taskId = taskId; } public String getProcessDefinitionId() { return processDefinitionId; } public void setProcessDefinitionId(String processDefinitionId) { this.processDefiniti...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\process\InjectActivityRequest.java
2
请在Spring Boot框架中完成以下Java代码
public List listByRoleIds(String roleIdsStr) { List<String> roldIds = Arrays.asList(roleIdsStr.split(",")); return super.getSessionTemplate().selectList(getStatement("listByRoleIds"), roldIds); } /** * 根据父菜单ID获取该菜单下的所有子孙菜单.<br/> * * @param parentId * (如果为空,则为获取所有的菜单).<br/> * @return menuLis...
* . * @return menuList. */ @Override public List<PmsMenu> listByParentId(Long parentId) { return super.getSessionTemplate().selectList(getStatement("listByParentId"), parentId); } /*** * 根据名称和是否叶子节点查询数据 * * @param isLeaf * 是否是叶子节点 * @param name * 节点名称 * @return...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\permission\dao\impl\PmsMenuDaoImpl.java
2
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return passwor...
public void setPasswordConfirm(String passwordConfirm) { this.passwordConfirm = passwordConfirm; } @ManyToMany @JoinTable(name = "user_role", joinColumns = @JoinColumn(name = "user_id"), inverseJoinColumns = @JoinColumn(name = "role_id")) public Set<Role> getRoles() { return roles; ...
repos\Spring-Boot-Advanced-Projects-main\login-registration-springboot-hibernate-jsp-auth\src\main\java\net\alanbinu\springboot\loginregistrationspringbootauthjsp\model\User.java
1
请完成以下Java代码
private final MoveTo getMoveTo(TransferSupport info) { MoveTo move = new MoveTo(); if (info.isDrop()) { JTree.DropLocation dl = (JTree.DropLocation)info.getDropLocation(); TreePath path = dl.getPath(); if (path == null) return null; move.to = (MTreeNode)path.getLastPathComponent(); if (move.to...
} else { move.to = selected; move.indexTo = 0; } } return move; } private boolean equals(MTreeNode node1, MTreeNode node2) { if(node1 == null || node2 == null) return false; if(node1 == node2) return true; return node1.getAD_Tree_ID() == node2.getAD_Tree_ID() && node1.getAD_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\tree\VTreeTransferHandler.java
1
请完成以下Java代码
public void setM_ShipperTransportation_ID (int M_ShipperTransportation_ID) { if (M_ShipperTransportation_ID < 1) set_Value (COLUMNNAME_M_ShipperTransportation_ID, null); else set_Value (COLUMNNAME_M_ShipperTransportation_ID, Integer.valueOf(M_ShipperTransportation_ID)); } /** Get Transport Auftrag. @ret...
public void setProcessed (boolean Processed) { set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); } /** Get Verarbeitet. @return Checkbox sagt aus, ob der Beleg verarbeitet wurde. */ @Override public boolean isProcessed () { Object oo = get_Value(COLUMNNAME_Processed); if (oo != null) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.go\src\main\java-gen\de\metas\shipper\gateway\go\model\X_GO_DeliveryOrder.java
1
请完成以下Java代码
public boolean containsLabel(E label) { return labelMap.containsKey(label); } public int getFrequency(E label) { Integer frequency = labelMap.get(label); if (frequency == null) return 0; return frequency; } @Override public String toString() { fi...
if (param == null) return null; String[] array = param.split(" "); return create(array); } @SuppressWarnings("unchecked") public static Map.Entry<String, Map.Entry<String, Integer>[]> create(String param[]) { if (param.length % 2 == 0) return null; int natureCount = (par...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dictionary\item\EnumItem.java
1
请完成以下Java代码
public void checkReadRegisteredDeployments() { getAuthorizationManager().checkAuthorization(SystemPermissions.READ, Resources.SYSTEM); } @Override public void checkReadProcessApplicationForDeployment() { getAuthorizationManager().checkAuthorization(SystemPermissions.READ, Resources.SYSTEM); } @Overr...
getAuthorizationManager().checkAuthorization(SystemPermissions.READ, Resources.SYSTEM); } // helper //////////////////////////////////////// protected AuthorizationManager getAuthorizationManager() { return Context.getCommandContext().getAuthorizationManager(); } protected ProcessDefinitionEntity findL...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cfg\auth\AuthorizationCommandChecker.java
1
请完成以下Java代码
public class UserUpdateGenderDTO { /** * 用户编号 */ @NotNull(message = "用户编号不能为空") private Integer id; /** * 性别 */ @NotNull(message = "性别不能为空") @InEnum(value = GenderEnum.class, message = "性别必须是 {value}") private Integer gender; public Integer getId() { return...
} public UserUpdateGenderDTO setGender(Integer gender) { this.gender = gender; return this; } @Override public String toString() { return "UserUpdateGenderDTO{" + "id=" + id + ", gender=" + gender + '}'; } }
repos\SpringBoot-Labs-master\lab-22\lab-22-validation-01\src\main\java\cn\iocoder\springboot\lab22\validation\dto\UserUpdateGenderDTO.java
1
请完成以下Java代码
public String getIncidentMessageLike() { return incidentMessageLike; } public String getCaseInstanceId() { return caseInstanceId; } public String getSuperCaseInstanceId() { return superCaseInstanceId; } public String getSubCaseInstanceId() { return subCaseInstanceId; } public boolean...
@Override public ProcessInstanceQuery or() { if (this != queries.get(0)) { throw new ProcessEngineException("Invalid query usage: cannot set or() within 'or' query"); } ProcessInstanceQueryImpl orQuery = new ProcessInstanceQueryImpl(); orQuery.isOrQueryActive = true; orQuery.queries = queri...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ProcessInstanceQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class BOMLine { BOMComponentType componentType; ProductId componentId; AttributeSetInstanceId asiId; @Getter(AccessLevel.PRIVATE) Quantity qty; Percent scrapPercent; @Getter(AccessLevel.PACKAGE) BOMCostPrice costPrice; Percent coProductCostDistributionPercent; @Builder private BOMLine( @NonNul...
@Nullable public CostAmount getCostAmountOrNull(final CostElementId costElementId) { final BOMCostElementPrice costPriceHolder = getCostPrice().getCostElementPriceOrNull(costElementId); if (costPriceHolder == null) { return null; } final CostPrice costPrice; if (isByProduct()) { costPrice = costP...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\costing\BOMLine.java
2
请完成以下Java代码
private void setServiceTypeFields( @NonNull final RecordServiceType recordServiceType, @NonNull final XmlRecordService recordService) { recordServiceType.setRecordId(recordService.getRecordId()); recordServiceType.setCode(recordService.getCode()); recordServiceType.setRefCode(recordService.getRefCode()); ...
for (final XmlDocument document : documents) { documentsType.getDocument().add(createDocumentType(document)); } return documentsType; } private DocumentType createDocumentType(@NonNull final XmlDocument document) { final DocumentType documentType = jaxbRequestObjectFactory.createDocumentType(); docume...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\Invoice440FromCrossVersionModelTool.java
1
请完成以下Java代码
private long getSequence(String invoker) { AtomicLong r = this.sequences.get(invoker); if (r == null) { r = new AtomicLong(0); AtomicLong previous = this.sequences.putIfAbsent(invoker, r); if (previous != null) { r = previous; } } ...
return daemon; } public void setDaemon(boolean daemon) { this.daemon = daemon; } public UncaughtExceptionHandler getUncaughtExceptionHandler() { return uncaughtExceptionHandler; } public void setUncaughtExceptionHandler(UncaughtExceptionHandler handler) { this.uncaught...
repos\Spring-Boot-In-Action-master\id-spring-boot-starter\src\main\java\com\baidu\fsg\uid\utils\NamingThreadFactory.java
1
请完成以下Java代码
private static class FTSFilterDescriptorsMap { private final ImmutableMap<String, FTSFilterDescriptor> descriptorsByTargetTableName; private final ImmutableMap<FTSFilterDescriptorId, FTSFilterDescriptor> descriptorsById; private FTSFilterDescriptorsMap(@NonNull final List<FTSFilterDescriptor> descriptors) { ...
if (valueType == FTSJoinColumn.ValueType.INTEGER) { availableKeys = availableIntKeys; } else if (valueType == FTSJoinColumn.ValueType.STRING) { availableKeys = availableStringKeys; } else { availableKeys = new ArrayList<>(); } if (availableKeys.isEmpty()) { throw new Ademp...
repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java\de\metas\fulltextsearch\config\FTSFilterDescriptorRepository.java
1
请完成以下Spring Boot application配置
spring: application: name: sc-eureka-server server: port: 8761 eureka: client: service-url: defaultZone: http://localhost:8761/eureka register-with-eureka: false fetch-registry: false management: endpoin
ts: web: exposure: include: "*" endpoint: health: show-details: ALWAYS
repos\SpringBootLearning-master (1)\springboot-admin\sc-eureka-server\src\main\resources\application.yml
2
请在Spring Boot框架中完成以下Java代码
public class FTSDocumentFilterDescriptorsProviderFactory implements DocumentFilterDescriptorsProviderFactory { // services private static final Logger logger = LogManager.getLogger(FTSDocumentFilterDescriptorsProviderFactory.class); private final IMsgBL msgBL = Services.get(IMsgBL.class); private final FTSConfigSer...
return null; } final FTSFilterContext context = FTSFilterContext.builder() .filterDescriptor(ftsFilterDescriptor) .searchService(ftsSearchService) .build(); final ITranslatableString caption = msgBL.getTranslatableMsgText(MSG_FULL_TEXT_SEARCH_CAPTION); return ImmutableDocumentFilterDescriptorsPro...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\provider\fullTextSearch\FTSDocumentFilterDescriptorsProviderFactory.java
2
请完成以下Java代码
public void C_InvoiceDoIt(final InvoiceId invoiceId, final EDIExportStatus targetExportStatus) { final de.metas.edi.model.I_C_Invoice invoice = ediDocOutBoundLogService.retreiveById(invoiceId); invoice.setEDI_ExportStatus(targetExportStatus.getCode()); invoiceDAO.save(invoice); } @NonNull public LookupValues...
{ final String code = availableTargetStatuses.get(0).getCode(); return LookupValue.StringLookupValue.of(code, adReferenceService.retrieveListNameTranslatableString(EDIExportStatus.AD_Reference_ID, code)); } return IProcessDefaultParametersProvider.DEFAULT_VALUE_NOTAVAILABLE; } public boolean checkIsNotInvo...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\edi_desadv\ChangeEDI_ExportStatusHelper.java
1
请完成以下Java代码
public void exportQuartzJobLog(HttpServletResponse response, JobQueryCriteria criteria) throws IOException { quartzJobService.downloadLog(quartzJobService.queryAllLog(criteria), response); } @ApiOperation("查询任务执行日志") @GetMapping(value = "/logs") @PreAuthorize("@el.check('timing:list')") pub...
@PutMapping(value = "/{id}") @PreAuthorize("@el.check('timing:edit')") public ResponseEntity<Object> updateQuartzJobStatus(@PathVariable Long id){ quartzJobService.updateIsPause(quartzJobService.findById(id)); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @Log("执行定时任务") @Api...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\quartz\rest\QuartzJobController.java
1
请完成以下Java代码
final class AvailableForSaleResultGroupBuilder { @NonNull @Getter private final ProductId productId; @NonNull @Getter private final AttributesKey storageAttributesKey; @NonNull @Getter private final WarehouseId warehouseId; @NonNull private BigDecimal qtyOnHandStock; @NonNull private BigDecimal qtyToBe...
this.qtyOnHandStock = CoalesceUtil.coalesce(qtyOnHandStock, ZERO); this.qtyToBeShipped = CoalesceUtil.coalesce(qtyToBeShipped, ZERO); } public AvailableForSalesLookupBucketResult build() { return AvailableForSalesLookupBucketResult.builder() .productId(productId) .storageAttributesKey(storageAttributesK...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java\de\metas\material\cockpit\availableforsales\AvailableForSaleResultGroupBuilder.java
1
请完成以下Java代码
public CalloutStatisticsEntry setStatusFailed(final Throwable exception) { duration = duration == null ? null : duration.stop(); this.exception = exception; status = Status.Failed; _nodeSummary = null; // reset return this; } public CalloutStatisticsEntry getCreateChild(final ICalloutField field...
{ logger.trace("Skip executing all callouts for {} because {}", field, reason); countChildFieldsSkipped++; return this; } public CalloutStatisticsEntry childSkipped(final ICalloutField field, final ICalloutInstance callout, final String reasonSummary) { final String reasonDetails = null; return ch...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\callout\api\impl\CalloutExecutor.java
1
请完成以下Java代码
public int hashCode() { return this.files.hashCode(); } @Override public String toString() { if (this.files.size() == 1) { return this.files.get(0).getPath(); } return this.files.stream().map(File::toString).collect(Collectors.joining(", ")); } /** * Find the Docker Compose file by searching in the ...
* Create a new {@link DockerComposeFile} for the given {@link File}. * @param file the source file * @return the Docker Compose file */ public static DockerComposeFile of(File file) { Assert.notNull(file, "'file' must not be null"); Assert.isTrue(file.exists(), () -> "'file' [%s] must exist".formatted(file))...
repos\spring-boot-4.0.1\core\spring-boot-docker-compose\src\main\java\org\springframework\boot\docker\compose\core\DockerComposeFile.java
1
请完成以下Java代码
private static String dominantGenre(Centroid centroid) { return centroid .getCoordinates() .keySet() .stream() .limit(2) .collect(Collectors.joining(", ")); } private static Centroid sortedCentroid(Centroid key) { List<Map.Entry<String, Double>>...
records.add(new Record(artist, tags)); } return records; } private static Set<String> getTop100Tags() throws IOException { return lastFm .topTags() .execute() .body() .all(); } private static List<String> getTop100Artists() throws IOExcep...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-3\src\main\java\com\baeldung\algorithms\kmeans\LastFm.java
1
请在Spring Boot框架中完成以下Java代码
public class BookResource implements Service { private BookManager bookManager = new BookManager(); @Override public void update(Routing.Rules rules) { rules .get("/", this::books) .get("/{id}", this::bookById); } private void bookById(ServerRequest serverR...
private JsonObject from(Book book) { JsonObject jsonObject = Json.createObjectBuilder() .add("id", book.getId()) .add("isbn", book.getIsbn()) .add("name", book.getName()) .add("author", book.getAuthor()) .add("pages", book.getPages(...
repos\tutorials-master\microservices-modules\helidon\helidon-se\src\main\java\com\baeldung\helidon\se\routing\BookResource.java
2
请在Spring Boot框架中完成以下Java代码
public String hello() { return "hello"; } @GetMapping("/index") @ResponseBody public String index() { String wel = "hello ~ "; // Subject subject = SecurityUtils.getSubject(); // System.out.println(subject.hasRole("admin")); // String s = testService.vipPrint(); // ...
} @GetMapping("/vip") @ResponseBody public String vip() { return "hello vip"; } @GetMapping("/common") @ResponseBody public String common() { return "hello common"; } }
repos\spring-boot-quick-master\quick-shiro\src\main\java\com\shiro\quick\controller\LoginController.java
2
请完成以下Java代码
public static com.google.protobuf.Parser<AddressBook> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<AddressBook> getParserForType() { return PARSER; } @java.lang.Override public com.baeldung.protobuf.AddressBookProtos.AddressBook getDefaultInstan...
}; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }); internal_static_protobuf_Person_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_protobu...
repos\tutorials-master\google-protocol-buffer\src\main\java\com\baeldung\protobuf\AddressBookProtos.java
1
请在Spring Boot框架中完成以下Java代码
public LegacyEndpointConverter httptraceLegacyEndpointConverter() { return LegacyEndpointConverters.httptrace(); } @Bean @ConditionalOnMissingBean(name = "threaddumpLegacyEndpointConverter") public LegacyEndpointConverter threaddumpLegacyEndpointConverter() { return LegacyEndpointConverters.threaddump();...
} @Configuration(proxyBeanMethods = false) protected static class CookieStoreConfiguration { /** * Creates a default {@link PerInstanceCookieStore} that should be used. * @return the cookie store */ @Bean @ConditionalOnMissingBean public PerInstanceCookieStore cookieStore() { return new JdkPerIn...
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\config\AdminServerInstanceWebClientConfiguration.java
2
请完成以下Java代码
protected int getModelId(final I_M_HU_Snapshot modelSnapshot) { return modelSnapshot.getM_HU_ID(); } @Override protected I_M_HU getModel(final I_M_HU_Snapshot modelSnapshot) { return modelSnapshot.getM_HU(); } @Override protected Map<Integer, I_M_HU_Snapshot> retrieveModelSnapshotsByParent(final I_M_HU_It...
final Set<Integer> includedHUIds = retrieveIncludedM_HUIds(huItemIds); huIdsToCheck = new HashSet<>(includedHUIds); huIdsToCheck.removeAll(huIdsCollector); } } private final Set<Integer> retrieveM_HU_Item_Ids(final Set<Integer> huIds) { if (huIds.isEmpty()) { return Collections.emptySet(); } fin...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\snapshot\impl\M_HU_SnapshotHandler.java
1
请完成以下Java代码
public @Nullable String getCause() { return this.cause; } /** * True if a returned message has been received. * @return true if there is a return. * @since 2.2.10 */ public boolean isReturned() { return this.returned; } /** * Indicate that a returned message has been received. * @param isReturned...
*/ public boolean waitForReturnIfNeeded() throws InterruptedException { return !this.returned || this.latch.await(RETURN_CALLBACK_TIMEOUT, TimeUnit.SECONDS); } /** * Count down the returned message latch; call after the listener has been called. * @since 2.2.10 */ public void countDown() { this.latch.cou...
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\connection\PendingConfirm.java
1
请在Spring Boot框架中完成以下Java代码
public String getFundDirection() { return fundDirection; } public void setFundDirection(String fundDirection) { this.fundDirection = fundDirection; } public String getFundDirectionDesc() { return AccountFundDirectionEnum.getEnum(this.getFundDirection()).getLabel(); } ...
} public String getTrxTypeDesc() { return TrxTypeEnum.getEnum(this.getTrxType()).getDesc(); } public Integer getRiskDay() { return riskDay; } public void setRiskDay(Integer riskDay) { this.riskDay = riskDay; } public String getUserNo() { return userNo; ...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\account\entity\RpAccountHistory.java
2
请完成以下Java代码
public class HistoricTaskInstanceQueryProperty implements QueryProperty { private static final long serialVersionUID = 1L; private static final Map<String, HistoricTaskInstanceQueryProperty> properties = new HashMap<>(); public static final HistoricTaskInstanceQueryProperty HISTORIC_TASK_INSTANCE_ID = ne...
private String name; public HistoricTaskInstanceQueryProperty(String name) { this.name = name; properties.put(name, this); } @Override public String getName() { return name; } public static HistoricTaskInstanceQueryProperty findByName(String propertyName) { ret...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\HistoricTaskInstanceQueryProperty.java
1
请完成以下Java代码
public String getSourceTable() { return org.compiere.model.I_M_InOut.Table_Name; } @Override public boolean isUserInChargeUserEditable() { return false; } @Override public void setOrderedData(final I_C_Invoice_Candidate ic) { throw new IllegalStateException("Not supported"); } @Override public void...
{ throw new IllegalStateException("Not supported"); } @Override public PriceAndTax calculatePriceAndTax(final I_C_Invoice_Candidate ic) { throw new UnsupportedOperationException(); } @Override public void setBPartnerData(final I_C_Invoice_Candidate ic) { throw new IllegalStateException("Not supported");...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inout\invoicecandidate\M_InOut_Handler.java
1
请完成以下Java代码
public final boolean requestFocusInWindow() { final CollapsiblePanel findPanelCollapsible = getCollapsiblePanel(); if (findPanelCollapsible.isCollapsed()) { return false; } return findPanel.requestFocusInWindow(); } /** * @return true if it's expanded and the underlying {@link FindPanel} allows focu...
@Override public void propertyChange(final PropertyChangeEvent evt) { runnable.run(); } }); } private static final class CollapsiblePanel extends JXTaskPane implements IUISubClassIDAware { private static final long serialVersionUID = 1L; public CollapsiblePanel() { super(); } @Override...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\FindPanelContainer_Collapsible.java
1
请在Spring Boot框架中完成以下Java代码
public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public String getPayType() { return payType; } public void setPayType(String payType) { this.payType = payType; } public Integer getNumberOfStag...
"payKey='" + payKey + '\'' + ", productName='" + productName + '\'' + ", orderNo='" + orderNo + '\'' + ", orderPrice=" + orderPrice + ", orderIp='" + orderIp + '\'' + ", orderDate='" + orderDate + '\'' + ", orderTime='" + or...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\bo\ScanPayRequestBo.java
2
请完成以下Java代码
private CommissionPoints extractInvoicedCommissionPoints( @NonNull final I_C_Invoice invoiceRecord, @NonNull final I_C_InvoiceLine invoiceLineRecord) { final Money invoicedLineAmount = Money.of(invoiceLineRecord.getLineNetAmt(), CurrencyId.ofRepoId(invoiceRecord.getC_Currency_ID())); final CommissionPoints ...
return CommissionPoints.of(taxAdjustedAmount); } @NonNull private Optional<BPartnerId> getSalesRepId(@NonNull final I_C_Invoice invoiceRecord) { final BPartnerId invoiceSalesRepId = BPartnerId.ofRepoIdOrNull(invoiceRecord.getC_BPartner_SalesRep_ID()); if (invoiceSalesRepId != null) { return Optional.of(i...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\businesslogic\sales\commissiontrigger\salesinvoiceline\SalesInvoiceFactory.java
1
请完成以下Java代码
public void setSuggestedPackingMaterial(final I_M_HU_PackingMaterial suggestedPackingMaterial) { this.suggestedPackingMaterial = suggestedPackingMaterial; } public void setSuggestedItemProduct(final I_M_HU_PI_Item_Product suggestedItemProduct) { this.suggestedItemProduct = suggestedItemProduct; } public I_M...
{ return suggestedPI; } public void setSuggestedPI(final I_M_HU_PI suggestedPI) { this.suggestedPI = suggestedPI; } @Override public int getC_BPartner_Location_ID() { return -1; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\document\impl\PlainHUDocumentLine.java
1
请完成以下Java代码
public java.sql.Timestamp getDate1 () { return (java.sql.Timestamp)get_Value(COLUMNNAME_Date1); } /** Set Enddatum. @param EndDate Last effective date (inclusive) */ @Override public void setEndDate (java.sql.Timestamp EndDate) { set_Value (COLUMNNAME_EndDate, EndDate); } /** Get Enddatum. @ret...
/** Get Repeat. @return Repeat */ @Override public boolean isRepeat () { Object oo = get_Value(COLUMNNAME_IsRepeat); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Name. @param Name Alphanumeric ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_NonBusinessDay.java
1
请完成以下Java代码
private static IStringExpression buildSqlSelect( @NonNull final List<SQLDatasourceFieldDescriptor> fields, @NonNull final String sourceTableName, @Nullable final String sqlFrom, @Nullable final String sqlWhereClause, @Nullable final String sqlGroupAndOrderBy) { Check.assumeNotEmpty(fields, "fields sha...
private static IStringExpression buildSqlDetailsWhereClause( @Nullable final String sqlDetailsWhereClause, @Nullable final String sqlWhereClause) { String sqlDetailsWhereClauseNorm = CoalesceUtil.firstNotEmptyTrimmed( sqlDetailsWhereClause, sqlWhereClause); if (sqlDetailsWhereClauseNorm == null || Ch...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\kpi\descriptor\sql\SQLDatasourceDescriptor.java
1
请在Spring Boot框架中完成以下Java代码
private static PrepareMsg getCommitPrepareMsg(User user, VersionCreateRequest request) { return PrepareMsg.newBuilder().setCommitMsg(request.getVersionName()) .setBranchName(request.getBranch()).setAuthorName(getAuthorName(user)).setAuthorEmail(user.getEmail()).build(); } private static...
vcSettings = entitiesVersionControlService.getVersionControlSettings(tenantId); } if (vcSettings != null) { builder.setVcSettings(ProtoUtils.toProto(vcSettings)); } else if (request.requiresSettings()) { throw new RuntimeException("No entity version control settings provi...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\sync\vc\DefaultGitVersionControlQueueService.java
2
请在Spring Boot框架中完成以下Java代码
public class HttpCodecsProperties { /** * Whether to log form data at DEBUG level, and headers at TRACE level. */ private boolean logRequestDetails; /** * Limit on the number of bytes that can be buffered whenever the input stream needs * to be aggregated. This applies only to the auto-configured WebFlux s...
return this.logRequestDetails; } public void setLogRequestDetails(boolean logRequestDetails) { this.logRequestDetails = logRequestDetails; } public @Nullable DataSize getMaxInMemorySize() { return this.maxInMemorySize; } public void setMaxInMemorySize(@Nullable DataSize maxInMemorySize) { this.maxInMemor...
repos\spring-boot-4.0.1\module\spring-boot-http-codec\src\main\java\org\springframework\boot\http\codec\autoconfigure\HttpCodecsProperties.java
2
请完成以下Java代码
public DataType getDataType() { return DataType.LONG; } @Override public Optional<Long> getLongValue() { return Optional.ofNullable(value); } @Override public Object getValue() { return value; } @Override public boolean equals(Object o) { if (this =...
return Objects.hash(super.hashCode(), value); } @Override public String toString() { return "LongDataEntry{" + "value=" + value + "} " + super.toString(); } @Override public String getValueAsString() { return Long.toString(value); } }
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\kv\LongDataEntry.java
1
请完成以下Java代码
public static TaxCategoryId ofRepoId(final int repoId) { if (repoId == NOT_FOUND.getRepoId()) { return NOT_FOUND; } else { return new TaxCategoryId(repoId); } } public static TaxCategoryId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? ofRepoId(repoId) : null; } public static TaxCate...
} public static int toRepoId(final TaxCategoryId id) { return id != null ? id.getRepoId() : -1; } public static boolean equals(final TaxCategoryId o1, final TaxCategoryId o2) { return Objects.equals(o1, o2); } int repoId; private TaxCategoryId(final int repoId) { this.repoId = Check.assumeGreaterThan...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\tax\api\TaxCategoryId.java
1
请在Spring Boot框架中完成以下Java代码
private void updateChildOrgCode(String newOrgCode, String oldOrgCode) { //查询当前部门下的所有子级部门 LambdaQueryWrapper<SysDepart> query = new LambdaQueryWrapper<>(); query.likeRight(SysDepart::getOrgCode, oldOrgCode); query.orderByAsc(SysDepart::getDepartOrder); query.orderByDesc(SysDepart:...
* @param page * @return */ @Override public IPage<SysUser> getDepartmentHead(String departId, Page<SysUser> page) { List<SysUser> departmentHead = departMapper.getDepartmentHead(page, departId); if(CollectionUtil.isNotEmpty(departmentHead)){ departmentHead.forEach(item->{ ...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\service\impl\SysDepartServiceImpl.java
2
请完成以下Java代码
public Percent getPercent() { assertValueType(IssuingToleranceValueType.PERCENTAGE); return Check.assumeNotNull(percent, "percent not null"); } @NonNull public Quantity getQty() { assertValueType(IssuingToleranceValueType.QUANTITY); return Check.assumeNotNull(qty, "qty not null"); } public ITranslatabl...
final Quantity qty = getQty(); return qtyBase.subtract(qty); } else { // shall not happen throw new AdempiereException("Unknown valueType: " + valueType); } } public IssuingToleranceSpec convertQty(@NonNull final UnaryOperator<Quantity> qtyConverter) { if (valueType == IssuingToleranceValueType.Q...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\IssuingToleranceSpec.java
1
请完成以下Java代码
public abstract class AbstractResourceReader implements ResourceReader { /** * @inheritDoc */ @Override public @NonNull byte[] read(@NonNull Resource resource) { return Optional.ofNullable(resource) .filter(this::isAbleToHandle) .map(this::preProcess) .map(it -> { try (InputStream in = it.getInp...
*/ @SuppressWarnings("unused") protected boolean isAbleToHandle(@Nullable Resource resource) { return resource != null; } /** * Reads data from the target {@link Resource} (intentionally) by using the {@link InputStream} returned by * {@link Resource#getInputStream()}. * * However, other algorithm/strate...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\core\io\AbstractResourceReader.java
1
请完成以下Java代码
protected String encodeNonNullPassword(String rawPassword) { return digest(rawPassword, this.saltGenerator.generateKey()); } @Override protected boolean matchesNonNull(String rawPassword, String encodedPassword) { return decodeAndCheckMatches(rawPassword, encodedPassword); } @Override protected boolean upgr...
int memoryCost = (int) params >> 8 & 0xff; int parallelization = (int) params & 0xff; byte[] generated = SCrypt.generate(Utf8.encode(rawPassword), salt, cpuCost, memoryCost, parallelization, this.keyLength); return MessageDigest.isEqual(derived, generated); } private String digest(CharSequence rawPassword,...
repos\spring-security-main\crypto\src\main\java\org\springframework\security\crypto\scrypt\SCryptPasswordEncoder.java
1
请完成以下Java代码
public int getC_Queue_WorkPackage_Param_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_Queue_WorkPackage_Param_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Process Date. @param P_Date Prozess-Parameter */ @Override public void setP_Date (java.sql.Timestamp P_Date) { s...
{ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_P_Number); if (bd == null) return BigDecimal.ZERO; return bd; } /** Set Process String. @param P_String Prozess-Parameter */ @Override public void setP_String (java.lang.String P_String) { set_Value (COLUMNNAME_P_String, P_String); } /** Ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java-gen\de\metas\async\model\X_C_Queue_WorkPackage_Param.java
1
请完成以下Spring Boot application配置
###########【Kafka集群】########### spring.kafka.bootstrap-servers=9.134.41.114:9092 ###########【初始化生产者配置】########### # 重试次数 spring.kafka.producer.retries=0 # 应答级别:多少个分区副本备份完成时向生产者发送ack确认(可选0、1、all/-1) spring.kafka.producer.acks=1 # 批量大小 spring.kafka.producer.batch-size=16384 # 提交延时 spring.kafka.producer.properti...
test # 消费会话超时时间(超过这个时间consumer没有发送心跳,就会触发rebalance操作) spring.kafka.consumer.properties.session.timeout.ms=120000 # 消费请求超时时间 spring.kafka.consumer.properties.request.timeout.ms=180000 # Kafka提供的序列化和反序列化类 spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer spring.kafka.co...
repos\SpringBootLearning-master\version2.x\spring-kafka-demo\src\main\resources\application.properties
2
请完成以下Java代码
private void updateLogLineDocStatus(@NonNull final TableRecordReference tableRecordReference, @Nullable final DocStatus docStatus) { final ICompositeQueryUpdater<I_C_Doc_Outbound_Log_Line> queryUpdaterLogLine = queryBL.createCompositeQueryUpdater(I_C_Doc_Outbound_Log_Line.class) .addSetColumnValue(I_C_Doc_Outbou...
final Map<Integer, List<I_C_Doc_Outbound_Log_Line>> linesByLogId = queryBL.createQueryBuilder(I_C_Doc_Outbound_Log_Line.class) .addInArrayFilter(I_C_Doc_Outbound_Log_Line.COLUMNNAME_C_Doc_Outbound_Log_ID, ids) .create() .list() .stream() .collect(Collectors.groupingBy(I_C_Doc_Outbound_Log_Line::getC...
repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java\de\metas\document\archive\api\impl\DocOutboundDAO.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable String getAuthoritiesClaimDelimiter() { return this.authoritiesClaimDelimiter; } public void setAuthoritiesClaimDelimiter(@Nullable String authoritiesClaimDelimiter) { this.authoritiesClaimDelimiter = authoritiesClaimDelimiter; } public @Nullable String getAuthoritiesClaimName() { re...
return this.clientId; } public void setClientId(@Nullable String clientId) { this.clientId = clientId; } public @Nullable String getClientSecret() { return this.clientSecret; } public void setClientSecret(@Nullable String clientSecret) { this.clientSecret = clientSecret; } public @Nullable ...
repos\spring-boot-4.0.1\module\spring-boot-security-oauth2-resource-server\src\main\java\org\springframework\boot\security\oauth2\server\resource\autoconfigure\OAuth2ResourceServerProperties.java
2
请完成以下Java代码
public static URL getResource(String name) { return getResource(name, null); } public static URL getResource(String name, ClassLoader classLoader) { if(classLoader == null) { // Try the current Thread context class loader classLoader = Thread.currentThread().getContextClassLoader(); } U...
* Create a new instance of the provided type * * @param type the class to create a new instance of * @param parameters the parameters to pass to the constructor * @return the created instance */ public static <T> T createInstance(Class<T> type, Object... parameters) { // get types for parameters ...
repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\util\ReflectUtil.java
1
请完成以下Java代码
public String getBatchJobDefinitionId() { return batchJobDefinitionId; } public void setBatchJobDefinitionId(String batchJobDefinitionId) { this.batchJobDefinitionId = batchJobDefinitionId; } public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this....
@Override public Date getExecutionStartTime() { return executionStartTime; } public void setExecutionStartTime(final Date executionStartTime) { this.executionStartTime = executionStartTime; } @Override public Object getPersistentState() { Map<String, Object> persistentState = new HashMap<Strin...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\history\HistoricBatchEntity.java
1
请完成以下Java代码
public void setLineNetAmt(final I_C_Invoice_Candidate ic) { final IInvoiceCandidateHandler handler = createInvoiceCandidateHandler(ic); handler.setLineNetAmt(ic); } @Override public void setOrderedData(final I_C_Invoice_Candidate ic) { final IInvoiceCandidateHandler handler = createInvoiceCandidateHandler(i...
@Override public void setInvoiceScheduleAndDateToInvoice(@NonNull final I_C_Invoice_Candidate icRecord) { final IInvoiceCandidateHandler handler = createInvoiceCandidateHandler(icRecord); handler.setInvoiceScheduleAndDateToInvoice(icRecord); } @Override public void setPickedData(final I_C_Invoice_Candidate ic...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceCandidateHandlerBL.java
1
请完成以下Java代码
public void setRemote_Host (String Remote_Host) { set_ValueNoCheck (COLUMNNAME_Remote_Host, Remote_Host); } /** Get Remote Host. @return Remote host Info */ public String getRemote_Host () { return (String)get_Value(COLUMNNAME_Remote_Host); } /** Set Sales Volume in 1.000. @param SalesVolume Tot...
/** Set Start Implementation/Production. @param StartProductionDate The day you started the implementation (if implementing) - or production (went life) with Adempiere */ public void setStartProductionDate (Timestamp StartProductionDate) { set_Value (COLUMNNAME_StartProductionDate, StartProductionDate); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Registration.java
1
请完成以下Java代码
public void createUOMConversion(@NonNull final CreateUOMConversionRequest request) { final BigDecimal fromToMultiplier = request.getFromToMultiplier(); final BigDecimal toFromMultiplier = UOMConversionRate.computeInvertedMultiplier(fromToMultiplier); final I_C_UOM_Conversion record = newInstance(I_C_UOM_Convers...
{ final UomId productStockingUomId = Services.get(IProductBL.class).getStockUOMId(productId); final ImmutableList<UOMConversionRate> rates = Services.get(IQueryBL.class) .createQueryBuilderOutOfTrx(I_C_UOM_Conversion.class) .addEqualsFilter(I_C_UOM_Conversion.COLUMNNAME_M_Product_ID, productId) .addOnl...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\uom\impl\UOMConversionDAO.java
1
请在Spring Boot框架中完成以下Java代码
public class MustacheResourceTemplateLoader implements TemplateLoader, ResourceLoaderAware { private String prefix = ""; private String suffix = ""; private String charSet = "UTF-8"; private ResourceLoader resourceLoader = new DefaultResourceLoader(null); public MustacheResourceTemplateLoader() { } public ...
this.charSet = charSet; } /** * Set the resource loader. * @param resourceLoader the resource loader */ @Override public void setResourceLoader(ResourceLoader resourceLoader) { this.resourceLoader = resourceLoader; } @Override public Reader getTemplate(String name) throws Exception { return new Input...
repos\spring-boot-4.0.1\module\spring-boot-mustache\src\main\java\org\springframework\boot\mustache\autoconfigure\MustacheResourceTemplateLoader.java
2
请完成以下Java代码
public void startDocument() throws SAXException { website = new Baeldung(); } @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { switch (qName) { case ARTICLES: w...
public void setArticleList(List<BaeldungArticle> articleList) { this.articleList = articleList; } public List<BaeldungArticle> getArticleList() { return this.articleList; } } public static class BaeldungArticle { private String title; private Str...
repos\tutorials-master\xml-modules\xml\src\main\java\com\baeldung\sax\SaxParserMain.java
1
请完成以下Java代码
public Wrapper<T> code(int code) { this.setCode(code); return this; } /** * Sets the 信息 ,返回自身的引用. * * @param message * the new 信息 * * @return the wrapper */ public Wrapper<T> message(String message) { this.setMessage(message); ...
* the new 结果数据 * * @return the wrapper */ public Wrapper<T> result(T result) { this.setData(result); return this; } public T getData() { return data; } public void setData(T data) { this.data = data; } }
repos\spring-boot-student-master\spring-boot-student-validated\src\main\java\com\xiaolyuh\wrapper\Wrapper.java
1
请完成以下Java代码
public I_AD_Window getPO_Window() throws RuntimeException { return (I_AD_Window)MTable.get(getCtx(), I_AD_Window.Table_Name) .getPO(getPO_Window_ID(), get_TrxName()); } /** Set PO Window. @param PO_Window_ID Purchase Order Window */ public void setPO_Window_ID (int PO_Window_ID) { if (PO_Window_I...
/** Get Search Type. @return Which kind of search is used (Query or Table) */ public String getSearchType () { return (String)get_Value(COLUMNNAME_SearchType); } /** Set Transaction Code. @param TransactionCode The transaction code represents the search definition */ public void setTransactionCode...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_SearchDefinition.java
1
请完成以下Java代码
public final void closeById(@NonNull final ViewId viewId, @NonNull final ViewCloseAction closeAction) { final PurchaseView view = views.getIfPresent(viewId); if (view == null || !view.isAllowClosingPerUserRequest()) { return; } if (closeAction.isDone()) { onViewClosedByUser(view); } views.inval...
.rowsSupplier(rowsSupplier) .additionalRelatedProcessDescriptors(getAdditionalProcessDescriptors()) .build(); return view; } protected List<RelatedProcessDescriptor> getAdditionalProcessDescriptors() { return ImmutableList.of(); } private final PurchaseRowsSupplier createRowsSupplier( final ViewI...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\sales\purchasePlanning\view\PurchaseViewFactoryTemplate.java
1
请完成以下Java代码
public class Customer implements Serializable { private static final long serialVersionUID = 1L; private long id; private volatile String name; private Address address; public long getId() { return id; } public void setId(long id) { this.id = id; }
public String getName() { return name; } public void setName(String name) { this.name = name; } public Address getAddress() { return address; } public void setAddress(Address address) { this.address = address; } }
repos\tutorials-master\core-java-modules\core-java-serialization\src\main\java\com\baeldung\serialization\Customer.java
1
请在Spring Boot框架中完成以下Java代码
public void setUserSearchBase(String userSearchBase) { this.userSearchBase = userSearchBase; } /** * Returns the configured {@link AuthenticationManager} that can be used to perform * LDAP authentication. * @return the configured {@link AuthenticationManager} */ public final AuthenticationManager createAu...
} private AbstractLdapAuthenticator getAuthenticator() { AbstractLdapAuthenticator authenticator = createDefaultLdapAuthenticator(); if (this.userSearchFilter != null) { authenticator.setUserSearch( new FilterBasedLdapUserSearch(this.userSearchBase, this.userSearchFilter, this.contextSource)); } if (t...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\ldap\AbstractLdapAuthenticationManagerFactory.java
2
请完成以下Java代码
public String toString() { return MoreObjects.toStringHelper(this) .addValue(groupsById) .toString(); } public ImmutableSet<String> getTableNames() { return tableNames; } public boolean containsTableName(final String tableName) { return tableNames.contains(tableName); } public ImmutableTableNa...
return replacingGroup(defaultGroupNew); } public ImmutableTableNamesGroupsIndex replacingGroup(@NonNull final TableNamesGroup groupToAdd) { if (groupsById.isEmpty()) { return new ImmutableTableNamesGroupsIndex(ImmutableList.of(groupToAdd)); } final ArrayList<TableNamesGroup> newGroups = new ArrayList<>(...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\ImmutableTableNamesGroupsIndex.java
1
请完成以下Java代码
public abstract class AbstractCommonEventProcessingCacheListener<K, V> extends CacheListenerAdapter<K, V> { @Override public void afterCreate(EntryEvent<K, V> event) { processEntryEvent(event, EntryEventType.CREATE); } @Override public void afterDestroy(EntryEvent<K, V> event) { processEntryEvent(event, Entr...
processRegionEvent(event, RegionEventType.LIVE); } protected void processRegionEvent(RegionEvent<K, V> event, RegionEventType eventType) { } public enum EntryEventType { CREATE, DESTROY, INVALIDATE, UPDATE; } public enum RegionEventType { CLEAR, CREATE, DESTROY, INVALIDATE, LIVE; } }
repos\spring-boot-data-geode-main\spring-geode-project\apache-geode-extensions\src\main\java\org\springframework\geode\cache\AbstractCommonEventProcessingCacheListener.java
1
请在Spring Boot框架中完成以下Java代码
public void setConsumersPerQueue(Integer consumersPerQueue) { this.consumersPerQueue = consumersPerQueue; } /** * Set the number of messages to receive before acknowledging (success). * A failed message will short-circuit this counter. * @param messagesPerAck the number of messages. * @see #setAckTimeout(L...
super.initializeContainer(instance, endpoint); JavaUtils javaUtils = JavaUtils.INSTANCE.acceptIfNotNull(this.taskScheduler, instance::setTaskScheduler) .acceptIfNotNull(this.monitorInterval, instance::setMonitorInterval) .acceptIfNotNull(this.messagesPerAck, instance::setMessagesPerAck) .acceptIfNotNull(...
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\config\DirectRabbitListenerContainerFactory.java
2
请完成以下Java代码
public static <R> Singleton<R> from(final Supplier<R> original) { return new Singleton<>(original); } /** * <p>from.</p> * * @param original a {@link java.util.function.Function} object * @param arg0 a T object * @param <T> a T class * @param <R> a R class * @return a...
return from(() -> original.apply(arg0Supplier.get())); } /** * <p>fromLazy.</p> * * @param original a {@link java.util.function.BiFunction} object * @param arg0Supplier a {@link java.util.function.Supplier} object * @param arg1Supplier a {@link java.util.function.Supplier} object ...
repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\util\Singleton.java
1
请在Spring Boot框架中完成以下Java代码
public String getData() { return data; } @Override public String getExecutionId() { return executionId; } @Override public String getProcessInstanceId() { return processInstanceId; } @Override public String getProcessDefinitionId() { return processD...
@Override public String getScopeDefinitionId() { return scopeDefinitionId; } @Override public String getSubScopeId() { return subScopeId; } @Override public String getScopeType() { return scopeType; } @Override public String getTenantId() { retur...
repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\persistence\entity\HistoricTaskLogEntryEntityImpl.java
2
请完成以下Java代码
public class User { private Long id; private String firstName; private String lastName; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getFirstName() {
return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } }
repos\tutorials-master\jackson-modules\jackson-core\src\main\java\com\baeldung\jackson\deserialization\jsongeneric\User.java
1
请完成以下Java代码
class Employee { @Id private String id; private String name; @DBRef(lazy = true) // lazy to avoid stackoverflow on load private Manager manager; public Employee() { } public Employee(String id, String name) { this.id = id; this.name = name; } public String getId() { return id; } public void setI...
public String getName() { return name; } public void setName(String name) { this.name = name; } public Manager getManager() { return manager; } public void setManager(Manager manager) { this.manager = manager; } }
repos\spring-data-examples-main\mongodb\linking\src\main\java\example\springdata\mongodb\linking\dbref\Employee.java
1
请完成以下Java代码
public void save(@NonNull final AttachmentEntry attachmentEntry) { attachmentEntryRepository.save(attachmentEntry); } @Value public static class AttachmentEntryQuery { List<String> tagsSetToTrue; List<String> tagsSetToAnyValue; Object referencedRecord; String mimeType; @Builder
private AttachmentEntryQuery( @Singular("tagSetToTrue") final List<String> tagsSetToTrue, @Singular("tagSetToAnyValue") final List<String> tagsSetToAnyValue, @Nullable final String mimeType, @NonNull final Object referencedRecord) { this.referencedRecord = referencedRecord; this.mimeType = mime...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\attachments\AttachmentEntryService.java
1
请在Spring Boot框架中完成以下Java代码
public class ResourceService { private final ResourceRepository resourceRepository; public ResourceService( @NonNull final ResourceRepository resourceRepository) { this.resourceRepository = resourceRepository; } public static ResourceService newInstanceForUnitTesting() { Adempiere.assertUnitTestMode(); ...
// // // ------------------------------------------------------------------------ // // @UtilityClass @Deprecated public static class Legacy { public static String getResourceName(@NonNull final ResourceId resourceId) { final I_S_Resource resourceRecord = ResourceRepository.retrieveRecordById(resourceId)...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\resource\ResourceService.java
2
请完成以下Java代码
public class SpringCacheBasedAclCache implements AclCache { private final Cache cache; private PermissionGrantingStrategy permissionGrantingStrategy; private AclAuthorizationStrategy aclAuthorizationStrategy; public SpringCacheBasedAclCache(Cache cache, PermissionGrantingStrategy permissionGrantingStrategy, ...
public MutableAcl getFromCache(Serializable pk) { Assert.notNull(pk, "Primary key (identifier) required"); return getFromCache((Object) pk); } @Override public void putInCache(MutableAcl acl) { Assert.notNull(acl, "Acl required"); Assert.notNull(acl.getObjectIdentity(), "ObjectIdentity required"); Assert....
repos\spring-security-main\acl\src\main\java\org\springframework\security\acls\domain\SpringCacheBasedAclCache.java
1
请完成以下Java代码
public int getAD_Table_ID() { return get_ValueAsInt(COLUMNNAME_AD_Table_ID); } @Override public void setBinaryData (final @Nullable java.lang.String BinaryData) { set_ValueNoCheck (COLUMNNAME_BinaryData, BinaryData); } @Override public java.lang.String getBinaryData() { return get_ValueAsString(COLUM...
else set_ValueNoCheck (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public void setType (final boolean Type) { set_ValueNoCheck (COLUMNNAME_Type, Type); } @Override public boolean isType() { retu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_AttachmentEntry_ReferencedRecord_v.java
1
请完成以下Java代码
final class UpdateASIAttributeFromModelCommand { @NonNull private final IAttributeSetInstanceAwareFactoryService attributeSetInstanceAwareFactoryService; @NonNull private final IAttributeDAO attributeDAO; @NonNull private final IAttributeSetInstanceBL attributeSetInstanceBL; @NonNull private final AttributeCode at...
return; } final AttributeId attributeId = attributeDAO.retrieveActiveAttributeIdByValueOrNull(attributeCode); if (attributeId == null) { return; } attributeSetInstanceBL.getCreateASI(asiAware); final AttributeSetInstanceId asiId = AttributeSetInstanceId.ofRepoIdOrNull(asiAware.getM_AttributeSetInstan...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\api\impl\UpdateASIAttributeFromModelCommand.java
1
请完成以下Java代码
public void onReverse(final I_M_InOut inout) { if (isMaterialReturn(inout)) { return; } final boolean reversal = true; eventSender.send(createInOutChangedEvent(inout, reversal)); } private InOutChangedEvent createInOutChangedEvent(final I_M_InOut inout, final boolean reversal) { return InOutChanged...
final String movementType = inout.getMovementType(); return Services.get(IInOutBL.class).isReturnMovementType(movementType); } private Set<ProductId> extractProductIds(final I_M_InOut inout) { final IInOutDAO inoutsRepo = Services.get(IInOutDAO.class); return inoutsRepo.retrieveLines(inout) .stream() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\product\stats\interceptor\M_InOut.java
1
请完成以下Java代码
public class CalloutProductCategory extends CalloutEngine { /** * Loop detection of product category tree. * * @param ctx context * @param WindowNo current Window No * @param mTab Grid Tab * @param mField Grid Field * @param value New Value * @return "" or error message */ public String testF...
final int productCategoryParentId = productCategory.getM_Product_Category_Parent_ID(); if (productCategoryParentId <= 0) { return NO_ERROR; } if(productCategory.getM_Product_Category_ID() > 0) { MProductCategory.assertNoLoopInTree(productCategory); } return NO_ERROR; } } // CalloutProductCate...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\CalloutProductCategory.java
1
请完成以下Java代码
public class Author { @Id private String id; @ArangoId private String arangoId; private String name; public Author() { super(); } public Author(String name) { this.name = name; } public String getId() { return id; }
public void setId(String id) { this.id = id; } public String getArangoId() { return arangoId; } public void setArangoId(String arangoId) { this.arangoId = arangoId; } public String getName() { return name; } public void setName(String name) { t...
repos\tutorials-master\persistence-modules\spring-data-arangodb\src\main\java\com\baeldung\arangodb\model\Author.java
1
请完成以下Java代码
private Object toPrimitive(JsonPrimitive jsonValue, JsonDeserializationContext context) { if (jsonValue.isBoolean()) return jsonValue.getAsBoolean(); else if (jsonValue.isString()) return jsonValue.getAsString(); else { BigDecimal bigDec = jsonValue.getAsBigDe...
return val.toBigIntegerExact().longValue(); } catch (ArithmeticException e) { return null; } } private Integer toInteger(BigDecimal val) { try { return val.intValueExact(); } catch (ArithmeticException e) { return null; } } }
repos\tutorials-master\json-modules\gson\src\main\java\com\baeldung\gson\serialization\MapDeserializer.java
1
请在Spring Boot框架中完成以下Java代码
public class Resource { @NonNull ResourceId resourceId; @NonNull String name; @Nullable ManufacturingResourceType manufacturingResourceType; @Nullable WorkplaceId workplaceId; @Nullable Integer externalSystemParentConfigId; boolean isManufacturingResource; public boolean isWorkstation() { return isManufactur...
{ return isManufacturingResource && ManufacturingResourceType.ExternalSystem == manufacturingResourceType; } @NonNull public ResourceQRCode toQrCode() { return ResourceQRCode.builder() .resourceId(resourceId) .resourceType(ManufacturingResourceType.toCodeOrNull(manufacturingResourceType)) .capt...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\Resource.java
2
请在Spring Boot框架中完成以下Java代码
public boolean isRetained(VariableInstanceEntity entity, Object param) { return isRetained(entity, (InternalVariableInstanceQueryImpl) param); } public boolean isRetained(VariableInstanceEntity entity, InternalVariableInstanceQueryImpl param) { if (param.executionId != null && !param.execution...
if (param.id != null && !param.id.equals(entity.getId())) { return false; } if (param.taskIds != null && !param.taskIds.contains(entity.getTaskId())) { return false; } if (param.executionIds != null && !param.executionIds.contains(entity.getExecutionId())) { ...
repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\InternalVariableInstanceQueryImpl.java
2
请完成以下Java代码
public boolean reActivateIt() { log.info(toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) return false; setProcessed(false); setDocAction(DOCACTION_Complete); // After reActivate m...
/** * Unlock Document. * * @return true if success */ @Override public boolean unlockIt() { log.info(toString()); setProcessing(false); return true; } // unlockIt @Override public boolean voidIt() { return false; } @Override public int getC_Currency_ID() { return 0; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\model\MCFlatrateConditions.java
1
请完成以下Java代码
public void beforeFlatrateTermReactivate(final I_C_Flatrate_Term term) { deleteFlatrateTermDataEntriesOnReactivate(term); deleteC_Invoice_Clearing_AllocsOnReactivate(term); deleteInvoiceCandidates(term); } /** * Deletes {@link I_C_Flatrate_DataEntry} records for given term. * * @throws AdempiereExceptio...
/** * When a term is reactivated, its invoice candidate needs to be deleted. * Note that we assume the deletion will fail with a meaningful error message if the invoice candidate has already been invoiced. */ public void deleteInvoiceCandidates(@NonNull final I_C_Flatrate_Term term) { Services.get(IInvoiceCan...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\spi\FallbackFlatrateTermEventListener.java
1
请在Spring Boot框架中完成以下Java代码
public void authorBatchInserts() { Author jn = new Author(); jn.setName("Joana Nimar"); jn.setGenre("History"); jn.setAge(34); Author mj = new Author(); mj.setName("Mark Janel"); mj.setGenre("Anthology"); mj.setAge(23); Author og ...
qy.setAge(51); Author at = new Author(); at.setName("Alicia Tom"); at.setGenre("Anthology"); at.setAge(38); Author kl = new Author(); kl.setName("Katy Loin"); kl.setGenre("Anthology"); kl.setAge(56); List<Author> authors ...
repos\Hibernate-SpringBoot-master\HibernateSpringBootBatchingAndSerial\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
public void setM_Warehouse(org.compiere.model.I_M_Warehouse M_Warehouse) { set_ValueFromPO(COLUMNNAME_M_Warehouse_ID, org.compiere.model.I_M_Warehouse.class, M_Warehouse); } /** Set Lager. @param M_Warehouse_ID Storage Warehouse and Service Point */ @Override public void setM_Warehouse_ID (int M_Warehou...
/** Get Gang. @return X-Dimension, z.B. Gang */ @Override public java.lang.String getX () { return (java.lang.String)get_Value(COLUMNNAME_X); } /** Set Regal. @param X1 Regal */ @Override public void setX1 (java.lang.String X1) { set_Value (COLUMNNAME_X1, X1); } /** Get Regal. @return Regal ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Locator.java
1
请完成以下Java代码
public void setExternalSystem_Outbound_Endpoint_ID (final int ExternalSystem_Outbound_Endpoint_ID) { if (ExternalSystem_Outbound_Endpoint_ID < 1) set_ValueNoCheck (COLUMNNAME_ExternalSystem_Outbound_Endpoint_ID, null); else set_ValueNoCheck (COLUMNNAME_ExternalSystem_Outbound_Endpoint_ID, ExternalSystem_Ou...
public String getSasSignature() { return get_ValueAsString(COLUMNNAME_SasSignature); } /** * Type AD_Reference_ID=542016 * Reference name: ExternalSystem_Outbound_Endpoint_EndpointType */ public static final int TYPE_AD_Reference_ID=542016; /** HTTP = HTTP */ public static final String TYPE_HTTP = "HTT...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Outbound_Endpoint.java
1
请在Spring Boot框架中完成以下Java代码
protected void setRelatedEntities(EntitiesExportCtx<?> ctx, RuleChain ruleChain, RuleChainExportData exportData) { RuleChainMetaData metaData = ruleChainService.loadRuleChainMetaData(ctx.getTenantId(), ruleChain.getId()); Optional.ofNullable(metaData.getNodes()).orElse(Collections.emptyList()) ...
if (ruleChain.getFirstRuleNodeId() != null) { ruleChain.setFirstRuleNodeId(ctx.getExternalId(ruleChain.getFirstRuleNodeId())); } } @Override protected RuleChainExportData newExportData() { return new RuleChainExportData(); } @Override public Set<EntityType> getSuppo...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\sync\ie\exporting\impl\RuleChainExportService.java
2
请完成以下Java代码
public Expression getCollectionExpression() { return collectionExpression; } public void setCollectionExpression(Expression collectionExpression) { this.collectionExpression = collectionExpression; } public String getCollectionVariable() { return collectionVariable; } ...
} public ActivityBehavior getInnerActivityBehavior() { return innerActivityBehavior; } /** * ACT-1339. Calling ActivityEndListeners within an {@link AtomicOperation} so that an executionContext is present. * * @author Aris Tzoumas * @author Joram Barrez */ private stat...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\MultiInstanceActivityBehavior.java
1
请完成以下Java代码
public TypedValue transform(Object value) throws IllegalArgumentException { if (value instanceof Number) { int intValue = transformNumber((Number) value); return Variables.integerValue(intValue); } else if (value instanceof String) { int intValue = transformString((String) value); retur...
} else { throw new IllegalArgumentException(); } } protected boolean isInteger(Number value) { double doubleValue = value.doubleValue(); return doubleValue == (int) doubleValue; } protected int transformString(String value) { return Integer.parseInt(value); } }
repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\type\IntegerDataTypeTransformer.java
1
请完成以下Java代码
public class TreeListenerSupport implements ITreeListener { private final WeakList<ITreeListener> listeners = new WeakList<ITreeListener>(); public void addTreeListener(ITreeListener listener, boolean isWeak) { if (!listeners.contains(listener)) listeners.add(listener, isWeak); } public void removeTreeLis...
@Override public void onNodeDeleted(PO po) { for (ITreeListener listener : listeners) { listener.onNodeDeleted(po); } } @Override public void onParentChanged(int AD_Table_ID, int nodeId, int newParentId, int oldParentId, String trxName) { if (newParentId == oldParentId) return; for (ITreeListener...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\model\tree\TreeListenerSupport.java
1