instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
private void setData (int row, int col, TextLayout layout, AttributedCharacterIterator iter) { if (layout == null) return; if (p_sizeCalculated) throw new IllegalStateException("Size already calculated"); if (row < 0 || row >= m_rows) throw new ArrayIndexOutOfBoundsException("Row Index=" + row + " Rows=...
* @param isView true if online view (IDs are links) */ public void paint(Graphics2D g2D, int pageNo, Point2D pageStart, Properties ctx, boolean isView) { Point2D.Double location = getAbsoluteLocation(pageStart); float y = (float)location.y; // for (int row = 0; row < m_rows; row++) { float x = (float)...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\layout\GridElement.java
1
请完成以下Java代码
private void executeTask() { ArrayList<T> itemsToConsume = null; final long remaining; final int bufferSize; synchronized (lock) { // we don't use SystemTime because in our usual tests it's rigged to return a fixed value. Fee free to use it here, too - maybe with an enhanced Timesource - when it makes se...
consumer.accept(itemsToConsume); buffer.clear(); } } } public void purgeBuffer() { synchronized (lock) { buffer.clear(); } } public void shutdown() { executor.shutdown(); } /* public static void main(String[] args) throws InterruptedException { final Debouncer<Integer> debouncer = D...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\async\Debouncer.java
1
请完成以下Java代码
public LinearModel getModel() { return model; } /** * 在线学习 * * @param instance * @return */ public boolean learn(Instance instance) { if (instance == null) return false; model.update(instance); return true; } /** * 在线学习 * ...
{ return learn(createInstance(sentence, model.featureMap)); } /** * 性能测试 * * @param corpora 数据集 * @return 默认返回accuracy,有些子类可能返回P,R,F1 * @throws IOException */ public double[] evaluate(String corpora) throws IOException { return evaluate(corpora, this.getMod...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\perceptron\PerceptronTagger.java
1
请完成以下Java代码
public void attachState(MigratingScopeInstance owningActivityInstance) { ExecutionEntity representativeExecution = owningActivityInstance.resolveRepresentativeExecution(); ScopeImpl currentScope = owningActivityInstance.getCurrentScope(); ExecutionEntity newOwningExecution = representativeExecution; i...
public HistoryEvent createHistoryEvent(HistoryEventProducer producer) { return producer.createHistoricVariableMigrateEvt(variable); } }); } } @Override public void migrateDependentEntities() { // nothing to do } public String getVariableName() { return variable.getName();...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingVariableInstance.java
1
请完成以下Java代码
public class MIndexValidator implements ModelValidator { private int m_AD_Client_ID = -1; @Override public int getAD_Client_ID() { return m_AD_Client_ID; } /** * Does nothing, the code is commented out. See the javadoc of {@link #modelChange(PO, int)}. */ @Override public void initialize(ModelValidation...
// { // // Skip inactive indexes // if (!index.isActive()) // { // continue; // } // // // Only UNIQUE indexes need to be validated // if (!index.isUnique()) // { // continue; // } // // if (!index.isWhereClauseMatched(ctx, poWhereClause, trxName)) // { // ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\model\MIndexValidator.java
1
请完成以下Java代码
private ActivityImpl getCurrentActivity(CommandContext commandContext, Job job) { String type = job.getJobHandlerType(); ActivityImpl activity = null; if (TimerExecuteNestedActivityJobHandler.TYPE.equals(type) || TimerCatchIntermediateEventJobHandler.TYPE.equals(type)) { ...
} } } else if (AsyncContinuationJobHandler.TYPE.equals(type)) { ExecutionEntity execution = fetchExecutionEntity(commandContext, job.getExecutionId()); if (execution != null) { activity = execution.getActivity(); } } else { // ...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\cmd\JobRetryCmd.java
1
请完成以下Spring Boot application配置
# # Copyright 2015-2023 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # logging.level.root=INFO logging.level.sample.mybatis.web.mapper=TRACE
repos\spring-boot-starter-master\mybatis-spring-boot-samples\mybatis-spring-boot-sample-web\src\main\resources\application.properties
2
请完成以下Java代码
public <ImportRecordType> IImportProcess<ImportRecordType> newImportProcess(@NonNull final Class<ImportRecordType> modelImportClass) { final IImportProcess<ImportRecordType> importProcess = newImportProcessOrNull(modelImportClass); if (importProcess == null) { throw new AdempiereException("No import process f...
throw new AdempiereException("Failed instantiating " + importProcessClass, e); } } @Nullable private <ImportRecordType> IImportProcess<ImportRecordType> newImportProcessForTableNameOrNull(@NonNull final String importTableName) { final Class<?> importProcessClass = importProcessDescriptorsMap.getImportProcessCl...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\processing\impl\ImportProcessFactory.java
1
请完成以下Java代码
public final IClientUIInvoker setOnFail(OnFail onFail) { Check.assumeNotNull(onFail, "onFail not null"); this.onFail = onFail; return this; } private final OnFail getOnFail() { return onFail; } @Override public final IClientUIInvoker setExceptionHandler(IExceptionHandler exceptionHandler) { Check.as...
protected final Object getParentComponent() { return parentComponent; } protected final int getParentWindowNo() { return parentWindowNo; } @Override public final IClientUIInvoker setRunnable(final Runnable runnable) { this.runnable = runnable; return this; } private final Runnable getRunnable() {...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\adempiere\form\AbstractClientUIInvoker.java
1
请完成以下Java代码
public AttributesIncludedTabData updateByKey( @NonNull final AttributesIncludedTabDataKey key, @NonNull final Collection<AttributeId> attributeIds, @NonNull final BiFunction<AttributeId, AttributesIncludedTabDataField, AttributesIncludedTabDataField> mapper) { final HashMap<AttributeId, I_Record_Attribute> ...
{ record = InterfaceWrapperHelper.newInstance(I_Record_Attribute.class); } updateRecord(record, field, key); InterfaceWrapperHelper.save(record); } if (field != null) { fields.put(attributeId, field); } } InterfaceWrapperHelper.deleteAll(recordsByAttributeId.values()); return A...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\attributes_included_tab\data\AttributesIncludedTabDataRepository.java
1
请在Spring Boot框架中完成以下Java代码
public class Contact { @Id @GeneratedValue private Long id; @NotBlank private String name; @Email private String email; @Pattern(regexp = "\\d{3}-\\d{3}-\\d{4}") private String phone; public Contact() { } public Contact(String name, String email, String phone) { ...
public void setName(String name) { this.name = name; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPhone() { return phone; } public void setPhone(String phone) { this.ph...
repos\tutorials-master\vaadin\src\main\java\com\baeldung\data\Contact.java
2
请完成以下Java代码
public abstract class BaseScorer<T extends ISentenceKey> implements IScorer { public BaseScorer() { storage = new TreeMap<T, Set<String>>(); } /** * 储存 */ protected Map<T, Set<String>> storage; /** * 权重 */ public double boost = 1.0; /** * 设置权重 * @p...
@Override public Map<String, Double> computeScore(String outerSentence) { TreeMap<String, Double> result = new TreeMap<String, Double>(Collections.reverseOrder()); T keyOuter = generateKey(outerSentence); if (keyOuter == null) return result; for (Map.Entry<T, Set<String>> entry :...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\suggest\scorer\BaseScorer.java
1
请完成以下Java代码
private static boolean isSimpleType(Class<?> type) { return isPrimitiveOrWrapper(type) || type == String.class || type == BigDecimal.class || type == BigInteger.class || type == Date.class || type == URL.class || typ...
} } } catch (Exception e) { throw new RuntimeException(e); } return beanMetadata; } protected Map<String, ServiceBean> getServiceBeansMap() { return beansOfTypeIncludingAncestors(applicationContext, ServiceBean.class); } protected ReferenceAn...
repos\dubbo-spring-boot-project-master\dubbo-spring-boot-compatible\actuator\src\main\java\org\apache\dubbo\spring\boot\actuate\endpoint\metadata\AbstractDubboMetadata.java
1
请在Spring Boot框架中完成以下Java代码
public static class Ssl { /** * Whether to enable SSL support. Enabled automatically if a "bundle" is provided * unless specified otherwise. */ private @Nullable Boolean enabled; /** * SSL bundle name. */ private @Nullable String bundle; public Boolean getEnabled() { return (this.enabled ...
} public void setConnect(Duration connect) { this.connect = connect; } public Duration getDisconnect() { return this.disconnect; } public void setDisconnect(Duration disconnect) { this.disconnect = disconnect; } public Duration getKeyValue() { return this.keyValue; } public void setKe...
repos\spring-boot-4.0.1\module\spring-boot-couchbase\src\main\java\org\springframework\boot\couchbase\autoconfigure\CouchbaseProperties.java
2
请完成以下Java代码
public void setSupervisor(org.compiere.model.I_AD_User Supervisor) { set_ValueFromPO(COLUMNNAME_Supervisor_ID, org.compiere.model.I_AD_User.class, Supervisor); } /** Set Vorgesetzter. @param Supervisor_ID Supervisor for this user/organization - used for escalation and approval */ @Override public void s...
public static final String WEEKDAY_Samstag = "6"; /** Set Day of the Week. @param WeekDay Day of the Week */ @Override public void setWeekDay (java.lang.String WeekDay) { set_Value (COLUMNNAME_WeekDay, WeekDay); } /** Get Day of the Week. @return Day of the Week */ @Override public java.lang.St...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Scheduler.java
1
请完成以下Java代码
public void setName (java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Name */ @Override public java.lang.String getName () { return (java.lang.String)get_Value(COLUMNNAME_Name); } /** Set Skript. @param Script Dynamic Java Language Script to calculate result ...
@return Method of ordering records; lowest number comes first */ @Override public int getSeqNo () { Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); if (ii == null) return 0; return ii.intValue(); } /** Set Start No. @param StartNo Starting number/position */ @Override public void setSta...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ImpFormat_Row.java
1
请在Spring Boot框架中完成以下Java代码
public class ChunksConfig { @Bean public ItemReader<Line> itemReader() { return new LineReader(); } @Bean public ItemProcessor<Line, Line> itemProcessor() { return new LineProcessor(); } @Bean public ItemWriter<Line> itemWriter() { return new LinesWriter(); ...
return new StepBuilder("processLines", jobRepository).<Line, Line> chunk(2, transactionManager) .reader(reader) .processor(processor) .writer(writer) .build(); } @Bean(name = "chunksJob") public Job job(JobRepository jobRepository, PlatformTransactionManager transact...
repos\tutorials-master\spring-batch\src\main\java\com\baeldung\taskletsvschunks\config\ChunksConfig.java
2
请在Spring Boot框架中完成以下Java代码
class EmployeeRowMapper implements RowMapper < Employee > { @Override public Employee mapRow(ResultSet rs, int rowNum) throws SQLException { Employee employee = new Employee(); employee.setId(rs.getLong("id")); employee.setFirstName(rs.getString("first_name")); ...
public int deleteById(long id) { return jdbcTemplate.update("delete from employees where id=?", new Object[] { id }); } public int insert(Employee employee) { return jdbcTemplate.update("insert into employees (id, first_name, last_name, email_address) " + "values(?, ?, ?, ?)...
repos\Spring-Boot-Advanced-Projects-main\springboot2-jdbc-crud-mysql-example\src\main\java\net\alanbinu\springboot2\jdbc\repository\EmployeeJDBCRepository.java
2
请完成以下Java代码
public void parseParams() { String disabled = initParams.get(DISABLED_PARAM); if (ServletFilterUtil.isEmpty(disabled)) { setDisabled(false); } else { setDisabled(Boolean.parseBoolean(disabled)); } String value = initParams.get(VALUE_PARAM); if (!isDisabled()) { if (!Servl...
setValue(value); } else { setValue(HEADER_DEFAULT_VALUE); } } } @Override public String getHeaderName() { return HEADER_NAME; } }
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\security\filter\headersec\provider\impl\ContentTypeOptionsProvider.java
1
请在Spring Boot框架中完成以下Java代码
public void setResetDate(Instant resetDate) { this.resetDate = resetDate; } public String getLangKey() { return langKey; } public void setLangKey(String langKey) { this.langKey = langKey; } public Set<Authority> getAuthorities() { return authorities; } ...
return getClass().hashCode(); } // prettier-ignore @Override public String toString() { return "User{" + "login='" + login + '\'' + ", firstName='" + firstName + '\'' + ", lastName='" + lastName + '\'' + ", email='" + email + '\'' + ",...
repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\gateway-app\src\main\java\com\gateway\domain\User.java
2
请完成以下Java代码
public int getCaretPosition() { return m_textArea.getCaretPosition(); } /** * Set Text Editable * @param edit */ public void setEditable (boolean edit) { m_textArea.setEditable(edit); } /** * Is Text Editable * @return true if editable */ public boolean isEditable() { return m_textArea.isE...
/** * Add Text Mouse Listener * @param l */ @Override public void addMouseListener (MouseListener l) { m_textArea.addMouseListener(l); } /** * Add Text Key Listener * @param l */ @Override public void addKeyListener (KeyListener l) { m_textArea.addKeyListener(l); } /** * Add Text Input Me...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CTextArea.java
1
请完成以下Java代码
public ILUTUConfigurationEditor save() { assertEditing(); final I_M_HU_LUTU_Configuration lutuConfigurationInitial = getLUTUConfiguration(); final I_M_HU_LUTU_Configuration lutuConfigurationEditing = getEditingLUTUConfiguration(); // // Check if we need to use the new configuration or we are ok with the ol...
} _lutuConfigurationInitial = lutuConfigurationToUse; _lutuConfigurationEditing = null; // stop editing mode return this; } @Override public ILUTUConfigurationEditor pushBackToModel() { if (isEditing()) { save(); } final I_M_HU_LUTU_Configuration lutuConfiguration = getLUTUConfiguration(); lu...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\LUTUConfigurationEditor.java
1
请完成以下Java代码
public Segment enableTranslatedNameRecognize(boolean enable) { config.translatedNameRecognize = enable; config.updateNerConfig(); return this; } /** * 是否启用日本人名识别 * * @param enable */ public Segment enableJapaneseNameRecognize(boolean enable) { con...
int to; public WorkThread(String[] sentenceArray, List<Term>[] termListArray, int from, int to) { this.sentenceArray = sentenceArray; this.termListArray = termListArray; this.from = from; this.to = to; } @Override public void run(...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\Segment.java
1
请在Spring Boot框架中完成以下Java代码
public void setRepair_VHU_ID (final int Repair_VHU_ID) { if (Repair_VHU_ID < 1) set_Value (COLUMNNAME_Repair_VHU_ID, null); else set_Value (COLUMNNAME_Repair_VHU_ID, Repair_VHU_ID); } @Override public int getRepair_VHU_ID() { return get_ValueAsInt(COLUMNNAME_Repair_VHU_ID); } /** * Status AD_...
{ return get_ValueAsString(COLUMNNAME_Status); } /** * Type AD_Reference_ID=541243 * Reference name: C_Project_Repair_Task_Type */ public static final int TYPE_AD_Reference_ID=541243; /** ServiceRepairOrder = W */ public static final String TYPE_ServiceRepairOrder = "W"; /** SpareParts = P */ public st...
repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java-gen\de\metas\servicerepair\repository\model\X_C_Project_Repair_Task.java
2
请完成以下Java代码
public void preInit(ProcessEngineConfigurationImpl processEngineConfiguration) { for (ProcessEnginePlugin plugin : plugins) { plugin.preInit(processEngineConfiguration); } } @Override public void postInit(ProcessEngineConfigurationImpl processEngineConfiguration) { for (ProcessEnginePlugin plug...
* @return the configured plugins */ public List<ProcessEnginePlugin> getPlugins() { return plugins; } @Override public String toString() { return this.getClass().getSimpleName() + plugins; } private static List<ProcessEnginePlugin> toList(ProcessEnginePlugin plugin, ProcessEnginePlugin... addi...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cfg\CompositeProcessEnginePlugin.java
1
请完成以下Spring Boot application配置
server: port: 8080 servlet: context-path: / spring: application: name: Api-Gateway cloud: gateway: globalcors: corsConfigurations: '[/**]': allowedOrigins: "https://www.baeldung.com" allowedMethods: - GET allowedHeaders: "*" ...
: - GET allowedHeaders: '*' springdoc: api-docs: enabled: true path: /v3/api-docs swagger-ui: enabled: true config-url: /v3/api-docs/swagger-config urls: - name: gateway-service url: /v3/api-docs - name: product-service url: /p...
repos\tutorials-master\spring-cloud-modules\spring-cloud-gateway-3\spring-cloud-gateway-service\src\main\resources\application.yml
2
请完成以下Java代码
public class ScriptTypeTaskListener implements TaskListener { private static final long serialVersionUID = -8915149072830499057L; protected Expression script; protected Expression language; protected Expression resultVariable; public ScriptTypeTaskListener() { } public ScriptTypeTaskLi...
Object result = scriptingEngines.evaluate(request.build()).getResult(); if (resultVariable != null) { String resultVariable = Objects.toString(this.resultVariable.getValue(delegateTask), null); if (resultVariable != null) { delegateTask.setVariable(resultVariable, result...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\listener\ScriptTypeTaskListener.java
1
请完成以下Java代码
public String getSpData() { return spData; } public void setSpData(String spData) { this.spData = spData; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append...
sb.append(", productId=").append(productId); sb.append(", skuCode=").append(skuCode); sb.append(", price=").append(price); sb.append(", stock=").append(stock); sb.append(", lowStock=").append(lowStock); sb.append(", pic=").append(pic); sb.append(", sale=").append(sale); ...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsSkuStock.java
1
请在Spring Boot框架中完成以下Java代码
public GrpcChannelProperties getChannel(final String name) { final GrpcChannelProperties properties = getRawChannel(name); properties.copyDefaultsFrom(getGlobalChannel()); return properties; } /** * Gets the global channel properties. Global properties are used, if the channel prop...
private String defaultScheme; /** * Get the default scheme that should be used, if the client doesn't specify a scheme/address. * * @return The default scheme to use or null. * @see #setDefaultScheme(String) */ public String getDefaultScheme() { return this.defaultScheme; }...
repos\grpc-spring-master\grpc-client-spring-boot-starter\src\main\java\net\devh\boot\grpc\client\config\GrpcChannelsProperties.java
2
请完成以下Java代码
public class SessionFilter implements Filter{ @Override public void init(FilterConfig filterConfig) throws ServletException { System.out.println("init filter"); } @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, Servlet...
if (session != null) { session.setHttpOnly(true); session.setSecure(true); res.addCookie(session); } } chain.doFilter(req, res); } @Override public void destroy() { System.out.println("destroy filter"); } }
repos\tutorials-master\spring-security-modules\spring-security-web-mvc\src\main\java\com\baeldung\session\filter\SessionFilter.java
1
请完成以下Java代码
public void remove() { lexiographicallyOrderedScriptsSupplier.get().remove(); } @SuppressWarnings("unused") private void dumpTofile(SortedSet<IScript> lexiagraphicallySortedScripts) { FileWriter writer; try { writer = new FileWriter(GloballyOrderedScannerDecorator.class.getName() + "_sorted_scripts.txt...
} catch (IOException e) { e.printStackTrace(); } } @Override public String toString() { return MoreObjects.toStringHelper(this) .addValue(getInternalScanner()) .toString(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\scanner\impl\GloballyOrderedScannerDecorator.java
1
请完成以下Java代码
public void destroy() throws Exception { if (cmmnEngine != null) { cmmnEngine.close(); } } @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { this.applicationContext = applicationContext; } @Override pu...
@Override public Class<CmmnEngine> getObjectType() { return CmmnEngine.class; } @Override public boolean isSingleton() { return true; } public CmmnEngineConfiguration getCmmnEngineConfiguration() { return cmmnEngineConfiguration; } public void setCmmnEngineConf...
repos\flowable-engine-main\modules\flowable-cmmn-spring\src\main\java\org\flowable\cmmn\spring\CmmnEngineFactoryBean.java
1
请在Spring Boot框架中完成以下Java代码
public class StudentJdbcRepository { @Autowired JdbcTemplate jdbcTemplate; class StudentRowMapper implements RowMapper<Student> { @Override public Student mapRow(ResultSet rs, int rowNum) throws SQLException { Student student = new Student(); student.setId(rs.getLong("id")); student.setName(rs.getStrin...
return jdbcTemplate.queryForObject("select * from student where id=?", new Object[] { id }, new BeanPropertyRowMapper<Student>(Student.class)); } public int deleteById(long id) { return jdbcTemplate.update("delete from student where id=?", new Object[] { id }); } public int insert(Student student) { retur...
repos\Spring-Boot-Advanced-Projects-main\spring-boot-2-jdbc-with-h2\src\main\java\com\alanbinu\springboot\jdbc\h2\example\student\StudentJdbcRepository.java
2
请完成以下Java代码
public Criteria andShowStatusNotBetween(Integer value1, Integer value2) { addCriterion("show_status not between", value1, value2, "showStatus"); return (Criteria) this; } } public static class Criteria extends GeneratedCriteria { protected Criteria() { super(...
this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\CmsPrefrenceAreaExample.java
1
请在Spring Boot框架中完成以下Java代码
public void stop(StopContext context) { // nothing to do } public Runnable getExecuteJobsRunnable(List<String> jobIds, ProcessEngineImpl processEngine) { return new ExecuteJobsRunnable(jobIds, processEngine); } public boolean schedule(Runnable runnable, boolean isLongRunning) { if(isL...
} protected boolean scheduleLongRunningWork(Runnable runnable) { final ManagedQueueExecutorService managedQueueExecutorService = managedQueueInjector.getValue(); boolean rejected = false; try { // wait for 2 seconds for the job to be accepted by the pool. managedQueueExecutorServ...
repos\camunda-bpm-platform-master\distro\wildfly26\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\service\MscExecutorService.java
2
请完成以下Java代码
public IQueryOrderByBuilder<T> addColumn(final String columnName) { final Direction direction = Direction.Ascending; final Nulls nulls = getNulls(direction); return addColumn(columnName, direction, nulls); } @Override public IQueryOrderByBuilder<T> addColumn(ModelColumn<T, ?> column) { final String column...
@Override public IQueryOrderByBuilder<T> addColumn(@NonNull final ModelColumn<T, ?> column, final Direction direction, final Nulls nulls) { final String columnName = column.getColumnName(); return addColumn(columnName, direction, nulls); } private Nulls getNulls(final Direction direction) { // NOTE: keeping...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\QueryOrderByBuilder.java
1
请在Spring Boot框架中完成以下Java代码
public final class ProductMasterDataProvider { private final IProductBL productsBL = Services.get(IProductBL.class); @NonNull private final ExternalIdentifierProductLookupService productLookupService; @Value private static class ProductCacheKey { @NonNull OrgId orgId; @NonNull ExternalIdentifier product...
@NonNull final ExternalIdentifier productExternalIdentifier, @NonNull final OrgId orgId) { return productInfoCache.getOrLoad( new ProductCacheKey(orgId, productExternalIdentifier), this::getProductInfo0); } private ProductInfo getProductInfo0(@NonNull final ProductCacheKey key) { final ExternalIden...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\ordercandidates\impl\ProductMasterDataProvider.java
2
请完成以下Java代码
public class Shift { private LocalDateTime start; private LocalDateTime end; private String requiredSkill; @PlanningVariable private Employee employee; // A no-arg constructor is required for @PlanningEntity annotated classes public Shift() { } public Shift(LocalDateTime start, L...
return start; } public LocalDateTime getEnd() { return end; } public String getRequiredSkill() { return requiredSkill; } public Employee getEmployee() { return employee; } }
repos\tutorials-master\timefold-solver\src\main\java\com\baeldung\timefoldsolver\Shift.java
1
请完成以下Java代码
public class FilterRules { public static List<SecurityFilterRule> load(InputStream configFileResource, String applicationPath) throws IOException { ObjectMapper objectMapper = new ObjectMapper(); SecurityFilterConfig config = objectMapper.readValue(configFileRes...
/** * Iterate over a number of filter rules and match them against * the given request. * * @param requestMethod * @param requestUri * @param filterRules * * @return the checked request with authorization information attached */ public static Authorization authorize(String requestMethod, St...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\security\filter\util\FilterRules.java
1
请在Spring Boot框架中完成以下Java代码
public ForecastExtensionType getForecastExtension() { return forecastExtension; } /** * Sets the value of the forecastExtension property. * * @param value * allowed object is * {@link ForecastExtensionType } * */ public void setForecastExtension(Fore...
* {@link String } * */ public void setControlTotalQualifier(String value) { this.controlTotalQualifier = value; } /** * Gets the value of the controlTotalValue property. * * @return * possible object is * ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\DocumentExtensionType.java
2
请完成以下Java代码
public class InOutCost { @NonNull private final InOutCostId id; @Setter @Nullable InOutCostId reversalId; @NonNull private final OrgId orgId; @NonNull private final OrderCostDetailId orderCostDetailId; @NonNull private final OrderAndLineId orderAndLineId; @NonNull private final SOTrx soTrx; @NonNull private fin...
public InOutLineId getInOutLineId() {return inoutAndLineId.getInOutLineId();} public void addCostAmountInvoiced(@NonNull final Money amtToAdd) { this.costAmountInvoiced = this.costAmountInvoiced.add(amtToAdd); this.isInvoiced = this.costAmount.isEqualByComparingTo(this.costAmountInvoiced); } public Money getC...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\costs\inout\InOutCost.java
1
请完成以下Java代码
private String createCardContent(InstanceEvent event, Instance instance) { String content = this.createContent(event, instance); Map<String, Object> header = new HashMap<>(); header.put("template", StringUtils.hasText(this.card.getThemeColor()) ? "red" : this.card.getThemeColor()); Map<String, String> titleCon...
public void setSecret(String secret) { this.secret = secret; } public MessageType getMessageType() { return messageType; } public void setMessageType(MessageType messageType) { this.messageType = messageType; } public Card getCard() { return card; } public void setCard(Card card) { this.card = car...
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\notify\FeiShuNotifier.java
1
请完成以下Java代码
public abstract class AgentReloader { private static final Set<String> AGENT_CLASSES; static { Set<String> agentClasses = new LinkedHashSet<>(); agentClasses.add("org.zeroturnaround.javarebel.Integration"); agentClasses.add("org.zeroturnaround.javarebel.ReloaderFactory"); agentClasses.add("org.hotswap.agent...
public static boolean isActive() { return isActive(null) || isActive(AgentReloader.class.getClassLoader()) || isActive(ClassLoader.getSystemClassLoader()); } private static boolean isActive(@Nullable ClassLoader classLoader) { for (String agentClass : AGENT_CLASSES) { if (ClassUtils.isPresent(agentClass, ...
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\restart\AgentReloader.java
1
请完成以下Java代码
public class CorrelationPropertyRetrievalExpressionImpl extends BaseElementImpl implements CorrelationPropertyRetrievalExpression { protected static AttributeReference<Message> messageRefAttribute; protected static ChildElement<MessagePath> messagePathChild; public static void registerType(ModelBuilder modelBui...
} public Message getMessage() { return messageRefAttribute.getReferenceTargetElement(this); } public void setMessage(Message message) { messageRefAttribute.setReferenceTargetElement(this, message); } public MessagePath getMessagePath() { return messagePathChild.getChild(this); } public voi...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\CorrelationPropertyRetrievalExpressionImpl.java
1
请完成以下Java代码
public String getExitEventType() { return exitEventType; } public void setExitEventType(String exitEventType) { this.exitEventType = exitEventType; } @Override public void addIncomingAssociation(Association association) { this.incomingAssociations.add(association); } ...
public void setOutgoingAssociations(List<Association> outgoingAssociations) { this.outgoingAssociations = outgoingAssociations; } @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); if (isEntryCriterion) { stringBuilder.append("Entry c...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\Criterion.java
1
请完成以下Java代码
private JsonNode createDetails(AlarmRuleState ruleState) { JsonNode alarmDetails; String alarmDetailsStr = ruleState.getAlarmRule().getAlarmDetails(); DashboardId dashboardId = ruleState.getAlarmRule().getDashboardId(); if (StringUtils.isNotEmpty(alarmDetailsStr) || dashboardId != null)...
break; } return String.valueOf(result); } public boolean processAlarmClear(TbContext ctx, Alarm alarmNf) { boolean updated = false; if (currentAlarm != null && currentAlarm.getId().equals(alarmNf.getId())) { currentAlarm = null; for (AlarmRuleState state ...
repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\profile\AlarmState.java
1
请完成以下Java代码
class CassandraDockerComposeConnectionDetailsFactory extends DockerComposeConnectionDetailsFactory<CassandraConnectionDetails> { private static final int CASSANDRA_PORT = 9042; CassandraDockerComposeConnectionDetailsFactory() { super("cassandra"); } @Override protected CassandraConnectionDetails getDockerCo...
private final String datacenter; CassandraDockerComposeConnectionDetails(RunningService service) { super(service); CassandraEnvironment cassandraEnvironment = new CassandraEnvironment(service.env()); this.contactPoints = List.of(new Node(service.host(), service.ports().get(CASSANDRA_PORT))); this.datacen...
repos\spring-boot-4.0.1\module\spring-boot-cassandra\src\main\java\org\springframework\boot\cassandra\docker\compose\CassandraDockerComposeConnectionDetailsFactory.java
1
请完成以下Java代码
public static TaxId ofRepoId(final int repoId) { return new TaxId(repoId); } @Nullable public static TaxId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? ofRepoId(repoId) : null; } public static Optional<TaxId> optionalOfRepoId(final int repoId) { return Optional.ofNullable(ofRepoIdOrNull(repoId...
private TaxId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "C_Tax_ID"); } @Override @JsonValue public int getRepoId() { return repoId; } public boolean isNoTaxId() { return repoId == Tax.C_TAX_ID_NO_TAX_FOUND; } public static boolean equals(@Nullable TaxId id1, @Nullable Tax...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\tax\api\TaxId.java
1
请完成以下Java代码
public List<Attachment> findAttachmentsByTaskId(String taskId) { checkHistoryEnabled(); return getDbSqlSession().selectList("selectAttachmentsByTaskId", taskId); } @SuppressWarnings("unchecked") public void deleteAttachmentsByTaskId(String taskId) { checkHistoryEnabled(); Li...
String contentId = attachment.getContentId(); if (contentId != null) { getByteArrayManager().deleteByteArrayById(contentId); } getDbSqlSession().delete(attachment); if (dispatchEvents) { getProcessEngineConfiguration().getEventDispatcher()....
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\AttachmentEntityManager.java
1
请完成以下Java代码
public String getCallbackId() { return callbackId; } public void setCallbackId(String callbackId) { this.callbackId = callbackId; } public String getCallbackType() { return callbackType; } public void setCallbackType(String callbackType) { this.callbackType = c...
return assigneeId; } public void setAssigneeId(String assigneeId) { this.assigneeId = assigneeId; } public String getInitiatorVariableName() { return initiatorVariableName; } public void setInitiatorVariableName(String initiatorVariableName) { this.initiatorVariableNam...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\interceptor\StartCaseInstanceBeforeContext.java
1
请完成以下Java代码
public class ProcessStartedListenerDelegate implements ActivitiEventListener { private List<ProcessRuntimeEventListener<ProcessStartedEvent>> listeners; private ToAPIProcessStartedEventConverter processInstanceStartedEventConverter; public ProcessStartedListenerDelegate( List<ProcessRuntimeEventL...
processInstanceStartedEventConverter .from((ActivitiProcessStartedEvent) event) .ifPresent(convertedEvent -> { for (ProcessRuntimeEventListener<ProcessStartedEvent> listener : listeners) { listener.onEvent(convertedEvent); }...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-runtime-impl\src\main\java\org\activiti\runtime\api\event\internal\ProcessStartedListenerDelegate.java
1
请在Spring Boot框架中完成以下Java代码
public DecisionDefinitionQuery orderByVersionTag() { return orderBy(DecisionDefinitionQueryProperty.VERSION_TAG); } //results //////////////////////////////////////////// @Override public long executeCount(CommandContext commandContext) { if (isDmnEnabled(commandContext)) { checkQueryOk(); ...
} public Date getDeployedAfter() { return deployedAfter; } public Date getDeployedAt() { return deployedAt; } public String getKey() { return key; } public String getKeyLike() { return keyLike; } public String getResourceName() { return resourceName; } public String getRe...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\dmn\entity\repository\DecisionDefinitionQueryImpl.java
2
请完成以下Java代码
public class XmlValidator { private static final Logger LOGGER = LoggerFactory.getLogger(XmlValidator.class); private String xsdPath; private String xmlPath; public XmlValidator(String xsdPath, String xmlPath) { this.xsdPath = xsdPath; this.xmlPath = xmlPath; } public boolean...
XmlErrorHandler xsdErrorHandler = new XmlErrorHandler(); Validator validator = initValidator(xsdPath); validator.setErrorHandler(xsdErrorHandler); try { validator.validate(new StreamSource(getFile(xmlPath))); } catch (SAXParseException e) {} xsdErrorHandler.getExcepti...
repos\tutorials-master\xml-modules\xml\src\main\java\com\baeldung\xml\validation\XmlValidator.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...
Fully qualified SQL WHERE clause */ @Override public void setWhereClause (java.lang.String WhereClause) { set_Value (COLUMNNAME_WhereClause, WhereClause); } /** Get Sql WHERE. @return Fully qualified SQL WHERE clause */ @Override public java.lang.String getWhereClause () { return (java.lang.String...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Note.java
1
请完成以下Java代码
public java.lang.String getName () { return (java.lang.String)get_Value(COLUMNNAME_Name); } /** Set Reihenfolge. @param SeqNo Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst */ @Override public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo...
/** Set Registername. @param TabName Registername */ @Override public void setTabName (java.lang.String TabName) { set_Value (COLUMNNAME_TabName, TabName); } /** Get Registername. @return Registername */ @Override public java.lang.String getTabName () { return (java.lang.String)get_Value(COLUMNNAM...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\dataentry\model\X_DataEntry_SubTab.java
1
请完成以下Java代码
public class FTSDocumentFilterConverter implements SqlDocumentFilterConverter { public static final FTSDocumentFilterConverter instance = new FTSDocumentFilterConverter(); @Override public boolean canConvert(final String filterId) { return FTSDocumentFilterDescriptorsProviderFactory.FILTER_ID.equals(filterId); ...
return FilterSql.allowNoneWithComment("no FTS result"); } // final SqlAndParams whereClause = SqlAndParams.builder() // .append("EXISTS (") // .append(" SELECT 1 FROM ").append(I_T_ES_FTS_Search_Result.Table_Name) // .append(" WHERE ") // .append(" ").append(I_T_ES_FTS_Search_Result.COLUMNNAME_Sear...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\provider\fullTextSearch\FTSDocumentFilterConverter.java
1
请完成以下Java代码
public int getAndIncrementRuleNodeCounter() { return ruleNodeExecCounter.getAndIncrement(); } public TbMsgProcessingCtx copy() { if (stack == null || stack.isEmpty()) { return new TbMsgProcessingCtx(ruleNodeExecCounter.get()); } else { return new TbMsgProcessingC...
return new TbMsgProcessingCtx(ruleNodeExecCounter); } } public MsgProtos.TbMsgProcessingCtxProto toProto() { var ctxBuilder = MsgProtos.TbMsgProcessingCtxProto.newBuilder(); ctxBuilder.setRuleNodeExecCounter(ruleNodeExecCounter.get()); if (stack != null) { for (TbMsg...
repos\thingsboard-master\common\message\src\main\java\org\thingsboard\server\common\msg\TbMsgProcessingCtx.java
1
请完成以下Java代码
public void setProcessed (boolean Processed) { set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); } /** Get Processed. @return The document has been processed */ public boolean isProcessed () { Object oo = get_Value(COLUMNNAME_Processed); if (oo != null) { if (oo instanceof Boolean) ...
@param TextMsg Text Message */ public void setTextMsg (String TextMsg) { set_Value (COLUMNNAME_TextMsg, TextMsg); } /** Get Text Message. @return Text Message */ public String getTextMsg () { return (String)get_Value(COLUMNNAME_TextMsg); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Depreciation_Convention.java
1
请完成以下Java代码
public void setBooks(List<BookList> books) { this.books = books; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getCl...
return false; } return id != null && id.equals(((AuthorList) obj).id); } @Override public int hashCode() { return 2021; } @Override public String toString() { return "Author{" + "id=" + id + ", name=" + name + ", genre=" + genre + ", age=" + age...
repos\Hibernate-SpringBoot-master\HibernateSpringBootManyToManyBidirectionalListVsSet\src\main\java\com\bookstore\entity\AuthorList.java
1
请在Spring Boot框架中完成以下Java代码
public DeploymentEntity getDeployment() { return deployment; } public boolean isDuplicateFilterEnabled() { return isDuplicateFilterEnabled; } public boolean isDeployChangedOnly() { return deployChangedOnly; } public Date getProcessDefinitionsActivationDate() { return processDefinitionsAct...
public String getNameFromDeployment() { return nameFromDeployment; } public Set<String> getDeployments() { return deployments; } public Map<String, Set<String>> getDeploymentResourcesById() { return deploymentResourcesById; } public Map<String, Set<String>> getDeploymentResourcesByName() { ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\repository\DeploymentBuilderImpl.java
2
请完成以下Java代码
public Date getRemovalTime() { return removalTime; } public String getRootProcessInstanceId() { return rootProcessInstanceId; } public static HistoricExternalTaskLogDto fromHistoricExternalTaskLog(HistoricExternalTaskLog historicExternalTaskLog) { HistoricExternalTaskLogDto result = new HistoricEx...
result.errorMessage = historicExternalTaskLog.getErrorMessage(); result.activityId = historicExternalTaskLog.getActivityId(); result.activityInstanceId = historicExternalTaskLog.getActivityInstanceId(); result.executionId = historicExternalTaskLog.getExecutionId(); result.processInstanceId = historicE...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricExternalTaskLogDto.java
1
请在Spring Boot框架中完成以下Java代码
public class WebInitializer implements WebApplicationInitializer { public void onStartup(ServletContext container) throws ServletException { AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext(); ctx.register(ApplicationConfiguration.class); ctx.setServletContext(container); ...
// // Create the 'root' Spring application context // AnnotationConfigWebApplicationContext rootContext = new AnnotationConfigWebApplicationContext(); // rootContext.register(ServiceConfig.class, JPAConfig.class, SecurityConfig.class); // // // Manage the lifecycle of the root application context // container.addL...
repos\tutorials-master\spring-web-modules\spring-mvc-forms-jsp\src\main\java\com\baeldung\springmvcforms\configuration\WebInitializer.java
2
请完成以下Java代码
public CompletableFuture<String> doTaskOne() throws Exception { log.info("开始做任务一"); long start = System.currentTimeMillis(); Thread.sleep(random.nextInt(10000)); long end = System.currentTimeMillis(); log.info("完成任务一,耗时:" + (end - start) + "毫秒"); return CompletableFuture....
log.info("完成任务二,耗时:" + (end - start) + "毫秒"); return CompletableFuture.completedFuture("任务二完成"); } @Async public CompletableFuture<String> doTaskThree() throws Exception { log.info("开始做任务三"); long start = System.currentTimeMillis(); Thread.sleep(random.nextInt(10000)); ...
repos\SpringBoot-Learning-master\2.x\chapter7-6\src\main\java\com\didispace\chapter76\AsyncTasks.java
1
请完成以下Java代码
public void searchUsers() { logger.info("Searching users in Keycloak {}", keycloak.serverInfo() .getInfo() .getSystemInfo() .getVersion()); searchByUsername("user1", true); searchByUsername("user", false); searchByUsername("1", false); searchByEmail(...
private void searchByAttributes(String query) { logger.info("Searching by attributes: {}", query); List<UserRepresentation> users = keycloak.realm(REALM_NAME) .users() .searchByAttributes(query); logger.info("Users found by attributes {}", users.stream() .map(user -...
repos\tutorials-master\spring-boot-modules\spring-boot-keycloak-2\src\main\java\com\baeldung\keycloak\adminclient\AdminClientService.java
1
请完成以下Java代码
public void updateLogAndLinesDocStatus(@NonNull final TableRecordReference tableRecordReference, @Nullable final DocStatus docStatus) { updateLogDocStatus(tableRecordReference, docStatus); updateLogLineDocStatus(tableRecordReference, docStatus); } private void updateLogDocStatus(@NonNull final TableRecordRefere...
@Override @NonNull public ImmutableList<LogWithLines> retrieveLogsWithLines(@NonNull final ImmutableList<I_C_Doc_Outbound_Log> logs) { if (logs.isEmpty()) { return ImmutableList.of(); } final ImmutableSet<DocOutboundLogId> ids = logs.stream() .map(log -> DocOutboundLogId.ofRepoId(log.getC_Doc_Outboun...
repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java\de\metas\document\archive\api\impl\DocOutboundDAO.java
1
请完成以下Java代码
public IntegrationFlow fileMoverWithPriorityChannel() { return IntegrationFlow.from(sourceDirectory()) .filter(onlyJpgs()) .channel("alphabetically") .handle(targetDirectory()) .get(); } @Bean public MessageHandler anotherTargetDirectory() { F...
.bridge(e -> e.poller(Pollers.fixedRate(Duration.of(1, TimeUnit.SECONDS.toChronoUnit()), Duration.of(20, TimeUnit.SECONDS.toChronoUnit())))) .handle(targetDirectory()) .get(); } // @Bean public IntegrationFlow anotherFileWriter() { return IntegrationFlow.from("holdingTank") ...
repos\tutorials-master\spring-integration\src\main\java\com\baeldung\dsl\JavaDSLFileCopyConfig.java
1
请在Spring Boot框架中完成以下Java代码
class RestApi { @GetMapping("/blocking") Mono<String> getBlocking() { return Mono.fromCallable(() -> { try { Thread.sleep(2_000); } catch (InterruptedException e) { throw new RuntimeException(e); } ...
@GetMapping("/blocking-with-scheduler") Mono<String> getBlockingWithDedicatedScheduler() { return Mono.fromCallable(this::fetchDataBlocking) .subscribeOn(Schedulers.boundedElastic()) .map(data -> "retrieved data: " + data); } private String fetchDataB...
repos\tutorials-master\spring-reactive-modules\spring-webflux-2\src\main\java\com\baeldung\webflux\threadstarvation\ThreadStarvationApp.java
2
请完成以下Java代码
public class Reader { private Integer id; private String firstname; private String lastname; private String randomNum; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getFirstname() { return firstname; ...
return lastname; } public void setLastname(String lastname) { this.lastname = lastname == null ? null : lastname.trim(); } public String getRandomNum() { return randomNum; } public void setRandomNum(String randomNum) { this.randomNum = randomNum == null ? null : random...
repos\spring-boot-quick-master\quick-multi-data\src\main\java\com\quick\mulit\entity\secondary\Reader.java
1
请完成以下Java代码
public void setEntityType (String EntityType) { set_Value (COLUMNNAME_EntityType, EntityType); } /** Get Entity Type. @return Dictionary Entity Type; Determines ownership and synchronization */ public String getEntityType () { return (String)get_Value(COLUMNNAME_EntityType); } public org.compiere.mo...
return (String)get_Value(COLUMNNAME_Help); } /** 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)ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ReplicationStrategy.java
1
请在Spring Boot框架中完成以下Java代码
protected void setDistributedSystemId(Integer distributedSystemId) { this.distributedSystemId = Optional.ofNullable(distributedSystemId) .filter(id -> id > -1) .orElse(this.distributedSystemId); } protected Optional<Integer> getDistributedSystemId() { return Optional.ofNullable(this.distributedSystemId) ...
if (logger.isWarnEnabled()) { logger.warn("Distributed System Id [{}] was set on the ClientCache instance, which will not have any effect", distributedSystemId); } }); } @Bean PeerCacheConfigurer peerCacheDistributedSystemIdConfigurer() { return (beanName, cacheFactoryBean) -> getDistributedSyst...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\config\annotation\DistributedSystemIdConfiguration.java
2
请完成以下Java代码
public <ReqT, RespT> Listener<ReqT> interceptCall( final ServerCall<ReqT, RespT> call, final Metadata headers, final ServerCallHandler<ReqT, RespT> next) { try { final GrpcExceptionServerCall<ReqT, RespT> handledCall = new GrpcExceptionServerC...
} } /** * Creates a new no-op call listener because you can neither return null nor throw an exception in * {@link #interceptCall(ServerCall, Metadata, ServerCallHandler)}. * * @param <ReqT> The type of the request. * @return The newly created dummy listener. */ protected <Req...
repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\error\GrpcExceptionInterceptor.java
1
请完成以下Java代码
public Map<String, Object> getProperties() { return properties; } public String getPropertiesInternal() { return JsonUtil.asString(properties); } public Filter setProperties(Map<String, Object> properties) { this.properties = properties; return this; } public void setPropertiesInternal(St...
} public Object getPersistentState() { Map<String, Object> persistentState = new HashMap<String, Object>(); persistentState.put("name", this.name); persistentState.put("owner", this.owner); persistentState.put("query", this.query); persistentState.put("properties", this.properties); return pe...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\FilterEntity.java
1
请在Spring Boot框架中完成以下Java代码
public String getStartUserId() { return startUserId; } public void setStartUserId(String startUserId) { this.startUserId = startUserId; } public String getReferenceId() { return referenceId; } public void setReferenceId(String referenceId) { this.referenceId = ...
public void setFormKey(String formKey) { this.formKey = formKey; } public String getAssignee() { return assignee; } public void setAssignee(String assignee) { this.assignee = assignee; } public String getCompletedBy() { return completedBy; } public voi...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\planitem\PlanItemInstanceResponse.java
2
请完成以下Java代码
public static Function<ServerRequest, ServerRequest> stripPrefix() { return stripPrefix(1); } public static Function<ServerRequest, ServerRequest> stripPrefix(int parts) { return request -> { MvcUtils.addOriginalRequestUrl(request, request.uri()); // TODO: gateway url attributes String path = request.ur...
private String rootCauseExceptionTypeHeaderName = CB_ROOT_CAUSE_EXCEPTION_TYPE; private String rootCauseExceptionMessageHeaderName = CB_ROOT_CAUSE_EXCEPTION_MESSAGE; public String getExecutionExceptionTypeHeaderName() { return executionExceptionTypeHeaderName; } public void setExecutionExceptionTypeHeader...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\filter\BeforeFilterFunctions.java
1
请完成以下Java代码
static Builder<?> builder(String url, WebSocketClient webSocketClient) { return new DefaultWebSocketGraphQlClientBuilder(url, webSocketClient); } /** * Return a builder for a {@link WebSocketGraphQlClient}. * @param url the GraphQL endpoint URL * @param webSocketClient the underlying transport client to use ...
/** * Configure how frequently to send ping messages. * <p>By default, this is not set, and ping messages are not sent. * @param keepAlive the value to use * @since 1.3.0 */ Builder<B> keepAlive(Duration keepAlive); /** * Build the {@code WebSocketGraphQlClient}. */ @Override WebSocketGrap...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\client\WebSocketGraphQlClient.java
1
请完成以下Java代码
static final class Builder implements Authentication.Builder<Builder> { private final Log logger = LogFactory.getLog(getClass()); private final Collection<GrantedAuthority> authorities = new LinkedHashSet<>(); private @Nullable Object principal; private @Nullable Object credentials; private @Nullable Obj...
@Override public Builder credentials(@Nullable Object credentials) { this.credentials = credentials; return this; } @Override public Builder authenticated(boolean authenticated) { this.authenticated = authenticated; return this; } @Override public Authentication build() { return new Simpl...
repos\spring-security-main\core\src\main\java\org\springframework\security\core\SimpleAuthentication.java
1
请完成以下Java代码
private PickingJobStep withChangedPickFroms(@NonNull final UnaryOperator<PickingJobStepPickFromMap> mapper) { final PickingJobStepPickFromMap newPickFroms = mapper.apply(this.pickFroms); return !Objects.equals(this.pickFroms, newPickFroms) ? toBuilder().pickFroms(newPickFroms).build() : this; } public I...
{ return pickFroms.getPickFromByHUQRCode(qrCode); } @NonNull public List<HuId> getPickedHUIds() { return pickFroms.getPickedHUIds(); } @NonNull public Optional<PickingJobStepPickedToHU> getLastPickedHU() { return pickFroms.getLastPickedHU(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\PickingJobStep.java
1
请完成以下Java代码
private static final class ColumnNamePair { @lombok.NonNull String columnName; @lombok.NonNull String subQueryColumnName; @lombok.NonNull IQueryFilterModifier modifier; } public static final class Builder<T> { private String tableName; private final List<ColumnNamePair> matchers = new ArrayList<>()...
public Builder<T> matchingColumnNames(final String columnName, final String subQueryColumnName, final IQueryFilterModifier modifier) { matchers.add(ColumnNamePair.builder() .columnName(columnName) .subQueryColumnName(subQueryColumnName) .modifier(modifier) .build()); return this; } publ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\InSubQueryFilter.java
1
请在Spring Boot框架中完成以下Java代码
private void updateSOCreditStatus(@NonNull final BPartnerStats bpStats) { final IBPartnerStatsBL bpartnerStatsBL = Services.get(IBPartnerStatsBL.class); // load the statistics final I_C_BPartner_Stats stats = loadDataRecord(bpStats); final BigDecimal creditUsed = stats.getSO_CreditUsed(); final BPartnerCre...
setSOCreditStatus(bpStats, creditStatusToSet); } private void updateCreditLimitIndicator(@NonNull final BPartnerStats bstats) { // load the statistics final I_C_BPartner_Stats stats = loadDataRecord(bstats); final BigDecimal creditUsed = stats.getSO_CreditUsed(); final BPartnerCreditLimitRepository creditL...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\service\impl\BPartnerStatsDAO.java
2
请在Spring Boot框架中完成以下Java代码
protected CandidatesQuery createPreExistingCandidatesQuery( @NonNull final AbstractDDOrderEvent ddOrderEvent, @NonNull final DDOrderLine ddOrderLine, @NonNull final CandidateType candidateType) { final SupplyRequiredDescriptor supplyRequiredDescriptor = ddOrderEvent.getSupplyRequiredDescriptor(); if (supp...
return CandidatesQuery.FALSE; } return CandidatesQuery.builder() .type(candidateType) .businessCase(CandidateBusinessCase.DISTRIBUTION) .groupId(groupId) .materialDescriptorQuery(toMaterialDescriptorQuery(ddOrderLine.getProductDescriptor())) .build(); } private static MaterialDescriptorQuery...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\ddorder\DDOrderCreatedHandler.java
2
请完成以下Java代码
public class HistoricActivityStatisticsDto { protected String id; protected long instances; protected long canceled; protected long finished; protected long completeScope; protected long openIncidents; protected long resolvedIncidents; protected long deletedIncidents; public HistoricActivityStatisti...
} public long getDeletedIncidents() { return deletedIncidents; } public static HistoricActivityStatisticsDto fromHistoricActivityStatistics(HistoricActivityStatistics statistics) { HistoricActivityStatisticsDto result = new HistoricActivityStatisticsDto(); result.id = statistics.getId(); resul...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricActivityStatisticsDto.java
1
请完成以下Java代码
public void setProductType (final @Nullable java.lang.String ProductType) { set_Value (COLUMNNAME_ProductType, ProductType); } @Override public java.lang.String getProductType() { return get_ValueAsString(COLUMNNAME_ProductType); } /** * VATType AD_Reference_ID=540842 * Reference name: VATType */ ...
public static final String VATTYPE_ReducedVAT = "R"; /** TaxExempt = E */ public static final String VATTYPE_TaxExempt = "E"; @Override public void setVATType (final @Nullable java.lang.String VATType) { set_Value (COLUMNNAME_VATType, VATType); } @Override public java.lang.String getVATType() { return ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_TaxCategory.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isDeployResources() { return deployResources; } public void setDeployResources(boolean deployResources) { this.deployResources = deployResources; } public boolean isEnableChangeDetection() { return enableChangeDetection; } public void setEnableChangeDete...
this.changeDetectionDelay = changeDetectionDelay; } public boolean isEnabled() { return enabled; } public void setEnabled(boolean enabled) { this.enabled = enabled; } public FlowableServlet getServlet() { return servlet; } }
repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-starters\flowable-spring-boot-autoconfigure\src\main\java\org\flowable\spring\boot\eventregistry\FlowableEventRegistryProperties.java
2
请在Spring Boot框架中完成以下Java代码
public class DemoApplication { public static void main(String[] args) { ConfigurableApplicationContext context = SpringApplication.run(DemoApplication.class, args); RedissonClient redisson = context.getBean(RedissonClient.class); RBloomFilter bf = redisson.getBloomFilter("test-bloom-filter"); bf.tryInit(10000...
for (int i = 0; i < 10000; i++) { String str = i % 10 == 0 ? list.get(i / 10) : UUID.randomUUID().toString(); System.out.println(str); if (bf.contains(str)) { if (set.contains(str)) { right++; } else { wrong++; } } } //right is 1000 System.out.println("right:" + right); //Beca...
repos\springboot-demo-master\BloomFilter\src\main\java\com\et\DemoApplication.java
2
请完成以下Java代码
protected HistoricActivityInstanceEventEntity loadActivityInstanceEventEntity(ExecutionEntity execution) { final String activityInstanceId = execution.getActivityInstanceId(); HistoricActivityInstanceEventEntity cachedEntity = findInCache(HistoricActivityInstanceEventEntity.class, activityInstanceId); if(...
HistoricBatchEntity cachedEntity = findInCache(HistoricBatchEntity.class, batchId); if(cachedEntity != null) { return cachedEntity; } else { return newBatchEventEntity(batch); } } /** find a cached entity by primary key */ protected <T extends HistoryEvent> T findInCache(Class<T> type,...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\producer\CacheAwareHistoryEventProducer.java
1
请在Spring Boot框架中完成以下Java代码
private void initToken(final long refreshTime) { LOG.debug("开始初始化access_token........"); //记住原本的时间,用于出错回滚 final long oldTime = this.weixinTokenStartTime; this.weixinTokenStartTime = refreshTime; String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + this.appid + "&sec...
private void initJSToken(final long refreshTime) { LOG.debug("初始化 jsapi_ticket........"); //记住原本的时间,用于出错回滚 final long oldTime = this.jsTokenStartTime; this.jsTokenStartTime = refreshTime; String url = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=" + accessToken + "&type=jsapi"; NetWorkCe...
repos\spring-boot-quick-master\quick-wx-public\src\main\java\com\wx\pn\api\config\ApiConfig.java
2
请完成以下Java代码
public List<IInvoiceLineAttribute> aggregate() { final ImmutableSet<IInvoiceLineAttribute> finalIntersectionResult = currentIntersectionResult == null ? ImmutableSet.of() : ImmutableSet.copyOf(currentIntersectionResult); final LinkedHashSet<IInvoiceLineAttribute> result = new LinkedHashSet<>(currentUnionResult); ...
{ currentIntersectionResult = new LinkedHashSet<>(invoiceLineAttributesToAdd); } // Case: already have a current result, so we just need to intersect it with the set we got as parameter. else { currentIntersectionResult = Sets.intersection(currentIntersectionResult, invoiceLineAttributesToAdd); } } @...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\spi\impl\aggregator\standard\DefaultInvoiceLineAttributeAggregator.java
1
请完成以下Java代码
private JsonOLCand toJson( @NonNull final OLCand olCand, @NonNull final MasterdataProvider masterdataProvider) { final OrgId orgId = OrgId.ofRepoId(olCand.getAD_Org_ID()); final ZoneId orgTimeZone = masterdataProvider.getOrgTimeZone(orgId); final String orgCode = orgDAO.retrieveOrgValue(orgId); final Or...
.pricingSystemId(PricingSystemId.toRepoId(olCand.getPricingSystemId())) .price(olCand.getPriceActual()) .discount(olCand.getDiscount()) // .warehouseDestId(WarehouseId.toRepoId(olCand.getWarehouseDestId())) // .jsonOrderLineGroup(jsonOrderLineGroup) .description(olCand.unbox().getDescriptio...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\ordercandidates\impl\JsonConverters.java
1
请在Spring Boot框架中完成以下Java代码
public class UserController { private List<User> users = Arrays.asList( new User("ana@yahoo.com", "pass", "Ana", 20), new User("bob@yahoo.com", "pass", "Bob", 30), new User("john@yahoo.com", "pass", "John", 40), new User("mary@yahoo.com", "pass", "Mary", 30)); @GetMapping("/userPage") ...
if (users.stream().anyMatch(it -> user.getEmail().equals(it.getEmail()))) { return new ResponseEntity<>(Collections.singletonList("Email already exists!"), HttpStatus.CONFLICT); } else { users.add(user); return new ResponseEntity<>(HttpStatus.CREATED); ...
repos\tutorials-master\spring-web-modules\spring-mvc-forms-jsp\src\main\java\com\baeldung\springmvcforms\controller\UserController.java
2
请完成以下Java代码
public class BasicMapperUtils { private static final String START_PLACEHOLDER_PREFIX = "%{"; private static final String END_PLACEHOLDER_PREFIX = "}"; public static OAuth2User getOAuth2User(String email, Map<String, Object> attributes, OAuth2MapperConfig config) { OAuth2User oauth2User = new OAuth2...
StrSubstitutor sub = new StrSubstitutor(attributes, START_PLACEHOLDER_PREFIX, END_PLACEHOLDER_PREFIX); return sub.replace(config.getBasic().getTenantNamePattern()); default: throw new RuntimeException("Tenant Name Strategy with type " + config.getBasic().getTenantNameStrategy...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\security\auth\oauth2\BasicMapperUtils.java
1
请完成以下Java代码
public class SentryPartInstanceEntityImpl extends AbstractCmmnEngineEntity implements SentryPartInstanceEntity { protected String caseDefinitionId; protected String caseInstanceId; protected String planItemInstanceId; protected String onPartId; protected String ifPartId; protected Date timeStam...
} @Override public void setPlanItemInstanceId(String planItemInstanceId) { this.planItemInstanceId = planItemInstanceId; } @Override public String getOnPartId() { return onPartId; } @Override public void setOnPartId(String onPartId) { this.onPartId = onPartId; ...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\SentryPartInstanceEntityImpl.java
1
请完成以下Java代码
public String getResetPasswordUrl(final String token) { Check.assumeNotEmpty(token, "token is not empty"); return getFrontendURL(SYSCONFIG_RESET_PASSWORD_PATH, ImmutableMap.<String, Object>builder() .put(PARAM_ResetPasswordToken, token) .build()); } public boolean isCrossSiteUsageAllowed() { return ...
final String url = StringUtils.trimBlankToNull(sysConfigBL.getValue(SYSCONFIG_APP_API_URL)); if (url != null && !url.equals("-")) { return url; } final String frontendUrl = getFrontendURL(); if (frontendUrl != null) { return frontendUrl + "/app"; } return null; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\ui\web\WebuiURLs.java
1
请在Spring Boot框架中完成以下Java代码
public int getFactor() { return factor; } /** * Sets the value of the factor property. * */ public void setFactor(int value) { this.factor = value; } /** * Gets the value of the notOtherwiseSpecified property. * * @return * possible object i...
} /** * Sets the value of the notOtherwiseSpecified property. * * @param value * allowed object is * {@link String } * */ public void setNotOtherwiseSpecified(String value) { this.notOtherwiseSpecified = value; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\Hazardous.java
2
请完成以下Java代码
public void setTypeName(String typeName) { this.typeName = typeName; } public VariableType getType() { return type; } public void setType(VariableType type) { this.type = type; } public String getProcessInstanceId() { return processInstanceId; } public...
public String getTextValue2() { return textValue2; } public void setTextValue2(String textValue2) { this.textValue2 = textValue2; } public Object getCachedValue() { return cachedValue; } public void setCachedValue(Object cachedValue) { this.cachedValue = cached...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\VariableInstanceEntityImpl.java
1
请完成以下Java代码
private String filterUrl(String requestPath){ String url = ""; if(oConvertUtils.isNotEmpty(requestPath)){ url = requestPath.replace("\\", "/"); url = url.replace("//", "/"); if(url.indexOf(SymbolConstant.DOUBLE_SLASH)>=0){ url = filterUrl(url); ...
}else{ requestPath = requestPath.substring(0,requestPath.indexOf("?")); } } // 去掉项目路径 requestPath = requestPath.substring(request.getContextPath().length() + 1); return filterUrl(requestPath); } @Deprecated private boolean moHuContain(List<String>...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\aspect\PermissionDataAspect.java
1
请完成以下Java代码
public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } /** * Role AD_Reference_ID=541254 * Reference name: Role */ public static final int ROLE_AD_Reference_ID=541254; /** Main Producer = MP */ public static final String ROLE_MainProducer = "MP"; /** Hostpital = HO */ publi...
public static final String ROLE_Payer = "PA"; /** Payer = PA */ public static final String ROLE_Pharmacy = "PH"; @Override public void setRole (final @Nullable java.lang.String Role) { set_Value (COLUMNNAME_Role, Role); } @Override public java.lang.String getRole() { return get_ValueAsString(COLUMNNAME_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BP_Relation.java
1
请完成以下Java代码
public class SaveUserCmd extends AbstractWritableIdentityServiceCmd<Void> implements Command<Void>, Serializable { private static final long serialVersionUID = 1L; protected User user; protected boolean skipPasswordPolicy; public SaveUserCmd(User user) { this(user, false); } public SaveUserCmd(User u...
.saveUser(user); commandContext.getOperationLogManager().logUserOperation(operationResult, user.getId()); return null; } private void validateUserEntity(CommandContext commandContext) { if(shouldCheckPasswordPolicy(commandContext)) { if(!((UserEntity) user).checkPasswordAgainstPolicy()) { ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\SaveUserCmd.java
1
请完成以下Java代码
public static void printStack (boolean adempiereOnly, boolean first9only) { Throwable t = new Throwable(); // t.printStackTrace(); int counter = 0; StackTraceElement[] elements = t.getStackTrace(); for (int i = 1; i < elements.length; i++) { if (elements[i].getClassName().indexOf("util.Trace") != -1) ...
// ) { ste_lastSkipped = true; continue; } final int lastDot = classname.lastIndexOf("."); if (lastDot >= 0) { classname = classname.substring(lastDot + 1); } if (ste_lastSkipped || stackTraceStr.length() > 0) { stackTraceStr.append(ste_lastSkipped ? " <~~~ " : " <- "); }...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\Trace.java
1
请完成以下Java代码
public Optional<DeviceAccessor> getDeviceAccessorById(@NonNull DeviceId deviceId) { return getDefaultDeviceAccessorsHub().getDeviceAccessorById(deviceId); } public DeviceAccessorsHub getDefaultDeviceAccessorsHub() { final IHostIdentifier clientHost = NetUtils.getLocalHost(); final Properties ctx = Env.getCtx...
return new DeviceAccessorsHub(deviceConfigPool); } public void cacheReset() { hubsByKey.clear(); } @Value(staticConstructor = "of") private static class DeviceAccessorsHubKey { @NonNull IHostIdentifier clientHost; @NonNull ClientId adClientId; @NonNull OrgId adOrgId; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.device.adempiere\src\main\java\de\metas\device\accessor\DeviceAccessorsHubFactory.java
1
请完成以下Java代码
public final void addHUAssignmentListener(final IHUAssignmentListener listener) { Check.assumeNotNull(listener, "listener not null"); listeners.addIfAbsent(listener); } /** * Invokes {@link #assertAssignable(I_M_HU, Object, String)} on all included listeners. */ @Override public void assertAssignable(fina...
@Override public final void onHUAssigned(final I_M_HU hu, final Object model, final String trxName) { for (final IHUAssignmentListener listener : listeners) { listener.onHUAssigned(hu, model, trxName); } } @Override public final void onHUUnassigned(final IReference<I_M_HU> huRef, final IReference<Object>...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\CompositeHUAssignmentListener.java
1