instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public class DemoController { @Autowired private UserServiceFeignClient userServiceFeignClient; @GetMapping("/test01") public UserResponse test01() { return userServiceFeignClient.get(1); // System.out.println("编号:" + user.getId()); // System.out.println("昵称:" + user.getName()); ...
} @GetMapping("/test02B") public List<UserResponse> test02B() { Map<String, Object> queryMap = new HashMap<>(); queryMap.put("name", "昵称"); return userServiceFeignClient.list(queryMap); } @GetMapping("/test03") public Integer test03() { return userServiceFeignClient...
repos\SpringBoot-Labs-master\lab-58\lab-58-feign-demo\src\main\java\cn\iocoder\springboot\lab58\feigndemo\controller\DemoController.java
2
请完成以下Java代码
public void setHasExpenseLoading(Boolean value) { this.hasExpenseLoading = value; } /** * Gets the value of the doCostAssessment property. * * @return * possible object is * {@link Boolean } * */ public boolean isDoCostAssessment() { if (doCo...
return doCostAssessment; } } /** * Sets the value of the doCostAssessment property. * * @param value * allowed object is * {@link Boolean } * */ public void setDoCostAssessment(Boolean value) { this.doCostAssessment = value; } }
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\XtraStationaryType.java
1
请在Spring Boot框架中完成以下Java代码
final class GlobalMethodSecuritySelector implements ImportSelector { @Override public String[] selectImports(AnnotationMetadata importingClassMetadata) { Class<EnableGlobalMethodSecurity> annoType = EnableGlobalMethodSecurity.class; Map<String, Object> annotationAttributes = importingClassMetadata.getAnnotationA...
boolean jsr250Enabled = attributes.getBoolean("jsr250Enabled"); List<String> classNames = new ArrayList<>(4); if (isProxy) { classNames.add(MethodSecurityMetadataSourceAdvisorRegistrar.class.getName()); } classNames.add(autoProxyClassName); if (!skipMethodSecurityConfiguration) { classNames.add(GlobalMe...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\method\configuration\GlobalMethodSecuritySelector.java
2
请完成以下Java代码
protected Map<Class<? extends DbEntity>, DbOperation> performProcessCleanup() { return Context .getCommandContext() .getHistoricProcessInstanceManager() .deleteHistoricProcessInstancesByRemovalTime(ClockUtil.getCurrentTime(), configuration.getMinuteFrom(), configuration.getMinute...
.isDmnEnabled(); } protected Integer getTaskMetricsTimeToLive() { return Context .getProcessEngineConfiguration() .getParsedTaskMetricsTimeToLive(); } protected boolean shouldRescheduleNow() { int batchSize = getBatchSize(); for (DbOperation deleteOperation : deleteOperations.valu...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\historycleanup\HistoryCleanupRemovalTime.java
1
请完成以下Java代码
public MonitorConfig getMonitor() { return this.monitor; } public void setMonitor(MonitorConfig monitor) { this.monitor = monitor; } public ProviderConfig getProvider() { return this.provider; } public void setProvider(ProviderConfig provider) { this.provider = provider; } public Con...
public Map<String, MonitorConfig> getMonitors() { return this.monitors; } public void setMonitors(Map<String, MonitorConfig> monitors) { this.monitors = monitors; } public Map<String, ProviderConfig> getProviders() { return this.providers; } public void setProviders(Map<String, ProviderConfig...
repos\dubbo-spring-boot-starter-master\src\main\java\com\alibaba\dubbo\spring\boot\DubboProperties.java
1
请完成以下Java代码
public String getDescription() { return "1.4"; } // getDescription /** * Get Number Servers * * @return no of servers */ public String getServerCount() { int noRunning = 0; int noStopped = 0; for (int i = 0; i < m_servers.size(); i++) { AdempiereServer server = m_servers.get(i); if (server...
+ " - Running=" + noRunning + " - Stopped=" + noStopped; return info; } // getServerCount /** * Get start date * * @return start date */ public Timestamp getStartTime() { return new Timestamp(m_start.getTime()); } // getStartTime } // AdempiereServerMgr
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\serverRoot\de.metas.adempiere.adempiere.serverRoot.base\src\main\java-legacy\org\compiere\server\AdempiereServerMgr.java
1
请在Spring Boot框架中完成以下Java代码
private void sendRpcRequestToDevice(ToDeviceRpcRequest msg) { TopicPartitionInfo tpi = partitionService.resolve(ServiceType.TB_CORE, msg.getTenantId(), msg.getDeviceId()); ToDeviceRpcRequestActorMsg rpcMsg = new ToDeviceRpcRequestActorMsg(serviceId, msg); if (tpi.isMyPartition()) { l...
clusterService.pushNotificationToCore(originServiceId, response, null); } } private void scheduleTimeout(ToDeviceRpcRequest request, UUID requestId) { long timeout = Math.max(0, request.getExpirationTime() - System.currentTimeMillis()) + TimeUnit.SECONDS.toMillis(1); log.trace("[{}] pro...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\rpc\DefaultTbRuleEngineRpcService.java
2
请完成以下Java代码
public IAutoCloseable switchContext(final Properties ctx) { Check.assumeNotNull(ctx, "ctx not null"); // Avoid StackOverflowException caused by setting the same context if (ctx == this) { return NullAutoCloseable.instance; } final long threadIdOnSet = Thread.currentThread().getId(); final Properties...
closed = true; } }; } /** * Dispose the context from current thread */ public void dispose() { final Properties ctx = threadLocalContext.get(); ctx.clear(); threadLocalContext.remove(); } public void setListener(@NonNull final IContextProviderListener listener) { this.listener = listener; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\context\ThreadLocalServerContext.java
1
请完成以下Java代码
public class RequestUtil { /** * 获取请求真实IP地址 */ public static String getRequestIp(HttpServletRequest request) { //通过HTTP代理服务器转发时添加 String ipAddress = request.getHeader("x-forwarded-for"); if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress))...
} catch (UnknownHostException e) { e.printStackTrace(); } ipAddress = inetAddress.getHostAddress(); } } // 通过多个代理转发的情况,第一个IP为客户端真实IP,多个IP会按照','分割 if (ipAddress != null && ipAddress.length() > 15) { if (ipAddress.indexOf(...
repos\mall-master\mall-common\src\main\java\com\macro\mall\common\util\RequestUtil.java
1
请在Spring Boot框架中完成以下Java代码
public class NotificationService { private static final Logger LOG = LoggerFactory.getLogger(NotificationService.class); public void createNotification(NotificationDTO notificationDTO) { Notification notification = toEntity(notificationDTO); LOG.info("Received notification by module dependency...
} private Notification toEntity(NotificationDTO notificationDTO) { Notification notification = new Notification(); notification.setDate(notificationDTO.getDate()); if (notificationDTO.getFormat().equals("SMS")) { notification.setFormat(NotificationType.SMS); } if...
repos\tutorials-master\spring-boot-modules\spring-boot-libraries\src\main\java\com\baeldung\modulith\notification\NotificationService.java
2
请完成以下Java代码
private void updateValid(final IDocumentChangesCollector changesCollector) { final DocumentValidStatus validStatusOld = _validStatus; final DocumentValidStatus validStatusNew = computeValidStatus(); _validStatus = validStatusNew; // Collect validStatus changed event if (!NullDocumentChangesCollector.isNull(...
public boolean hasChangesToSave() { if (isReadonlyVirtualField()) { return false; } return !isInitialValue(); } private boolean isInitialValue() { return DataTypes.equals(_value, _initialValue); } @Override public Optional<WindowId> getZoomIntoWindowId() { final LookupDataSource lookupDataSour...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentField.java
1
请完成以下Java代码
public class MigratingVariableInstance implements MigratingInstance { protected VariableInstanceEntity variable; protected boolean isConcurrentLocalInParentScope; public MigratingVariableInstance(VariableInstanceEntity variable, boolean isConcurrentLocalInParentScope) { this.variable = variable; this.is...
ExecutionEntity representativeExecution = owningActivityInstance.resolveRepresentativeExecution(); representativeExecution.addVariableInternal(variable); } @Override public void migrateState() { migrateHistory(); } protected void migrateHistory() { HistoryLevel historyLevel = Context.getProcess...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingVariableInstance.java
1
请完成以下Spring Boot application配置
logging.level.root=INFO management.endpoints.web.exposure.include=* info.app.name=Spring Boot 2 actuator Application management.endpoint.health.group.custom.include=diskSpace,ping management.endpoint.health.group.custom.show-components=always management.end
point.health.group.custom.show-details=always management.endpoint.health.group.custom.status.http-mapping.up=207
repos\tutorials-master\spring-reactive-modules\spring-reactive-security\src\main\resources\application.properties
2
请完成以下Java代码
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 KeyNamePair getKeyNamePair() { return new KeyNamePair(get_I...
Method of ordering records; lowest number comes first */ public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Sequence. @return Method of ordering records; lowest number comes first */ public int getSeqNo () { Integer ii = (Integer)get_Value(COLUMNNAME_S...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_DesktopWorkbench.java
1
请在Spring Boot框架中完成以下Java代码
public abstract class RefundConfigChangeHandler { private RefundConfig formerRefundConfig; @Getter private RefundConfig currentRefundConfig; protected RefundConfigChangeHandler(@NonNull final RefundConfig currentRefundConfig) { assertCorrectRefundBase(currentRefundConfig); this.currentRefundConfig = current...
Check.errorUnless(getExpectedRefundBase().equals(refundConfig.getRefundBase()), "The given currentRefundConfig needs to have refundBase = AMOUNT_PER_UNIT; currentRefundConfig={}", refundConfig); } /** * @return the refund config that was the current config before {@link #currentRefundConfig(RefundConfig)} ...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\refund\allqties\refundconfigchange\RefundConfigChangeHandler.java
2
请在Spring Boot框架中完成以下Java代码
public class TestJsonController { @Autowired ObjectMapper mapper; @JsonView(User.AllUserFieldView.class) @RequestMapping("getuser") @ResponseBody public User getUser() { User user = new User(); user.setUserName("mrbird"); user.setAge(26); user.setPassword("123456"); user.setBirthday(new Date()); ret...
String name = user.getUserName(); return name; } catch (Exception e) { e.printStackTrace(); } return null; } @RequestMapping("formatobjecttojsonstring") @ResponseBody public String formatObjectToJsonString() { try { User user = new User(); user.setUserName("mrbird"); user.setAge(26); user...
repos\SpringAll-master\18.Spring-Boot-Jackson\src\main\java\com\example\controller\TestJsonController.java
2
请在Spring Boot框架中完成以下Java代码
public CommonResult createBrand(@Validated @RequestBody PmsBrandDto pmsBrand) { CommonResult commonResult; int count = demoService.createBrand(pmsBrand); if (count == 1) { commonResult = CommonResult.success(pmsBrand); LOGGER.debug("createBrand success:{}", pmsBrand); ...
@RequestMapping(value = "/brand/delete/{id}", method = RequestMethod.GET) @ResponseBody public CommonResult deleteBrand(@PathVariable("id") Long id) { int count = demoService.deleteBrand(id); if (count == 1) { LOGGER.debug("deleteBrand success :id={}", id); return CommonR...
repos\mall-master\mall-demo\src\main\java\com\macro\mall\demo\controller\DemoController.java
2
请完成以下Java代码
private TbMsg processPublishResult(TbMsg origMsg, String messageId) { TbMsgMetaData metaData = origMsg.getMetaData().copy(); metaData.putValue(MESSAGE_ID, messageId); return origMsg.transform() .metaData(metaData) .build(); } private TbMsg processExceptio...
CredentialsProvider credProvider = FixedCredentialsProvider.create(credentials); var retrySettings = RetrySettings.newBuilder() .setTotalTimeout(Duration.ofSeconds(10)) .setInitialRetryDelay(Duration.ofMillis(50)) .setRetryDelayMultiplier(1.1) .se...
repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\gcp\pubsub\TbPubSubNode.java
1
请完成以下Java代码
public class Sys { /** * 服务器名称 */ private String computerName; /** * 服务器Ip */ private String computerIp; /** * 项目路径 */ private String userDir; /** * 操作系统 */ private String osName; /** * 系统架构 */ private String osArch; publ...
public String getUserDir() { return userDir; } public void setUserDir(String userDir) { this.userDir = userDir; } public String getOsName() { return osName; } public void setOsName(String osName) { this.osName = osName; } public String getOsArch() { ...
repos\spring-boot-demo-master\demo-websocket\src\main\java\com\xkcoding\websocket\model\server\Sys.java
1
请完成以下Java代码
public void deleteBatch(String batchId) { commandExecutor.execute(new DeleteBatchCmd(batchId)); } @Override public HistoryJobQuery createHistoryJobQuery() { return new HistoryJobQueryImpl(commandExecutor, configuration.getJobServiceConfiguration()); } @Override public ExternalW...
commandExecutor.execute(new UnacquireAllExternalWorkerJobsForWorkerCmd(workerId, tenantId, configuration.getJobServiceConfiguration())); } @Override public ChangeTenantIdBuilder createChangeTenantIdBuilder(String fromTenantId, String toTenantId) { return new ChangeTenantIdBuilderImpl(fromTenant...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\CmmnManagementServiceImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class PhoneNumberGenerator { private static int CALIFORNIA_AREA_CODE = 707; private static int IOWA_AREA_CODE = 319; private static int MONTANA_AREA_CODE = 406; private static int NEW_YORK_AREA_CODE = 914; private static int OREGON_AREA_CODE = 503; private static int WASHINGTON_AREA_CODE = 206; private s...
public static String generate(String phoneNumber) { if (!StringUtils.hasText(phoneNumber)) { phoneNumber = String.valueOf(PHONE_NUMBER_AREA_CODES.get(index.nextInt(PHONE_NUMBER_AREA_CODES.size()))) .concat("-") .concat(String.valueOf(index.nextInt(9))) .concat(String.valueOf(index.nextInt(9))) .c...
repos\spring-boot-data-geode-main\spring-geode-samples\caching\near\src\main\java\example\app\caching\near\client\service\support\PhoneNumberGenerator.java
2
请在Spring Boot框架中完成以下Java代码
public class AttributeId implements RepoIdAware { int repoId; @JsonCreator public static AttributeId ofRepoId(final int repoId) { return new AttributeId(repoId); } public static AttributeId ofRepoIdObj(@NonNull final Object repoIdObj) { if (repoIdObj instanceof AttributeId) { return (AttributeId)repoI...
public static int toRepoId(final AttributeId attributeId) { return attributeId != null ? attributeId.getRepoId() : -1; } private AttributeId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "repoId"); } @Override @JsonValue public int getRepoId() { return repoId; } public static...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\mm\attributes\AttributeId.java
2
请完成以下Java代码
public void setExternalSystem_Outbound_Endpoint_ID (final int ExternalSystem_Outbound_Endpoint_ID) { if (ExternalSystem_Outbound_Endpoint_ID < 1) set_Value (COLUMNNAME_ExternalSystem_Outbound_Endpoint_ID, null); else set_Value (COLUMNNAME_ExternalSystem_Outbound_Endpoint_ID, ExternalSystem_Outbound_Endpoin...
public String getScriptIdentifier() { return get_ValueAsString(COLUMNNAME_ScriptIdentifier); } @Override public void setSeqNo (final int SeqNo) { set_Value (COLUMNNAME_SeqNo, SeqNo); } @Override public int getSeqNo() { return get_ValueAsInt(COLUMNNAME_SeqNo); } @Override public void setWhereClaus...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_ScriptedExportConversion.java
1
请完成以下Java代码
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 static fina...
for (ExecutionListener executionListener : listeners) { try { Context.getProcessEngineConfiguration() .getDelegateInterceptor() .handleInvocation(new ExecutionListenerInvocation(executionListener, execution)); } ...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\MultiInstanceActivityBehavior.java
1
请完成以下Java代码
public JpaRepository<S, Long> getRepository() { return repository; } public int countNumberOfRequestsWithFunction(ToIntFunction<List<S>> function) { return function.applyAsInt(repository.findAll()); } public Optional<S> getUserById(Long id) { return repository.findById(id); ...
Optional<S> user = repository.findById(id); user.ifPresent(predicate::test); return user; } public int getUserByIdWithFunction(Long id, ToIntFunction<S> function) { Optional<S> optionalUser = repository.findById(id); if (optionalUser.isPresent()) { return function.a...
repos\tutorials-master\persistence-modules\spring-boot-persistence-2\src\main\java\com\baeldung\listvsset\Service.java
1
请完成以下Java代码
public void setM_ReceiptSchedule_ID (final int M_ReceiptSchedule_ID) { if (M_ReceiptSchedule_ID < 1) set_Value (COLUMNNAME_M_ReceiptSchedule_ID, null); else set_Value (COLUMNNAME_M_ReceiptSchedule_ID, M_ReceiptSchedule_ID); } @Override public int getM_ReceiptSchedule_ID() { return get_ValueAsInt(CO...
@Override public BigDecimal getQtyWithIssues() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyWithIssues); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyWithIssuesInCatchUOM (final @Nullable BigDecimal QtyWithIssuesInCatchUOM) { set_Value (COLUMNNAME_QtyWithIssuesInC...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inoutcandidate\model\X_M_ReceiptSchedule_Alloc.java
1
请完成以下Java代码
public Object getPrincipal() { return authentication.getPrincipal(); } public void setTrustResolver(AuthenticationTrustResolver trustResolver) { this.trustResolver = trustResolver; } public void setRoleHierarchy(RoleHierarchy roleHierarchy) { this.roleHierarchy = roleHierarchy;...
} private static String getRoleWithDefaultPrefix(String defaultRolePrefix, String role) { if (role == null) { return role; } if ((defaultRolePrefix == null) || (defaultRolePrefix.length() == 0)) { return role; } if (role.startsWith(defaultRolePrefix))...
repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\custom\security\MySecurityExpressionRoot.java
1
请在Spring Boot框架中完成以下Java代码
public class MybatisDeadLetterJobDataManager extends AbstractDataManager<DeadLetterJobEntity> implements DeadLetterJobDataManager { protected CachedEntityMatcher<DeadLetterJobEntity> deadLetterByExecutionIdMatcher = new DeadLetterJobsByExecutionIdMatcher(); protected SingleCachedEntityMatcher<DeadLetterJobEnti...
} @Override public List<DeadLetterJobEntity> findJobsByExecutionId(String executionId) { DbSqlSession dbSqlSession = getDbSqlSession(); // If the execution has been inserted in the same command execution as this query, there can't be any in the database if (isEntityInserted(db...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\persistence\entity\data\impl\MybatisDeadLetterJobDataManager.java
2
请完成以下Java代码
public void setCCM_Success (String CCM_Success) { set_Value (COLUMNNAME_CCM_Success, CCM_Success); } /** Get Is Success. @return Is Success */ public String getCCM_Success () { return (String)get_Value(COLUMNNAME_CCM_Success); } /** Set Description. @param Description Optional short description ...
public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName()); } /** Set Search Key. @param Value Search key for the ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\callcenter\model\X_CCM_Bundle_Result.java
1
请完成以下Java代码
private MCash createCash() { MCash cash = new MCash (getCtx(), 0, get_TrxName()); cash.setName(p_Name); cash.setDescription(p_Description); cash.setDateAcct(p_DateAcct); cash.setStatementDate(p_StatementDate); cash.setC_CashBook_ID(p_C_CashBook_ID); if (!cash.save()) { throw new IllegalStateExcept...
cashLine.setCashType("T"); // Transfer if (!cashLine.save()) { throw new IllegalStateException("Could not create Cash line (To Bank)"); } cashLineList.add(cashLine); MCashLine cashLines[] = new MCashLine[cashLineList.size()]; cashLineList.toArray(cashLines); return cashLines; } // createCashLines...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\adempiere\process\ImmediateBankTransfer.java
1
请完成以下Java代码
public BigDecimal getFirstWeight() { return firstWeight; } public void setFirstWeight(BigDecimal firstWeight) { this.firstWeight = firstWeight; } public BigDecimal getFirstFee() { return firstFee; } public void setFirstFee(BigDecimal firstFee) { this.firstFee =...
public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", name=").append(name); sb.append(", chargeType=").append(...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsFeightTemplate.java
1
请完成以下Java代码
private void markAsDestroyed() { asserNotDestroyed(); destroyed = true; } @Override public ParentType end() { markAsDestroyed(); final InSubQueryFilter<ModelType> inSubQueryFilter = inSubQueryBuilder.build(); finisher.accept(inSubQueryFilter); return parent; } @Override public IInSubQueryFilterCl...
} @Override public IInSubQueryFilterClause<ModelType, ParentType> matchingColumnNames(final String columnName, final String subQueryColumnName, final IQueryFilterModifier modifier) { asserNotDestroyed(); inSubQueryBuilder.matchingColumnNames(columnName, subQueryColumnName, modifier); return this; } @Overr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\InSubQueryFilterClause.java
1
请完成以下Java代码
private String convert (long number) { /* special case */ if (number == 0) return "CERO"; String prefix = ""; if (number < 0) { number = -number; prefix = "MENOS"; } String soFar = ""; int place = 0; do { long n = number % 1000; if (n != 0) { String s = convertLessThanOneThous...
if (pos2 > pos) pos = pos2; String oldamt = amount; if(lang.isDecimalPoint()) amount = amount.replaceAll (",", ""); // Old else amount = amount.replaceAll( "\\.",""); int newpos = 0; if(lang.isDecimalPoint()) newpos = amount.lastIndexOf ('.'); // Old else newpos = amount.lastIndexOf (','...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\AmtInWords_ES.java
1
请在Spring Boot框架中完成以下Java代码
public Object[][] getGraphData() { final Date current = new Date(); final int colCount = statusList.size() + 1; final int rowCount = statusMetricsByMinute.size() + 1; final Object[][] result = new Object[rowCount][colCount]; result[0][0] = "Time"; int j = 1; for ...
j++; } } return result; } @Scheduled(fixedDelayString = "${fixedDelay.in.milliseconds:60000}") private void exportMetrics() { List<Integer> statusCount = new ArrayList<>(); for (final String status : statusList) { Search search = registry.find(status)...
repos\tutorials-master\spring-boot-modules\spring-boot-actuator\src\main\java\com\baeldung\metrics\service\CustomActuatorMetricService.java
2
请完成以下Java代码
private boolean isMatching(final I_C_VAT_Code matching, final VATCodeMatchingRequest request) { logger.debug("Matching: {}", matching); logger.debug("Request: {}", request); // Match accounting schema if (matching.getC_AcctSchema_ID() != request.getC_AcctSchema_ID()) { logger.debug("=> not matching (C_Acc...
/** * Retries all active {@link I_C_VAT_Code}s for given C_AcctSchema_ID. * * @param acctSchemaId C_AcctSchema_ID */ @Cached(cacheName = I_C_VAT_Code.Table_Name + "#by#" + I_C_VAT_Code.COLUMNNAME_C_AcctSchema_ID) public List<I_C_VAT_Code> retriveVATCodeMatchingsForSchema(@CacheCtx final Properties ctx, final ...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\vatcode\impl\VATCodeDAO.java
1
请完成以下Java代码
private ITranslatableString getProductName(final ProductId productId) { final I_M_Product product = getProductById(productId); final IModelTranslationMap trls = InterfaceWrapperHelper.getModelTranslationMap(product); return trls.getColumnTrl(I_M_Product.COLUMNNAME_Name, product.getName()); } private UomId get...
return Amount.of(productPrice.getPriceStd(), currency.getCurrencyCode()); } private String getUOMSymbol(final UomId uomId) { final I_C_UOM uom = uomDAO.getById(uomId); return StringUtils.trimBlankToOptional(uom.getUOMSymbol()).orElseGet(uom::getName); } private UomIdAndSymbol toUomIdAndSymbol(final UomId uom...
repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java\de\metas\pos\POSProductsLoader.java
1
请在Spring Boot框架中完成以下Java代码
public class LoggingAspect { private final Logger log = LoggerFactory.getLogger(this.getClass()); /** * Pointcut that matches all repositories, services and Web REST endpoints. */ @Pointcut("within(@org.springframework.stereotype.Repository *)" + " || within(@org.springframework.stereoty...
* @param joinPoint join point for advice * @return result * @throws Throwable throws IllegalArgumentException */ @Around("applicationPackagePointcut() && springBeanPointcut()") public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable { if (log.isDebugEnabled()) { ...
repos\Spring-Boot-Advanced-Projects-main\springboot2-springaop-example\src\main\java\net\alanbinu\springboot2\springboot2jpacrudexample\aspect\LoggingAspect.java
2
请完成以下Java代码
public String getFormKey() { return formKey; } public void setFormKey(String formKey) { this.formKey = formKey; } public boolean isSameDeployment() { return sameDeployment; } public void setSameDeployment(boolean sameDeployment) { this.sameDeployment = sameDepl...
public List<String> getCandidateUsers() { return candidateUsers; } public void setCandidateUsers(List<String> candidateUsers) { this.candidateUsers = candidateUsers; } public List<String> getCandidateGroups() { return candidateGroups; } public void setCandidateGroups(L...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\HumanTask.java
1
请在Spring Boot框架中完成以下Java代码
public void setDisableHtmlEscaping(@Nullable Boolean disableHtmlEscaping) { this.disableHtmlEscaping = disableHtmlEscaping; } public @Nullable String getDateFormat() { return this.dateFormat; } public void setDateFormat(@Nullable String dateFormat) { this.dateFormat = dateFormat; } /** * Enumeration of...
/** * Lenient compliance. */ LENIENT, /** * Strict compliance with some small deviations for legacy reasons. */ LEGACY_STRICT, /** * Strict compliance. */ STRICT } }
repos\spring-boot-4.0.1\module\spring-boot-gson\src\main\java\org\springframework\boot\gson\autoconfigure\GsonProperties.java
2
请完成以下Java代码
protected ProcessPreconditionsResolution checkPreconditionsApplicable() { if (!isHUEditorView()) { return ProcessPreconditionsResolution.rejectWithInternalReason("not the HU view"); } final DocumentIdsSelection selectedRowIds = getSelectedRowIds(); if (!selectedRowIds.isSingleDocumentId()) { return ...
if (p_QtyTU <= 0) { throw new FillMandatoryException("QtyTU"); } final I_M_HU topLevelHU = getRecord(I_M_HU.class); final HUsToNewTUsRequest request = HUsToNewTUsRequest.forSourceHuAndQty(topLevelHU, p_QtyTU); final LUTUResult.TUsList tus = HUTransformService.newInstance().husToNewTUs(request); if (tus...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_HU_MoveTUsToDirectWarehouse.java
1
请完成以下Java代码
public void destroy() { final List<RuntimeException> errors = new ArrayList<>(); final Iterator<ScopedBeanReference> it = this.references.values().iterator(); while (it.hasNext()) { ScopedBeanReference val = it.next(); it.remove(); try ...
* Gets the bean managed by this instance, if it exists. * * @return The existing bean or null. */ public Object getBeanIfExists() { return this.bean; } /** * Sets the given callback used to destroy the managed bean. * * @param de...
repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\scope\GrpcRequestScope.java
1
请在Spring Boot框架中完成以下Java代码
public class CompressFilePreviewImpl implements FilePreview { private final FileHandlerService fileHandlerService; private final CompressFileReader compressFileReader; private final OtherFilePreviewImpl otherFilePreview; private static final String Rar_PASSWORD_MSG = "password"; private static fina...
fileTree = compressFileReader.unRar(filePath, filePassword, fileName, fileAttribute); } catch (Exception e) { if (e.getMessage().toLowerCase().contains(Rar_PASSWORD_MSG)) { model.addAttribute("needFilePassword", true); return EXEL_FILE_PREVIEW_PAGE; ...
repos\kkFileView-master\server\src\main\java\cn\keking\service\impl\CompressFilePreviewImpl.java
2
请完成以下Java代码
public static String validateCreditCardVV (String creditCardVV, String creditCardType) { // no data if (creditCardVV == null || creditCardVV.length() == 0 || creditCardType == null || creditCardType.length() == 0) return ""; int length = checkNumeric(creditCardVV).length(); // Amex = 4 digits if (cre...
return "PaymentBankAccountNotValid"; } // validateBankAccountNo /** * Validate Check No * @param CheckNo CheckNo * @return "" or Error AD_Message */ public static String validateCheckNo (String CheckNo) { int length = checkNumeric(CheckNo).length(); if (length > 0) return ""; return "Payment...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MPaymentValidate.java
1
请在Spring Boot框架中完成以下Java代码
public String getResourceName() { return resourceName; } public void setResourceName(String resourceName) { this.resourceName = resourceName; } public String getDeploymentId() { return deploymentId; } public void setDeploymentId(String deploymentId) { this.depl...
public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } }
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\repository\DecisionResponse.java
2
请完成以下Java代码
public String[] getWhereClauses(List<Object> params) { final GeodbObject go = getGeodbObject(); final String searchText = getText(); if (go == null && !Check.isEmpty(searchText, true)) return new String[]{"1=2"}; if (go == null) return new String[]{"1=1"}; final int radius = getRadius(); // final...
+ " )" + " )"; } private GeodbObject getGeodbObject() { return (GeodbObject)fieldCityZipAutocompleter.getUserOject(); } @Override public String getText() { return fieldCityZipAutocompleter.getText(); } private int getRadius() { if (fieldRadius == null) return 0; Object o = fieldRadius.getVal...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\gui\search\InfoQueryCriteriaBPRadius.java
1
请完成以下Java代码
protected void prepare() { final IQueryFilter<I_C_Invoice> userSelectionFilter = getProcessInfo().getQueryFilterOrElse(null); if (userSelectionFilter == null) { return; } final int selectionCount = queryBL .createQueryBuilder(I_C_Invoice.class) .filter(userSelectionFilter) .addEqualsFilter(I...
if (selectionCount <= 0) { throw new AdempiereException("@NoSelection@"); } } @Override protected String doIt() throws Exception { enqueuer.enqueueSelection(getProcessInfo().getPinstanceId()); return MSG_OK; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\process\C_Invoice_CancelAndRecreate.java
1
请完成以下Java代码
public void setUser1_ID (int User1_ID) { if (User1_ID < 1) set_Value (COLUMNNAME_User1_ID, null); else set_Value (COLUMNNAME_User1_ID, Integer.valueOf(User1_ID)); } /** Get User List 1. @return User defined list element #1 */ @Override public int getUser1_ID () { Integer ii = (Integer)get_Val...
return ii.intValue(); } /** Set User Element 1. @param UserElement1_ID User defined accounting Element */ @Override public void setUserElement1_ID (int UserElement1_ID) { if (UserElement1_ID < 1) set_Value (COLUMNNAME_UserElement1_ID, null); else set_Value (COLUMNNAME_UserElement1_ID, Integer....
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-gen\de\metas\acct\model\X_Fact_Acct_Summary.java
1
请完成以下Java代码
public HUQueryBuilder addHUIdsToAlwaysInclude(final Collection<HuId> huIdsToAlwaysInclude) { if (huIdsToAlwaysInclude == null || huIdsToAlwaysInclude.isEmpty()) { return this; } this._huIdsToAlwaysInclude.addAll(huIdsToAlwaysInclude); this._huIdsToExclude.removeAll(huIdsToAlwaysInclude); return this; ...
return this; } @Override public IHUQueryBuilder setExcludeReservedToOtherThan(@Nullable final HUReservationDocRef documentRef) { _excludeReservedToOtherThanRef = documentRef; return this; } @Override public IHUQueryBuilder setExcludeReserved() { _excludeReserved = true; return this; } @Override pu...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUQueryBuilder.java
1
请完成以下Java代码
public static List<String> extract(String text, int size) { IPhraseExtractor extractor = new MutualInformationEntropyPhraseExtractor(); return extractor.extractPhrase(text, size); } // public static void main(String[] args) // { // MutualInformationEntropyPhraseExtractor extractor ...
// "必须掌握计算机相关知识,熟练使用仿真工具MATLAB等,必须会一门编程语言。\n" + // "\n" + // "2研究方向\n" + // "视频算法工程师、图像处理算法工程师、音频算法工程师 通信基带算法工程师\n" + // "\n" + // "3目前国内外状况\n" + // "目前国内从事算法研究的工程师不少,但是高级算法工程师却很少,是一个非常紧缺的专业工程师。算法工程师根据研究领域来分主要有音频/视频...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\phrase\MutualInformationEntropyPhraseExtractor.java
1
请完成以下Java代码
protected List<String[]> convertToSequence(Sentence sentence) { List<String[]> charList = new LinkedList<String[]>(); for (Word w : sentence.toSimpleWordList()) { String word = CharTable.convert(w.value); if (word.length() == 1) { charList....
public Segment toSegment() { return new Segment() { @Override protected List<Term> segSentence(char[] sentence) { List<String> wordList = segment(new String(sentence)); List<Term> termList = new LinkedList<Term>(); f...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\hmm\HMMSegmenter.java
1
请在Spring Boot框架中完成以下Java代码
public BigDecimal getOffsetX() { return offsetX; } /** * Sets the value of the offsetX property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setOffsetX(BigDecimal value) { this.offsetX = value; } /** ...
* Gets the value of the connectionType property. * * @return * possible object is * {@link String } * */ public String getConnectionType() { return connectionType; } /** * Sets the value of the connectionType property. * * @param value ...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\Printer.java
2
请完成以下Java代码
public org.compiere.model.I_AD_UI_Element getAD_UI_Element() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_AD_UI_Element_ID, org.compiere.model.I_AD_UI_Element.class); } @Override public void setAD_UI_Element(org.compiere.model.I_AD_UI_Element AD_UI_Element) { set_ValueFromPO(COLUMNNAME_AD_UI_Elem...
* TooltipIconName AD_Reference_ID=540912 * Reference name: TooltipIcon */ public static final int TOOLTIPICONNAME_AD_Reference_ID=540912; /** text = text */ public static final String TOOLTIPICONNAME_Text = "text"; /** Set Tooltip Icon Name. @param TooltipIconName Tooltip Icon Name */ @Override public voi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_UI_ElementField.java
1
请完成以下Java代码
public <V> V get(Object key) { return hasKey(key) ? (V) this.context.get(key) : null; } @Override public boolean hasKey(Object key) { Assert.notNull(key, "key cannot be null"); return this.context.containsKey(key); } /** * Returns the {@link OAuth2TokenClaimsSet.Builder claims} allowing the ability to ...
public static final class Builder extends AbstractBuilder<OAuth2TokenClaimsContext, Builder> { private Builder(OAuth2TokenClaimsSet.Builder claimsBuilder) { Assert.notNull(claimsBuilder, "claimsBuilder cannot be null"); put(OAuth2TokenClaimsSet.Builder.class, claimsBuilder); } /** * Builds a new {@link...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\token\OAuth2TokenClaimsContext.java
1
请完成以下Java代码
public void setV_BPartnerCockpit_ID (final int V_BPartnerCockpit_ID) { if (V_BPartnerCockpit_ID < 1) { set_ValueNoCheck (COLUMNNAME_V_BPartnerCockpit_ID, null); } else { set_ValueNoCheck (COLUMNNAME_V_BPartnerCockpit_ID, Integer.valueOf(V_BPartnerCockpit_ID)); } } /** Get V_BPartnerCockpit_ID. @...
} /** Set Suchschlüssel. @param value Suchschlüssel für den Eintrag im erforderlichen Format - muss eindeutig sein */ @Override public void setvalue (final java.lang.String value) { set_Value (COLUMNNAME_value, value); } /** Get Suchschlüssel. @return Suchschlüssel für den Eintrag im erforderlichen F...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\adempiere\model\X_V_BPartnerCockpit.java
1
请完成以下Java代码
public ApiRequestAuditId getIdNotNull() { if (this.apiRequestAuditId == null) { throw new AdempiereException("getIdNotNull() should be called only for already persisted ApiRequestAudit objects!") .appendParametersToMessage() .setParameter("ApiRequestAudit", this); } return apiRequestAuditId; } ...
if (Check.isBlank(body)) { return Optional.empty(); } try { return Optional.of(objectMapper.readValue(body, Object.class)); } catch (final JsonProcessingException e) { throw new AdempiereException("Failed to parse body!") .appendParametersToMessage() .setParameter("ApiAuditRequest", th...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\audit\apirequest\request\ApiRequestAudit.java
1
请完成以下Java代码
public String getId() { return this.id; } /** * Creates a new {@link PublicKeyCredentialRpEntityBuilder} * @return a new {@link PublicKeyCredentialRpEntityBuilder} */ public static PublicKeyCredentialRpEntityBuilder builder() { return new PublicKeyCredentialRpEntityBuilder(); } /** * Used to create a...
/** * Sets the {@link #getId()} property. * @param id the id * @return the {@link PublicKeyCredentialRpEntityBuilder} */ public PublicKeyCredentialRpEntityBuilder id(String id) { this.id = id; return this; } /** * Creates a new {@link PublicKeyCredentialRpEntity}. * @return a new {@link P...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\api\PublicKeyCredentialRpEntity.java
1
请完成以下Java代码
public String getExpressionLanguage() { return expressionLanguageAttribute.getValue(this); } public void setExpressionLanguage(String expressionLanguage) { expressionLanguageAttribute.setValue(this, expressionLanguage); } public String getTypeLanguage() { return typeLanguageAttribute.getValue(this...
public Collection<Extension> getExtensions() { return extensionCollection.get(this); } public Collection<RootElement> getRootElements() { return rootElementCollection.get(this); } public Collection<BpmnDiagram> getBpmDiagrams() { return bpmnDiagramCollection.get(this); } public Collection<Rel...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\DefinitionsImpl.java
1
请完成以下Java代码
public class HUsToReceiveViewFactory extends HUEditorViewFactoryTemplate { public static final String WINDOW_ID_STRING = "husToReceive"; public static final WindowId WINDOW_ID = WindowId.fromJson(WINDOW_ID_STRING); public HUsToReceiveViewFactory() { super(ImmutableList.of(HUsToReceiveHUEditorViewCustomizer.insta...
return true; } @Override protected void customizeHUEditorViewRepository(final SqlHUEditorViewRepository.SqlHUEditorViewRepositoryBuilder huEditorViewRepositoryBuilder) { huEditorViewRepositoryBuilder.customProcessApplyPredicate(this::checkIfProcessDescriptorApplies); } private boolean checkIfProcessDescriptor...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\receiptSchedule\HUsToReceiveViewFactory.java
1
请完成以下Java代码
public static Class<?>[] getClasses(Collection<Configurations> configurations) { List<Configurations> collated = collate(configurations); LinkedHashSet<Class<?>> classes = collated.stream() .flatMap(Configurations::streamClasses) .collect(Collectors.toCollection(LinkedHashSet::new)); return ClassUtils.toCla...
else { collated.set(collated.size() - 1, collated.getLast().merge(configuration)); } } return collated; } private static List<Configurations> sortConfigurations(Collection<Configurations> configurations) { List<Configurations> sorted = new ArrayList<>(configurations); sorted.sort(COMPARATOR); return...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\annotation\Configurations.java
1
请完成以下Java代码
public class SynonymHelper { /** * 同一行最多支持编码这么多个单词 */ public static final long MAX_WORDS = 999L; /** * 尾数的长度,表示原子词的index */ public static final int MAX_INDEX_LENGTH = String.valueOf(MAX_WORDS).length(); public static long convertString2Id(String idString) { long id; ...
sbId.append((char)(id % (26 * 10 * 10 * 26 * 10 * 10) / (10 * 10 * 26 * 10 * 10) + 'a')); sbId.append((char)(id % (10 * 10 * 26 * 10 * 10) / (10 * 26 * 10 * 10) + '0')); sbId.append((char)(id % (10 * 26 * 10 * 10) / (26 * 10 * 10) + '0')); sbId.append((char)(id % (26 * 10 * ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\synonym\SynonymHelper.java
1
请完成以下Java代码
public int compare(GridField o1, GridField o2) { if (o1 == o2) { return 0; } final GridFieldVO vo1 = o1.getVO(); final GridFieldVO vo2 = o2.getVO(); final int seqNo1 = vo1.isDisplayedGrid() && vo1.getSeqNoGrid() > 0 ? vo1.getSeqNoGrid() : Integer.MAX_VALUE; final int seqNo2 = vo2.isD...
// Update final GridField gridField = columnName2GridField.get(columnName); loadTableColumn(column, gridField); } // // Reorder table's columns based on GridField settings int currentIdx = 0; final int visibleFieldsCount = visibleColumnNames.size(); for (final String columnName : visibleColumnNames) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\grid\CTableColumns2GridTabSynchronizer.java
1
请在Spring Boot框架中完成以下Java代码
public void addObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor) { this.objectPostProcessor.addObjectPostProcessor(objectPostProcessor); } /** * Sets the {@link SecurityBuilder} to be used. This is automatically set when using * {@link AbstractConfiguredSecurityBuilder#with(SecurityConfigurerAdap...
Class<?> oppClass = opp.getClass(); Class<?> oppType = GenericTypeResolver.resolveTypeArgument(oppClass, ObjectPostProcessor.class); if (oppType == null || oppType.isAssignableFrom(object.getClass())) { object = opp.postProcess(object); } } return object; } /** * Adds an {@link ObjectPost...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\SecurityConfigurerAdapter.java
2
请完成以下Java代码
public String getBio() { return bio; } public void setName(String name) { this.name = name; } public void setAge(int age) { this.age = age; } public String getRace() { return race; } public void setRace(String race) { this.race = race; } ...
return cityOfOrigin; } public void setCityOfOrigin(String cityOfOrigin) { this.cityOfOrigin = cityOfOrigin; } public String getFavoriteWeapon() { return favoriteWeapon; } public void setFavoriteWeapon(String favoriteWeapon) { this.favoriteWeapon = favoriteWeapon; }...
repos\tutorials-master\spring-ai-modules\spring-ai-3\src\main\java\com\baeldung\springaistructuredoutput\dto\Character.java
1
请完成以下Java代码
public static int usingTwoPointer(int num) { char[] numChars = Integer.toString(num) .toCharArray(); int pivotIndex = numChars.length - 2; while (pivotIndex >= 0 && numChars[pivotIndex] >= numChars[pivotIndex + 1]) { pivotIndex--; } if (pivotIndex == -1) ...
numChars[i] = numChars[j]; numChars[j] = temp; } private static void reverse(char[] numChars, int i, int j) { while (i < j) { swap(numChars, i, j); i++; j--; } } public static void main(String[] args) { int result = usingTwoPointer(53...
repos\tutorials-master\core-java-modules\core-java-numbers-8\src\main\java\com\baeldung\nexthighestnumbersamedigit\NextHighestNumber.java
1
请完成以下Java代码
default CompletableFuture<Output> execute(DelegatePlanItemInstance planItemInstance, AsyncTaskInvoker taskInvoker) { Input inputData = prepareExecutionData(planItemInstance); return taskInvoker.submit(() -> execute(inputData)); } /** * Method invoked before doing the execution to extract n...
* <b>IMPORTANT:</b> This is a completely new thread which does not participate in the transaction of the case. * * @param inputData the input data for the execution created via {@link #prepareExecutionData(DelegatePlanItemInstance)} * @return the output data of the execution * @see #execute(Delegate...
repos\flowable-engine-main\modules\flowable-cmmn-api\src\main\java\org\flowable\cmmn\api\delegate\FlowablePlanItemFutureJavaDelegate.java
1
请完成以下Java代码
public <T> T getProperty(final String propertyName) { final T defaultValue = null; return getProperty(propertyName, defaultValue); } @Override public <T> T getProperty(final String propertyName, final T defaultValue) { Check.assumeNotNull(propertyName, "propertyName not null"); if (properties == null) ...
public boolean isProperty(final String propertyName) { final boolean defaultValue = false; return isProperty(propertyName, defaultValue); } @Override public boolean isProperty(final String propertyName, final boolean defaultValue) { final Boolean value = getProperty(propertyName); if (value == null) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\api\impl\AbstractDunningContext.java
1
请完成以下Java代码
public Batch execute(CommandContext commandContext) { BatchElementConfiguration elementConfiguration = collectProcessInstanceIds(commandContext); ensureNotEmpty(BadUserRequestException.class, "processInstanceIds", elementConfiguration.getIds()); return new BatchBuilder(commandContext) .type(Batch....
return elementConfiguration; } public List<String> getProcessInstanceIds() { return processInstanceIds; } protected void writeUserOperationLog(CommandContext commandContext, int numInstances) { List<PropertyChange> propertyChanges = new ArrayList<>(); propertyChanges.add(new PropertyChange("nrOfI...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\batch\DeleteProcessInstanceBatchCmd.java
1
请完成以下Java代码
public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName()); } /** Set Other SQL Clause. @param OtherClause Other SQL Clause */ public void setOtherClause (String OtherClause) { set_Value (COLUMNNAME_OtherClause, OtherClause); } /** Get Other SQL Clause. @return...
@param WhereClause Fully qualified SQL WHERE clause */ public void setWhereClause (String WhereClause) { set_Value (COLUMNNAME_WhereClause, WhereClause); } /** Get Sql WHERE. @return Fully qualified SQL WHERE clause */ public String getWhereClause () { return (String)get_Value(COLUMNNAME_WhereCla...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_TemplateTable.java
1
请在Spring Boot框架中完成以下Java代码
private I_C_BankStatement getCreateCashStatement(final I_C_Payment payment) { final Properties ctx = InterfaceWrapperHelper.getCtx(payment); final String trxName = InterfaceWrapperHelper.getTrxName(payment); final int C_BP_BankAccount_ID = payment.getC_BP_BankAccount_ID(); final LocalDate statementDate = TimeU...
I_C_BP_BankAccount ba = InterfaceWrapperHelper.create(ctx, C_BP_BankAccount_ID, I_C_BP_BankAccount.class, trxName); if (ba == null || ba.getC_BP_BankAccount_ID() <= 0) { throw new AdempiereException("@NotFound@ @C_BP_BankAccount_ID@ (ID=" + C_BP_BankAccount_ID + ")"); } // Create Statement return createBa...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\service\impl\CashStatementBL.java
2
请在Spring Boot框架中完成以下Java代码
public void setDesc(String desc) { this.desc = desc; } public List<MenuEntity> getMenuList() { return menuList; } public void setMenuList(List<MenuEntity> menuList) { this.menuList = menuList; } public List<PermissionEntity> getPermissionList() { return permiss...
public void setPermissionList(List<PermissionEntity> permissionList) { this.permissionList = permissionList; } @Override public String toString() { return "RoleEntity{" + "id='" + id + '\'' + ", name='" + name + '\'' + ", desc='" + desc + '\''...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\entity\user\RoleEntity.java
2
请完成以下Java代码
public DocumentFieldLogicExpressionResultRevaluator getLogicExpressionResultRevaluator() { DocumentFieldLogicExpressionResultRevaluator logicExpressionRevaluator = this.logicExpressionRevaluator; if (logicExpressionRevaluator == null) { logicExpressionRevaluator = this.logicExpressionRevaluator = DocumentFiel...
} if (action.isWindowWriteAccessRequired()) { if (allowWindowEdit == null) { final DocumentEntityDescriptor entityDescriptor = document.getEntityDescriptor(); final AdWindowId adWindowId = entityDescriptor.getDocumentType().isWindow() ? entityDescriptor.getWindowId().toAdWindowId() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\json\JSONDocumentPermissions.java
1
请在Spring Boot框架中完成以下Java代码
public class QRCodeConfigurationService { @NonNull private final IHandlingUnitsBL handlingUnitsBL = Services.get(IHandlingUnitsBL.class); @NonNull private final IHandlingUnitsDAO handlingUnitsDAO = Services.get(IHandlingUnitsDAO.class); @NonNull private final IProductBL productBL = Services.get(IProductBL.class); @...
.map(HuId::ofRepoId) .collect(ImmutableSet.toImmutableSet()); } public boolean isAtLeastOneActiveConfig() { return repository.isAtLeastOneActiveConfig(); } @NonNull public ImmutableMap<QRCodeConfigurationId, QRCodeConfiguration> getByIds(@NonNull final ImmutableSet<QRCodeConfigurationId> qrCodeConfigurati...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\qrcodes\service\QRCodeConfigurationService.java
2
请完成以下Java代码
public int getRowCount() { return m_data.getMaxRow()+1; } // getRowCount /** * Get Number of Columns * @return no of cols */ public int getColCount() { return m_data.getMaxCol()+1; } // getColCount /** * Set Horizontal Space (top, between rows, button) * @param spaceH horizontal space (...
return m_spaceH; } // getSpaceH /** * Set Vertical Space (left, between columns, right) * @param spaceV vertical space (left, between columns, right) */ public void setSpaceV(int spaceV) { m_spaceV = spaceV; } // setSpaceV /** * Get Vertical Space (left, between columns, right) * @return s...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\ALayout.java
1
请在Spring Boot框架中完成以下Java代码
public class X_M_PropertiesConfig extends org.compiere.model.PO implements I_M_PropertiesConfig, org.compiere.model.I_Persistent { /** * */ private static final long serialVersionUID = 1359529093L; /** Standard Constructor */ public X_M_PropertiesConfig (Properties ctx, int M_PropertiesConfig_ID, Strin...
{ Integer ii = (Integer)get_Value(COLUMNNAME_M_PropertiesConfig_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Name. @param Name Alphanumeric identifier of the entity */ @Override public void setName (java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PropertiesConfig.java
2
请完成以下Java代码
protected boolean beforeSave (boolean newRecord) { // Reset info if (isSummary() && getAction() != null) setAction(null); String action = getAction(); if (action == null) action = ""; // Clean up references if (getAD_Window_ID() != 0 && !action.equals(ACTION_Window)) setAD_Window_ID(0); if (getA...
{ if (success) delete_Tree(MTree_Base.TREETYPE_Menu); return success; } // afterDelete /** * FR [ 1966326 ] * get Menu ID * @param String Menu Name * @return int retValue */ public static int getMenu_ID(String menuName) { int retValue = 0; String SQL = "SELECT AD_Menu_ID FROM AD_Menu WHERE N...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MMenu.java
1
请完成以下Java代码
protected void prepare() { for (ProcessInfoParameter para : getParametersAsArray()) { if (para.getParameter() == null) { // skip if no parameter value continue; } final String name = para.getParameterName(); if (name.equals(PARAM_DunningGrace)) { p_DunningGrace = para.getParameterAsT...
// We want to make sure that model validators are triggered EVEN if the old DunningGrace value equals with new DunningGrace value markColumnChanged(candidate, I_C_Dunning_Candidate.COLUMNNAME_DunningGrace); save(candidate); } private Iterator<I_C_Dunning_Candidate> retrieveSelectionIterator() { final StringBu...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\process\C_Dunning_Candidate_SetDunningGrace.java
1
请完成以下Java代码
public abstract class AbstractSecurityManager implements SecurityManager { private static final String INVALID_AUTHENTICATED_PRINCIPAL = "Invalid authenticated principal"; private final SecurityContextPrincipalProvider securityContextPrincipalProvider; private final PrincipalIdentityProvider principalIden...
@Override public List<String> getAuthenticatedUserGroups() { return securityContextPrincipalProvider .getCurrentPrincipal() .map(principalGroupsProvider::getGroups) .orElseThrow(this::securityException); } @Override public List<String> getAuthenticatedUserRol...
repos\Activiti-develop\activiti-api\activiti-api-runtime-shared\src\main\java\org\activiti\api\runtime\shared\security\AbstractSecurityManager.java
1
请完成以下Java代码
public boolean isApplicable(final Class<? extends AbstractStub<?>> stubType) { return true; } @Override public AbstractStub<?> createStub(final Class<? extends AbstractStub<?>> stubType, final Channel channel) { try { // Search for public static *Grpc#new*Stub(Channel) ...
&& parameters.length == 1 && Channel.class.equals(parameters[0].getType())) { return AbstractStub.class.cast(method.invoke(null, channel)); } } } // Search for a public constructor *Stub(Channel) ...
repos\grpc-spring-master\grpc-client-spring-boot-starter\src\main\java\net\devh\boot\grpc\client\stubfactory\FallbackStubFactory.java
1
请在Spring Boot框架中完成以下Java代码
public class EdgeConnectionTriggerProcessor implements NotificationRuleTriggerProcessor<EdgeConnectionTrigger, EdgeConnectionNotificationRuleTriggerConfig> { @Override public boolean matchesFilter(EdgeConnectionTrigger trigger, EdgeConnectionNotificationRuleTriggerConfig triggerConfig) { EdgeConnectivi...
return EdgeConnectionNotificationInfo.builder() .eventType(trigger.isConnected() ? "connected" : "disconnected") .tenantId(trigger.getTenantId()) .customerId(trigger.getCustomerId()) .edgeId(trigger.getEdgeId()) .edgeName(trigger.getEdgeNam...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\notification\rule\trigger\EdgeConnectionTriggerProcessor.java
2
请完成以下Java代码
public Double getX() { return xAttribute.getValue(this); } public void setX(double x) { xAttribute.setValue(this, x); } public Double getY() { return yAttribute.getValue(this); } public void setY(double y) { yAttribute.setValue(this, y); } public Double getWidth() {
return widthAttribute.getValue(this); } public void setWidth(double width) { widthAttribute.setValue(this, width); } public Double getHeight() { return heightAttribute.getValue(this); } public void setHeight(double height) { heightAttribute.setValue(this, height); } }
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\dc\BoundsImpl.java
1
请完成以下Java代码
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((courseId == null) ? 0 : courseId.hashCode()); result = prime * result + ((studentId == null) ? 0 : studentId.hashCode()); return result; } @Override public boolean equals(Object...
return false; CourseRatingKey other = (CourseRatingKey) obj; if (courseId == null) { if (other.courseId != null) return false; } else if (!courseId.equals(other.courseId)) return false; if (studentId == null) { if (other.studentId != nu...
repos\tutorials-master\persistence-modules\spring-jpa\src\main\java\com\baeldung\manytomany\model\CourseRatingKey.java
1
请完成以下Java代码
public static LocalPortForwarder localPortForwarding(SSHClient ssh) throws IOException, InterruptedException { LocalPortForwarder locForwarder; final Parameters params = new Parameters(ssh.getRemoteHostname(), 8081, "google.com", 80); final ServerSocket ss = new ServerSocket(); ss.setReu...
try { ssh.addHostKeyVerifier(new PromiscuousVerifier()); ssh.connect(hostName, 22); ssh.getConnection() .getKeepAlive() .setKeepAliveInterval(5); ssh.authPassword(userName, password); Session session = ssh.startSession(); ...
repos\tutorials-master\libraries-security-2\src\main\java\com\baeldung\sshj\SSHJAppDemo.java
1
请完成以下Java代码
public class ImmutableFeatureMDatMap extends FeatureMap { MutableDoubleArrayTrieInteger dat; public ImmutableFeatureMDatMap() { super(); dat = new MutableDoubleArrayTrieInteger(); } public ImmutableFeatureMDatMap(TagSet tagSet) { super(tagSet); dat = new Mutable...
@Override public int size() { return dat.size(); } @Override public Set<Map.Entry<String, Integer>> entrySet() { return dat.entrySet(); } @Override public void save(DataOutputStream out) throws IOException { tagSet.save(out); dat.save(out); }...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\perceptron\feature\ImmutableFeatureMDatMap.java
1
请在Spring Boot框架中完成以下Java代码
public Map<String, List<Object>> getAttributes() { return this.attributes; } @Override public String getResponseValue() { return this.responseValue; } public static final class Builder { private final String responseValue; private String nameId; private List<String> sessionIndexes = List.of(); pr...
public Builder nameId(String nameId) { this.nameId = nameId; return this; } public Builder sessionIndexes(List<String> sessionIndexes) { this.sessionIndexes = sessionIndexes; return this; } public Builder attributes(Map<String, List<Object>> attributes) { this.attributes = attributes; return...
repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\authentication\Saml2ResponseAssertion.java
2
请在Spring Boot框架中完成以下Java代码
public void setInterchangeHeader(InterchangeHeaderType value) { this.interchangeHeader = value; } /** * The ID represents the unique number of the message. * * @return * possible object is * {@link String } * */ public String getID() { return...
*/ public void setReferences(String value) { this.references = value; } /** * Flag indicating whether the message is a test message or not. * * @return * possible object is * {@link Boolean } * */ public Boolean isTestIndicator() { return...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\messaging\header\ErpelBusinessDocumentHeaderType.java
2
请完成以下Java代码
public String getFunctionNameFQ() {return className + " - " + functionName;} } enum Type { MODEL_INTERCEPTOR("modelInterceptor"), DOC_ACTION("docAction"), ASYNC_WORKPACKAGE("asyncWorkPackage"), SCHEDULER("scheduler"), EVENTBUS_REMOTE_ENDPOINT("eventbus-remote-endpoint"), REST_CONTROLLER("rest-cont...
DB("db"); Type(final String code) { this.code = code; } public boolean isAnyRestControllerType() { return this == Type.REST_CONTROLLER || this == Type.REST_CONTROLLER_WITH_WINDOW_ID; } @Getter private final String code; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.monitoring\src\main\java\de\metas\monitoring\adapter\PerformanceMonitoringService.java
1
请在Spring Boot框架中完成以下Java代码
public class ExternalSystemAlbertaConfigId implements IExternalSystemChildConfigId { int repoId; @JsonCreator @NonNull public static ExternalSystemAlbertaConfigId ofRepoId(final int repoId) { return new ExternalSystemAlbertaConfigId(repoId); } @Nullable public static ExternalSystemAlbertaConfigId ofRepoIdOr...
{ return getRepoId(); } private ExternalSystemAlbertaConfigId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "ExternalSystem_Config_Alberta_ID"); } @Override public ExternalSystemType getType() { return ExternalSystemType.Alberta; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\alberta\ExternalSystemAlbertaConfigId.java
2
请完成以下Java代码
public ResponseEntity<JWTToken> authorize(@Valid @RequestBody LoginVM loginVM) { UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(loginVM.getUsername(), loginVM.getPassword()); Authentication authentication = this.authenticationManager.authe...
JWTToken(String idToken) { this.idToken = idToken; } @JsonProperty("id_token") String getIdToken() { return idToken; } void setIdToken(String idToken) { this.idToken = idToken; } } }
repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\web\rest\UserJWTController.java
1
请完成以下Java代码
private static TableRecordReference toTableRecordRef(final CustomsInvoice customsInvoice) { return TableRecordReference.of(I_C_Customs_Invoice.Table_Name, customsInvoice.getId()); } private final UserNotificationRequest.UserNotificationRequestBuilder newUserNotificationRequest() { return UserNotificationReques...
return customsInvoice.getLastUpdatedBy(); } // // Fallback: notify only the creator else { return customsInvoice.getCreatedBy(); } } private void postNotifications(final List<UserNotificationRequest> notifications) { Services.get(INotificationBL.class).sendAfterCommit(notifications); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\customs\event\CustomsInvoiceUserNotificationsProducer.java
1
请完成以下Java代码
public I_R_Status getR_Status() throws RuntimeException { return (I_R_Status)MTable.get(getCtx(), I_R_Status.Table_Name) .getPO(getR_Status_ID(), get_TrxName()); } /** Set Status. @param R_Status_ID Request Status */ public void setR_Status_ID (int R_Status_ID) { if (R_Status_ID < 1) set_Valu...
/** Set Sales Representative. @param SalesRep_ID Sales Representative or Company Agent */ public void setSalesRep_ID (int SalesRep_ID) { if (SalesRep_ID < 1) set_ValueNoCheck (COLUMNNAME_SalesRep_ID, null); else set_ValueNoCheck (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_ID)); } /** Get ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\callcenter\model\X_RV_R_Group_Prospect.java
1
请完成以下Java代码
public void setPeriod_OpenFuture (final int Period_OpenFuture) { set_Value (COLUMNNAME_Period_OpenFuture, Period_OpenFuture); } @Override public int getPeriod_OpenFuture() { return get_ValueAsInt(COLUMNNAME_Period_OpenFuture); } @Override public void setPeriod_OpenHistory (final int Period_OpenHistory) ...
} /** * TaxCorrectionType AD_Reference_ID=392 * Reference name: C_AcctSchema TaxCorrectionType */ public static final int TAXCORRECTIONTYPE_AD_Reference_ID=392; /** None = N */ public static final String TAXCORRECTIONTYPE_None = "N"; /** Write_OffOnly = W */ public static final String TAXCORRECTIONTYPE_Wr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_AcctSchema.java
1
请完成以下Spring Boot application配置
mp.jwt.verify.publickey.location=publicKey.pem quarkus.native.resources.includes=publicKey.pem mp.jwt.verify.issuer=my-issuer smallrye.jwt.sign.key.location=privateKey.pem quarkus.datasource.db-kind=h2 quarkus.datasource.jdbc.url=jdbc:h2:mem:testdb_;DB_CLOSE_DELAY=-1;MODE=MYSQL;DB_CLOSE_ON_EXIT=TRUE;DATABASE_TO_LOWER=...
cy.role-policy1.permissions.SEND_MESSAGE=SEND_MESSAGE quarkus.http.auth.policy.role-policy1.permissions.CREATE_USER=CREATE_USER quarkus.http.auth.policy.role-policy1.permissions.OPERATOR=OPERATOR quarkus.http.auth.permission.roles1.paths=/permission-based/* quarkus.http.auth.permission.roles1.policy=role-policy1
repos\tutorials-master\quarkus-modules\quarkus-rbac\src\main\resources\application.properties
2
请完成以下Java代码
public void setDateNextRun(Timestamp dateNextWork) { impProcessor.setDateNextRun(dateNextWork); } @Override public Timestamp getDateLastRun() { return impProcessor.getDateLastRun(); } @Override public void setDateLastRun(Timestamp dateLastRun) { impProcessor.setDateLastRun(dateLastRun); } @Override ...
} @Override public AdempiereProcessorLog[] getLogs() { final List<AdempiereProcessorLog> list = Services.get(IIMPProcessorDAO.class).retrieveAdempiereProcessorLogs(impProcessor); return list.toArray(new AdempiereProcessorLog[list.size()]); } @Override public String get_TableName() { return I_IMP_Processo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\server\rpl\api\impl\IMPProcessorAdempiereProcessorAdapter.java
1
请完成以下Java代码
private final Class<?> getDocLineClass(final int adTableId) { final String tableName = tableDAO.retrieveTableName(adTableId); return headerTableName2lineModelClass.get(tableName); } private final IActivityAware getDocLineActivityAwareOrNull(final I_Fact_Acct_ActivityChangeRequest request) { final Class<?> li...
} return activityAware; } @VisibleForTesting static interface IActivityAware { String COLUMNNAME_C_Activity_ID = "C_Activity_ID"; int getC_Activity_ID(); void setC_Activity_ID(final int activityId); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\process\Fact_Acct_ActivityChangeRequest_Process.java
1
请完成以下Java代码
public boolean isPKey() { return m_isPKey; } // isPKey /** * Column value forces page break * @return true if page break */ public boolean isPageBreak() { return m_isPageBreak; } // isPageBreak /*************************************************************************/ /** * HashCode * @ret...
*/ public String toString() { StringBuffer sb = new StringBuffer(m_columnName).append("=").append(m_value); if (m_isPKey) sb.append("(PK)"); return sb.toString(); } // toString /** * Value Has Key * @return true if value has a key */ public boolean hasKey() { return m_value instanceof NamePair...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\PrintDataElement.java
1
请完成以下Java代码
private static Converter<Object, ?> getConverter(TypeDescriptor targetDescriptor) { return (source) -> CLAIM_CONVERSION_SERVICE.convert(source, OBJECT_TYPE_DESCRIPTOR, targetDescriptor); } private static List<String> convertScope(Object scope) { if (scope == null) { return Collections.emptyList(); } ...
responseClaims.put(OAuth2TokenIntrospectionClaimNames.SCOPE, StringUtils.collectionToDelimitedString(source.getScopes(), " ")); } if (source.getExpiresAt() != null) { responseClaims.put(OAuth2TokenIntrospectionClaimNames.EXP, source.getExpiresAt().getEpochSecond()); } if (source.getIssuedAt() != n...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\http\converter\OAuth2TokenIntrospectionHttpMessageConverter.java
1
请完成以下Java代码
public final C_AllocationHdr_Builder currencyId(@NonNull final CurrencyId currencyId) { return currencyId(currencyId.getRepoId()); } public final C_AllocationHdr_Builder currencyId(int currencyId) { assertNotBuilt(); allocHdr.setC_Currency_ID(currencyId); return this; } public final C_AllocationHdr_Buil...
{ assertNotBuilt(); final C_AllocationLine_Builder lineBuilder = new C_AllocationLine_Builder(this); allocationLineBuilders.add(lineBuilder); return lineBuilder; } public final ImmutableList<I_C_AllocationLine> getC_AllocationLines() { return ImmutableList.copyOf(allocationLines); } public C_Allocati...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\allocation\api\C_AllocationHdr_Builder.java
1
请完成以下Java代码
public void setUseLifeYears (int UseLifeYears) { set_ValueNoCheck (COLUMNNAME_UseLifeYears, Integer.valueOf(UseLifeYears)); } /** Get Usable Life - Years. @return Years of the usable life of the asset */ public int getUseLifeYears () { Integer ii = (Integer)get_Value(COLUMNNAME_UseLifeYears); if (ii =...
@return Currently used units of the assets */ public int getUseUnits () { Integer ii = (Integer)get_Value(COLUMNNAME_UseUnits); if (ii == null) return 0; return ii.intValue(); } /** Set Version No. @param VersionNo Version Number */ public void setVersionNo (String VersionNo) { set_ValueN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Change.java
1
请完成以下Java代码
public WindowId getWindowId() { return WINDOW_ID; } @Override public void put(final IView view) { views.put(view); } @Nullable @Override public BankStatementReconciliationView getByIdOrNull(final ViewId viewId) { return BankStatementReconciliationView.cast(views.getByIdOrNull(viewId)); } @Override ...
@Override public void invalidateView(final ViewId viewId) { views.invalidateView(viewId); } private List<RelatedProcessDescriptor> getPaymentToReconcilateProcesses() { return ImmutableList.of( createProcessDescriptor(PaymentsToReconcileView_Reconcile.class)); } private final RelatedProcessDescriptor cr...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\bankstatement_reconciliation\BankStatementReconciliationViewFactory.java
1
请完成以下Java代码
public InvoiceCandidate2WorkpackageAggregator setAD_PInstance_Creator_ID(@NonNull final PInstanceId adPInstanceId) { this.pInstanceId = adPInstanceId; return this; } public InvoiceCandidate2WorkpackageAggregator setAsyncBatchId(final AsyncBatchId asyncBatchId) { _asyncBatchId = asyncBatchId; return this; ...
} public InvoiceCandidate2WorkpackageAggregator setInvoicingParams(@NonNull final IInvoicingParams invoicingParams) { this.invoicingParams = invoicingParams; return this; } /** * Gets unprocessed workpackages queue size */ public final int getQueueSize() { return getWorkPackageQueue().size(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceCandidate2WorkpackageAggregator.java
1