instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { return bean; } public void setRegistry(ActivitiStateHandlerRegistry registry) { this.registry = registry; } public Object postProcessAfterInitialization(final Object bean, final String b...
ProcessVariable pv = (ProcessVariable) pa; String pvName = pv.value(); vars.put(ctr, pvName); } else if (pa instanceof ProcessVariables) { pvMapIndex = ctr; } else if (pa instanceof ProcessId ) { procIdIndex = ctr; } } } ActivitiStateHandl...
repos\camunda-bpm-platform-master\engine-spring\core\src\main\java\org\camunda\bpm\engine\spring\components\aop\ActivitiStateAnnotationBeanPostProcessor.java
1
请完成以下Java代码
public void log(@NonNull final RabbitMQAuditEntry entry) { try { final I_RabbitMQ_Message_Audit record = InterfaceWrapperHelper.newInstance(I_RabbitMQ_Message_Audit.class); record.setRabbitMQ_QueueName(entry.getQueueName()); record.setDirection(entry.getDirection().getCode()); record.setContent(convert...
} } private String convertContentToString(final @NonNull Object content) { try { return JsonObjectMapperHolder.sharedJsonObjectMapper().writeValueAsString(content); } catch (final JsonProcessingException e) { logger.warn("Failed converting `{}` to JSON. Returning toString().", content, e); return...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\rabbitmq\RabbitMQAuditService.java
1
请在Spring Boot框架中完成以下Java代码
public class UserHateoasController { private final UserRepository userService; // Assume a service layer handles business logic public UserHateoasController(UserRepository userService) { this.userService = userService; } @GetMapping public CollectionModel<User> getAllUsers() { Lis...
public EntityModel<User> getUserById(@PathVariable Integer id) { User user = userService.getUserById(id); user.add(linkTo(methodOn(UserController.class).getUserById(id)).withSelfRel()); user.add(linkTo(methodOn(UserController.class).getAllUsers()).withRel("all-users")); return EntityMode...
repos\tutorials-master\spring-web-modules\spring-boot-rest-2\src\main\java\com\baeldung\hateoasvsswagger\UserHateoasController.java
2
请完成以下Java代码
public void setC_Receivable_Acct (int C_Receivable_Acct) { set_Value (COLUMNNAME_C_Receivable_Acct, Integer.valueOf(C_Receivable_Acct)); } /** Get Customer Receivables. @return Account for Customer Receivables */ public int getC_Receivable_Acct () { Integer ii = (Integer)get_Value(COLUMNNAME_C_Receivabl...
/** Set Receivable Services. @param C_Receivable_Services_Acct Customer Accounts Receivables Services Account */ public void setC_Receivable_Services_Acct (int C_Receivable_Services_Acct) { set_Value (COLUMNNAME_C_Receivable_Services_Acct, Integer.valueOf(C_Receivable_Services_Acct)); } /** Get Receivabl...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BP_Customer_Acct.java
1
请完成以下Java代码
public void setCreationTime(Long creationTime) { this.creationTime = creationTime; } public String getCreatorId() { return this.creatorId; } public void setCreatorId(String creatorId) { this.creatorId = creatorId; } public String getCreator() { return this.crea...
return this.mode; } public void setMode(GameMode mode) { this.mode = mode; } public int getMaxPlayers() { return this.maxPlayers; } public void setMaxPlayers(int maxPlayers) { this.maxPlayers = maxPlayers; } public List<PlayerDTO> getPlayers() { return...
repos\tutorials-master\libraries-data\src\main\java\com\baeldung\modelmapper\dto\GameDTO.java
1
请在Spring Boot框架中完成以下Java代码
public ApplicationRunner init() { return args -> { System.out.println("\n\nFetch Author as Streamable:"); bookstoreService.fetchAuthorsAsStreamable(); System.out.println("\n\nFetch Author DTO as Streamable:"); bookstoreService.fetchAuthorsDtoAsStreamable(); ...
System.out.println("\n\nDO THIS! Fetch only the needed columns:"); bookstoreService.fetchAuthorsNames2(); System.out.println("\n\nDON'T DO THIS! Fetch more rows than needed just to throw away a part of it:"); bookstoreService.fetchAuthorsOlderThanAge1(); Sys...
repos\Hibernate-SpringBoot-master\HibernateSpringBootStreamable\src\main\java\com\bookstore\MainApplication.java
2
请完成以下Java代码
public CostAmount multiply(@NonNull final Quantity quantity) { if (!UomId.equals(uomId, quantity.getUomId())) { throw new AdempiereException("UOM does not match: " + this + ", " + quantity); } return toCostAmount().multiply(quantity); } public CostAmount multiply( @NonNull final Duration duration, ...
public CostPrice convertAmounts( @NonNull final UomId toUomId, @NonNull final UnaryOperator<CostAmount> converter) { if (UomId.equals(this.uomId, toUomId)) { return this; } return toBuilder() .uomId(toUomId) .ownCostPrice(converter.apply(getOwnCostPrice())) .componentsCostPrice(converter....
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\CostPrice.java
1
请完成以下Java代码
public java.lang.String getValue () { return (java.lang.String)get_Value(COLUMNNAME_Value); } /** Set Windows Archive Path. @param WindowsArchivePath Windows Archive Path */ @Override public void setWindowsArchivePath (java.lang.String WindowsArchivePath) { set_Value (COLUMNNAME_WindowsArchivePath, Wind...
} /** Set Windows Attachment Path. @param WindowsAttachmentPath Windows Attachment Path */ @Override public void setWindowsAttachmentPath (java.lang.String WindowsAttachmentPath) { set_Value (COLUMNNAME_WindowsAttachmentPath, WindowsAttachmentPath); } /** Get Windows Attachment Path. @return Windows Att...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Client.java
1
请完成以下Java代码
public static String extractDomainSocketAddressPath(final String address) { if (!address.startsWith(DOMAIN_SOCKET_ADDRESS_PREFIX)) { throw new IllegalArgumentException(address + " is not a valid domain socket address."); } String path = address.substring(DOMAIN_SOCKET_ADDRESS_PREFIX....
public static String extractServiceName(final MethodDescriptor<?, ?> method) { return MethodDescriptor.extractFullServiceName(method.getFullMethodName()); } /** * Extracts the method name from the given method. * * @param method The method to get the method name from. * @return The ...
repos\grpc-spring-master\grpc-common-spring-boot\src\main\java\net\devh\boot\grpc\common\util\GrpcUtils.java
1
请完成以下Java代码
class DBVersionSetter { private static final transient Logger logger = LoggerFactory.getLogger(DBVersionSetter.class); @NonNull private final IDatabase db; @NonNull private final String newVersion; @NonNull private final String additionalMetaDataSuffix; public void setVersion() { final String versionStr ...
} @VisibleForTesting static String createVersionWithOptionalSuffix( @NonNull final String versionStr, final String suffix) { final Version version; if (suffix == null || "".equals(suffix) || versionStr.endsWith(suffix)) { // there is no suffix, or the same suffix was already added earlier when a migr...
repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.cli\src\main\java\de\metas\migration\cli\rollout_migrate\DBVersionSetter.java
1
请完成以下Java代码
public List<UserAuthentication> getAuthentications() { return new ArrayList<>(authentications.values()); } /** * Allows checking whether a user is currently authenticated for a given process engine name. * * @param engineName the name of the process engine for which we want to check for authentication...
* clears the {@link Authentications} for the current thread. */ public static void clearCurrent() { currentAuthentications.remove(); } /** * Returns the authentications for the current thread. * * @return the authentications. */ public static Authentications getCurrent() { return current...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\security\auth\Authentications.java
1
请在Spring Boot框架中完成以下Java代码
private UserEntity buildUserEntity(RegisterReq registerReq) { UserEntity userEntity = new UserEntity(); userEntity.setId(generateKey()); userEntity.setUsername(registerReq.getUsername()); userEntity.setPassword(registerReq.getPassword()); userEntity.setLicencePic(registerReq.getL...
throw new CommonBizException(ExpCodeEnum.LICENCE_NULL); } // 企业名称不能为空 if (StringUtils.isEmpty(registerReq.getUsername())) { throw new CommonBizException(ExpCodeEnum.COMPANYNAME_NULL); } } } /** * 参数校验 * @param loginReq */ ...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-User\src\main\java\com\gaoxi\user\service\UserServiceImpl.java
2
请完成以下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); } /** Set Suchschlüssel. @param Value Suchschlü...
*/ @Override public void setValue (java.lang.String Value) { set_Value (COLUMNNAME_Value, Value); } /** Get Suchschlüssel. @return Suchschlüssel für den Eintrag im erforderlichen Format - muss eindeutig sein */ @Override public java.lang.String getValue () { return (java.lang.String)get_Value(COLU...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\process\rpl\requesthandler\model\X_IMP_RequestHandler.java
1
请完成以下Java代码
public void addTraceEventForDelete(@NonNull final I_M_ShipmentSchedule_QtyPicked shipmentScheduleQtyPicked) { huTraceEventsService.createAndAddFor(shipmentScheduleQtyPicked); } private static class DeferredProcessor { private final HUTraceEventsService huTraceEventsService; private final AtomicBoolean proce...
if (processed.get()) { throw new AdempiereException("already processed: " + this); } this.records.put(record.getM_ShipmentSchedule_QtyPicked_ID(), record); } public void processNow() { final boolean alreadyProcessed = processed.getAndSet(true); if (alreadyProcessed) { throw new Adempie...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\trace\interceptor\M_ShipmentSchedule_QtyPicked.java
1
请完成以下Java代码
public void exportDict(HttpServletResponse response, DictQueryCriteria criteria) throws IOException { dictService.download(dictService.queryAll(criteria), response); } @ApiOperation("查询字典") @GetMapping(value = "/all") @PreAuthorize("@el.check('dict:list')") public ResponseEntity<List<DictDt...
@ApiOperation("修改字典") @PutMapping @PreAuthorize("@el.check('dict:edit')") public ResponseEntity<Object> updateDict(@Validated(Dict.Update.class) @RequestBody Dict resources){ dictService.update(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @Log("删除字典") @ApiOp...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\rest\DictController.java
1
请完成以下Java代码
public ProcessDefinitionEntity execute(CommandContext commandContext) { ensureOnlyOneNotNull("either process definition id or key must be set", processDefinitionId, processDefinitionKey); ProcessDefinitionEntity processDefinition = find(commandContext); if (checkReadPermission) { for(CommandChecker...
protected ProcessDefinitionEntity findById(DeploymentCache deploymentCache, String processDefinitionId) { return deploymentCache.findDeployedProcessDefinitionById(processDefinitionId); } protected ProcessDefinitionEntity findByKey(DeploymentCache deploymentCache, String processDefinitionKey) { if (isTenant...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\GetDeployedProcessDefinitionCmd.java
1
请完成以下Java代码
public EventDefinitionEntity findEventDefinitionByKeyAndVersion(String eventDefinitionKey, Integer eventVersion) { Map<String, Object> params = new HashMap<>(); params.put("eventDefinitionKey", eventDefinitionKey); params.put("eventVersion", eventVersion); List<EventDefinitionEntity> res...
} @Override @SuppressWarnings("unchecked") public List<EventDefinition> findEventDefinitionsByNativeQuery(Map<String, Object> parameterMap) { return getDbSqlSession().selectListWithRawParameter("selectEventDefinitionByNativeQuery", parameterMap); } @Override public long findEventDefini...
repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\persistence\entity\data\impl\MybatisEventDefinitionDataManager.java
1
请完成以下Java代码
public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDirector() { return director; } public void setDirector(String director) { this.director = director; } public String getRating() {
return rating; } public void setRating(String rating) { this.rating = rating; } public int getDuration() { return duration; } public void setDuration(int duration) { this.duration = duration; } }
repos\tutorials-master\persistence-modules\spring-data-jpa-repo\src\main\java\com\baeldung\spring\data\persistence\like\model\Movie.java
1
请完成以下Java代码
private void createUpdateProcessParam(final I_AD_Process process, I_AD_Process_Para processParamModel, final ProcessClassParamInfo paramInfo) { final boolean isNew; if (processParamModel == null) { isNew = true; processParamModel = InterfaceWrapperHelper.newInstance(I_AD_Process_Para.class, process); p...
return DisplayType.String; } else if (boolean.class.equals(type) || Boolean.class.equals(type)) { return DisplayType.String; } else { throw new AdempiereException("Cannot determine DisplayType for " + paramInfo); } } private static int getFieldLengthByDisplayType(final int displayType) { if (D...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\processtools\AD_Process_Para_UpdateFromAnnotations.java
1
请完成以下Java代码
public class MXIFAJournal extends X_I_FAJournal { /** * */ private static final long serialVersionUID = -3922040740843729868L; public MXIFAJournal(Properties ctx, int I_FAJournal_ID, String trxName) { super(ctx, I_FAJournal_ID, trxName); if (I_FAJournal_ID == 0) { // setIsDepreciated (false); // setI...
super(ctx, rs, trxName); } // MAsset public BigDecimal getExpenseDr() { BigDecimal bd = getAmtAcctDr(); return bd; } public BigDecimal getExpenseCr() { BigDecimal bd = getAmtAcctCr(); return bd; } public BigDecimal getAmtAcctTotal() { BigDecimal dr = getAmtAcctDr(); BigDecimal cr = getAmtAcctCr(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MXIFAJournal.java
1
请完成以下Java代码
public class ReminderType { @XmlAttribute(name = "request_timestamp", required = true) @XmlSchemaType(name = "unsignedLong") protected BigInteger requestTimestamp; @XmlAttribute(name = "request_date", required = true) @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar requestDate;...
* Gets the value of the requestId property. * * @return * possible object is * {@link String } * */ public String getRequestId() { return requestId; } /** * Sets the value of the requestId property. * * @param value * allowed obje...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_response\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\response\ReminderType.java
1
请完成以下Java代码
private HUPackingMaterialsCollector getCreatePackingMaterialsCollectorForInventory(final IHUContext huContext, final int inventoryId) { return packingMaterialsCollectorByInventoryId.computeIfAbsent(inventoryId, k -> { final HUPackingMaterialsCollector c = new HUPackingMaterialsCollector(huContext); c.setSeenM_...
@Builder private static class InventoryLineCandidate { @NonNull ZonedDateTime movementDate; @NonNull HuId topLevelHUId; @NonNull ProductId productId; @NonNull Quantity qty; @Nullable I_M_InOutLine receiptLine; @Nullable String poReference; @Nullable public InOutLineId getInOutLineId() { retu...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\internaluse\InventoryAllocationDestination.java
1
请完成以下Java代码
private HUEditorView createPackingHUsView(@NonNull final PackingHUsViewKey key) { return createPackingHUsView(key, null); } private HUEditorView createPackingHUsView( @NonNull final PackingHUsViewKey key, @Nullable final JSONFilterViewRequest additionalFilters) { final IHUQueryBuilder huQuery = createHUQ...
.processId(adProcessDAO.retrieveProcessIdByClass(processClass)) .anyTable().anyWindow() .displayPlace(DisplayPlace.ViewQuickActions) .build(); } private IHUQueryBuilder createHUQuery(final PackingHUsViewKey key) { final IHUQueryBuilder huQuery = Services.get(IHandlingUnitsDAO.class) .createHUQuery...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingslotsClearing\PackingHUsViewFactory.java
1
请完成以下Java代码
public static GroupEntityManager getGroupEntityManager(CommandContext commandContext) { return getIdmEngineConfiguration(commandContext).getGroupEntityManager(); } public static MembershipEntityManager getMembershipEntityManager() { return getMembershipEntityManager(getCommandContext()); ...
public static TokenEntityManager getTokenEntityManager() { return getTokenEntityManager(getCommandContext()); } public static TokenEntityManager getTokenEntityManager(CommandContext commandContext) { return getIdmEngineConfiguration(commandContext).getTokenEntityManager(); } pu...
repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\util\CommandContextUtil.java
1
请完成以下Java代码
public class Profile { @Embedded private UserName userName; @Column(name = "bio") private String bio; @Embedded private Image image; @Transient private boolean following; public Profile(UserName userName) { this(userName, null, null, false); } private Profile(Us...
return following; } Profile withFollowing(boolean following) { this.following = following; return this; } void changeUserName(UserName userName) { this.userName = userName; } void changeBio(String bio) { this.bio = bio; } void changeImage(Image image) { ...
repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\domain\user\Profile.java
1
请完成以下Java代码
public String getType() { return activit5Comment.getType(); } @Override public String getFullMessage() { return activit5Comment.getFullMessage(); } public org.activiti.engine.task.Comment getRawObject() { return activit5Comment; } @Override public void setUserI...
@Override public void setProcessInstanceId(String processInstanceId) { ((CommentEntity) activit5Comment).setProcessInstanceId(processInstanceId); } @Override public void setType(String type) { ((CommentEntity) activit5Comment).setType(type); } @Override public void setFullM...
repos\flowable-engine-main\modules\flowable5-compatibility\src\main\java\org\flowable\compatibility\wrapper\Flowable5CommentWrapper.java
1
请在Spring Boot框架中完成以下Java代码
private PickingJob executeInTrx() { // Make sure that provided picking slot exist in our system final PickingSlotIdAndCaption newPickingSlot = Optional.ofNullable(pickingSlotQRCode) .map(pickingSlotService::getPickingSlotIdAndCaption) .orElseGet(() -> pickingSlotService.getPickingSlotIdAndCaption(pickingSl...
{ throw new AdempiereException(TranslatableStrings.builder() .append("Failed allocating picking slot ").append(newPickingSlot.getCaption()).append(" because ") .append(allocated.getReason()) .build()); } else if (allocated.isTrue()) { final PickingJob pickingJob = initialPickingJob.withPickin...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\service\commands\PickingJobAllocatePickingSlotCommand.java
2
请完成以下Java代码
public void updateBundle(String name, SslBundle updatedBundle) { getRegistered(name).update(updatedBundle); } @Override public SslBundle getBundle(String name) { return getRegistered(name).getBundle(); } @Override public void addBundleUpdateHandler(String name, Consumer<SslBundle> updateHandler) throws NoSu...
} void update(SslBundle updatedBundle) { Assert.notNull(updatedBundle, "'updatedBundle' must not be null"); this.bundle = updatedBundle; if (this.updateHandlers.isEmpty()) { logger.warn(LogMessage.format( "SSL bundle '%s' has been updated but may be in use by a technology that doesn't support SSL ...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\ssl\DefaultSslBundleRegistry.java
1
请在Spring Boot框架中完成以下Java代码
VariableElement getField() { return this.field; } @Override protected boolean isMarkedAsNested(MetadataGenerationEnvironment environment) { return environment.getNestedConfigurationPropertyAnnotation(getField()) != null; } @Override protected String resolveDescription(MetadataGenerationEnvironment environme...
/** * Determine if the current {@link #getField() field} defines a public accessor using * lombok annotations. * @param env the {@link MetadataGenerationEnvironment} * @param getter {@code true} to look for the read accessor, {@code false} for the * write accessor * @return {@code true} if this field has a ...
repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\LombokPropertyDescriptor.java
2
请完成以下Spring Boot application配置
spring: application: name: demo-consumer cloud: # Nacos 作为注册中心的配置项 nacos: discovery: server-addr: 127.0.0.1:8848 # Zipkin 配置项,对应 ZipkinProperties 类 zipkin: base-url: http://127.0.0.1:9411 # Zipkin 服务的地址 # Dubbo 配置项,对应 DubboConfigurationProperties 类 dubbo: # Dubbo 服务注册中心配置,对应 Re...
ConsumerConfig 类 consumer: filter: tracing # Spring Cloud Alibaba Dubbo 专属配置项,对应 DubboCloudProperties 类 cloud: subscribed-services: demo-provider # 设置订阅的应用列表,默认为 * 订阅所有应用。
repos\SpringBoot-Labs-master\labx-13\labx-13-sc-sleuth-dubbo\labx-13-sc-sleuth-dubbo-consumer\src\main\resources\application.yaml
2
请完成以下Java代码
public class PayConfigUtil { private static final Log LOG = LogFactory.getLog(PayConfigUtil.class); /** * 通过静态代码块读取上传文件的验证格式配置文件,静态代码块只执行一次(单例) */ private static Properties properties = new Properties(); private PayConfigUtil() { } // 通过类装载器装载进来 static { try { ...
properties.load(PayConfigUtil.class.getClassLoader() .getResourceAsStream("pay_config.properties")); } catch (IOException e) { LOG.error(e); } } /** * 函数功能说明 :读取配置项 Administrator 2012-12-14 修改者名字 : 修改日期 : 修改内容 : * * @参数: * @return void * ...
repos\roncoo-pay-master\roncoo-pay-web-sample-shop\src\main\java\com\roncoo\pay\utils\PayConfigUtil.java
1
请完成以下Java代码
public ProcessPreconditionsResolution checkPreconditionsApplicable(final @NonNull IProcessPreconditionsContext context) { final SelectionSize selectionSize = context.getSelectionSize(); if (selectionSize.isNoSelection()) { return ProcessPreconditionsResolution.rejectBecauseNoSelection(); } return Process...
.createQueryBuilder(I_C_Doc_Outbound_Log.class) .addOnlyActiveRecordsFilter() .filter(filter) .create() .iterateAndStream(); return stream.iterator(); } protected I_C_Doc_Outbound_Log_Line retrieveDocumentLogLine(final I_C_Doc_Outbound_Log log) { final I_C_Doc_Outbound_Log_Line logLine = docOut...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\process\C_Doc_Outbound_Log_PrintSelected.java
1
请完成以下Java代码
public static List<Pinyin> convert(String tonePinyinText, boolean removeNull) { List<Pinyin> pinyinList = new LinkedList<Pinyin>(); Collection<Token> tokenize = trie.tokenize(tonePinyinText); for (Token token : tokenize) { Pinyin pinyin = mapKey.get(token.getFragment()); ...
public static boolean valid(String[] pinyinStringArray) { for (String p : pinyinStringArray) { if (!valid(p)) return false; } return true; } public static List<Pinyin> convertFromToneNumber(String[] pinyinArray) { List<Pinyin> pinyinList = new ArrayL...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dictionary\py\TonePinyinString2PinyinConverter.java
1
请完成以下Java代码
private static ProductTaxCategory ofRecord(@NonNull final I_M_Product_TaxCategory productTaxCategory) { return ProductTaxCategory.builder() .productTaxCategoryId(ProductTaxCategoryId.ofRepoId(productTaxCategory.getM_Product_TaxCategory_ID())) .productId(ProductId.ofRepoId(productTaxCategory.getM_Product_ID()...
.appendParametersToMessage() .setParameter("ProductTaxCategoryId", productTaxCategory.getProductTaxCategoryId())); record.setValidFrom(TimeUtil.asTimestamp(productTaxCategory.getValidFrom())); record.setC_Country_ID(CountryId.toRepoId(productTaxCategory.getCountryId())); record.setM_Product_ID(ProductId....
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\tax\ProductTaxCategoryRepository.java
1
请在Spring Boot框架中完成以下Java代码
class UserUpdater { private final UserRepository userRepository; private final PasswordService passwordService; public Mono<User> updateUser(UpdateUserRequest request, User user) { ofNullable(request.getBio()) .ifPresent(user::setBio); ofNullable(request.getImage()) ...
if (existsByUsername) { throw usernameAlreadyInUseException(); } user.setUsername(request.getUsername()); } private Mono<?> updateEmail(UpdateUserRequest request, User user) { if (request.getEmail() == null) { return Mono.empty(); } if (request.ge...
repos\realworld-spring-webflux-master\src\main\java\com\realworld\springmongo\user\UserUpdater.java
2
请在Spring Boot框架中完成以下Java代码
public CommissionTrigger createForDocument( @NonNull final CommissionTriggerDocument commissionTriggerDocument, final boolean documentDeleted) { final CommissionTriggerData triggerData = createForRequest(commissionTriggerDocument, documentDeleted); final Customer customer = Customer.of(commissionTriggerDocu...
.totalQtyInvolved(commissionTriggerDocument.getTotalQtyInvolved()) .documentCurrencyId(commissionTriggerDocument.getDocumentCurrencyId()); if (documentDeleted) { builder .forecastedBasePoints(CommissionPoints.ZERO) .invoiceableBasePoints(CommissionPoints.ZERO) .invoicedBasePoints(CommissionPo...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\services\CommissionTriggerFactory.java
2
请完成以下Java代码
public java.math.BigDecimal getPrice () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Price); if (bd == null) return BigDecimal.ZERO; return bd; } /** Set Zusagbar. @param QtyPromised Zusagbar */ @Override public void setQtyPromised (java.math.BigDecimal QtyPromised) { set_Value (COLUMNNAME...
set_Value (COLUMNNAME_Ranking, Integer.valueOf(Ranking)); } /** Get Ranking. @return Relative Rank Number */ @Override public int getRanking () { Integer ii = (Integer)get_Value(COLUMNNAME_Ranking); if (ii == null) return 0; return ii.intValue(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java-gen\de\metas\rfq\model\X_C_RfQResponseLineQty.java
1
请完成以下Java代码
public static Optional<TaxId> optionalOfRepoId(final int repoId) { return Optional.ofNullable(ofRepoIdOrNull(repoId)); } public static int toRepoId(@Nullable final TaxId id) { return id != null ? id.getRepoId() : -1; } @SuppressWarnings("OptionalUsedAsFieldOrParameterType") public static int toRepoId(@Null...
private TaxId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "C_Tax_ID"); } @Override @JsonValue public int getRepoId() { return repoId; } public boolean isNoTaxId() { return repoId == Tax.C_TAX_ID_NO_TAX_FOUND; } public static boolean equals(@Nullable TaxId id1, @Nullable Tax...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\tax\api\TaxId.java
1
请完成以下Java代码
public boolean isProcessed () { Object oo = get_Value(COLUMNNAME_Processed); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } @Override public org.compiere.model.I_M_PriceList getUVP_Price_List() throws RuntimeExcep...
return ii.intValue(); } @Override public org.compiere.model.I_M_PriceList getZBV_Price_List() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_ZBV_Price_List_ID, org.compiere.model.I_M_PriceList.class); } @Override public void setZBV_Price_List(org.compiere.model.I_M_PriceList ZBV_Price_List) { s...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma\src\main\java-gen\de\metas\vertical\pharma\model\X_I_Pharma_Product.java
1
请完成以下Java代码
public void setFunctionColumn (String FunctionColumn) { set_Value (COLUMNNAME_FunctionColumn, FunctionColumn); } /** Get Function Column. @return Overwrite Column with Function */ public String getFunctionColumn () { return (String)get_Value(COLUMNNAME_FunctionColumn); } /** Set SQL Group Function. ...
/** Get SQL Group Function. @return This function will generate a Group By Clause */ public boolean isGroupFunction () { Object oo = get_Value(COLUMNNAME_IsGroupFunction); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return f...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ReportView_Col.java
1
请完成以下Java代码
public static String getStrFormTime(String form, Date date) { SimpleDateFormat sdf = new SimpleDateFormat(form); return sdf.format(date); } /** * 获取几天内日期 return 2014-5-4、2014-5-3 */ public static List<String> getLastDays(int countDay) { List<String> listDate = new ArrayList<String>(); for (int i = 0; i ...
e.printStackTrace(); } return value; } public static boolean isSameDayWithToday(Date date) { if (date == null) { return false; } Calendar todayCal = Calendar.getInstance(); Calendar dateCal = Calendar.getInstance(); todayCal.setTime(new Date()); dateCal.setTime(date); int subYear = todayCa...
repos\roncoo-pay-master\roncoo-pay-common-core\src\main\java\com\roncoo\pay\common\core\utils\DateUtils.java
1
请完成以下Java代码
public void setC_RevenueRecognition_Plan_ID (int C_RevenueRecognition_Plan_ID) { if (C_RevenueRecognition_Plan_ID < 1) set_ValueNoCheck (COLUMNNAME_C_RevenueRecognition_Plan_ID, null); else set_ValueNoCheck (COLUMNNAME_C_RevenueRecognition_Plan_ID, Integer.valueOf(C_RevenueRecognition_Plan_ID)); } /** G...
/** Get Total Amount. @return Total Amount */ public BigDecimal getTotalAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalAmt); if (bd == null) return Env.ZERO; return bd; } public I_C_ValidCombination getUnEarnedRevenue_A() throws RuntimeException { return (I_C_ValidCombination)...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_RevenueRecognition_Plan.java
1
请完成以下Java代码
protected String doIt() throws Exception { final IQueryBL queryBL = Services.get(IQueryBL.class); final IDLMService dlmService = Services.get(IDLMService.class); final ITrxManager trxManager = Services.get(ITrxManager.class); final List<I_DLM_Partition_Config_Line> configLinesDB = queryBL.createQueryBuilder(I...
{ dlmService.addTableToDLM(dlm_Referencing_Table); } }); } return MSG_OK; } @Override public Object getParameterDefaultValue(final IProcessDefaultParameter parameter) { final int configId = parameter.getContextAsInt(I_DLM_Partition_Config.COLUMNNAME_DLM_Partition_Config_ID); if (configId > 0) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\process\Add_Tables_to_DLM.java
1
请完成以下Java代码
public Integer getNormalOrderOvertime() { return normalOrderOvertime; } public void setNormalOrderOvertime(Integer normalOrderOvertime) { this.normalOrderOvertime = normalOrderOvertime; } public Integer getConfirmOvertime() { return confirmOvertime; } public void setCo...
StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", flashOrderOvertime=").append(flashOrderOvertime); sb.append(", normalOrderOvertime=").appen...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\OmsOrderSetting.java
1
请在Spring Boot框架中完成以下Java代码
public void registerDeleted(EntityType entityType) { EntityTypeLoadResult result = results.computeIfAbsent(entityType, EntityTypeLoadResult::new); result.setDeleted(result.getDeleted() + 1); } public void addRelations(Collection<EntityRelation> values) { relations.addAll(values); } ...
public void addEventCallback(ThrowingRunnable tr) { if (tr != null) { eventCallbacks.add(tr); } } public void registerNotFound(EntityId externalId) { notFoundIds.add(externalId); } public boolean isNotFound(EntityId externalId) { return notFoundIds.contains(...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\sync\vc\data\EntitiesImportCtx.java
2
请完成以下Java代码
public Builder setC_Order_ID(final int C_Order_ID) { this.C_Order_ID = C_Order_ID; return this; } public Builder setDocumentNo(final String documentNo) { this.documentNo = documentNo; return this; } public Builder setDocTypeName(final String docTypeName) { this.docTypeName = docTypeName; ...
public Builder setOpenAmtConv(final BigDecimal openAmtConv) { this.openAmtConv = openAmtConv; return this; } public Builder setDiscount(final BigDecimal discount) { this.discount = discount; return this; } public Builder setPaymentRequestAmt(final BigDecimal paymentRequestAmt) { Check.ass...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.swingui\src\main\java\de\metas\banking\payment\paymentallocation\model\InvoiceRow.java
1
请完成以下Java代码
public class MultipartFileUploadClient { public static void main(String[] args) throws IOException { uploadSingleFile(); uploadMultipleFile(); } private static void uploadSingleFile() throws IOException { HttpHeaders headers = new HttpHeaders(); headers.setContentType(Media...
body.add("files", getTestFile()); HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(body, headers); String serverUrl = "http://localhost:8080/spring-rest/fileserver/multiplefileupload/"; RestTemplate restTemplate = new RestTemplate(); ResponseEntity<String> resp...
repos\tutorials-master\spring-web-modules\spring-resttemplate-1\src\main\java\com\baeldung\resttemplate\web\upload\client\MultipartFileUploadClient.java
1
请完成以下Java代码
public String getExecutionId() { return executionId; } public void setExecutionId(String executionId) { this.executionId = executionId; } public String getProcessDefinitionId() { return processDefinitionId; } public void setProcessDefinitionId(String processDefinitionI...
return getClass() + " - " + type; } public String getReason() { return reason; } public void setReason(String reason) { this.reason = reason; } public String getActor() { return actor; } public void setActor(String actor) { this.actor = actor; } }
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\delegate\event\impl\ActivitiEventImpl.java
1
请完成以下Java代码
public class Application { private final String name; private final String managementUrl; private final String healthUrl; private final String serviceUrl; private final Map<String, String> metadata; @lombok.Builder(builderClassName = "Builder") protected Application(String name, String managementUrl, Strin...
public static Builder create(String name) { return Application.builder().name(name); } public Map<String, String> getMetadata() { return Collections.unmodifiableMap(metadata); } public static class Builder { // Will be generated by lombok } }
repos\spring-boot-admin-master\spring-boot-admin-client\src\main\java\de\codecentric\boot\admin\client\registration\Application.java
1
请完成以下Java代码
public IAttributeValuesProvider getAttributeValuesProvider() { throw new InvalidAttributeValueException("method not supported for " + this); } @Override public I_C_UOM getC_UOM() { return null; } @Override public IAttributeValueCallout getAttributeValueCallout() { return NullAttributeValueCallout.insta...
{ return false; } @Override public int getDisplaySeqNo() { return 0; } @Override public NamePair getNullAttributeValue() { return null; } /** * @return true; we consider Null attributes as always generated */ @Override public boolean isNew() { return true; } @Override public boolean isOn...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\impl\NullAttributeValue.java
1
请在Spring Boot框架中完成以下Java代码
public void setPOSPaymentProcessingStatus (final java.lang.String POSPaymentProcessingStatus) { set_Value (COLUMNNAME_POSPaymentProcessingStatus, POSPaymentProcessingStatus); } @Override public java.lang.String getPOSPaymentProcessingStatus() { return get_ValueAsString(COLUMNNAME_POSPaymentProcessingStatus);...
set_Value (COLUMNNAME_POSPaymentProcessor, POSPaymentProcessor); } @Override public java.lang.String getPOSPaymentProcessor() { return get_ValueAsString(COLUMNNAME_POSPaymentProcessor); } @Override public void setSUMUP_Config_ID (final int SUMUP_Config_ID) { if (SUMUP_Config_ID < 1) set_Value (COLUMN...
repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java-gen\de\metas\pos\repository\model\X_C_POS_Payment.java
2
请在Spring Boot框架中完成以下Java代码
public void setXProperties(final Map<String, Object> xCutsProperties, final JRPrintElement element) { super.setXProperties(xCutsProperties, element); } /** * First calls the parent's {@link JRXlsExporterNature#setXProperties(CutsInfo, JRPrintElement, int, int, int, int) setXProperties} method.<br> * Then, "fo...
* * @return <code>true</code> if the element was annotated to require a hidden column */ private boolean isColumnHidden(final JRPrintElement element) { if (element.hasProperties() && element.getPropertiesMap().containsProperty(MetasJRXlsExporter.PROPERTY_COLUMN_HIDDEN)) { final boolean defaultValue = f...
repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\jasper\exporter\MetasJRXlsExporterNature.java
2
请完成以下Java代码
public String getActivityInstanceId() { return activityInstanceId; } public void setActivityInstanceId(String activityInstanceId) { this.activityInstanceId = activityInstanceId; } public String getTaskId() { return taskId; } public void setTaskId(String taskId) { this.taskId = taskId; }...
public void setRootProcessInstanceId(String rootProcessInstanceId) { this.rootProcessInstanceId = rootProcessInstanceId; } public void delete() { Context .getCommandContext() .getDbEntityManager() .delete(this); } @Override public String toString() { return this.getClass().getS...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricDetailEventEntity.java
1
请完成以下Java代码
public String toString() { return subject + "(" + id + ")"; } // ************************************************************************ // Getters and setters // ************************************************************************ public String getId() { return id; } ...
} public Timeslot getTimeslot() { return timeslot; } public void setTimeslot(Timeslot timeslot) { this.timeslot = timeslot; } public Room getRoom() { return room; } public void setRoom(Room room) { this.room = room; } }
repos\springboot-demo-master\Timefold Solver\src\main\java\org\acme\schooltimetabling\domain\Lesson.java
1
请完成以下Java代码
public MaturingConfigLine getById(@NonNull final MaturingConfigLineId lineId) { return getMaturingConfigMap().getById(lineId); } public List<MaturingConfigLine> getByMaturedProductId(@NonNull final ProductId maturedProductId) { return getMaturingConfigMap().getByMaturedProductId(maturedProductId); } @NonNul...
.maturedProductId(ProductId.ofRepoIdOrNull(record.getMatured_Product_ID())) .orgId(OrgId.ofRepoIdOrAny(record.getAD_Org_ID())) .maturityAge(Integer.valueOf(record.getMaturityAge())) .build(); } public MaturingConfigLine save(@NonNull final MaturingConfigLine maturingConfigLine) { final I_M_Maturing_C...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\material\maturing\MaturingConfigRepository.java
1
请完成以下Java代码
public I_M_DistributionRunLine getM_DistributionRunLine() throws RuntimeException { return (I_M_DistributionRunLine)MTable.get(getCtx(), I_M_DistributionRunLine.Table_Name) .getPO(getM_DistributionRunLine_ID(), get_TrxName()); } /** Set Distribution Run Line. @param M_DistributionRunLine_ID Distribution...
set_Value (COLUMNNAME_M_Product_ID, null); else set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); } /** Get Product. @return Product, Service, Item */ public int getM_Product_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); if (ii == null) return 0; return i...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_T_DistributionRunDetail.java
1
请在Spring Boot框架中完成以下Java代码
public boolean matchesFilter(EntitiesLimitTrigger trigger, EntitiesLimitNotificationRuleTriggerConfig triggerConfig) { if (isNotEmpty(triggerConfig.getEntityTypes()) && !triggerConfig.getEntityTypes().contains(trigger.getEntityType())) { return false; } DefaultTenantProfileConfigurat...
return EntitiesLimitNotificationInfo.builder() .entityType(trigger.getEntityType()) .currentCount(trigger.getCurrentCount()) .limit(trigger.getLimit()) .percents((int) (((float) trigger.getCurrentCount() / trigger.getLimit()) * 100)) .tenan...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\notification\rule\trigger\EntitiesLimitTriggerProcessor.java
2
请完成以下Java代码
private static <T> T safeGet(Future<T> f) { try { return f.get(); } catch(Exception ex) { throw new RuntimeException(ex); } } private static class WorkerResult { public final long elapsed; WorkerResult(long elapsed) { this....
@Override public WorkerResult call() throws Exception { try { long start = System.currentTimeMillis(); for ( int i = 0 ; i < iterations ; i++ ) { channel.basicPublish("", queue, null,payload); } ...
repos\tutorials-master\messaging-modules\rabbitmq\src\main\java\com\baeldung\benchmark\SingleConnectionPublisherNio.java
1
请在Spring Boot框架中完成以下Java代码
public String getName() { return name; } public void setName(String name) { this.name = name; } @ApiModelProperty(example = "2010-10-13T14:54:26.750+02:00") public Date getDeploymentTime() { return deploymentTime; } public void setDeploymentTime(Date deploymentTime...
this.category = category; } @ApiModelProperty(example = "http://localhost:8081/app-api/app-repository/deployments/10") public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } @ApiModelProperty(example = "null") public String getTenantI...
repos\flowable-engine-main\modules\flowable-app-engine-rest\src\main\java\org\flowable\app\rest\service\api\repository\AppDeploymentResponse.java
2
请在Spring Boot框架中完成以下Java代码
public class Author implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private int age; private String name; @Enumerated(EnumType.STRING) @Type(type = "genre_enum_type") @Column(colum...
public void setGenre(GenreType genre) { this.genre = genre; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } @Override public String toString() { return "Author{" + "id=" + id + ", age=" + age + ", name="...
repos\Hibernate-SpringBoot-master\HibernateSpringBootEnumPostgreSQLCustomType\src\main\java\com\bookstore\entity\Author.java
2
请完成以下Java代码
class PostingEqualClearingAccontsUtils { public static void removeFactLinesIfEqual( final Fact fact, final FactLine dr, final FactLine cr, final Predicate<AcctSchema> isInterOrg) { final AcctSchema as = fact.getAcctSchema(); if (as.isPostIfSameClearingAccounts()) { return; } if (dr == null |...
if (!ElementValueId.equals(debitAccountId, creditAccountId)) { return; } BigDecimal debit = dr.getAmtAcctDr(); BigDecimal credit = cr.getAmtAcctCr(); if (debit.compareTo(credit) != 0) { return; } fact.remove(dr); fact.remove(cr); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\PostingEqualClearingAccontsUtils.java
1
请完成以下Java代码
public class ResponseBodyController { @CrossOrigin @GetMapping(value = "/user/json/{userId}", produces = MediaType.APPLICATION_JSON_VALUE) public User getJsonUserInfo(@PathVariable("userId") @Size(min = 5, max = 8) String userId) { User user = new User("Java技术栈", 18); user.setId(Long.valueO...
OrderInfo orderInfo3 = new OrderInfo("123456003", 666, new Date()); orderList.add(orderInfo1); orderList.add(orderInfo2); orderList.add(orderInfo3); user.setOrderList(orderList); return user; } @PostMapping(value = "/user/save") public ResponseEntity saveUser(@Reque...
repos\spring-boot-best-practice-master\spring-boot-web\src\main\java\cn\javastack\springboot\web\controller\ResponseBodyController.java
1
请完成以下Java代码
public boolean containsOption(String name) { return this.source.containsProperty(name); } @Override public @Nullable List<String> getOptionValues(String name) { List<String> values = this.source.getOptionValues(name); return (values != null) ? Collections.unmodifiableList(values) : null; } @Override publi...
super(args); } @Override public List<String> getNonOptionArgs() { return super.getNonOptionArgs(); } @Override public @Nullable List<String> getOptionValues(String name) { return super.getOptionValues(name); } } }
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\DefaultApplicationArguments.java
1
请完成以下Java代码
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(InclusiveGateway.class, BPMN_ELEMENT_INCLUSIVE_GATEWAY) .namespaceUri(BPMN20_NS) .extendsType(Gateway.class) .instanceProvider(new ModelTypeInstanceProvider<InclusiveGateway>(...
} @Override public InclusiveGatewayBuilder builder() { return new InclusiveGatewayBuilder((BpmnModelInstance) modelInstance, this); } public SequenceFlow getDefault() { return defaultAttribute.getReferenceTargetElement(this); } public void setDefault(SequenceFlow defaultFlow) { defaultAttribu...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\InclusiveGatewayImpl.java
1
请完成以下Java代码
public String getDeploymentId() { return deploymentId; } public String getName() { return name; } public String getNameLike() { return nameLike; } public String getCategory() { return category; } public String getCategoryNotEquals() { return ca...
return withoutTenantId; } public String getProcessDefinitionKey() { return processDefinitionKey; } public String getProcessDefinitionKeyLike() { return processDefinitionKeyLike; } public boolean isLatestVersion() { return latestVersion; } }
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\DeploymentQueryImpl.java
1
请完成以下Java代码
private void writerServiceEnvironment(IndentingWriter writer, Map<String, String> environment) { if (environment.isEmpty()) { return; } writer.println("environment:"); writer.indented(() -> { for (Map.Entry<String, String> env : environment.entrySet()) { writer.println("- '%s=%s'".formatted(env.getKey...
writer.println("command: '%s'".formatted(command)); } private void writerServiceLabels(IndentingWriter writer, Map<String, String> labels) { if (labels.isEmpty()) { return; } writer.println("labels:"); writer.indented(() -> { for (Map.Entry<String, String> label : labels.entrySet()) { writer.printl...
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\container\docker\compose\ComposeFileWriter.java
1
请在Spring Boot框架中完成以下Java代码
public Exposure getExposure() { return this.exposure; } public @Nullable String getDomain() { return this.domain; } public void setDomain(@Nullable String domain) { this.domain = domain; } public Properties getStaticNames() { return this.staticNames; } public static class Exposure { /** * Endp...
public void setInclude(Set<String> include) { this.include = include; } public Set<String> getExclude() { return this.exclude; } public void setExclude(Set<String> exclude) { this.exclude = exclude; } } }
repos\spring-boot-4.0.1\module\spring-boot-actuator-autoconfigure\src\main\java\org\springframework\boot\actuate\autoconfigure\endpoint\jmx\JmxEndpointProperties.java
2
请完成以下Java代码
private static Instant getInstant_ISO_OFFSET_DATE_TIME(String s) { // assuming "2007-12-03T10:15:30.00Z" UTC instant // assuming "2007-12-03T10:15:30.00" ZoneId.systemDefault() instant // assuming "2007-12-03T10:15:30.00-04:00" TZ instant // assuming "2007-12-03T10:15:30.00+04:00"...
} } private static Instant getInstantWithLocalZoneOffsetId_RFC_1123(String value) { String s = value.trim() + " GMT"; Instant instant = Instant.from(DateTimeFormatter.RFC_1123_DATE_TIME.parse(s)); ZoneId systemZone = ZoneId.systemDefault(); // my timezone String id = systemZone....
repos\thingsboard-master\common\script\script-api\src\main\java\org\thingsboard\script\api\tbel\TbDate.java
1
请完成以下Java代码
public GatewayFilter apply(RequestHeaderSizeGatewayFilterFactory.Config config) { String errorHeaderName = config.getErrorHeaderName() != null ? config.getErrorHeaderName() : "errorMessage"; return new GatewayFilter() { @Override public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {...
private static String getErrorMessage(HashMap<String, Long> longHeaders, DataSize maxSize) { StringBuilder msg = new StringBuilder(String.format(ERROR_PREFIX, maxSize)); longHeaders .forEach((header, size) -> msg.append(String.format(ERROR, header, DataSize.of(size, DataUnit.BYTES)))); return msg.toString(); ...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RequestHeaderSizeGatewayFilterFactory.java
1
请完成以下Java代码
public void setIsDefault (boolean IsDefault) { set_Value (COLUMNNAME_IsDefault, Boolean.valueOf(IsDefault)); } /** Get Standard. @return Default value */ @Override public boolean isDefault () { Object oo = get_Value(COLUMNNAME_IsDefault); if (oo != null) { if (oo instanceof Boolean) retu...
{ Object oo = get_Value(COLUMNNAME_IsDefaultSO); 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 */ @Override public void setName (java.lang.St...
repos\metasfresh-new_dawn_uat\backend\de.metas.aggregation\src\main\java-gen\de\metas\aggregation\model\X_C_Aggregation.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO (Properties ctx) { org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo (ctx, Table_Name, get_TrxName()); return poi; } @Override public String toString() { StringBuilder sb = new StringBuilder ("X_PP_MRP_Alloc[") ....
public void setPP_MRP_Supply(org.eevolution.model.I_PP_MRP PP_MRP_Supply) { set_ValueFromPO(COLUMNNAME_PP_MRP_Supply_ID, org.eevolution.model.I_PP_MRP.class, PP_MRP_Supply); } /** Set MRP Supply. @param PP_MRP_Supply_ID MRP Supply */ @Override public void setPP_MRP_Supply_ID (int PP_MRP_Supply_ID) { if (...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_MRP_Alloc.java
1
请完成以下Java代码
public String getDiagramResourceName() { return null; } @Override public String getDeploymentId() { return null; } public void addLaneSet(LaneSet newLaneSet) { getLaneSets().add(newLaneSet); } public Lane getLaneForId(String id) { if (laneSets != null && !l...
} @Override public String getDescription() { return (String) getProperty("documentation"); } /** * @return all lane-sets defined on this process-instance. Returns an empty list if none are defined. */ public List<LaneSet> getLaneSets() { if (laneSets == null) { ...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\pvm\process\ProcessDefinitionImpl.java
1
请完成以下Java代码
private static String extractIBAN(@NonNull final BankAccount bpBankAccount) { final String iban = coalesceSuppliers( () -> toNullOrRemoveSpaces(bpBankAccount.getIBAN()), () -> toNullOrRemoveSpaces(bpBankAccount.getQR_IBAN()) ); if (Check.isBlank(iban)) { throw new AdempiereException(ERR_C_BP_BankAcc...
.swiftCode(extractSwiftCode(bpBankAccount)) .build(); } private @Nullable String extractSwiftCode(@NonNull final BankAccount bpBankAccount) { return Optional.ofNullable(bpBankAccount.getBankId()) .map(bankRepo::getById) .map(bank -> toNullOrRemoveSpaces(bank.getSwiftCode())) .orElse(null); } @V...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\base\src\main\java\de\metas\payment\sepa\api\impl\CreateSEPAExportFromPaySelectionCommand.java
1
请在Spring Boot框架中完成以下Java代码
public class M_AttributeInstance { private final IAttributesBL attributesBL = Services.get(IAttributesBL.class); /** * Fire {@link IShipmentScheduleSegment} changed when an {@link I_M_AttributeInstance} is changed. * * NOTE: there is no point to trigger this on AFTER_NEW because then an segment change will be ...
final AttributeId attributeId = AttributeId.ofRepoId(ai.getM_Attribute_ID()); if (!attributesBL.isStorageRelevant(attributeId)) { return; } final ShipmentScheduleAttributeSegment attributeSegment = ShipmentScheduleAttributeSegment.ofAttributeId(attributeId); final ImmutableShipmentScheduleSegment storage...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\modelvalidator\M_AttributeInstance.java
2
请完成以下Java代码
public void serializeToFile(Food.FoodDelivery delivery) { try (FileOutputStream fos = new FileOutputStream(FILE_PATH)) { delivery.writeTo(fos); logger.info("Successfully wrote to the file."); } catch (IOException ioe) { logger.warning("Error serializing the Map or wri...
} catch (IOException e) { logger.warning(String.format("Error reading file: %s location", FILE_PATH)); return Food.FoodDelivery.newBuilder() .build(); } } public void displayRestaurants(Food.FoodDelivery delivery) { Map<String, Food.Menu> restaurants = de...
repos\tutorials-master\google-protocol-buffer\src\main\java\com\baeldung\mapinprotobuf\FoodDelivery.java
1
请完成以下Java代码
public boolean isOnlyTimers() { return onlyTimers; } public boolean isOnlyMessages() { return onlyMessages; } public Date getDuedateHigherThan() { return duedateHigherThan; } public Date getDuedateLowerThan() { return duedateLowerThan; } public Date ge...
return noRetriesLeft; } public String getTenantId() { return tenantId; } public String getTenantIdLike() { return tenantIdLike; } public boolean isWithoutTenantId() { return withoutTenantId; } }
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\JobQueryImpl.java
1
请完成以下Java代码
public class TablePage { protected String tableName; /** * The total number of rows in the table. */ protected long total = -1; /** * Identifies the index of the first result stored in this TablePage. For example in a paginated database table, this value identifies the record number of...
public void setRows(List<Map<String, Object>> rowData) { this.rowData = rowData; } /** * @return the actual table content. */ public List<Map<String, Object>> getRows() { return rowData; } public void setTotal(long total) { this.total = total; } /** ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\management\TablePage.java
1
请完成以下Java代码
public List<HistoricEntityLink> getHistoricEntityLinkParentsForCaseInstance(String caseInstanceId) { return commandExecutor.execute(new GetHistoricEntityLinkParentsForCaseInstanceCmd(caseInstanceId)); } @Override public List<HistoricEntityLink> getHistoricEntityLinkChildrenForTask(String taskId) { ...
@Override public HistoricTaskLogEntryBuilder createHistoricTaskLogEntryBuilder() { return new HistoricTaskLogEntryBuilderImpl(commandExecutor, configuration.getTaskServiceConfiguration()); } @Override public HistoricTaskLogEntryQuery createHistoricTaskLogEntryQuery() { return new Histor...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\CmmnHistoryServiceImpl.java
1
请完成以下Java代码
public abstract class AbstractPriceListBasedRule implements IPricingRule { private static final Logger log = LogManager.getLogger(AbstractPriceListBasedRule.class); @Override @OverridingMethodsMustInvokeSuper public boolean applies(final IPricingContext pricingCtx, final IPricingResult result) { if (result.isCa...
final String msg = "pricingCtx {} contains no priceList"; Loggables.addLog(msg, pricingCtx); log.error(msg, pricingCtx); Trace.printStack(); return false; // false; } if (pricingCtx.getPriceListId().isNone()) { log.info("Not applying because PriceList is NoPriceList ({})", pricingCtx); return f...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\rules\price_list_version\AbstractPriceListBasedRule.java
1
请完成以下Java代码
public String getBusinessKey() { return businessKey; } public Map<String, Object> getCorrelationKeys() { return correlationKeys; } public Map<String, Object> getLocalCorrelationKeys() { return localCorrelationKeys; } public String getProcessInstanceId() { return processInstanceId; } ...
return tenantId; } public boolean isTenantIdSet() { return isTenantIdSet; } public boolean isExecutionsOnly() { return isExecutionsOnly; } @Override public String toString() { return "CorrelationSet [businessKey=" + businessKey + ", processInstanceId=" + processInstanceId + ", processDefini...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\runtime\CorrelationSet.java
1
请完成以下Java代码
public void setState(State state) { this.state = state; } public Exception getFailure() { return failure; } public void setFailure(Exception failure) { this.failure = failure; } public enum State { NOT_APPLIED, APPLIED, /** * Indicates that the operation was not performed ...
FAILED_ERROR, /** * Indicates that the operation was not performed and that the reason * was a concurrent modification to the data to be updated. * Applies to databases with isolation level READ_COMMITTED. */ FAILED_CONCURRENT_MODIFICATION, /** * Indicates that the operation was n...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\entitymanager\operation\DbOperation.java
1
请完成以下Java代码
public static class MethodSummary { private int totalMethodCount; private int publicMethodCount; private int protectedMethodCount; private int packagePrivateMethodCount; private int privateMethodCount; void addPublicMethod() { totalMethodCount...
} /** * @return the publicMethodCount */ public int getPublicMethodCount() { return publicMethodCount; } /** * @return the protectedMethodCount */ public int getProtectedMethodCount() { return protectedMethodCount; ...
repos\tutorials-master\libraries-transform\src\main\java\com\baeldung\spoon\ClassReporter.java
1
请在Spring Boot框架中完成以下Java代码
public static class LastInvoiceInfo { @NonNull private InvoiceId invoiceId; @NonNull private LocalDate invoiceDate; @NonNull private Money price; public boolean isAfter(@Nullable LastInvoiceInfo other) { if (other == null) { return true;
} else if (this.invoiceDate.compareTo(other.invoiceDate) > 0) { return true; } else if (this.invoiceDate.compareTo(other.invoiceDate) == 0) { return this.invoiceId.getRepoId() > other.invoiceId.getRepoId(); } else // if(this.invoiceDate.compareTo(other.invoiceDate) < 0) { return fals...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\product\stats\BPartnerProductStats.java
2
请完成以下Java代码
private Page<Owner> findPaginatedForOwnersLastName(int page, String lastname) { int pageSize = 5; Pageable pageable = PageRequest.of(page - 1, pageSize); return owners.findByLastNameStartingWith(lastname, pageable); } @GetMapping("/owners/{ownerId}/edit") public String initUpdateOwnerForm() { return VIEWS_O...
return "redirect:/owners/{ownerId}"; } /** * Custom handler for displaying an owner. * @param ownerId the ID of the owner to display * @return a ModelMap with the model attributes for the view */ @GetMapping("/owners/{ownerId}") public ModelAndView showOwner(@PathVariable("ownerId") int ownerId) { ModelA...
repos\spring-petclinic-main\src\main\java\org\springframework\samples\petclinic\owner\OwnerController.java
1
请在Spring Boot框架中完成以下Java代码
public Iterator<String> iterator() { return getAccepted().iterator(); } /** * Return the active profiles. * @return the active profiles */ public List<String> getActive() { return this.activeProfiles; } /** * Return the default profiles. * @return the active profiles */ public List<String> getDe...
ACTIVE(AbstractEnvironment.ACTIVE_PROFILES_PROPERTY_NAME, Environment::getActiveProfiles, true, Collections.emptySet()), DEFAULT(AbstractEnvironment.DEFAULT_PROFILES_PROPERTY_NAME, Environment::getDefaultProfiles, false, Collections.singleton("default")); private final Function<Environment, String[]> gett...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\Profiles.java
2
请在Spring Boot框架中完成以下Java代码
private Candidate retrieveExistingSupplyCandidateOrNull(@NonNull final AbstractReceiptScheduleEvent event) { final CandidatesQuery query = createCandidatesQuery(event); return candidateRepositoryRetrieval.retrieveLatestMatchOrNull(query); } protected abstract CandidatesQuery createCandidatesQuery(@NonNull final...
private PurchaseDetail createPurchaseDetail(final AbstractReceiptScheduleEvent event) { final PurchaseDetailBuilder purchaseDetailBuilder = PurchaseDetail.builder() .qty(event.getMaterialDescriptor().getQuantity()) .receiptScheduleRepoId(event.getReceiptScheduleId()) .advised(Flag.FALSE_DONT_UPDATE); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\receiptschedule\ReceiptsScheduleCreatedOrUpdatedHandler.java
2
请完成以下Java代码
public class CreateProcessInstancePayload implements Payload { private String id; private String processDefinitionId; private String processDefinitionKey; private String name; private String businessKey; public CreateProcessInstancePayload() { this.id = UUID.randomUUID().toString(); ...
public String getProcessDefinitionKey() { return processDefinitionKey; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getBusinessKey() { return businessKey; } }
repos\Activiti-develop\activiti-api\activiti-api-process-model\src\main\java\org\activiti\api\process\model\payloads\CreateProcessInstancePayload.java
1
请完成以下Java代码
public class CyclicBarrierDemo { private CyclicBarrier cyclicBarrier; private List<List<Integer>> partialResults = Collections.synchronizedList(new ArrayList<>()); private Random random = new Random(); private int NUM_PARTIAL_RESULTS; private int NUM_WORKERS; private void runSimulation(int num...
class AggregatorThread implements Runnable { @Override public void run() { String thisThreadName = Thread.currentThread().getName(); System.out.println(thisThreadName + ": Computing final sum of " + NUM_WORKERS + " workers, having " + NUM_PARTIAL_RESULTS + " results each."); ...
repos\tutorials-master\core-java-modules\core-java-concurrency-advanced-7\src\main\java\com\baeldung\cyclicbarrier\CyclicBarrierDemo.java
1
请完成以下Java代码
public void setC_BPartner_QuickInput_Attributes2_ID (final int C_BPartner_QuickInput_Attributes2_ID) { if (C_BPartner_QuickInput_Attributes2_ID < 1) set_ValueNoCheck (COLUMNNAME_C_BPartner_QuickInput_Attributes2_ID, null); else set_ValueNoCheck (COLUMNNAME_C_BPartner_QuickInput_Attributes2_ID, C_BPartner_Q...
{ set_ValueFromPO(COLUMNNAME_C_BPartner_QuickInput_ID, org.compiere.model.I_C_BPartner_QuickInput.class, C_BPartner_QuickInput); } @Override public void setC_BPartner_QuickInput_ID (final int C_BPartner_QuickInput_ID) { if (C_BPartner_QuickInput_ID < 1) set_ValueNoCheck (COLUMNNAME_C_BPartner_QuickInput_ID...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_QuickInput_Attributes2.java
1
请完成以下Java代码
protected POInfo initPO (Properties ctx) { POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); return poi; } public String toString() { StringBuffer sb = new StringBuffer ("X_AD_DesktopWorkbench[") .append(get_ID()).append("]"); return sb.toString(); } pu...
/** Get Workbench. @return Collection of windows, reports */ public int getAD_Workbench_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_Workbench_ID); if (ii == null) return 0; return ii.intValue(); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_DesktopWorkbench.java
1
请完成以下Java代码
public void setCreationOptionsRepository(PublicKeyCredentialCreationOptionsRepository creationOptionsRepository) { Assert.notNull(creationOptionsRepository, "creationOptionsRepository cannot be null"); this.creationOptionsRepository = creationOptionsRepository; } private void registerCredential(HttpServletReques...
private @Nullable RelyingPartyPublicKey publicKey; @Nullable RelyingPartyPublicKey getPublicKey() { return this.publicKey; } void setPublicKey(RelyingPartyPublicKey publicKey) { this.publicKey = publicKey; } } public static class SuccessfulUserRegistrationResponse { private final CredentialRecord...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\registration\WebAuthnRegistrationFilter.java
1
请完成以下Java代码
public DocumentId retrieveParentDocumentId(final DocumentEntityDescriptor parentEntityDescriptor) { final DocumentQuery query = build(); final DocumentsRepository documentsRepository = getDocumentsRepository(); return documentsRepository.retrieveParentDocumentId(parentEntityDescriptor, query); } public ...
_orderBys = new ArrayList<>(); } _orderBys.add(orderBy); return this; } public Builder setOrderBys(final DocumentQueryOrderByList orderBys) { if (orderBys == null || orderBys.isEmpty()) { _orderBys = null; } else { _orderBys = new ArrayList<>(orderBys.toList()); } return thi...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentQuery.java
1
请完成以下Java代码
public boolean isInboundEMail () { Object oo = get_Value(COLUMNNAME_IsInboundEMail); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Message-ID. @param MessageID EMail Message-ID */ @Override publi...
if (ii == null) return 0; return ii.intValue(); } /** Set Betreff. @param Subject Mail Betreff */ @Override public void setSubject (java.lang.String Subject) { set_Value (COLUMNNAME_Subject, Subject); } /** Get Betreff. @return Mail Betreff */ @Override public java.lang.String getSubject...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Mail.java
1
请完成以下Java代码
protected Object resolveExpression(CmmnEngineConfiguration cmmnEngineConfiguration, String executionId, String expressionString) { CaseInstanceEntityManager caseInstanceEntityManager = cmmnEngineConfiguration.getCaseInstanceEntityManager(); Expression expression = cmmnEngineConfiguration.getExpressionMa...
} protected void handleOutParameters(DelegatePlanItemInstance planItemInstance, CmmnEngineConfiguration cmmnEngineConfiguration) { if (outParameters == null) { return; } CaseInstanceEntityManager caseInstanceEntityManager = cmmnEngineConfiguration.getCaseInstanceEntityManager()...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\behavior\impl\CaseTaskActivityBehavior.java
1
请完成以下Java代码
public void delete(Set<TopicPartitionInfo> partitions) { if (partitions.isEmpty()) { return; } var writeLock = partitionsLock.writeLock(); writeLock.lock(); try { this.partitions.values().forEach(tpis -> tpis.removeAll(partitions)); } finally { ...
} } public void stop() { eventConsumer.stop(); eventConsumer.awaitStop(); } public interface RestoreCallback { void onAllPartitionsRestored(); default void onPartitionRestored(TopicPartitionInfo partition) {} } }
repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\common\state\QueueStateService.java
1
请完成以下Java代码
public int getRecord_ID() { return get_ValueAsInt(COLUMNNAME_Record_ID); } @Override public void setValueDate (final @Nullable java.sql.Timestamp ValueDate) { set_Value (COLUMNNAME_ValueDate, ValueDate); } @Override public java.sql.Timestamp getValueDate() { return get_ValueAsTimestamp(COLUMNNAME_Val...
{ final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_ValueNumber); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setValueString (final @Nullable java.lang.String ValueString) { set_Value (COLUMNNAME_ValueString, ValueString); } @Override public java.lang.String getValueString() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Record_Attribute.java
1
请完成以下Java代码
public Optional<IDocumentHandOverLocationAdapter> getDocumentHandOverLocationAdapter(final Object record) { return toOLCand(record).map(OLCandDocumentLocationAdapterFactory::handOverLocationAdapter); } private static Optional<I_C_OLCand> toOLCand(final Object record) { return InterfaceWrapperHelper.isInstanceO...
{ return new DropShipLocationAdapter(delegate); } public static DropShipOverrideLocationAdapter dropShipOverrideAdapter(@NonNull final I_C_OLCand delegate) { return new DropShipOverrideLocationAdapter(delegate); } public static HandOverLocationAdapter handOverLocationAdapter(@NonNull final I_C_OLCand delegat...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\location\adapter\OLCandDocumentLocationAdapterFactory.java
1
请完成以下Java代码
private int checkForWin(int[] row) { boolean isEqual = true; int size = row.length; int previous = row[0]; for (int i = 0; i < size; i++) { if (previous != row[i]) { isEqual = false; break; } previous = row[i]; }...
} public void printStatus() { switch (this.checkStatus()) { case P1: System.out.println("Player 1 wins"); break; case P2: System.out.println("Player 2 wins"); break; case DRAW: System.out.println("Game Draw"); b...
repos\tutorials-master\algorithms-modules\algorithms-searching\src\main\java\com\baeldung\algorithms\mcts\tictactoe\Board.java
1
请完成以下Spring Boot application配置
spring: mail: host: smtp.exmail.qq.com username: xxx@xxx.com password: xxx properties: "[mail.smtp.socketFactory.class]": javax.net.ssl.SSLSocketFactory "[mail.smtp.socketFactory.fallback]": false "[mail.smtp.socketFactory.port]": 465 "[mail.smtp.connectiontimeout]": 5000 ...
meout]": 3000 "[mail.smtp.writetimeout]": 5000 mail: from: xxx@xxx.com personal: 栈长 bcc: xxx@xxx.com subject: Spring Boot 发邮件测试主题
repos\spring-boot-best-practice-master\spring-boot-mail\src\main\resources\application.yml
2
请完成以下Java代码
public meta setHttpEquiv (String http_equiv) { addAttribute ("http-equiv", http_equiv); return this; } /** * Sets the http-equiv="" attribute. * * @param content * the value that should go into the http-equiv attribute */ public meta setHttpEquiv (String http_equiv, String content) { a...
return (this); } /** * Adds an Element to the element. * * @param element * Adds an Element to the element. */ public meta addElement (Element element) { addElementToRegistry (element); return (this); } /** * Adds an Element to the element. * * @param element * Adds...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\meta.java
1