instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public class RewindableReader extends Reader { private static final SpinCoreLogger LOG = SpinLogger.CORE_LOGGER; protected PushbackReader wrappedReader; protected char[] buffer; protected int pos; protected boolean rewindable; public RewindableReader(Reader input, int size) { this.wrappedReader = ne...
wrappedReader.mark(readlimit); } public boolean markSupported() { return wrappedReader.markSupported(); } public synchronized void reset() throws IOException { wrappedReader.reset(); } public long skip(long n) throws IOException { return wrappedReader.skip(n); } /** * Rewinds the read...
repos\camunda-bpm-platform-master\spin\core\src\main\java\org\camunda\spin\impl\util\RewindableReader.java
1
请完成以下Java代码
public void setIsDepreciated (boolean IsDepreciated) { set_Value (COLUMNNAME_IsDepreciated, Boolean.valueOf(IsDepreciated)); } /** Get Depreciate. @return The asset will be depreciated */ public boolean isDepreciated () { Object oo = get_Value(COLUMNNAME_IsDepreciated); if (oo != null) { if (oo...
return false; } /** Set Track Issues. @param IsTrackIssues Enable tracking issues for this asset */ public void setIsTrackIssues (boolean IsTrackIssues) { set_Value (COLUMNNAME_IsTrackIssues, Boolean.valueOf(IsTrackIssues)); } /** Get Track Issues. @return Enable tracking issues for this asset */...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Group.java
1
请完成以下Java代码
public List<String> shortcutFieldOrder() { return Arrays.asList(NAME_KEY); } @Override public GatewayFilter apply(Config config) { // AbstractChangeRequestUriGatewayFilterFactory.apply() returns // OrderedGatewayFilter OrderedGatewayFilter gatewayFilter = (OrderedGatewayFilter) super.apply(config); return...
log.info("Request url is invalid: url={}, error=URI is not absolute", url); return Optional.ofNullable(null); } return Optional.of(uri); } catch (IllegalArgumentException e) { log.info("Request url is invalid : url={}, error={}", config.getTemplate(), e.getMessage()); return Optional.ofNullable(null...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\SetRequestUriGatewayFilterFactory.java
1
请在Spring Boot框架中完成以下Java代码
public DataResponse<HistoryJobResponse> getHistoryJobs(@ApiParam(hidden = true) @RequestParam Map<String, String> allRequestParams) { HistoryJobQuery query = managementService.createHistoryJobQuery(); if (allRequestParams.containsKey("id")) { query.jobId(allRequestParams.get("id")); ...
if (allRequestParams.containsKey("tenantIdLike")) { query.jobTenantIdLike(allRequestParams.get("tenantIdLike")); } if (allRequestParams.containsKey("withoutTenantId")) { if (Boolean.parseBoolean(allRequestParams.get("withoutTenantId"))) { query.jobWithoutTenantId(...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\management\HistoryJobCollectionResource.java
2
请在Spring Boot框架中完成以下Java代码
public FlowableEventDispatcher getEventDispatcher() { return configuration.getEventDispatcher(); } public JobManager getJobManager() { return configuration.getJobManager(); } public JobEntityManager getJobEntityManager() { return configuration.getJobEntityManager(); } ...
public ExternalWorkerJobEntityManager getExternalWorkerJobEntityManager() { return configuration.getExternalWorkerJobEntityManager(); } public TimerJobEntityManager getTimerJobEntityManager() { return configuration.getTimerJobEntityManager(); } public HistoryJobEntityManager getHis...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\ServiceImpl.java
2
请完成以下Java代码
public Catalina startServer() throws Exception { URL staticUrl = getClass().getClassLoader().getResource("static"); if (staticUrl == null) { throw new IllegalStateException("Static directory not found in classpath"); } Path staticDir = Paths.get(staticUrl.toURI()); ...
Files.writeString(configFile, config); System.setProperty("catalina.base", baseDir.toString()); System.setProperty("catalina.home", baseDir.toString()); Catalina catalina = new Catalina(); catalina.load(new String[]{"-config", configFile.toString()}); catalina.start(); ...
repos\tutorials-master\server-modules\apache-tomcat-2\src\main\java\com\baeldung\tomcat\AppServerXML.java
1
请完成以下Java代码
public java.sql.Timestamp getReminderDate() { return get_ValueAsTimestamp(COLUMNNAME_ReminderDate); } /** * Source AD_Reference_ID=541284 * Reference name: PO Sources */ public static final int SOURCE_AD_Reference_ID=541284; /** Material Disposition = MD */ public static final String SOURCE_MaterialDis...
} @Override public void setUserElementString6 (final @Nullable String UserElementString6) { set_Value (COLUMNNAME_UserElementString6, UserElementString6); } @Override public String getUserElementString6() { return get_ValueAsString(COLUMNNAME_UserElementString6); } @Override public void setUserElement...
repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java-gen\de\metas\purchasecandidate\model\X_C_PurchaseCandidate.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isGlobalAcquireLockEnabled() { return globalAcquireLockEnabled; } public void setGlobalAcquireLockEnabled(boolean globalAcquireLockEnabled) { this.globalAcquireLockEnabled = globalAcquireLockEnabled; } public String getGlobalAcquireLockPrefix() { return globalAcq...
public Duration getTimerLockForceAcquireAfter() { return timerLockForceAcquireAfter; } public void setTimerLockForceAcquireAfter(Duration timerLockForceAcquireAfter) { this.timerLockForceAcquireAfter = timerLockForceAcquireAfter; } public Duration getResetExpiredJobsInterval() { ...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\asyncexecutor\AsyncJobExecutorConfiguration.java
2
请完成以下Java代码
public List<GarbageCollectorInfo> getGarbageCollectors() { return this.garbageCollectors; } public static class MemoryUsageInfo { private final MemoryUsage memoryUsage; MemoryUsageInfo(MemoryUsage memoryUsage) { this.memoryUsage = memoryUsage; } public long getInit() { return this.memoryU...
/** * Garbage collection information. * * @since 3.5.0 */ public static class GarbageCollectorInfo { private final String name; private final long collectionCount; GarbageCollectorInfo(GarbageCollectorMXBean garbageCollectorMXBean) { this.name = garbageCollectorMXBean.getName(); this.c...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\info\ProcessInfo.java
1
请完成以下Java代码
protected ComponentDescription getProcessApplicationComponent(DeploymentUnit deploymentUnit) { ComponentDescription paComponentDescription = ProcessApplicationAttachments.getProcessApplicationComponent(deploymentUnit); return paComponentDescription; } @SuppressWarnings("unchecked") protected ProcessEngin...
// scan for process definitions if(PropertyHelper.getBooleanProperty(processArchive.getProperties(), ProcessArchiveXml.PROP_IS_SCAN_FOR_PROCESS_DEFINITIONS, process.isEmpty())) { //always use VFS scanner on JBoss final VfsProcessApplicationScanner scanner = new VfsProcessApplicationScanner(); St...
repos\camunda-bpm-platform-master\distro\wildfly26\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\deployment\processor\ProcessApplicationDeploymentProcessor.java
1
请完成以下Java代码
public class ComparePerformance { String strInitial = "springframework"; String strFinal = ""; String replacement = "java-"; @Benchmark public String benchmarkStringConcatenation() { strFinal = ""; strFinal += strInitial; return strFinal; } @Benchmark public St...
strFinal = strInitial.replaceFirst("spring", replacement); return strFinal; } @Benchmark public StringBuffer benchmarkStringBufferReplacement() { StringBuffer stringBuffer = new StringBuffer(strInitial); stringBuffer.replace(0,6, replacement); return stringBuffer; } ...
repos\tutorials-master\core-java-modules\core-java-strings\src\main\java\com\baeldung\stringbuffer\ComparePerformance.java
1
请完成以下Java代码
public EventSubscriptionEntityManager getEventSubscriptionEntityManager() { return processEngineConfiguration.getEventSubscriptionEntityManager(); } public HistoryManager getHistoryManager() { return processEngineConfiguration.getHistoryManager(); } public JobManager getJobManager() { ...
public ActivitiEventDispatcher getEventDispatcher() { return processEngineConfiguration.getEventDispatcher(); } public ActivitiEngineAgenda getAgenda() { return agenda; } public Object getResult() { return resultStack.pollLast(); } public void setResult(Object result) ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\interceptor\CommandContext.java
1
请完成以下Java代码
protected boolean shouldFetchValue(HistoricDetailVariableInstanceUpdateEntity entity) { // do not fetch values for byte arrays eagerly (unless requested by the user) return isByteArrayFetchingEnabled || !AbstractTypedValueSerializer.BINARY_VALUE_TYPES.contains(entity.getSerializer().getType().getName())...
} public String getType() { return type; } public boolean getExcludeTaskRelated() { return excludeTaskRelated; } public String getDetailId() { return detailId; } public String[] getProcessInstanceIds() { return processInstanceIds; } public Date getOccurredBefore() { return occ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricDetailQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class AdImageRepository { private final CCache<AdImageId, AdImage> cache = CCache.<AdImageId, AdImage>builder() .cacheMapType(CCache.CacheMapType.LRU) .initialCapacity(1000) .tableName(I_AD_Image.Table_Name) .build(); public AdImage getById(@NonNull final AdImageId adImageId) { return cache.get...
return fromRecord(record); } public static AdImage fromRecord(@NonNull I_AD_Image record) { final String filename = record.getName(); return AdImage.builder() .id(AdImageId.ofRepoId(record.getAD_Image_ID())) .lastModified(record.getUpdated().toInstant()) .filename(filename) .contentType(MimeTyp...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\image\AdImageRepository.java
2
请完成以下Java代码
default Predicate<ServerWebExchange> apply(Consumer<C> consumer) { C config = newConfig(); consumer.accept(config); beforeApply(config); return apply(config); } default AsyncPredicate<ServerWebExchange> applyAsync(Consumer<C> consumer) { C config = newConfig(); consumer.accept(config); beforeApply(conf...
@Override default C newConfig() { throw new UnsupportedOperationException("newConfig() not implemented"); } default void beforeApply(C config) { } Predicate<ServerWebExchange> apply(C config); default AsyncPredicate<ServerWebExchange> applyAsync(C config) { return toAsyncPredicate(apply(config)); } defa...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\handler\predicate\RoutePredicateFactory.java
1
请完成以下Java代码
public class WordNatureWeightModelMaker { public static boolean makeModel(String corpusLoadPath, String modelSavePath) { Set<String> posSet = new TreeSet<String>(); DictionaryMaker dictionaryMaker = new DictionaryMaker(); for (CoNLLSentence sentence : CoNLLLoader.loadSentenceList(corpusL...
IOUtil.saveTxt("data/model/dependency/pos-thu.txt", sb.toString()); return dictionaryMaker.saveTxtTo(modelSavePath); } private static void addPair(String from, String to, String label, DictionaryMaker dictionaryMaker) { dictionaryMaker.add(new Word(from + "@" + to, label)); dictiona...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dependency\model\WordNatureWeightModelMaker.java
1
请完成以下Java代码
protected DbOperation performBatchCleanup() { return Context .getCommandContext() .getHistoricBatchManager() .deleteHistoricBatchesByRemovalTime(ClockUtil.getCurrentTime(), configuration.getMinuteFrom(), configuration.getMinuteTo(), getBatchSize()); } protected DbOperation p...
return Context .getProcessEngineConfiguration() .isDmnEnabled(); } protected Integer getTaskMetricsTimeToLive() { return Context .getProcessEngineConfiguration() .getParsedTaskMetricsTimeToLive(); } protected boolean shouldRescheduleNow() { int batchSize = getBatchSize(...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\historycleanup\HistoryCleanupRemovalTime.java
1
请在Spring Boot框架中完成以下Java代码
public class WebMvcConfig implements WebMvcConfigurer { @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/statics/**").addResourceLocations("classpath:/statics/"); } // @Bean // public FilterRegistrationBean xssFilterRegistration() { /...
//自定义配置... FastJsonConfig config = new FastJsonConfig(); config.setDateFormat("yyyy-MM-dd HH:mm:ss"); // 添加更多解析特性以提高容错性 config.setReaderFeatures( JSONReader.Feature.FieldBased, JSONReader.Feature.SupportArrayToBean, // JSONReader.Feature.Ig...
repos\SpringBootCodeGenerator-master\src\main\java\com\softdev\system\generator\config\WebMvcConfig.java
2
请完成以下Java代码
public ProcessPreconditionsResolution checkPreconditionsApplicable(final @NonNull IProcessPreconditionsContext context) { if (context.isNoSelection()) { return ProcessPreconditionsResolution.rejectBecauseNoSelection(); } if (context.isMoreThanOneSelected()) { return ProcessPreconditionsResolution.rejec...
@Override protected String doIt() { final DeliveryOrderParcelId parcelId = DeliveryOrderParcelId.ofRepoIdOrNull(getRecord_ID()); if (parcelId == null) { return MSG_OK; } final DeliveryOrderParcel parcel = orderRepository.getParcelById(parcelId); if (parcel == null || parcel.getLabelPdfBase64() == null)...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.commons\src\main\java\de\metas\shipper\gateway\commons\process\Carrier_ShipmentOrder_Parcel_Label_Download.java
1
请完成以下Java代码
private float getTabPos (float xPos, float length) { float retValue = xPos + length; int iLength = (int)Math.ceil(length); int tabSpace = iLength % 30; retValue += (30 - tabSpace); return retValue; } // getTabPos /** * String Representation * @return info */ @Override public String toString() {...
.append("),Width=").append(p_width).append("(").append(p_maxHeight) .append("),PageLocation=").append(p_pageLocation).append(" - "); for (int i = 0; i < m_string_paper.length; i++) { if (m_string_paper.length > 1) sb.append(Env.NL).append(i).append(":"); AttributedCharacterIterator iter = m_string_pape...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\layout\StringElement.java
1
请完成以下Java代码
public class SaveService { /** 设置集合名称 */ private static final String COLLECTION_NAME = "users"; @Resource private MongoTemplate mongoTemplate; /** * 存储【一条】用户信息,如果文档信息已经【存在就执行更新】 * * @return 存储的文档信息 */ public Object save() { // 设置用户信息 User user = new User() ...
.setAge(22) .setSex("男") .setRemake("无") .setSalary(2800) .setName("kuiba") .setBirthday(new Date()) .setStatus(new Status().setHeight(169).setWeight(150)); // 存储用户信息,如果文档信息已经存在就执行更新 User newUser = mongoTempl...
repos\springboot-demo-master\mongodb\src\main\java\demo\et\mongodb\service\SaveService.java
1
请在Spring Boot框架中完成以下Java代码
public class RatingService { @Autowired private RatingRepository ratingRepository; @Autowired private RatingCacheRepository cacheRepository; @CircuitBreaker(name = "ratingsByBookIdFromDB", fallbackMethod = "findCachedRatingsByBookId") public List<Rating> findRatingsByBookId(Long bookId) { ...
newRating.setStars(rating.getStars()); Rating persisted = ratingRepository.save(newRating); cacheRepository.createRating(persisted); return persisted; } @Transactional(propagation = Propagation.REQUIRED) public void deleteRating(Long ratingId) { ratingRepository.deleteById(r...
repos\tutorials-master\spring-cloud-modules\spring-cloud-bootstrap\zipkin-log-svc-rating\src\main\java\com\baeldung\spring\cloud\bootstrap\svcrating\rating\RatingService.java
2
请完成以下Java代码
public static Map<String, String> byBufferedReader(String filePath, DupKeyOption dupKeyOption) { HashMap<String, String> map = new HashMap<>(); String line; try (BufferedReader reader = new BufferedReader(new FileReader(filePath))) { while ((line = reader.readLine()) != null) { ...
public static Map<String, List<String>> aggregateByKeys(String filePath) { Map<String, List<String>> map = new HashMap<>(); try (Stream<String> lines = Files.lines(Paths.get(filePath))) { lines.filter(line -> line.contains(":")) .forEach(line -> { String[]...
repos\tutorials-master\core-java-modules\core-java-io-4\src\main\java\com\baeldung\filetomap\FileToHashMap.java
1
请在Spring Boot框架中完成以下Java代码
public static ProcessEnginePlugin spinProcessEnginePlugin() { return new SpringBootSpinProcessEnginePlugin(); } } @ConditionalOnClass(ConnectProcessEnginePlugin.class) @Configuration static class ConnectConfiguration { @Bean @ConditionalOnMissingBean(name = "connectProcessEnginePlugin") ...
For more details: https://jira.camunda.com/browse/CAM-9043 */ @ConditionalOnInitializedRestarter @Configuration static class InitializedRestarterConfiguration { @Bean @ConditionalOnMissingBean(name = "applicationContextClassloaderSwitchPlugin") public ApplicationContextClassloaderSwitchPlugin appl...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\CamundaBpmPluginConfiguration.java
2
请完成以下Java代码
public String toString() { StringBuffer sb = new StringBuffer ("X_CM_Template_Ad_Cat[") .append(get_ID()).append("]"); return sb.toString(); } public I_CM_Ad_Cat getCM_Ad_Cat() throws RuntimeException { return (I_CM_Ad_Cat)MTable.get(getCtx(), I_CM_Ad_Cat.Table_Name) .getPO(getCM_...
/** Get Description. @return Optional short description of the record */ public String getDescription () { return (String)get_Value(COLUMNNAME_Description); } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name)...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_Template_Ad_Cat.java
1
请完成以下Java代码
public String getDescription() { return description; } @Override public String getDeploymentId() { return deploymentId; } @Override public void setDeploymentId(String deploymentId) { this.deploymentId = deploymentId; } @Override public int getVersion() { ...
public void setDiagramResourceName(String diagramResourceName) { this.diagramResourceName = diagramResourceName; } @Override public String getTenantId() { return tenantId; } @Override public void setTenantId(String tenantId) { this.tenantId = tenantId; } @Overr...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\persistence\entity\DecisionEntityImpl.java
1
请完成以下Java代码
public boolean isLookup() { return gridField.isLookup(); } public Lookup getLookup() { return gridField.getLookup(); } public boolean isVirtualColumn() { return gridField.isVirtualColumn(); } /** * Creates the editor component * * @param tableEditor true if table editor * @return editor or nul...
public String getValueDisplay(final Object value) { String infoDisplay = value == null ? "" : value.toString(); if (isLookup()) { final Lookup lookup = getLookup(); if (lookup != null) { infoDisplay = lookup.getDisplay(value); } } else if (getDisplayType() == DisplayType.YesNo) { final I...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\FindPanelSearchField.java
1
请完成以下Java代码
public static DDOrderUserNotificationProducer newInstance() { return new DDOrderUserNotificationProducer(); } public DDOrderUserNotificationProducer notifyGenerated(final Collection<? extends I_DD_Order> orders) { if (orders == null || orders.isEmpty()) { return this; } postNotifications(orders.strea...
.contentADMessageParam(orderRef) .targetAction(UserNotificationRequest.TargetRecordAction.of(orderRef)) .build(); } private UserNotificationRequest.UserNotificationRequestBuilder newUserNotificationRequest() { return UserNotificationRequest.builder() .topic(USER_NOTIFICATIONS_TOPIC); } private User...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\event\DDOrderUserNotificationProducer.java
1
请在Spring Boot框架中完成以下Java代码
public TaskService getTaskService() { return processEngine.getTaskService(); } @Bean(name = "historyService") @Override public HistoryService getHistoryService() { return processEngine.getHistoryService(); } @Bean(name = "identityService") @Override public IdentityService getIdentityService() ...
return processEngine.getCaseService(); } @Bean(name = "filterService") @Override public FilterService getFilterService() { return processEngine.getFilterService(); } @Bean(name = "externalTaskService") @Override public ExternalTaskService getExternalTaskService() { return processEngine.getExte...
repos\camunda-bpm-platform-master\engine-spring\core\src\main\java\org\camunda\bpm\engine\spring\SpringProcessEngineServicesConfiguration.java
2
请完成以下Java代码
public String getName() { return name; } public QueryOperator getOperator() { if(operator != null) { return operator; } return QueryOperator.EQUALS; } public String getOperatorName() { return getOperator().toString(); } public Object getValue() { return value.getValue(); }...
public void setVariableNameIgnoreCase(boolean variableNameIgnoreCase) { this.variableNameIgnoreCase = variableNameIgnoreCase; } public boolean isVariableValueIgnoreCase() { return variableValueIgnoreCase; } public void setVariableValueIgnoreCase(boolean variableValueIgnoreCase) { this.variableValu...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\QueryVariableValue.java
1
请在Spring Boot框架中完成以下Java代码
public static class JsonHUIdentifier { @Nullable @JsonProperty("metasfreshId") JsonMetasfreshId metasfreshId; @Nullable @JsonProperty("qrCode") String qrCode; @Builder public JsonHUIdentifier( @JsonProperty("metasfreshId") @Nullable final JsonMetasfreshId metasfreshId, @JsonProperty("qrCode")...
Check.assume(qrCode == null || metasfreshId == null, "metasfreshId and qrCode cannot be set at the same time!"); Check.assume(qrCode != null || metasfreshId != null, "metasfreshId or qrCode must be set!"); this.metasfreshId = metasfreshId; this.qrCode = qrCode; } @NonNull public static JsonHUIdentifier...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-manufacturing\src\main\java\de\metas\common\handlingunits\JsonSetClearanceStatusRequest.java
2
请完成以下Java代码
public <T> T computeDynAttributeIfAbsent(@NonNull final Object model, @NonNull final String attributeName, @NonNull final Supplier<T> supplier) { return getHelperThatCanHandle(model).computeDynAttributeIfAbsent(model, attributeName, supplier); } @Override public <T extends PO> T getPO(final Object model, final b...
return evaluatee; } return getHelperThatCanHandle(model) .getEvaluatee(model); } @Override public boolean isCopy(@NonNull final Object model) { return getHelperThatCanHandle(model).isCopy(model); } @Override public boolean isCopying(@NonNull final Object model) { return getHelperThatCanHandle(mod...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\wrapper\CompositeInterfaceWrapperHelper.java
1
请在Spring Boot框架中完成以下Java代码
public void doFilter(ServletRequest srequest, ServletResponse sresponse, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) srequest; String uri = request.getRequestURI(); sresponse.setCharacterEncoding("UTF-...
public void destroy() { } @Override public void init(FilterConfig filterconfig) throws ServletException { GreenUrlSet.add("/toRegister"); GreenUrlSet.add("/toLogin"); GreenUrlSet.add("/login"); GreenUrlSet.add("/loginOut"); GreenUrlSet.add("/register"); Gree...
repos\spring-boot-leaning-master\1.x\第16课:综合实战用户管理系统\user-manage\src\main\java\com\neo\config\SessionFilter.java
2
请完成以下Java代码
public class SetExecutionVariablesCmd extends NeedsActiveExecutionCmd<Object> { private static final long serialVersionUID = 1L; protected Map<String, ? extends Object> variables; protected boolean isLocal; public SetExecutionVariablesCmd(String executionId, Map<String, ? extends Object> variables, b...
} } } // ACT-1887: Force an update of the execution's revision to prevent // simultaneous inserts of the same // variable. If not, duplicate variables may occur since optimistic // locking doesn't work on inserts execution.forceUpdate(); return null; ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\SetExecutionVariablesCmd.java
1
请完成以下Java代码
private Comparator<Info_Column> getColumnsOrderBy() { if (I_AD_Field.Table_Name.equalsIgnoreCase(getTableName())) { return FixedOrderByKeyComparator.of( "*", ImmutableList.of( I_AD_Field.COLUMNNAME_AD_Column_ID, I_AD_Field.COLUMNNAME_Name, I_AD_Field.COLUMNNAME_EntityTyp...
String s = f.getText().toUpperCase(); if (!s.contains("%")) { if (!s.endsWith("%")) { s += "%"; } if (!s.startsWith("%")) { s = "%" + s; } } return s; } // getSQLText /** * Set Parameters for Query. * (as defined in getSQLWhere) * * @param pstmt statement * @param fo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\InfoGeneral.java
1
请在Spring Boot框架中完成以下Java代码
public class BankCodeCType { @XmlValue protected BigInteger value; @XmlAttribute(name = "BankCodeType", namespace = "http://erpel.at/schemas/1p0/documents", required = true) protected CountryCodeType bankCodeType; /** * Gets the value of the value property. * * @return * p...
* */ public CountryCodeType getBankCodeType() { return bankCodeType; } /** * Sets the value of the bankCodeType property. * * @param value * allowed object is * {@link CountryCodeType } * */ public void setBankCodeType(CountryCodeType v...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\BankCodeCType.java
2
请完成以下Java代码
public int getAD_UI_ElementField_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_UI_ElementField_ID); if (ii == null) return 0; return ii.intValue(); } @Override public org.compiere.model.I_AD_UI_Element getAD_UI_Element() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_AD_UI_Element_...
} /** Get Tooltip Icon Name. @return Tooltip Icon Name */ @Override public java.lang.String getTooltipIconName () { return (java.lang.String)get_Value(COLUMNNAME_TooltipIconName); } /** * Type AD_Reference_ID=540910 * Reference name: Type_AD_UI_ElementField */ public static final int TYPE_AD_Refe...
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 String getArtifactId() { return this.artifactId; } public void setArtifactId(String artifactId) { this.artifactId = artifactId; } public String getVersion() { return this.version; } public void setVersion(String version) { this.version = version; } public String getBootVersion() { return th...
public void setConfigurationFileFormat(String configurationFileFormat) { this.configurationFileFormat = configurationFileFormat; } public String getPackageName() { if (StringUtils.hasText(this.packageName)) { return this.packageName; } if (StringUtils.hasText(this.groupId) && StringUtils.hasText(this.arti...
repos\initializr-main\initializr-web\src\main\java\io\spring\initializr\web\project\ProjectRequest.java
1
请完成以下Java代码
public Stream<HuForInventoryLine> streamHus() { final IHUQueryBuilder huQueryBuilder = handlingUnitsDAO.createHUQueryBuilder() .setOnlyTopLevelHUs() .addHUStatusToInclude(X_M_HU.HUSTATUS_Active); if (onlyStockedProducts != null) { huQueryBuilder.setOnlyStockedProducts(onlyStockedProducts); } if (...
.flatMap(huForInventoryLineFactory::ofHURecord); } private void appendAttributeFilters(final IHUQueryBuilder huQueryBuilder) { final ImmutableAttributeSet storageRelevantAttributes = asiBL.getImmutableAttributeSetById(asiId) .filterOnlyStorageRelevantAttributes(); if (storageRelevantAttributes.isEmpty()) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\draftlinescreator\LocatorAndProductStrategy.java
1
请完成以下Spring Boot application配置
spring: datasource: url: jdbc:mysql://localhost:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false username: root password: root druid: initial-size: 5 #连接池初始化大小 min-idle: 10 #最小空闲连接数 max-active: 20 #最大连接数 web-stat-filter: exclus...
elasticsearch: repositories: enabled: true elasticsearch: uris: localhost:9200 logging: level: root: info com.macro.mall: debug logstash: host: localhost enableInnerLog: false
repos\mall-master\mall-search\src\main\resources\application-dev.yml
2
请完成以下Java代码
public String getExtensionId() { return "my-reactive-tenant-extension"; } } /** * Actual extension providing access to the {@link Tenant} value object. */ @RequiredArgsConstructor static class TenantExtension implements EvaluationContextExtension { private final Tenant tenant; @Override public Str...
public Tenant getRootObject() { return tenant; } } /** * The root object. */ @Value public static class Tenant { String tenantId; } }
repos\spring-data-examples-main\cassandra\reactive\src\main\java\example\springdata\cassandra\spel\ApplicationConfiguration.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_C_CashBook[") .append(get_ID()).append("]"); return sb.toString(); } /** Set Cas...
@param IsDefault Default value */ public void setIsDefault (boolean IsDefault) { set_Value (COLUMNNAME_IsDefault, Boolean.valueOf(IsDefault)); } /** Get Default. @return Default value */ public boolean isDefault () { Object oo = get_Value(COLUMNNAME_IsDefault); if (oo != null) { if (oo i...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_CashBook.java
1
请完成以下Java代码
public class DefaultESRLineHandler implements IESRLineHandler { final private ISysConfigBL sysConfigBL = Services.get(ISysConfigBL.class); final private IBPartnerDAO bpartnerDAO = Services.get(IBPartnerDAO.class); @Override public boolean matchBPartnerOfInvoice(final I_C_Invoice invoice, final I_ESR_ImportLine es...
@Override public boolean matchBPartner( @NonNull final I_C_BPartner bPartner, @NonNull final I_ESR_ImportLine esrLine) { if (sysConfigBL.getBooleanValue(ESRConstants.SYSCONFIG_MATCH_ORG, true)) { if (bPartner.getAD_Org_ID() > 0 // task 09852: a partner that has no org at all does not mean an inconsistenc...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java\de\metas\payment\esr\spi\impl\DefaultESRLineHandler.java
1
请在Spring Boot框架中完成以下Java代码
public class Book { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private long id; @Column(nullable = false) private String title; private String isbn; @ManyToOne @JoinColumn(name = "library_id") private Library library; @ManyToMany(mappedBy = "books", fetch = Fetc...
} public void setId(long id) { this.id = id; } public String getIsbn() { return isbn; } public void setIsbn(String isbn) { this.isbn = isbn; } public Library getLibrary() { return library; } public void setLibrary(Library library) { this.l...
repos\tutorials-master\persistence-modules\spring-data-rest\src\main\java\com\baeldung\books\models\Book.java
2
请在Spring Boot框架中完成以下Java代码
public MultipartConfigElement multipartConfigElement() { MultipartConfigFactory factory = new MultipartConfigFactory(); factory.setMaxFileSize(DataSize.ofBytes(10000000L)); factory.setMaxRequestSize(DataSize.ofBytes(10000000L)); return factory.createMultipartConfig(); } @Bean ...
CookieThemeResolver resolver = new CookieThemeResolver(); resolver.setDefaultThemeName("default"); resolver.setCookieName("example-theme-cookie"); return resolver; } @Bean public ThemeChangeInterceptor themeChangeInterceptor() { ThemeChangeInterceptor interceptor = new Theme...
repos\tutorials-master\spring-web-modules\spring-mvc-basics\src\main\java\com\baeldung\spring\web\config\WebConfig.java
2
请完成以下Java代码
private List<?> readCurrencyAndAmount() { int decimalPointPosition = readDecimalPointPosition(); String currencyCode = readNumericDataField(3, 3); String digits = readDataField(1, 15); BigDecimal amount = new BigDecimal(digits).movePointLeft(decimalPointPosition); return Arrays.asList(currencyCode, amount); ...
if (length < minLength) { throw new IllegalArgumentException("data field must be at least " + minLength + " characters long"); } String dataField = sequence.substring(position, endIndex); position = endIndex; return dataField; } private void skipSeparatorIfPresent() { if (position < sequence.length()...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\gs1\GS1SequenceReader.java
1
请完成以下Java代码
public Message<?> beforeHandle(Message<?> message, MessageChannel channel, MessageHandler handler) { return postReceive(message, channel); } @Override public Message<?> postReceive(Message<?> message, MessageChannel channel) { setup(message); return message; } @Override public void afterMessageHandled(Mes...
private void cleanup() { Stack<SecurityContext> contextStack = originalContext.get(); if (contextStack == null || contextStack.isEmpty()) { this.securityContextHolderStrategy.clearContext(); originalContext.remove(); return; } SecurityContext context = contextStack.pop(); try { if (this.empty.equa...
repos\spring-security-main\messaging\src\main\java\org\springframework\security\messaging\context\SecurityContextPropagationChannelInterceptor.java
1
请完成以下Java代码
public <T extends Spin<?>> T createSpinFromReader(Reader parameter) { ensureNotNull("parameter", parameter); RewindableReader rewindableReader = new RewindableReader(parameter, READ_SIZE); DataFormat<T> matchingDataFormat = null; for (DataFormat<?> format : DataFormats.getAvailableDataFormats()) { ...
Reader input = SpinIoUtil.stringAsReader(parameter); return createSpin(input, format); } public <T extends Spin<?>> T createSpinFromReader(Reader parameter, DataFormat<T> format) { ensureNotNull("parameter", parameter); DataFormatReader reader = format.getReader(); Object dataFormatInput = reader....
repos\camunda-bpm-platform-master\spin\core\src\main\java\org\camunda\spin\impl\SpinFactoryImpl.java
1
请完成以下Java代码
public void setRedirectUriResolver(Converter<RedirectUriParameters, Mono<String>> redirectUriResolver) { Assert.notNull(redirectUriResolver, "redirectUriResolver cannot be null"); this.redirectUriResolver = redirectUriResolver; } /** * Set the {@link ServerRedirectStrategy} to use, default * {@link DefaultSe...
public ServerWebExchange getServerWebExchange() { return this.serverWebExchange; } public Authentication getAuthentication() { return this.authentication; } public ClientRegistration getClientRegistration() { return this.clientRegistration; } } /** * Default {@link Converter} for redirect uri...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\oidc\web\server\logout\OidcClientInitiatedServerLogoutSuccessHandler.java
1
请完成以下Java代码
public void setProductValue (String ProductValue) { set_Value (COLUMNNAME_ProductValue, ProductValue); } /** Get Product Key. @return Key of the Product */ public String getProductValue () { return (String)get_Value(COLUMNNAME_ProductValue); } /** Set Valid from. @param ValidFrom Valid from incl...
UOM EDI X12 Code */ public void setX12DE355 (String X12DE355) { set_Value (COLUMNNAME_X12DE355, X12DE355); } /** Get UOM Code. @return UOM EDI X12 Code */ public String getX12DE355 () { return (String)get_Value(COLUMNNAME_X12DE355); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_PriceList.java
1
请完成以下Java代码
public java.lang.String getExportStatus() { return get_ValueAsString(COLUMNNAME_ExportStatus); } @Override public de.metas.inoutcandidate.model.I_M_ShipmentSchedule_ExportAudit getM_ShipmentSchedule_ExportAudit() { return get_ValueAsPO(COLUMNNAME_M_ShipmentSchedule_ExportAudit_ID, de.metas.inoutcandidate.mod...
@Override public void setM_ShipmentSchedule(final de.metas.inoutcandidate.model.I_M_ShipmentSchedule M_ShipmentSchedule) { set_ValueFromPO(COLUMNNAME_M_ShipmentSchedule_ID, de.metas.inoutcandidate.model.I_M_ShipmentSchedule.class, M_ShipmentSchedule); } @Override public void setM_ShipmentSchedule_ID (final int ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inoutcandidate\model\X_M_ShipmentSchedule_ExportAudit_Item.java
1
请完成以下Java代码
public class CollectionsSortTimeComplexityJMH { public static void main(String[] args) throws Exception { org.openjdk.jmh.Main.main(args); } @Benchmark public void measureCollectionsSortBestCase(BestCaseBenchmarkState state) { List<Integer> sortedList = new ArrayList<>(state.sortedLis...
public void setUp() { sortedList = new ArrayList<>(); for (int i = 1; i <= 1000000; i++) { sortedList.add(i); } } } @State(Scope.Benchmark) public static class AverageWorstCaseBenchmarkState { List<Integer> unsortedList; @Setup(Le...
repos\tutorials-master\core-java-modules\core-java-collections-5\src\main\java\com\baeldung\collectionssortcomplexity\CollectionsSortTimeComplexityJMH.java
1
请在Spring Boot框架中完成以下Java代码
public List<Post> retrievePostsForUser(@PathVariable int id) { Optional<User> user = userRepository.findById(id); if(user.isEmpty()) throw new UserNotFoundException("id:"+id); return user.get().getPosts(); } @PostMapping("/jpa/users") public ResponseEntity<User> createUser(@Valid @RequestBody User u...
throw new UserNotFoundException("id:"+id); post.setUser(user.get()); Post savedPost = postRepository.save(post); URI location = ServletUriComponentsBuilder.fromCurrentRequest() .path("/{id}") .buildAndExpand(savedPost.getId()) .toUri(); return ResponseEntity.created(location).build(); ...
repos\master-spring-and-spring-boot-main\12-rest-api\src\main\java\com\in28minutes\rest\webservices\restfulwebservices\user\UserJpaResource.java
2
请完成以下Java代码
public int getAD_WF_Block_ID() { return get_ValueAsInt(COLUMNNAME_AD_WF_Block_ID); } @Override public void setAD_Workflow_ID (final int AD_Workflow_ID) { if (AD_Workflow_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_Workflow_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_Workflow_ID, AD_Workflow_ID); }...
} @Override public java.lang.String getDescription() { return get_ValueAsString(COLUMNNAME_Description); } @Override public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WF_Block.java
1
请在Spring Boot框架中完成以下Java代码
class MetadataCollector { private final Predicate<ItemMetadata> mergeRequired; private final ConfigurationMetadata previousMetadata; private final Set<ItemMetadata> metadataItems = new LinkedHashSet<>(); private final Set<ItemHint> metadataHints = new LinkedHashSet<>(); /** * Creates a new {@code MetadataPr...
ConfigurationMetadata getMetadata() { ConfigurationMetadata metadata = new ConfigurationMetadata(); for (ItemMetadata item : this.metadataItems) { metadata.add(item); } for (ItemHint metadataHint : this.metadataHints) { metadata.add(metadataHint); } if (this.previousMetadata != null) { List<ItemMet...
repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\MetadataCollector.java
2
请完成以下Java代码
public class HelpCommand extends AbstractCommand { private final CommandRunner commandRunner; public HelpCommand(CommandRunner commandRunner) { super("help", "Get help on commands"); this.commandRunner = commandRunner; } @Override public String getUsageHelp() { return "command"; } @Override public @Nu...
for (Command command : this.commandRunner) { if (command.getName().equals(commandName)) { Log.info(this.commandRunner.getName() + command.getName() + " - " + command.getDescription()); Log.info(""); if (command.getUsageHelp() != null) { Log.info("usage: " + this.commandRunner.getName() + command.get...
repos\spring-boot-4.0.1\cli\spring-boot-cli\src\main\java\org\springframework\boot\cli\command\core\HelpCommand.java
1
请完成以下Java代码
public void setRecord_ID (int Record_ID) { if (Record_ID < 0) set_ValueNoCheck (COLUMNNAME_Record_ID, null); else set_ValueNoCheck (COLUMNNAME_Record_ID, Integer.valueOf(Record_ID)); } /** Get Datensatz-ID. @return Direct internal record ID */ @Override public int getRecord_ID () { Integer ii...
Transaction sub line ID (internal) */ @Override public void setSubLine_ID (int SubLine_ID) { if (SubLine_ID < 1) set_ValueNoCheck (COLUMNNAME_SubLine_ID, null); else set_ValueNoCheck (COLUMNNAME_SubLine_ID, Integer.valueOf(SubLine_ID)); } /** Get SubLine ID. @return Transaction sub line ID (inter...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-gen\de\metas\acct\model\X_Fact_Acct_ActivityChangeRequest.java
1
请完成以下Java代码
protected CostDetailCreateResult createOutboundCostDefaultImpl(final CostDetailCreateRequest request) { final boolean isReturnTrx = request.getQty().signum() > 0; final CurrentCost currentCosts = utils.getCurrentCost(request); final CostDetailPreviousAmounts previousCosts = CostDetailPreviousAmounts.of(currentC...
return result; } @Override public void voidCosts(final CostDetailVoidRequest request) { final CurrentCost currentCosts = utils.getCurrentCost(request.getCostSegmentAndElement()); currentCosts.addToCurrentQtyAndCumulate(request.getQty().negate(), request.getAmt().negate(), utils.getQuantityUOMConverter()); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\methods\AverageInvoiceCostingMethodHandler.java
1
请完成以下Java代码
public String getMake() { return make; } public void setMake(String make) { this.make = make; } public String getModel() { return model; } public void setModel(String model) { this.model = model; } public Engine getEngine() { return engine; ...
public void setBigEngine(boolean bigEngine) { isBigEngine = bigEngine; } public boolean isNewCar() { return isNewCar; } public void setNewCar(boolean newCar) { isNewCar = newCar; } @Override public String toString() { return "Car{" + "make='...
repos\tutorials-master\spring-spel\src\main\java\com\baeldung\spring\spel\entity\Car.java
1
请完成以下Java代码
public Locale getLocale() { return this.locale; } @Override public void configureExecutionInput(BiFunction<ExecutionInput, ExecutionInput.Builder, ExecutionInput> configurer) { this.executionInputConfigurers.add(configurer); } @Override public ExecutionInput toExecutionInput() { ExecutionInput.Builder inp...
ExecutionInput executionInput = inputBuilder.build(); for (BiFunction<ExecutionInput, ExecutionInput.Builder, ExecutionInput> configurer : this.executionInputConfigurers) { ExecutionInput current = executionInput; executionInput = executionInput.transform((builder) -> configurer.apply(current, builder)); } ...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\support\DefaultExecutionGraphQlRequest.java
1
请完成以下Java代码
public class DeleteHistoricProcessInstanceBatchConfigurationJsonConverter extends AbstractBatchConfigurationObjectConverter<BatchConfiguration> { public static final DeleteHistoricProcessInstanceBatchConfigurationJsonConverter INSTANCE = new DeleteHistoricProcessInstanceBatchConfigurationJsonConverter(); publ...
@Override public BatchConfiguration readConfiguration(JsonObject json) { BatchConfiguration configuration = new BatchConfiguration(readProcessInstanceIds(json), readIdMappings(json), JsonUtil.getBoolean(json, FAIL_IF_NOT_EXISTS)); return configuration; } protected List<String> readProcessInstance...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\deletion\DeleteHistoricProcessInstanceBatchConfigurationJsonConverter.java
1
请完成以下Java代码
public class MonitorableQueueProcessorStatistics implements IMutableQueueProcessorStatistics { private static final String METERNAME_QueueSize = "QueueSize"; private static final String METERNAME_All = "All"; private static final String METERNAME_Processed = "Processed"; private static final String METERNAME_Error ...
@Override public void incrementCountProcessed() { getMeter(METERNAME_Processed).plusOne(); } @Override public long getCountErrors() { return getMeter(METERNAME_Error).getGauge(); } @Override public void incrementCountErrors() { getMeter(METERNAME_Error).plusOne(); } @Override public long getQueueS...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\processor\impl\MonitorableQueueProcessorStatistics.java
1
请完成以下Java代码
public Void execute(CommandContext context) { ensureNotNull(BadUserRequestException.class, "caseDefinitionId", caseDefinitionId); if (historyTimeToLive != null) { ensureGreaterThanOrEqual(BadUserRequestException.class, "", "historyTimeToLive", historyTimeToLive, 0); } validate(historyTimeToLive,...
List<PropertyChange> propertyChanges = new ArrayList<>(); propertyChanges.add(new PropertyChange("historyTimeToLive", caseDefinitionEntity.getHistoryTimeToLive(), historyTimeToLive)); propertyChanges.add(new PropertyChange("caseDefinitionKey", null, caseDefinitionEntity.getKey())); commandContext.getOpera...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\cmd\UpdateCaseDefinitionHistoryTimeToLiveCmd.java
1
请完成以下Java代码
private Map<String, DestinationTopicHolder> correlatePairSourceAndDestinationValues( List<DestinationTopic> destinationList) { return IntStream .range(0, destinationList.size()) .boxed() .collect(Collectors.toMap(index -> destinationList.get(index).getDestinationName(), index -> new DestinationTo...
public static class DestinationTopicHolder { private final DestinationTopic sourceDestination; private final DestinationTopic nextDestination; DestinationTopicHolder(DestinationTopic sourceDestination, DestinationTopic nextDestination) { this.sourceDestination = sourceDestination; this.nextDestination = ...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\retrytopic\DefaultDestinationTopicResolver.java
1
请完成以下Java代码
public boolean hasAccess(Access access) { return accesses.contains(access); } public boolean isReadOnly() { return hasAccess(Access.READ) && !hasAccess(Access.WRITE); } public boolean isReadWrite() { return hasAccess(Access.WRITE); } public ClientId getClientId() { return resource.getClientId(); }...
{ return resource; } @Override public Permission mergeWith(final Permission permissionFrom) { final OrgPermission orgPermissionFrom = checkCompatibleAndCast(permissionFrom); final ImmutableSet<Access> accesses = ImmutableSet.<Access> builder() .addAll(this.accesses) .addAll(orgPermissionFrom.accesse...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\OrgPermission.java
1
请完成以下Java代码
public boolean fromXmlNode(I_AD_MigrationData data, Element element) { data.setColumnName(element.getAttribute(NODE_Column)); data.setAD_Column_ID(Integer.parseInt(element.getAttribute(NODE_AD_Column_ID))); data.setIsOldNull("true".equals(element.getAttribute(NODE_isOldNull))); data.setOldValue(element.getAtt...
StringBuffer buf = new StringBuffer(); NodeList list = element.getChildNodes(); boolean found = false; for (int i = 0; i < list.getLength(); i++) { Node node = list.item(i); if (node.getNodeType() == Node.TEXT_NODE) { buf.append(node.getNodeValue()); found = true; } } return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\xml\impl\MigrationDataHandler.java
1
请完成以下Java代码
public class DelegatingByTopicDeserializer extends DelegatingByTopicSerialization<Deserializer<?>> implements Deserializer<Object> { /** * Construct an instance that will be configured in {@link #configure(Map, boolean)} * with consumer properties. */ public DelegatingByTopicDeserializer() { } /** * Con...
protected Deserializer<?> configureDelegate(Map<String, ?> configs, boolean isKey, Deserializer<?> delegate) { delegate.configure(configs, isKey); return delegate; } @Override protected boolean isInstance(Object delegate) { return delegate instanceof Deserializer; } @Override public Object deserialize(Str...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\serializer\DelegatingByTopicDeserializer.java
1
请完成以下Java代码
public AppConfigurationEntry[] getAppConfigurationEntry(String name) { HashMap<String, String> options = new HashMap<String, String>(); options.put("useKeyTab", "true"); options.put("keyTab", this.keyTabLocation); options.put("principal", this.servicePrincipalName); options.put("storeKey", "true"); op...
if (this.refreshKrb5Config) { options.put("refreshKrb5Config", "true"); } if (!this.multiTier) { options.put("isInitiator", "false"); } return new AppConfigurationEntry[] { new AppConfigurationEntry("com.sun.security.auth.module.Krb5LoginModule", AppConfigurationEntry.LoginModuleContro...
repos\spring-security-main\kerberos\kerberos-core\src\main\java\org\springframework\security\kerberos\authentication\sun\SunJaasKerberosTicketValidator.java
1
请完成以下Java代码
public class C_AggregationItem_Builder { private final C_Aggregation_Builder parentBuilder; private final AdTableId adTableId; private I_C_Aggregation aggregation; private String type; private AdColumnId adColumnId; private I_C_Aggregation includedAggregation; private I_C_Aggregation_Attribute attribute; priva...
{ Check.assumeNotEmpty(type, "type not empty"); return type; } public C_AggregationItem_Builder setAD_Column(@Nullable final String columnName) { if (isBlank(columnName)) { this.adColumnId = null; } else { this.adColumnId = Services.get(IADTableDAO.class).retrieveColumnId(adTableId, columnName);...
repos\metasfresh-new_dawn_uat\backend\de.metas.aggregation\src\main\java\de\metas\aggregation\model\C_AggregationItem_Builder.java
1
请完成以下Java代码
protected ObjectNode mapDependency(Dependency dependency) { if (dependency.getCompatibilityRange() == null) { // only map the dependency if no compatibilityRange is set return mapValue(dependency); } return null; } protected ObjectNode mapType(Type type) { ObjectNode result = mapValue(type); result.p...
protected String formatVersion(String versionId) { Version version = VersionParser.DEFAULT.safeParse(versionId); return (version != null) ? version.format(Format.V1).toString() : versionId; } protected ObjectNode mapValue(MetadataElement value) { ObjectNode result = nodeFactory.objectNode(); result.put("id",...
repos\initializr-main\initializr-web\src\main\java\io\spring\initializr\web\mapper\InitializrMetadataV2JsonMapper.java
1
请在Spring Boot框架中完成以下Java代码
public King findByName(String name) { King t = kingDao.findByName(name); return t; } /** * 获取当前节点下的所有king * * @param name * @return */ public List<King> getKings(String name) { return kingDao.getKings(name); }
/** * 保存父子关系 * * @param fatherName * @param sonName * @return */ public void saveRelation(String fatherName, String sonName) { King from = kingDao.findByName(fatherName); King to = kingDao.findByName(sonName); FatherAndSonRelation fatherAndSonRelation = new Fath...
repos\springBoot-master\springboot-neo4j\src\main\java\cn\abel\neo4j\service\KingService.java
2
请完成以下Java代码
public String getId() { return id; } public String getBusinessKey() { return businessKey; } public String getCaseDefinitionId() { return caseDefinitionId; } public String getCaseDefinitionKey() { return caseDefinitionKey; } public String getCaseDefinitionName() { return caseDefin...
public Boolean getCompleted() { return completed; } public Boolean getTerminated() { return terminated; } public Boolean getClosed() { return closed; } public static HistoricCaseInstanceDto fromHistoricCaseInstance(HistoricCaseInstance historicCaseInstance) { HistoricCaseInstanceDto dto ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricCaseInstanceDto.java
1
请完成以下Java代码
public String getTp() { return tp; } /** * Sets the value of the tp property. * * @param value * allowed object is * {@link String } * */ public void setTp(String value) { this.tp = value; } /** * Gets the value of the amt prope...
* possible object is * {@link CurrencyExchange5 } * */ public CurrencyExchange5 getCcyXchg() { return ccyXchg; } /** * Sets the value of the ccyXchg property. * * @param value * allowed object is * {@link CurrencyExchange5 } * ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\AmountAndCurrencyExchangeDetails4.java
1
请完成以下Java代码
private static String exceptionMessage(String errorCode, String message) { if (message == null) { return ""; } else { return message + " (errorCode='" + errorCode + "')"; } } protected void setErrorCode(String errorCode) { ensureNotEmpty("Error Code", errorCode); this.errorCode = er...
@Override public String toString() { return super.toString() + " (errorCode='" + errorCode + "')"; } protected void setMessage(String errorMessage) { ensureNotEmpty("Error Message", errorMessage); this.errorMessage = errorMessage; } @Override public String getMessage() { return errorMessag...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\delegate\BpmnError.java
1
请完成以下Java代码
public static RSAPublicKey readX509PublicKey(File file) throws InvalidKeySpecException, IOException, NoSuchAlgorithmException { KeyFactory factory = KeyFactory.getInstance("RSA"); try (FileReader keyReader = new FileReader(file); PemReader pemReader = new PemReader(keyReader)) { ...
PemObject pemObject = pemReader.readPemObject(); byte[] content = pemObject.getContent(); PKCS8EncodedKeySpec privKeySpec = new PKCS8EncodedKeySpec(content); return (RSAPrivateKey) factory.generatePrivate(privKeySpec); } } public static RSAPrivateKey readPKCS8Private...
repos\tutorials-master\libraries-security\src\main\java\com\baeldung\pem\BouncyCastlePemUtils.java
1
请在Spring Boot框架中完成以下Java代码
public class AD_Menu { @Init public void init() { Services.get(IProgramaticCalloutProvider.class).registerAnnotatedCallout(this); } @ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFORE_CHANGE }, ifColumnsChanged = I_AD_Tab.COLUMNNAME_AD_Element_ID) @CalloutMethod(columnNames = I_...
menu.setWEBUI_NameBrowse(menuElement.getWEBUI_NameBrowse()); menu.setWEBUI_NameNew(menuElement.getWEBUI_NameNew()); menu.setWEBUI_NameNewBreadcrumb(menuElement.getWEBUI_NameNewBreadcrumb()); } @ModelChange(timings = { ModelValidator.TYPE_AFTER_NEW, ModelValidator.TYPE_AFTER_CHANGE }, ifColumnsChanged = I_AD_Menu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\menu\model\interceptor\AD_Menu.java
2
请在Spring Boot框架中完成以下Java代码
public class DerKurierShipperConfig { String restApiBaseUrl; String customerNumber; ParcelNumberGenerator parcelNumberGenerator; Optional<MailboxId> deliveryOrderMailBoxId; EMailAddress deliveryOrderRecipientEmailOrNull; int parcelNumberAdSequenceId; String collectorCode; String customerCode; LocalTime ...
this.customerNumber = Check.assumeNotEmpty(customerNumber, "Parameter customerNumber is not empty"); this.restApiBaseUrl = Check.assumeNotEmpty(restApiBaseUrl, "Parameter restApiBaseUrl is not empty"); final boolean mailBoxIsSet = deliveryOrderMailBoxId != null; final boolean mailAddressIsSet = deliveryOrderReci...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.derkurier\src\main\java\de\metas\shipper\gateway\derkurier\misc\DerKurierShipperConfig.java
2
请完成以下Java代码
public class SysPackPermission implements Serializable { private static final long serialVersionUID = 1L; /**主键编号*/ @TableId(type = IdType.ASSIGN_ID) @Schema(description = "主键编号") private String id; /**租户产品包名称*/ @Excel(name = "租户产品包名称", width = 15) @Schema(description = "租户产品包名称") private Strin...
private String createBy; /**创建时间*/ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd") @Schema(description = "创建时间") private Date createTime; /**更新人*/ @Schema(description = "更新人") private String updateBy; /**更新时间*/ @JsonFormat(timezone = "GMT+8",pattern ...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\entity\SysPackPermission.java
1
请完成以下Java代码
public void setInheritBusinessKey(boolean inheritBusinessKey) { this.inheritBusinessKey = inheritBusinessKey; } public boolean isFallbackToDefaultTenant() { return fallbackToDefaultTenant; } public void setFallbackToDefaultTenant(boolean fallbackToDefaultTenant) { this.fallback...
public void setCaseInstanceIdVariableName(String caseInstanceIdVariableName) { this.caseInstanceIdVariableName = caseInstanceIdVariableName; } @Override public CaseServiceTask clone() { CaseServiceTask clone = new CaseServiceTask(); clone.setValues(this); return clone; }...
repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\CaseServiceTask.java
1
请完成以下Java代码
public static int getBiFrequency(String a, String b) { int idA = CoreDictionary.trie.exactMatchSearch(a); if (idA == -1) { return 0; } int idB = CoreDictionary.trie.exactMatchSearch(b); if (idB == -1) { return 0; } int i...
/** * 获取词语的ID * * @param a 词语 * @return id */ public static int getWordID(String a) { return CoreDictionary.trie.exactMatchSearch(a); } /** * 热更新二元接续词典<br> * 集群环境(或其他IOAdapter)需要自行删除缓存文件 * @return 是否成功 */ public static boolean reload() { ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dictionary\CoreBiGramTableDictionary.java
1
请完成以下Java代码
public void runJobNow(QuartzJob quartzJob){ try { TriggerKey triggerKey = TriggerKey.triggerKey(JOB_NAME + quartzJob.getId()); CronTrigger trigger = (CronTrigger) scheduler.getTrigger(triggerKey); // 如果不存在则创建一个定时任务 if(trigger == null) { addJob(quar...
} /** * 暂停一个job * @param quartzJob / */ public void pauseJob(QuartzJob quartzJob){ try { JobKey jobKey = JobKey.jobKey(JOB_NAME + quartzJob.getId()); scheduler.pauseJob(jobKey); } catch (Exception e){ log.error("定时任务暂停失败", e); throw...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\quartz\utils\QuartzManage.java
1
请完成以下Java代码
public void payloadIgnoredForHttpMethod(String method) { logInfo("003", "Ignoring payload for HTTP '{}' method", method); } public ConnectorResponseException unableToReadResponse(Exception cause) { return new ConnectorResponseException(exceptionMessage("004", "Unable to read connectorResponse: {}", cause.g...
public ConnectorRequestException invalidConfigurationOption(String optionName, Exception cause) { return new ConnectorRequestException(exceptionMessage("008", "Invalid value for request configuration option: {}", optionName), cause); } public void ignoreConfig(String field, Object value) { logInfo("009", "...
repos\camunda-bpm-platform-master\connect\http-client\src\main\java\org\camunda\connect\httpclient\impl\HttpConnectorLogger.java
1
请完成以下Java代码
public void setPOReference (final @Nullable java.lang.String POReference) { set_Value (COLUMNNAME_POReference, POReference); } @Override public java.lang.String getPOReference() { return get_ValueAsString(COLUMNNAME_POReference); } @Override public void setProcessed (final boolean Processed) { set_Val...
@Override public void setQM_Analysis_Report_ID (final int QM_Analysis_Report_ID) { if (QM_Analysis_Report_ID < 1) set_ValueNoCheck (COLUMNNAME_QM_Analysis_Report_ID, null); else set_ValueNoCheck (COLUMNNAME_QM_Analysis_Report_ID, QM_Analysis_Report_ID); } @Override public int getQM_Analysis_Report_ID(...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_QM_Analysis_Report.java
1
请完成以下Java代码
public class X_WEBUI_Board_Lane extends org.compiere.model.PO implements I_WEBUI_Board_Lane, org.compiere.model.I_Persistent { private static final long serialVersionUID = -492769515L; /** Standard Constructor */ public X_WEBUI_Board_Lane (final Properties ctx, final int WEBUI_Board_Lane_ID, @Nullable final...
set_ValueFromPO(COLUMNNAME_WEBUI_Board_ID, de.metas.ui.web.base.model.I_WEBUI_Board.class, WEBUI_Board); } @Override public void setWEBUI_Board_ID (final int WEBUI_Board_ID) { if (WEBUI_Board_ID < 1) set_ValueNoCheck (COLUMNNAME_WEBUI_Board_ID, null); else set_ValueNoCheck (COLUMNNAME_WEBUI_Board_ID, W...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java-gen\de\metas\ui\web\base\model\X_WEBUI_Board_Lane.java
1
请在Spring Boot框架中完成以下Java代码
public class AddToResultGroupRequest { int queryNo; @NonNull ProductId productId; @NonNull AttributesKey storageAttributesKey; @NonNull WarehouseId warehouseId; @Nullable BigDecimal qtyOnHandStock; @Nullable BigDecimal qtyToBeShipped; @Builder public AddToResultGroupRequest( final int queryNo, ...
@Nullable final BigDecimal qtyOnHandStock, @Nullable final BigDecimal qtyToBeShipped) { this.queryNo = queryNo; this.productId = productId; this.warehouseId = warehouseId; this.storageAttributesKey = storageAttributesKey; this.qtyOnHandStock = qtyOnHandStock; this.qtyToBeShipped = qtyToBeShipped; } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java\de\metas\material\cockpit\availableforsales\AddToResultGroupRequest.java
2
请完成以下Java代码
public class MyCleanerResourceClass implements AutoCloseable { private static Resource resource; private static final Cleaner cleaner = Cleaner.create(); private final Cleaner.Cleanable cleanable; public MyCleanerResourceClass() { resource = new Resource(); this.cleanable = cleaner.reg...
CleaningState() { // constructor } @Override public void run() { // some cleanup action System.out.println("Cleanup done"); } } static class Resource { void use() { System.out.println("Using the resource"); } ...
repos\tutorials-master\core-java-modules\core-java-18\src\main\java\com\baeldung\finalization_closeable_cleaner\MyCleanerResourceClass.java
1
请完成以下Java代码
public String getDescription () { return (String)get_Value(COLUMNNAME_Description); } /** Set GL Category. @param GL_Category_ID General Ledger Category */ public void setGL_Category_ID (int GL_Category_ID) { if (GL_Category_ID < 1) set_ValueNoCheck (COLUMNNAME_GL_Category_ID, null); else s...
/** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_GL_Category.java
1
请完成以下Java代码
public static Throwable retrieveException() { final Throwable ex = getLastErrorsInstance().getLastExceptionAndReset(); return ex; } /** * Save Warning as ValueNamePair. * * @param AD_Message message key * @param message clear text message */ public static void saveWarning(final Logger logger, final S...
final StringBuilder sb = new StringBuilder(getClass().getSimpleName()).append("["); sb.append("lastError=").append(lastError); sb.append(", lastException=").append(lastException); sb.append(", lastWarning=").append(lastWarning); sb.append("]"); return sb.toString(); } public synchronized ValueNamePa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\logging\MetasfreshLastError.java
1
请在Spring Boot框架中完成以下Java代码
public class PushBPartnersProcessor implements Processor { @Override public void process(final Exchange exchange) { final JsonVendor jsonBPartner = exchange.getIn().getBody(JsonVendor.class); final BPUpsertCamelRequest bpUpsertCamelRequest = getBPUpsertCamelRequest(jsonBPartner); exchange.getIn().setBody(bpU...
.bpartnerComposite(jsonRequestComposite) .build(); final JsonRequestBPartnerUpsert jsonRequestBPartnerUpsert = JsonRequestBPartnerUpsert.builder() .requestItem(jsonRequestBPartnerUpsertItem) .syncAdvise(SyncAdvise.CREATE_OR_MERGE) .build(); return BPUpsertCamelRequest.builder() .jsonRequestBPa...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-grssignum\src\main\java\de\metas\camel\externalsystems\grssignum\from_grs\vendor\processor\PushBPartnersProcessor.java
2
请在Spring Boot框架中完成以下Java代码
public class DefaultEntityLimitsCache implements EntityLimitsCache { private static final int DEVIATION = 10; private final Cache<EntityLimitKey, Boolean> cache; public DefaultEntityLimitsCache(@Value("${cache.entityLimits.timeToLiveInMinutes:5}") int ttl, @Value("${cac...
}) .maximumSize(maxSize) .build(); } @Override public boolean get(EntityLimitKey key) { var result = cache.getIfPresent(key); return result != null ? result : false; } @Override public void put(EntityLimitKey key, boolean value) { cache.p...
repos\thingsboard-master\common\transport\transport-api\src\main\java\org\thingsboard\server\common\transport\limits\DefaultEntityLimitsCache.java
2
请完成以下Java代码
public boolean isTemporaryPricingConditionsBreak() { return hasChanges || id == null; } public PricingConditionsBreak toTemporaryPricingConditionsBreak() { if (isTemporaryPricingConditionsBreak()) { return this; } return toBuilder().id(null).build(); }
public PricingConditionsBreak toTemporaryPricingConditionsBreakIfPriceRelevantFieldsChanged(@NonNull final PricingConditionsBreak reference) { if (isTemporaryPricingConditionsBreak()) { return this; } if (equalsByPriceRelevantFields(reference)) { return this; } return toTemporaryPricingConditions...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\conditions\PricingConditionsBreak.java
1
请在Spring Boot框架中完成以下Java代码
public class CommentsConfiguration extends ResourceServerConfigurerAdapter { /** * Provide security so that endpoints are only served if the request is * already authenticated. */ @Override public void configure(HttpSecurity http) throws Exception { // @formatter:off http.requestMatchers() .antMatchers...
* So suppose you have 2 APIs, then you can define 2 resource servers. * <ol> * <li>Client 1 has been configured for access to resourceid1, so he can * only access "api1" if the resource server configures the resourceid to * "api1".</li> * <li>Client 1 can't access resource server 2 since it has configured the...
repos\spring-boot-microservices-master\comments-webservice\src\main\java\com\rohitghatol\microservices\comments\config\CommentsConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
private @Nullable String mapFactoryName(String name) { if (!name.startsWith(OPTIONAL_PREFIX)) { return name; } name = name.substring(OPTIONAL_PREFIX.length()); return (!present(name)) ? null : name; } private boolean present(String className) { String resourcePath = ClassUtils.convertClassNameToResource...
} exclusions.addAll(getExcludeAutoConfigurationsProperty()); return exclusions; } protected final Map<Class<?>, List<Annotation>> getAnnotations(AnnotationMetadata metadata) { MultiValueMap<Class<?>, Annotation> annotations = new LinkedMultiValueMap<>(); Class<?> source = ClassUtils.resolveClassName(metadata...
repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\ImportAutoConfigurationImportSelector.java
2
请完成以下Java代码
public List<InventoryLineHU> toInventoryLineHUs( @NonNull final IUOMConversionBL uomConversionBL, @NonNull final UomId targetUomId) { final UnaryOperator<Quantity> uomConverter = qty -> uomConversionBL.convertQuantityTo(qty, productId, targetUomId); return huForInventoryLineList.stream() .map(DraftInvent...
@NonNull private <K> Map<K, ProductHUInventory> mapByKey(final Function<HuForInventoryLine, K> keyProvider) { final Map<K, List<HuForInventoryLine>> key2Hus = new HashMap<>(); huForInventoryLineList.forEach(hu -> { final ArrayList<HuForInventoryLine> husFromTargetWarehouse = new ArrayList<>(); husFromTarge...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\draftlinescreator\ProductHUInventory.java
1
请完成以下Java代码
public static GreetingStandardType ofNullableCode(@Nullable final String code) { final String codeNorm = StringUtils.trimBlankToNull(code); return codeNorm != null ? ofCode(codeNorm) : null; } @JsonCreator public static GreetingStandardType ofCode(@NonNull final String code) { final String codeNorm = String...
} @JsonValue public String getCode() { return code; } @Nullable public static String toCode(@Nullable final GreetingStandardType type) { return type != null ? type.getCode() : null; } public GreetingStandardType composeWith(@NonNull final GreetingStandardType other) { return ofCode(code + "+" + other...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\greeting\GreetingStandardType.java
1
请完成以下Java代码
public Optional<String> getLookupTableName() { return Optional.of(modelTableName); } @Override public void cacheInvalidate() { // nothing } @Override public LookupDataSourceFetcher getLookupDataSourceFetcher() { return this; } @Override public boolean isHighVolume() { return true; } @Override...
{ return true; } @Override public boolean isNumericKey() { return true; } @Override public Set<String> getDependsOnFieldNames() { return null; } @Override public Optional<WindowId> getZoomIntoWindowId() { return Optional.empty(); } @Override public SqlForFetchingLookupById getSqlForFetchingLo...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\FullTextSearchLookupDescriptor.java
1
请完成以下Java代码
private String buildSummaryInfo(final RecordChangeLog changeLog) { final StringBuilder info = new StringBuilder(); // // Created / Created By final UserId createdBy = changeLog.getCreatedByUserId(); final ZonedDateTime createdTS = TimeUtil.asZonedDateTime(changeLog.getCreatedTimestamp()); info.append(" ")...
{ if (userId == null) { return "?"; } return userNamesById.computeIfAbsent(userId, usersRepo::retrieveUserFullName); } @Override public void actionPerformed(final ActionEvent e) { dispose(); } // actionPerformed } // RecordInfo
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\RecordInfo.java
1
请完成以下Java代码
public void writeStartTag(HtmlWriteContext context) { writeLeadingWhitespace(context); writeStartTagOpen(context); writeAttributes(context); writeStartTagClose(context); writeEndLine(context); } public void writeContent(HtmlWriteContext context) { if(textContent != null) { writeLeadin...
String attributeValue = escapeQuotes(attribute.getValue()); writer.write(attributeValue); writer.write("\""); } } } protected String escapeQuotes(String attributeValue){ String escapedHtmlQuote = "&quot;"; String escapedJavaQuote = "\""; return attributeValue.replaceAll(escape...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\form\engine\HtmlElementWriter.java
1
请完成以下Java代码
protected ScopeImpl getScopeForActivityInstance(ProcessDefinitionImpl processDefinition, ActivityInstance activityInstance) { String scopeId = activityInstance.getActivityId(); if (processDefinition.getId().equals(scopeId)) { return processDefinition; } else { return processDefinition...
if (retainedExecutionsForInstance.size() != 1) { throw new ProcessEngineException("There are " + retainedExecutionsForInstance.size() + " (!= 1) executions for activity instance " + activityInstance.getId()); } return retainedExecutionsForInstance.iterator().next(); } protected String desc...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\AbstractProcessInstanceModificationCommand.java
1
请完成以下Java代码
public final class CustomColNames { private CustomColNames() { } public static final String AD_OrgInfo_REPORT_PREFIX = "ReportPrefix"; public static final String C_BPartner_M_FREIGHTCOST_ID = "M_FreightCost_ID"; /** * This column is used in BankingPA service */ public final static String C_BP_BankAcount_V...
public static final String C_Tax_Acct_T_PAYDISCOUNT_EXTP_ACCT = "T_PayDiscount_Exp_Acct"; public static final String C_Tax_Acct_T_PAYDISCOUNT_REV_ACCT = "T_PayDiscount_Rev_Acct"; public static final String C_Tax_Acct_T_REVENUE_ACCT = "T_Revenue_Acct"; public static final String C_Tax_ISTO_EU_LOCATION = "IsToEULocat...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\util\CustomColNames.java
1