instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | public abstract class SecurityConfigurerAdapter<O, B extends SecurityBuilder<O>> implements SecurityConfigurer<O, B> {
private B securityBuilder;
private CompositeObjectPostProcessor objectPostProcessor = new CompositeObjectPostProcessor();
@Override
public void init(B builder) {
}
@Override
public void conf... | */
private static final class CompositeObjectPostProcessor implements ObjectPostProcessor<Object> {
private List<ObjectPostProcessor<?>> postProcessors = new ArrayList<>();
@Override
@SuppressWarnings({ "rawtypes", "unchecked" })
public Object postProcess(Object object) {
for (ObjectPostProcessor opp : th... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\SecurityConfigurerAdapter.java | 2 |
请完成以下Java代码 | public void setC_Letter_ID (int C_Letter_ID)
{
if (C_Letter_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_Letter_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_Letter_ID, Integer.valueOf(C_Letter_ID));
}
/** Get Letter.
@return Letter */
@Override
public int getC_Letter_ID ()
{
Integer ii = (Integer)... | @return Body (parsed) */
@Override
public java.lang.String getLetterBodyParsed ()
{
return (java.lang.String)get_Value(COLUMNNAME_LetterBodyParsed);
}
/** Set Subject.
@param LetterSubject Subject */
@Override
public void setLetterSubject (java.lang.String LetterSubject)
{
set_Value (COLUMNNAME_Lett... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\letters\model\X_C_Letter.java | 1 |
请完成以下Java代码 | public String toString()
{
return "ProductionMaterial ["
+ "product=" + product.getName()
+ ", qty=" + qty
+ ", uom=" + uom.getUOMSymbol()
+ "]";
}
@Override
public int hashCode()
{
return new HashcodeBuilder()
.append(product)
.append(qty)
.append(uom)
.toHashcode();
};
@Override
... | @Override
public I_M_Product getM_Product()
{
return product;
}
@Override
public BigDecimal getQty()
{
return qty;
}
@Override
public I_C_UOM getC_UOM()
{
return uom;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\InvoicingItem.java | 1 |
请完成以下Java代码 | public void clearCurrentWindow()
{
this.currentWindowId = null;
this._currentWindowName = null;
}
@Nullable
public String getCurrentWindowName()
{
if (this._currentWindowName == null && this.currentWindowId != null)
{
this._currentWindowName = adWindowDAO.retrieveWindowName(currentWindowId).translate(a... | .windowId(WindowId.of(currentWindowId))
.windowName(getCurrentWindowName())
.errorMessage(errorMessage)
.build());
}
public void collectError(@NonNull final Throwable exception)
{
errors.add(JsonWindowsHealthCheckResponse.Entry.builder()
.windowId(WindowId.of(currentWindowId))
.windowName(getC... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\health\ErrorsCollector.java | 1 |
请完成以下Java代码 | public void setC_DocLine_Sort_Item_ID (int C_DocLine_Sort_Item_ID)
{
if (C_DocLine_Sort_Item_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_DocLine_Sort_Item_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_DocLine_Sort_Item_ID, Integer.valueOf(C_DocLine_Sort_Item_ID));
}
/** Get Document Line Sorting Preferences... | if (ii == null)
return 0;
return ii.intValue();
}
/** 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));
}
/** Get Reihenfolge.
@return ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_DocLine_Sort_Item.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void putProcessInfoParameter(final ProcessInfoParameter processParam)
{
if (processParam == null)
{
return;
}
// NOTE: just to be on the safe side, for each process info parameter we are setting the ParameterName even if it's a range parameter
final Object parameterValue = normalizeParameterValue... | Language currLang = null;
if (languageObj instanceof String)
{
currLang = Language.getLanguage((String)languageObj);
}
else if (languageObj instanceof Language)
{
currLang = (Language)languageObj;
}
if (currLang == null)
{
currLang = Env.getLanguage(Env.getCtx());
}
return currLang;
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\jasper\JRParametersCollector.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class X_S_GithubConfig extends org.compiere.model.PO implements I_S_GithubConfig, org.compiere.model.I_Persistent
{
private static final long serialVersionUID = 835160211L;
/** Standard Constructor */
public X_S_GithubConfig (final Properties ctx, final int S_GithubConfig_ID, @Nullable final String t... | @Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setS_GithubConfig_ID (final int S_GithubConfig_ID)
{
if (S_GithubConfig_ID < 1)
set_ValueNoCheck (COLUMNNAME_S_GithubConfig_ID, null);
else
set_ValueNoCheck (COLUMNNAME_S_GithubConfig_I... | repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java-gen\de\metas\serviceprovider\model\X_S_GithubConfig.java | 2 |
请完成以下Java代码 | public class C_BPartner_SyncTo_GRS_HTTP extends C_BPartner_SyncTo_ExternalSystem
{
private final ExportBPartnerToGRSService exportToGRSService = SpringContextHolder.instance.getBean(ExportBPartnerToGRSService.class);
private static final String PARAM_EXTERNAL_SYSTEM_CONFIG_GRSSIGNUM_ID = I_ExternalSystem_Config_GRSS... | return ExternalSystemGRSSignumConfigId.ofRepoId(externalSystemConfigGRSSignumId);
}
@Override
protected String getExternalSystemParam()
{
return PARAM_EXTERNAL_SYSTEM_CONFIG_GRSSIGNUM_ID;
}
@Override
protected ExportToExternalSystemService getExportToBPartnerExternalSystem()
{
return exportToGRSService;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\grssignum\export\bpartner\C_BPartner_SyncTo_GRS_HTTP.java | 1 |
请完成以下Java代码 | class DualPrintStream extends PrintStream {
private final PrintStream second;
public DualPrintStream(OutputStream main, PrintStream second) {
super(main);
this.second = second;
}
@Override
public void close() {
super.close();
second.close();
}
@Override
... | }
@Override
public void write(int b) {
super.write(b);
second.write(b);
}
@Override
public void write(byte[] b) throws IOException {
super.write(b);
second.write(b);
}
@Override
public boolean checkError() {
return super.checkError() && second.c... | repos\tutorials-master\core-java-modules\core-java-io-apis-3\src\main\java\com\baeldung\outputtofile\DualPrintStream.java | 1 |
请完成以下Java代码 | public void setMappingGroupKey (final @Nullable java.lang.String MappingGroupKey)
{
set_Value (COLUMNNAME_MappingGroupKey, MappingGroupKey);
}
@Override
public java.lang.String getMappingGroupKey()
{
return get_ValueAsString(COLUMNNAME_MappingGroupKey);
}
/**
* MappingRule AD_Reference_ID=542000
* Re... | else
set_ValueNoCheck (COLUMNNAME_M_Shipper_ID, M_Shipper_ID);
}
@Override
public int getM_Shipper_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Shipper_ID);
}
@Override
public void setM_Shipper_Mapping_Config_ID (final int M_Shipper_Mapping_Config_ID)
{
if (M_Shipper_Mapping_Config_ID < 1)
set_Value... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Shipper_Mapping_Config.java | 1 |
请完成以下Java代码 | private boolean isCompletelyDelivered(final ShipmentScheduleWithHU candidate)
{
final I_M_ShipmentSchedule shipmentSchedule = candidate.getM_ShipmentSchedule();
final BigDecimal qtyOrdered = shipmentScheduleEffectiveValuesBL.computeQtyOrdered(shipmentSchedule);
final BigDecimal qtyToDeliver = shipmentScheduleEff... | public Order(@NonNull final OrderId orderId)
{
this.orderId = orderId;
}
public void addShipmentScheduleId(@NonNull final ShipmentScheduleId shipmentScheduleId)
{
shipmentScheduleIds.add(shipmentScheduleId);
}
public Set<ShipmentScheduleId> getMissingShipmentScheduleIds(final Set<ShipmentScheduleId>... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipmentschedule\spi\impl\CompleteOrderDeliveryRuleChecker.java | 1 |
请完成以下Java代码 | public int getAD_WorkflowProcessor_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_WorkflowProcessor_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Workflow Processorl Log.
@param AD_WorkflowProcessorLog_ID
Result of the execution of the Workflow Processor
*/
public void se... | */
public void setReference (String Reference)
{
set_Value (COLUMNNAME_Reference, Reference);
}
/** Get Reference.
@return Reference for this record
*/
public String getReference ()
{
return (String)get_Value(COLUMNNAME_Reference);
}
/** Set Summary.
@param Summary
Textual summary of this reque... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WorkflowProcessorLog.java | 1 |
请完成以下Java代码 | public String getMultiplier() {
return multiplier;
}
public void setMultiplier(String multiplier) {
this.multiplier = multiplier;
}
public String getRandom() {
return random;
}
public void setRandom(String random) {
this.... | return topic;
}
public void setTopic(String topic) {
this.topic = topic;
}
public Collection<String> getPartitions() {
return partitions;
}
public void setPartitions(Collection<String> partitions) {
this.partitions = partitions;
... | repos\flowable-engine-main\modules\flowable-event-registry-model\src\main\java\org\flowable\eventregistry\model\KafkaInboundChannelModel.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static boolean getSignVeryfy(Map<String, String> Params, String sign) {
//过滤空值、sign与sign_type参数
Map<String, String> sParaNew = AlipayCore.paraFilter(Params);
//获取待签名字符串
String preSignStr = AlipayCore.createLinkString(sParaNew);
//获得签名验证结果
boolean isSign = false;
... | */
private static String checkUrl(String urlvalue) {
String inputLine = "";
try {
URL url = new URL(urlvalue);
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection
... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\utils\alipay\AlipayNotify.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class SecondaryConfig {
@Autowired
private JpaProperties jpaProperties;
@Autowired
@Qualifier("secondaryDataSource")
private DataSource secondaryDataSource;
@Bean(name = "entityManagerSecondary")
public EntityManager entityManager(EntityManagerFactoryBuilder builder) {
retur... | .properties(getVendorProperties())
.packages("com.neo.model")
.persistenceUnit("secondaryPersistenceUnit")
.build();
}
private Map<String, Object> getVendorProperties() {
return jpaProperties.getHibernateProperties(new HibernateSettings());
}
@Be... | repos\spring-boot-leaning-master\2.x_data\1-5 Spring Boot 下的(分布式)事务解决方案\spring-boot-multi-Jpa\src\main\java\com\neo\config\SecondaryConfig.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class CompletableFutureDemo {
public static void completableFutureMethod() {
CompletableFuture<Integer> future = CompletableFuture.supplyAsync(() -> {
return 42;
});
System.out.println(future.join());
}
public static void chainingTaskExample() {
Completa... | System.err.println("Error in task: " + ex.getMessage());
// Can optionally return a default value
return "Error occurred";
});
future.thenAccept(result -> System.out.println("Result: " + result));
}
public static void timeoutExample() {
CompletableFu... | repos\tutorials-master\core-java-modules\core-java-concurrency-advanced-5\src\main\java\com\baeldung\executorservicevscompletablefuture\CompletableFutureDemo.java | 2 |
请完成以下Java代码 | private final JTextComponent getTextComponent()
{
return _textComponent;
}
@Override
public void executeCopyPasteAction(final CopyPasteActionType actionType)
{
final JTextComponent textComponent = getTextComponent();
if (textComponent == null)
{
return; // shall not happen
}
if (actionType == CopyP... | }
@Override
public boolean isCopyPasteActionAllowed(final CopyPasteActionType actionType)
{
if (actionType == CopyPasteActionType.Copy)
{
return hasTextToCopy();
}
else if (actionType == CopyPasteActionType.Cut)
{
return isEditable() && hasTextToCopy();
}
else if (actionType == CopyPasteActionTy... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ui\editor\JTextComponentCopyPasteSupportEditor.java | 1 |
请完成以下Java代码 | public String postUser(ModelMap map,
@ModelAttribute @Valid User user,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
map.addAttribute("action", "create");
return "userForm";
}
userService.insertByUs... | BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
map.addAttribute("action", "update");
return "userForm";
}
userService.update(user);
return "redirect:/users/";
}
/**
* 处理 "/users/{id}" 的 GET 请求,用来删除 User 信息
*/
@RequestMappi... | repos\springboot-learning-example-master\chapter-4-spring-boot-validating-form-input\src\main\java\spring\boot\core\web\UserController.java | 1 |
请完成以下Java代码 | public final class RequestedUrlRedirectInvalidSessionStrategy implements InvalidSessionStrategy {
private final Log logger = LogFactory.getLog(getClass());
private RedirectStrategy redirectStrategy = new DefaultRedirectStrategy();
private boolean createNewSession = true;
@Override
public void onInvalidSessionD... | * {@code SessionManagementFilter}.
* @param createNewSession defaults to {@code true}.
*/
public void setCreateNewSession(boolean createNewSession) {
this.createNewSession = createNewSession;
}
/**
* Sets the redirect strategy to use. The default is {@link DefaultRedirectStrategy}.
* @param redirectStrate... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\session\RequestedUrlRedirectInvalidSessionStrategy.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Config config(CasClient casClient) {
return new Config(casClient);
}
/**
* cas 客户端配置
* @param casConfig
* @return
*/
@Bean
public CasClient casClient(CasConfiguration casConfig){
CasClient casClient = new CasClient(casConfig);
//客户端回调地址
casClie... | /**
* 请求cas服务端配置
* @param casLogoutHandler
*/
@Bean
public CasConfiguration casConfig(){
final CasConfiguration configuration = new CasConfiguration();
//CAS server登录地址
configuration.setLoginUrl(casServerUrl + "/login");
configuration.setAcceptAnyProxy(true);
... | repos\spring-boot-quick-master\quick-shiro-cas\src\main\java\com\shiro\config\Pac4jConfig.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private CorsFilter getCorsFilter(ApplicationContext context) {
if (this.configurationSource != null) {
return new CorsFilter(this.configurationSource);
}
boolean containsCorsFilter = context.containsBeanDefinition(CORS_FILTER_BEAN_NAME);
if (containsCorsFilter) {
return context.getBean(CORS_FILTER_BEAN_NA... | * @return
*/
private static CorsFilter getMvcCorsFilter(ApplicationContext context) {
if (context.containsBean(HANDLER_MAPPING_INTROSPECTOR_BEAN_NAME)) {
CorsConfigurationSource corsConfigurationSource = context
.getBean(HANDLER_MAPPING_INTROSPECTOR_BEAN_NAME, CorsConfigurationSource.class);
return... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\CorsConfigurer.java | 2 |
请完成以下Java代码 | final class EventHtmlMessageFormat extends EventMessageFormatTemplate
{
public static final EventHtmlMessageFormat newInstance()
{
return new EventHtmlMessageFormat();
}
private EventHtmlMessageFormat()
{
super();
}
@Override
protected String formatTableRecordReference(final ITableRecordReference recordRe... | final int suggestedWindowId = (suggestedWindowIdObj instanceof Number) ? ((Number)suggestedWindowIdObj).intValue() : -1;
return new ADHyperlinkBuilder().createShowWindowHTML(recordRef, suggestedWindowId);
}
@Override
protected String formatText(final String text)
{
if (text == null || text.isEmpty())
{
re... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\ui\notifications\EventHtmlMessageFormat.java | 1 |
请完成以下Java代码 | protected String getTabName()
{
return ExternalSystemType.Other.getValue();
}
@Override
protected ExternalSystemType getExternalSystemType()
{
return ExternalSystemType.Other;
}
@Override
protected long getSelectedRecordCount(final IProcessPreconditionsContext context)
{
throw new UnsupportedOperationE... | }
final ExternalSystemOtherConfigId externalSystemOtherConfigId = ExternalSystemOtherConfigId.ofExternalSystemParentConfigId(parentConfigId);
final ExternalSystemParentConfig externalSystemParentConfig = externalSystemConfigDAO.getById(externalSystemOtherConfigId);
final ExternalSystemOtherConfig otherConfig = ... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\process\InvokeOtherAction.java | 1 |
请完成以下Java代码 | public class InvoiceCandidateHandlerDAO implements IInvoiceCandidateHandlerDAO
{
@Cached(cacheName = I_C_ILCandHandler.Table_Name + "#All")
@Override
public List<I_C_ILCandHandler> retrieveAll(@CacheCtx final Properties ctx)
{
final IQueryBL queryBL = Services.get(IQueryBL.class);
final IQueryBuilder<I_C_ILCan... | return result.get(0);
}
@Override
public List<I_C_ILCandHandler> retrieveForClass(
final Properties ctx,
@NonNull final Class<? extends IInvoiceCandidateHandler> clazz)
{
final String classname = clazz.getName();
final List<I_C_ILCandHandler> result = new ArrayList<>();
for (final I_C_ILCandHandler ha... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceCandidateHandlerDAO.java | 1 |
请完成以下Java代码 | public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
} | public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String[] getRoles() {
return roles;
}
public void setRoles(String[] roles) {
this.roles = roles;
}
} | repos\spring-boot-quick-master\quick-oauth2\quick-oauth2-server\src\main\java\com\quick\auth\server\entity\Account.java | 1 |
请完成以下Java代码 | public Long getId() {
return this.id;
}
public String getName() {
return this.name;
}
public String getDescription() {
return this.description;
}
public LocalDateTime getCreated() {
return this.created;
}
public Long getInserted() {
return this.inserted;
}
public void setName(String name) {
t... | public void setInserted(Long inserted) {
this.inserted = inserted;
}
public Category withId(Long id) {
return this.id == id ? this : new Category(id, this.name, this.description, this.created, this.inserted);
}
@Override
public String toString() {
return "Category(id=" + this.getId() + ", name=" + this.get... | repos\spring-data-examples-main\jdbc\aot-optimization\src\main\java\example\springdata\aot\Category.java | 1 |
请完成以下Java代码 | public String getHelp ()
{
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 get... | public void setR_Resolution_ID (int R_Resolution_ID)
{
if (R_Resolution_ID < 1)
set_ValueNoCheck (COLUMNNAME_R_Resolution_ID, null);
else
set_ValueNoCheck (COLUMNNAME_R_Resolution_ID, Integer.valueOf(R_Resolution_ID));
}
/** Get Resolution.
@return Request Resolution
*/
public int getR_Resolution_... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_Resolution.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BookQueryResolver {
private final BookRepository bookRepository;
public BookQueryResolver(BookRepository bookRepository) {
this.bookRepository = bookRepository;
}
@QueryMapping
public BookPage books(@Argument int page, @Argument int size) {
Pageable pageable = PageRequ... | books = bookRepository.findByIdGreaterThanOrderByIdAsc(cursor.get(), PageRequest.of(0, limit));
} else {
books = bookRepository.findAllByOrderByIdAsc(PageRequest.of(0, limit));
}
List<BookEdge> edges = books.stream()
.map(book -> new BookEdge(book, book.getId().toString(... | repos\tutorials-master\spring-boot-modules\spring-boot-graphql-2\src\main\java\com\baeldung\pagination\resolver\BookQueryResolver.java | 2 |
请完成以下Java代码 | public void unlock() {
this.lockOwner = null;
this.lockExpirationTime = null;
}
public abstract String getType();
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
... | this.lastFailureLogId = lastFailureLogId;
}
@Override
public String getFailedActivityId() {
return failedActivityId;
}
public void setFailedActivityId(String failedActivityId) {
this.failedActivityId = failedActivityId;
}
public String getBatchId() {
return batchId;
}
public void setBa... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\JobEntity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DataController {
private final MessageProducer messageProducer;
private final MessageConsumer messageConsumer;
@Autowired
public DataController(MessageProducer messageProducer, MessageConsumer messageConsumer) {
this.messageProducer = messageProducer;
this.messageConsumer ... | return ResponseEntity.ok().build();
}
@PostMapping("/send-message-and-get-response")
public ResponseEntity<MessageReply> sendMessageAndGetResponse(@RequestBody MessageRequest message) throws ExecutionException, InterruptedException {
long timestamp = System.nanoTime();
DataMessageAsyncEvent... | repos\spring-examples-java-17\spring-kafka\kafka-simple\src\main\java\itx\examples\spring\kafka\controller\DataController.java | 2 |
请完成以下Java代码 | public String getRuleKey() {
return ruleKey;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column rule.rule_key
*
* @param ruleKey the value for rule.rule_key
*
* @mbggenerated
*/
public void setRuleKey(String... | public Date getCreateTime() {
return createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column rule.create_time
*
* @param createTime the value for rule.create_time
*
* @mbggenerated
*/
public void setC... | repos\spring-boot-student-master\spring-boot-student-drools\src\main\java\com\xiaolyuh\domain\model\Rule.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 1234
http2:
enabled: true
servlet:
context-path: /generator
#tomcat:
# remote-ip-header: x-forward-for
# uri-encoding: UTF-8
# max-threads: 10
# background-processor-delay: 30
# basedir: ${user.home}/tomcat/
undertow:
# 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
... | QL 一键转 JAVA/JPA/Mybatis/MybatisPlus 等多种模板,轻松搞定 CRUD,彻底解放双手 ✋!只需提供 DDL、SELECT SQL 或简单 JSON 👉 即可生成 生成JPA/JdbcTemplate/Mybatis/MybatisPlus/BeetlSQL/CommonMapper 等代码模板。</p><p>🔥🔥🔥 全新 JSqlParser 引擎上线,强力支持 DDL CREATE SQL与 SELECT SQL 解析!欢迎体验 & 反馈 💬!</p><p>👨💻 面向开发者的高效利器,已服务数万工程师,欢迎 Star ⭐、Fork 🍴、提 Issue 💬,一起打造更强大的代码生成... | repos\SpringBootCodeGenerator-master\src\main\resources\application-bejson.yml | 2 |
请在Spring Boot框架中完成以下Java代码 | public class JsonWFActivity
{
@NonNull String activityId;
@NonNull String caption;
@NonNull String componentType;
@NonNull WFActivityStatus status;
@Nullable Boolean isAlwaysAvailableToUser;
@Nullable String userInstructions;
@Builder.Default
@NonNull Map<String, Object> componentProps = ImmutableMap.of();
... | @NonNull final JsonOpts jsonOpts)
{
final String adLanguage = jsonOpts.getAdLanguage();
return builder()
.activityId(activity.getId().getAsString())
.caption(activity.getCaption().translate(adLanguage))
.componentType(uiComponent.getType().getAsString())
.status(activity.getStatus())
.isAlways... | repos\metasfresh-new_dawn_uat\backend\de.metas.workflow.rest-api\src\main\java\de\metas\workflow\rest_api\controller\v2\json\JsonWFActivity.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class CustomColumnRepository
{
private final CCache<Integer, RESTApiTableInfoMap> cache = CCache.<Integer, RESTApiTableInfoMap>builder()
.tableName(I_AD_Column.Table_Name)
.additionalTableNameToResetFor(I_AD_Table.Table_Name)
.initialCapacity(1)
.build();
@Nullable
public RESTApiTableInfo getByTa... | .customRestAPIColumnName(columnName);
});
return builders.values().stream()
.map(RESTApiTableInfoBuilder::build)
.collect(RESTApiTableInfoMap.collect());
}
@EqualsAndHashCode
@ToString
private static class RESTApiTableInfoMap
{
private final ImmutableMap<String, RESTApiTableInfo> byTableName;
pr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\persistence\custom_columns\CustomColumnRepository.java | 2 |
请完成以下Spring Boot application配置 | # 基础配置
spring.datasource.druid.url=jdbc:mysql://localhost:3306/test
spring.datasource.druid.username=root
spring.datasource.druid.password=
spring.datasource.druid.driver-class-name=com.mysql.cj.jdbc.Driver
# 连接池配置
spring.datasource.druid.initialSize=10
spring.datasource.druid.maxActive=20
spring.datasource.druid.maxW... | ring.datasource.druid.filters=stat,wall
# 监控配置
spring.datasource.druid.stat-view-servlet.enabled=true
spring.datasource.druid.stat-view-servlet.url-pattern=/druid/*
spring.datasource.druid.stat-view-servlet.reset-enable=true
spring.datasource.druid.stat-view-servlet.login-username=admin
spring.datasource.druid.stat-vi... | repos\SpringBoot-Learning-master\2.x\chapter3-3\src\main\resources\application.properties | 2 |
请在Spring Boot框架中完成以下Java代码 | public Set<String> getAutoForward() {
return autoForward;
}
public void setAutoForward(Set<String> autoForward) {
this.autoForward = autoForward;
}
public Set<String> getSensitive() {
return sensitive;
}
public void setSensitive(Set<String> sensitive) {
this.sensitive = sensitive;
} | public Set<String> getSkipped() {
return skipped;
}
public void setSkipped(Set<String> skipped) {
this.skipped = skipped;
}
public HttpHeaders convertHeaders() {
HttpHeaders headers = new HttpHeaders();
for (String key : this.headers.keySet()) {
headers.set(key, this.headers.get(key));
}
return hea... | repos\spring-cloud-gateway-main\spring-cloud-gateway-proxyexchange-webmvc\src\main\java\org\springframework\cloud\gateway\mvc\config\ProxyExchangeWebMvcProperties.java | 2 |
请完成以下Java代码 | public void writeJExcel() throws IOException, WriteException {
WritableWorkbook workbook = null;
try {
File currDir = new File(".");
String path = currDir.getAbsolutePath();
String fileLocation = path.substring(0, path.length() - 1) + "temp.xls";
workbook... | headerLabel = new Label(1, 0, "Age", headerFormat);
sheet.setColumnView(0, 40);
sheet.addCell(headerLabel);
WritableCellFormat cellFormat = new WritableCellFormat();
cellFormat.setWrap(true);
Label cellLabel = new Label(0, 2, "John Smith", cellFormat);
... | repos\tutorials-master\apache-poi\src\main\java\com\baeldung\jexcel\JExcelHelper.java | 1 |
请完成以下Java代码 | public void execute(CommandContext commandContext) {
CreateNewTimerJobCommand cmd = new CreateNewTimerJobCommand(jobId);
commandExecutor.execute(cmd);
}
protected class CreateNewTimerJobCommand implements Command<Void> {
protected String jobId;
public CreateNewTimerJobCommand(String jobId) {
... | Date newDueDate = failedJob.calculateNewDueDate();
if (newDueDate != null) {
failedJob.createNewTimerJob(newDueDate);
// update configuration of failed job
TimerJobConfiguration config = (TimerJobConfiguration) failedJob.getJobHandlerConfiguration();
config.setFollowUpJobCreated(... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\RepeatingFailedJobListener.java | 1 |
请完成以下Java代码 | public class ExtensionElementsParser implements BpmnXMLConstants {
public void parse(
XMLStreamReader xtr,
List<SubProcess> activeSubProcessList,
Process activeProcess,
BpmnModel model
) throws Exception {
BaseElement parentElement = null;
if (!activeSubProcessLi... | new ActivitiEventListenerParser().parseChildElement(xtr, parentElement, model);
} else if (ELEMENT_POTENTIAL_STARTER.equals(xtr.getLocalName())) {
new PotentialStarterParser().parse(xtr, activeProcess);
} else {
ExtensionElement extensionElement = ... | repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\parser\ExtensionElementsParser.java | 1 |
请完成以下Java代码 | public IAttributeValue getAttributeValueOrNull(final AttributeCode attributeCode)
{
return attributeValuesByCode.get(attributeCode);
}
public boolean hasAttribute(final AttributeCode attributeCode)
{
return attributesByCode.containsKey(attributeCode);
}
public boolean hasAttribute(final AttributeId ... | public boolean hasAttributes()
{
return !attributesByCode.isEmpty();
}
public I_M_Attribute getAttributeByCodeOrNull(final AttributeCode attributeCode)
{
return attributesByCode.get(attributeCode);
}
public boolean isNull()
{
return this == NULL;
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\AbstractAttributeStorage.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<StageResponse> getStageOverview(@ApiParam(name = "caseInstanceId") @PathVariable String caseInstanceId) {
HistoricCaseInstance caseInstance = getHistoricCaseInstanceFromRequest(caseInstanceId);
return cmmnhistoryService.getStageOverview(caseInstance.getId());
}
@ApiOperation(va... | for (HistoricPlanItemInstance p : stagePlanItemInstances) {
if (p.getPlanItemDefinitionId().equals(stage.getId())) {
if (p.getEndedTime() == null) {
planItemInstance = p; // one that's not ended yet has precedence
} else {
if (planItemI... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\caze\HistoricCaseInstanceResource.java | 2 |
请完成以下Java代码 | public static FailedJobRetryConfiguration parseRetryIntervals(String retryIntervals) {
if (retryIntervals != null && !retryIntervals.isEmpty()) {
if (StringUtil.isExpression(retryIntervals)) {
ExpressionManager expressionManager = Context.getProcessEngineConfiguration().getExpressionManager();
... | }
}
return new ProcessEngineDetails(version, edition);
}
public static String parseServerVendor(String applicationServerInfo) {
String serverVendor = "";
Pattern pattern = Pattern.compile("[\\sA-Za-z]+");
Matcher matcher = pattern.matcher(applicationServerInfo);
if (matcher.find()) {
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\util\ParseUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private Logger logger(JoinPoint joinPoint) {
return LoggerFactory.getLogger(joinPoint.getSignature().getDeclaringTypeName());
}
/**
* Advice that logs methods throwing exceptions.
*
* @param joinPoint join point for advice.
* @param e exception.
*/
@AfterThrowing(pointcut =... | /**
* Advice that logs when a method is entered and exited.
*
* @param joinPoint join point for advice.
* @return result.
* @throws Throwable throws {@link IllegalArgumentException}.
*/
@Around("applicationPackagePointcut() && springBeanPointcut()")
public Object logAround(Proceedi... | repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\car-app\src\main\java\com\cars\app\aop\logging\LoggingAspect.java | 2 |
请完成以下Java代码 | public boolean containsChannel(Channel channel) {
return this.channels.contains(channel);
}
public @Nullable Connection getConnection() {
return (!this.connections.isEmpty() ? this.connections.get(0) : null);
}
public @Nullable Channel getChannel() {
return (!this.channels.isEmpty() ? this.channels.get(0) :... | logger.debug("Could not close synchronized Rabbit Channel after transaction", ex);
}
}
for (Connection con : this.connections) { //NOSONAR
RabbitUtils.closeConnection(con);
}
this.connections.clear();
this.channels.clear();
this.channelsPerConnection.clear();
}
public void addDeliveryTag(Channel ch... | repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\connection\RabbitResourceHolder.java | 1 |
请完成以下Java代码 | public void lock(LockExternalTaskDto lockExternalTaskDto) {
ExternalTaskService externalTaskService = engine.getExternalTaskService();
try {
externalTaskService
.lock(externalTaskId, lockExternalTaskDto.getWorkerId(), lockExternalTaskDto.getLockDuration());
} catch (NotFoundException e) {
... | } catch (NotFoundException e) {
throw new RestException(Status.NOT_FOUND, e, "External task with id " + externalTaskId + " does not exist");
} catch (BadUserRequestException e) {
throw new RestException(Status.BAD_REQUEST, e, e.getMessage());
}
}
@Override
public void unlock() {
ExternalT... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\externaltask\impl\ExternalTaskResourceImpl.java | 1 |
请完成以下Java代码 | public QueueBuilder stream() {
return withArgument("x-queue-type", "stream");
}
/**
* Set the delivery limit; only applies to quorum queues.
* @param limit the limit.
* @return the builder.
* @since 2.2.2
* @see #quorum()
*/
public QueueBuilder deliveryLimit(int limit) {
return withArgument("x-deliv... | /**
* Locate the queue leader.
*
* @since 2.3.7
*
*/
public enum LeaderLocator {
/**
* Deploy on the node with the fewest queue leaders.
*/
minLeaders("min-masters"),
/**
* Deploy on the node we are connected to.
*/
clientLocal("client-local"),
/**
* Deploy on a random node.
*/... | repos\spring-amqp-main\spring-amqp\src\main\java\org\springframework\amqp\core\QueueBuilder.java | 1 |
请完成以下Java代码 | public void setParameter(String parameter) {
Assert.hasText(parameter, "Parameter name cannot be empty or null");
this.parameter = parameter;
}
public String getParameter() {
return this.parameter;
}
protected UserDetailsService getUserDetailsService() {
return this.userDetailsService;
}
public String ... | this.userDetailsChecker = userDetailsChecker;
}
public void setAuthoritiesMapper(GrantedAuthoritiesMapper authoritiesMapper) {
this.authoritiesMapper = authoritiesMapper;
}
/**
* @since 5.5
*/
@Override
public void setMessageSource(MessageSource messageSource) {
Assert.notNull(messageSource, "messageSou... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\rememberme\AbstractRememberMeServices.java | 1 |
请完成以下Java代码 | public int getC_Recurring_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Recurring_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Recurring Run.
@param C_Recurring_Run_ID
Recurring Document Run
*/
public void setC_Recurring_Run_ID (int C_Recurring_Run_ID)
{
if (C_Recurri... | return (Timestamp)get_Value(COLUMNNAME_DateDoc);
}
public I_GL_JournalBatch getGL_JournalBatch() throws RuntimeException
{
return (I_GL_JournalBatch)MTable.get(getCtx(), I_GL_JournalBatch.Table_Name)
.getPO(getGL_JournalBatch_ID(), get_TrxName()); }
/** Set Journal Batch.
@param GL_JournalBatch_ID
Ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Recurring_Run.java | 1 |
请完成以下Java代码 | public BalanceType getBalance() {
return balance;
}
/**
* Sets the value of the balance property.
*
* @param value
* allowed object is
* {@link BalanceType }
*
*/
public void setBalance(BalanceType value) {
this.balance = value;
}
/*... | * allowed object is
* {@link EsrRedType }
*
*/
public void setEsrRed(EsrRedType value) {
this.esrRed = value;
}
/**
* Gets the value of the esrQR property.
*
* @return
* possible object is
* {@link EsrQRType }
*
*/
pub... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_450_response\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_450\response\ReimbursementType.java | 1 |
请完成以下Java代码 | public void onMessage(String message, Session session) {
log.info("收到来"+sid+"的信息:"+message);
//群发消息
for (WebSocketServer item : webSocketSet) {
try {
item.sendMessage(message);
} catch (IOException e) {
log.error(e.getMessage(),e);
}
}
}
@OnError
public void onError(Session session, Throwab... | }
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
WebSocketServer that = (WebSocketServer) o;
return Objects.equals(session, that.session) &&
Objects.equals(sid, that.sid);
}
@Override
public int h... | repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\maint\websocket\WebSocketServer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class InvoiceChangedEvent
{
@JsonProperty("invoiceId")
InvoiceId invoiceId;
@JsonProperty("invoiceDate")
LocalDate invoiceDate;
@JsonProperty("bpartnerId")
BPartnerId bpartnerId;
@JsonProperty("soTrx")
SOTrx soTrx;
@JsonProperty("reversal")
boolean reversal;
@JsonProperty("productPrices")
@Gette... | this.productPricesByProductId = Maps.uniqueIndex(this.productPrices, ProductPrice::getProductId);
}
public Set<ProductId> getProductIds()
{
return productPricesByProductId.keySet();
}
public Money getProductPrice(@NonNull final ProductId productId)
{
final ProductPrice productPrice = productPricesByProductI... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\product\stats\InvoiceChangedEvent.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private void onlyAllowPost(HttpHeaders headers) {
headers.setAllow(Collections.singleton(HttpMethod.POST));
}
@Configuration(proxyBeanMethods = false)
static class GraphQlEndpointCorsConfiguration implements WebFluxConfigurer {
final GraphQlProperties graphQlProperties;
final GraphQlCorsProperties corsPrope... | @Bean
HandlerMapping graphQlWebSocketEndpoint(GraphQlWebSocketHandler graphQlWebSocketHandler,
GraphQlProperties properties) {
String path = properties.getWebsocket().getPath();
Assert.state(path != null, "'path' must not be null");
logger.info(LogMessage.format("GraphQL endpoint WebSocket %s", path));
... | repos\spring-boot-4.0.1\module\spring-boot-graphql\src\main\java\org\springframework\boot\graphql\autoconfigure\reactive\GraphQlWebFluxAutoConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Area getArea() {
return area;
}
public void setArea(Area area) {
this.area = area;
}
public Object getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Object createdAt) {
this.createdAt = createdAt;
}
public UUID getId() {
retu... | public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
} | repos\tutorials-master\json-modules\json-2\src\main\java\com\baeldung\jsonschemageneration\configuration\AdvancedArticle.java | 2 |
请完成以下Java代码 | public class LicenseKeyDataImpl implements LicenseKeyData {
public static final String SERIALIZED_VALID_UNTIL = "valid-until";
public static final String SERIALIZED_IS_UNLIMITED = "unlimited";
protected String customer;
protected String type;
@SerializedName(value = SERIALIZED_VALID_UNTIL)
protected Strin... | }
public Boolean isUnlimited() {
return isUnlimited;
}
public void setUnlimited(Boolean isUnlimited) {
this.isUnlimited = isUnlimited;
}
public Map<String, String> getFeatures() {
return features;
}
public void setFeatures(Map<String, String> features) {
this.features = features;
}
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\telemetry\dto\LicenseKeyDataImpl.java | 1 |
请完成以下Java代码 | private Step step1() {
return stepBuilderFactory.get("step1")
.tasklet((stepContribution, chunkContext) -> {
System.out.println("execute step1。。。");
return RepeatStatus.FINISHED;
}).build();
}
private Step step2() {
return ... | private Step step3() {
return stepBuilderFactory.get("step3")
.tasklet((stepContribution, chunkContext) -> {
System.out.println("execute step3。。。");
return RepeatStatus.FINISHED;
}).build();
}
// 创建一个flow对象,包含若干个step
private Fl... | repos\springboot-demo-master\SpringBatch\src\main\java\com\et\batch\job\FlowJobDemo.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getUOMSymbol() {
return uomSymbol;
}
/**
* Sets the value of the uomSymbol property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUOMSymbol(String value) {
this.uomSymbol = value;
}
/**
... | return x12DE355;
}
/**
* Sets the value of the x12DE355 property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setX12DE355(String value) {
this.x12DE355 = value;
}
} | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev1\de\metas\edi\esb\jaxb\metasfreshinhousev1\EDIExpCUOMType.java | 2 |
请完成以下Java代码 | 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 ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNam... | {
if (PA_ColorSchema_ID < 1)
set_ValueNoCheck (COLUMNNAME_PA_ColorSchema_ID, null);
else
set_ValueNoCheck (COLUMNNAME_PA_ColorSchema_ID, Integer.valueOf(PA_ColorSchema_ID));
}
/** Get Color Schema.
@return Performance Color Schema
*/
public int getPA_ColorSchema_ID ()
{
Integer ii = (Integer)ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_ColorSchema.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void handleEvent(@NonNull final ReceiptScheduleDeletedEvent event)
{
final CandidatesQuery query = ReceiptsScheduleHandlerUtil.queryByReceiptScheduleId(event);
final Candidate candidateToDelete = candidateRepositoryRetrieval.retrieveLatestMatchOrNull(query);
if (candidateToDelete == null)
{
Loggables... | candidateToDelete.getId(), event.getReceiptScheduleId());
candidateChangeHandler.onCandidateDelete(candidateToDelete);
}
}
protected CandidatesQuery createCandidatesQuery(@NonNull final ReceiptScheduleDeletedEvent deletedEvent)
{
final PurchaseDetailsQuery purchaseDetailsQuery = PurchaseDetailsQuery.builder... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\receiptschedule\ReceiptsScheduleDeletedHandler.java | 2 |
请完成以下Java代码 | protected PageData<DashboardId> findEntities(TenantId tenantId, TenantId id, PageLink pageLink) {
return dashboardDao.findIdsByTenantId(id, pageLink);
}
@Override
protected void removeEntity(TenantId tenantId, DashboardId dashboardId) {
deleteDashboard(tenantId, dashboar... | }
}
private class CustomerDashboardsUpdater extends PaginatedRemover<Customer, DashboardInfo> {
private final Customer customer;
CustomerDashboardsUpdater(Customer customer) {
this.customer = customer;
}
@Override
protected PageData<DashboardInfo> findEnt... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\dashboard\DashboardServiceImpl.java | 1 |
请完成以下Java代码 | private final class HttpSessionWrapper extends HttpSessionAdapter<S> {
HttpSessionWrapper(S session, ServletContext servletContext) {
super(session, servletContext);
}
@Override
public void invalidate() {
super.invalidate();
SessionRepositoryRequestWrapper.this.requestedSessionInvalidated = tr... | @Override
public void forward(ServletRequest request, ServletResponse response) throws ServletException, IOException {
this.delegate.forward(request, response);
}
@Override
public void include(ServletRequest request, ServletResponse response) throws ServletException, IOException {
if (!SessionRepos... | repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\web\http\SessionRepositoryFilter.java | 1 |
请完成以下Java代码 | private static void addLineNumber() {
printHeader("add line number by hasNextLine() ");
Scanner scanner = new Scanner(INPUT);
int i = 0;
while (scanner.hasNextLine()) {
log.info(String.format("%d|%s", ++i, scanner.nextLine()));
}
log.info(END_LINE);
sc... | hasNextBasic();
hasNextWithDelimiter();
hasNextWithDelimiterFixed();
addLineNumber();
}
//overwrite the logger config
private static void setLogger() throws IOException {
InputStream is = HasNextVsHasNextLineDemo.class.getResourceAsStream("/scanner/log4j.properties");
... | repos\tutorials-master\core-java-modules\core-java-scanner\src\main\java\com\baeldung\scanner\HasNextVsHasNextLineDemo.java | 1 |
请完成以下Java代码 | public class CustomSpliterator implements Spliterator<Integer> {
private final List<Integer> elements;
private int currentIndex;
public CustomSpliterator(List<Integer> elements) {
this.elements = elements;
this.currentIndex = 0;
}
@Override
public boolean tryAdvance(Con... | if (currentSize < 2) {
return null;
}
int splitIndex = currentIndex + currentSize / 2;
CustomSpliterator newSpliterator = new CustomSpliterator(elements.subList(currentIndex, splitIndex));
currentIndex = splitIndex;
return newSpliterator;
}
@Over... | repos\tutorials-master\core-java-modules\core-java-8\src\main\java\com\baeldung\spliterator\CustomSpliterator.java | 1 |
请完成以下Java代码 | private List<JsonNode> getLastMsgs() {
if (lastMsgs.isEmpty()) {
return lastMsgs;
}
List<JsonNode> errors = lastMsgs.stream()
.map(msg -> msg.get("errorMsg"))
.filter(errorMsg -> errorMsg != null && !errorMsg.isNull() && StringUtils.isNotEmpty(errorMsg... | Map<String, String> updates = new HashMap<>();
getLastMsgs().forEach(msg -> {
EntityDataUpdate update = JacksonUtil.treeToValue(msg, EntityDataUpdate.class);
Map<String, String> latest = update.getLatest(deviceId);
updates.putAll(latest);
});
return updates;
... | repos\thingsboard-master\monitoring\src\main\java\org\thingsboard\monitoring\client\WsClient.java | 1 |
请完成以下Java代码 | public void setAttributeName (final java.lang.String AttributeName)
{
set_Value (COLUMNNAME_AttributeName, AttributeName);
}
@Override
public java.lang.String getAttributeName()
{
return get_ValueAsString(COLUMNNAME_AttributeName);
}
@Override
public void setAttributeValue (final java.lang.String Attribu... | @Override
public java.lang.String getDescription()
{
return get_ValueAsString(COLUMNNAME_Description);
}
@Override
public void setHelp (final java.lang.String Help)
{
set_Value (COLUMNNAME_Help, Help);
}
@Override
public java.lang.String getHelp()
{
return get_ValueAsString(COLUMNNAME_Help);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WF_ActivityResult.java | 1 |
请完成以下Java代码 | public void setOrderItems(List<OrderItem> orderItems) {
this.orderItems = orderItems;
}
public int getOrderId() {
return orderId;
}
public List<OrderItem> getOrderItems() {
return orderItems;
}
public void setOrderId(int orderId) {
this.orderId = orderId;
}... | return paymentMethod;
}
public void setPaymentMethod(String paymentMethod) {
this.paymentMethod = paymentMethod;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
} | repos\tutorials-master\patterns-modules\ddd-contexts\ddd-contexts-ordercontext\src\main\java\com\baeldung\dddcontexts\ordercontext\model\CustomerOrder.java | 1 |
请完成以下Java代码 | public static long parseDate(String value, DateFormat[] threadLocalformats) {
Long cachedDate = null;
try {
cachedDate = parseCache.get(value);
}
catch (Exception ex) {
}
if (cachedDate != null) {
return cachedDate;
}
Long date;
if (threadLocalformats != null) {
date = internalParseDate(value... | * @param cache Cache to be updated
* @param key Key to be updated
* @param value New value
*/
@SuppressWarnings("unchecked")
private static void updateCache(HashMap cache, Object key, @Nullable Object value) {
if (value == null) {
return;
}
if (cache.size() > 1000) {
cache.clear();
}
cache.put(k... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\savedrequest\FastHttpDateFormat.java | 1 |
请完成以下Java代码 | public String getName() {
return DEFAULT_NAME;
}
@Override
public String getContextualName(DataLoaderObservationContext context) {
List<?> result = context.getResult();
if (result.isEmpty()) {
return "graphql dataloader";
}
else {
return "graphql dataloader " + result.get(0).getClass().getSimpleName... | return KeyValue.of(DataLoaderLowCardinalityKeyNames.LOADER_NAME, context.getDataLoader().getName());
}
return LOADER_TYPE_UNKNOWN;
}
protected KeyValue outcome(DataLoaderObservationContext context) {
if (context.getError() != null) {
return OUTCOME_ERROR;
}
return OUTCOME_SUCCESS;
}
protected KeyValu... | repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\observation\DefaultDataLoaderObservationConvention.java | 1 |
请完成以下Java代码 | protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) {
if (isLoginAttempt(request, response)) {
return executeLogin(request, response);
}
return true;
}
/**
* 对跨域提供支持
*/
@Override
protected boolean preHandl... | if (httpServletRequest.getMethod().equals(RequestMethod.OPTIONS.name())) {
httpServletResponse.setStatus(HttpStatus.OK.value());
return false;
}
return super.preHandle(request, response);
}
/**
* 将非法请求 /401
*/
private void response401(ServletRequest req, Se... | repos\SpringBootBucket-master\springboot-jwt\src\main\java\com\xncoding\jwt\shiro\JWTFilter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SecurityConfig {
@Bean
public UserDetailsService userDetailsService() {
UserDetails user = User.withUsername("user")
.passwordEncoder(PasswordEncoderFactories.createDelegatingPasswordEncoder()::encode)
.password("password")
.roles("USER")
.b... | .logout(Customizer.withDefaults());
return http.build();
}
@Bean
public AuthenticationFailureHandler authenticationFailureHandler() {
return new CustomAuthenticationFailureHandler();
}
@Bean
public AuthenticationSuccessHandler authenticationSuccessHandler() {
return new... | repos\tutorials-master\spring-security-modules\spring-security-core\src\main\java\com\baeldung\exceptionhandler\security\SecurityConfig.java | 2 |
请完成以下Spring Boot application配置 | server.port=8080
server.address=0.0.0.0
spring.jpa.hibernate.ddl-auto=create
logging.file=azure.log
logging.level.root=info
spring.datasource.url=jdbc:h2:mem:azure-test-db
spring.datasource.username=sa
spring.datasource.password=
#spring.datasource.url=jdbc:mysql | ://localhost:3306/localdb
#spring.datasource.username=your-db-username
#spring.datasource.password=your-db-password | repos\tutorials-master\spring-boot-modules\spring-boot-azure-deployment\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public static char getDefaultAttributeQuoteChar()
{
return attribute_quote_char;
}
/*
Should we wrap quotes around an attribute?
*/
public static boolean getDefaultAttributeQuote()
{
return attribute_quote;
}
/**
Does this element need a closing tag?
*/
public static boolean getDefaul... | }
/**
Default value to set case type
*/
public static int getDefaultCaseType()
{
return case_type;
}
public static char getDefaultStartTag()
{
return start_tag;
}
public static char getDefaultEndTag()
{
return end_tag;
}
/**
Should we print html in a more readable format?
*/
public static b... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\ECSDefaults.java | 1 |
请完成以下Java代码 | private void autoReportActivities()
{
final IPPCostCollectorBL ppCostCollectorBL = Services.get(IPPCostCollectorBL.class);
final PPOrderRouting orderRouting = getOrderRouting();
for (final PPOrderRoutingActivity activity : orderRouting.getActivities())
{
if (activity.isMilestone()
&& (activity.isSubco... | final IPPCostCollectorBL ppCostCollectorBL = Services.get(IPPCostCollectorBL.class);
//
for (final I_PP_Order_BOMLine bomLine : getLines())
{
ppCostCollectorBL.createMaterialUsageVariance(this, bomLine);
}
//
final PPOrderRouting orderRouting = getOrderRouting();
for (final PPOrderRoutingActivity act... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\model\MPPOrder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private PickingJob reservePickingSlotIfPossible(@NonNull final PickingJob pickingJob)
{
final PickingSlotId slotId = pickingJob.getPickingSlotId()
.orElse(null);
if (slotId == null)
{
return pickingJob;
}
return PickingJobAllocatePickingSlotCommand.builder()
.pickingJobRepository(pickingJobRepos... | .filter(Objects::nonNull)
.map(PickingJobStepPickedTo::getActualPickedHUs)
.flatMap(List::stream)
.filter(pickStepHu -> huIdsToPick.containsKey(pickStepHu.getActualPickedHU().getId()))
.forEach(pickStepHU -> {
final HuId huId = pickStepHU.getActualPickedHU().getId();
final I_M_HU hu = huServic... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\service\commands\PickingJobReopenCommand.java | 2 |
请完成以下Java代码 | public final class PharmaVendorPermissions
{
public static PharmaVendorPermissions of(final I_C_BPartner bpartner)
{
if (!bpartner.isVendor())
{
return NONE;
}
final ImmutableSet.Builder<PharmaVendorPermission> permissionsBuilder = ImmutableSet.builder();
if (bpartner.isPharmaVendorAgentPermission())
... | private PharmaVendorPermissions(final Set<PharmaVendorPermission> permissions)
{
this.permissions = ImmutableSet.copyOf(permissions);
}
public boolean hasNoPermissions()
{
return permissions.isEmpty();
}
public boolean hasAtLeastOnePermission()
{
return !permissions.isEmpty();
}
public boolean hasPerm... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma\src\main\java\de\metas\vertical\pharma\PharmaVendorPermissions.java | 1 |
请完成以下Java代码 | public List<IncidentDto> getIncidents(UriInfo uriInfo, Integer firstResult, Integer maxResults) {
IncidentQueryDto queryDto = new IncidentQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
IncidentQuery query = queryDto.toQuery(getProcessEngine());
List<Incident> queryResult = QueryUtil.list(query,... | public CountResultDto getIncidentsCount(UriInfo uriInfo) {
IncidentQueryDto queryDto = new IncidentQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
IncidentQuery query = queryDto.toQuery(getProcessEngine());
long count = query.count();
CountResultDto result = new CountResultDto();
result.... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\IncidentRestServiceImpl.java | 1 |
请完成以下Java代码 | protected boolean beforeSave (boolean newRecord)
{
if (isAchieved())
{
if (getManualActual().signum() == 0)
setManualActual(Env.ONE);
if (getDateDoc() == null)
setDateDoc(new Timestamp(System.currentTimeMillis()));
}
return true;
} // beforeSave
/**
* After Save
* @param newRecord new
... | */
@Override
protected boolean afterDelete (boolean success)
{
if (success)
updateAchievementGoals();
return success;
} // afterDelete
/**
* Update Goals with Achievement
*/
private void updateAchievementGoals()
{
MMeasure measure = MMeasure.get (getCtx(), getPA_Measure_ID());
measure.updateGoal... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MAchievement.java | 1 |
请完成以下Java代码 | public Long getCity() {
return city;
}
public void setCity(Long city) {
this.city = city;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAddress() {
return address;
}
... | public String getZip() {
return zip;
}
public void setZip(String zip) {
this.zip = zip;
}
@Override
public String toString() {
return getCity() + "," + getName() + "," + getAddress() + "," + getZip();
}
} | repos\pagehelper-spring-boot-master\pagehelper-spring-boot-samples\pagehelper-spring-boot-sample-xml\src\main\java\tk\mybatis\pagehelper\domain\Hotel.java | 1 |
请完成以下Java代码 | public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getParameterName());
}
/** Set Process Date.
@param P_Date
Process Parameter
*/
public void setP_Date (Timestamp P_Date)
{
set_Value (COLUMNNAME_P_Date, P_Date);
}
/** Get Process Date.
@return Process Parameter
... | return Env.ZERO;
return bd;
}
/** Set Process String.
@param P_String
Process Parameter
*/
public void setP_String (String P_String)
{
set_Value (COLUMNNAME_P_String, P_String);
}
/** Get Process String.
@return Process Parameter
*/
public String getP_String ()
{
return (String)get_Value(C... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PInstance_Para.java | 1 |
请完成以下Java代码 | public List<Object> provideLineGroupingValues(final OLCand cand)
{
return providers.stream()
.flatMap(provider -> provider.provideLineGroupingValues(cand).stream())
.collect(Collectors.toList());
}
}
private static final class NullOLCandValidator implements IOLCandValidator
{
public static final ... | */
@Override
public void validate(@NonNull final I_C_OLCand olCand)
{
for (final IOLCandValidator olCandValdiator : validators)
{
try
{
olCandValdiator.validate(olCand);
}
catch (final Exception e)
{
final AdempiereException me = AdempiereException
.wrapIfNeeded(e)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\api\OLCandSPIRegistry.java | 1 |
请完成以下Java代码 | public int getM_Shipper_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Shipper_ID);
}
@Override
public void setM_Shipper_RoutingCode_ID (final int M_Shipper_RoutingCode_ID)
{
if (M_Shipper_RoutingCode_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Shipper_RoutingCode_ID, null);
else
set_ValueNoCheck (COLUMNNAME... | return get_ValueAsInt(COLUMNNAME_M_Shipper_RoutingCode_ID);
}
@Override
public void setName (final @Nullable 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_M_Shipper_RoutingCode.java | 1 |
请完成以下Java代码 | public StringElement addElement(String hashcode,String element)
{
// We do it this way so that filtering will work.
// 1. create a new StringElement(element) - this is the only way that setTextTag will get called
// 2. copy the filter state of this string element to this child.
// 3.... | @param hashcode the name of the element to be removed.
*/
public StringElement removeElement(String hashcode)
{
removeElementFromRegistry(hashcode);
return(this);
}
protected String createStartTag()
{
return("");
}
protected String createEndTag()
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\StringElement.java | 1 |
请完成以下Java代码 | public class CdiBusinessProcessEvent implements BusinessProcessEvent {
protected final String activityId;
protected final ProcessDefinition processDefinition;
protected final String transitionName;
protected final String processInstanceId;
protected final String executionId;
protected final DelegateTask de... | return transitionName;
}
@Override
public String getProcessInstanceId() {
return processInstanceId;
}
@Override
public String getExecutionId() {
return executionId;
}
@Override
public BusinessProcessEventType getType() {
return type;
}
@Override
public Date getTimeStamp() {
r... | repos\camunda-bpm-platform-master\engine-cdi\core\src\main\java\org\camunda\bpm\engine\cdi\impl\event\CdiBusinessProcessEvent.java | 1 |
请完成以下Java代码 | protected final void setDeliveredDataFromFirstInOut(@NonNull final I_C_Invoice_Candidate ic, @Nullable final I_M_InOut firstInOut)
{
ic.setM_InOut(firstInOut);
if (firstInOut == null)
{
ic.setDeliveryDate(null);
ic.setFirst_Ship_BPLocation_ID(-1);
ic.setC_Shipping_Location_ID(-1);
}
else
{
ic.... | */
protected final void setDefaultInvoiceDocType(final @NonNull I_C_Invoice_Candidate icRecord)
{
final DocTypeQuery docTypeQuery = DocTypeQuery.builder()
.adClientId(icRecord.getAD_Client_ID())
.adOrgId(icRecord.getAD_Org_ID())
.isSOTrx(icRecord.isSOTrx())
.docBaseType(icRecord.isSOTrx()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\spi\AbstractInvoiceCandidateHandler.java | 1 |
请完成以下Java代码 | public int compare(final ISideAction action1, final ISideAction action2)
{
final String displayName1 = getDisplayName(action1);
final String displayName2 = getDisplayName(action2);
return displayName1.compareTo(displayName2);
}
private final String getDisplayName(final ISideAction action)
{
final S... | SideActionType getType();
/**
* In case this action is of type {@link SideActionType#Toggle},
* this method is called by API/UI to tell this action that it was toggled(activated) or untoggled(deactivated).
*
* @param toggled
*/
void setToggled(final boolean toggled);
/**
* @return true if this side act... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ui\sideactions\model\ISideAction.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class TestController {
@Autowired
private UserService userService;
@GetMapping("testRequestMerge")
public void testRequerstMerge() throws InterruptedException, ExecutionException {
Future<User> f1 = userService.findUser(1L);
Future<User> f2 = userService.findUser(2L);
Fu... | return userService.getUsers();
}
@GetMapping("user/add")
public String addUser() {
return userService.addUser();
}
@GetMapping("user/update")
public void updateUser() {
userService.updateUser(new User(1L, "mrbird", "123456"));
}
@GetMapping("user/delete/{id:\\d+}")
... | repos\SpringAll-master\30.Spring-Cloud-Hystrix-Circuit-Breaker\Ribbon-Consumer\src\main\java\com\example\demo\controller\TestController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setTimeStamp(Date timeStamp) {
this.timeStamp = timeStamp;
}
@Override
public void setUserId(String userId) {
this.userId = userId;
}
@Override
public void setData(String data) {
this.data = data;
}
@Override
public void setExecutionId(String ex... | @Override
public String getType() {
return type;
}
@Override
public String getTaskId() {
return taskId;
}
@Override
public Date getTimeStamp() {
return timeStamp;
}
@Override
public String getUserId() {
return userId;
}
@Override
pu... | repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\persistence\entity\HistoricTaskLogEntryEntityImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public List<Todo> retrieveTodos(String user) {
List<Todo> filteredTodos = new ArrayList<Todo>();
for (Todo todo : todos) {
if (todo.getUser().equalsIgnoreCase(user)) {
filteredTodos.add(todo);
}
}
return filteredTodos;
}
public Todo re... | public void updateTodo(Todo todo){
todos.remove(todo);
todos.add(todo);
}
public void addTodo(String name, String desc, Date targetDate,
boolean isDone) {
todos.add(new Todo(++todoCount, name, desc, targetDate, isDone));
}
public void deleteTodo(int id) {
Iterat... | repos\SpringBootForBeginners-master\02.Spring-Boot-Web-Application\src\main\java\com\in28minutes\springboot\web\service\TodoService.java | 2 |
请完成以下Java代码 | public String getValidateFormFields() {
return validateFormFields;
}
public void setValidateFormFields(String validateFormFields) {
this.validateFormFields = validateFormFields;
}
@Override
public void addExitCriterion(Criterion exitCriterion) {
exitCriteria.add(exitCriteri... | }
@Override
public void setExitCriteria(List<Criterion> exitCriteria) {
this.exitCriteria = exitCriteria;
}
public String getBusinessStatus() {
return businessStatus;
}
public void setBusinessStatus(String businessStatus) {
this.businessStatus = businessStatus;
}
... | repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\Stage.java | 1 |
请完成以下Java代码 | private IWorkPackageBuilder initiateWorkPackageBuilder(
@NonNull final IWorkPackageQueue workPackageQueue,
@NonNull final ILock mainLock,
@Nullable final AsyncBatchId asyncBatchId,
final boolean propagateAsyncBatchIdToOrderRecord)
{
final IWorkPackageBuilder workpackageBuilder = workPackageQueue.newWorkP... | {
final OLCand candidate = olCandIterator.next();
final String headerAggregationKey = olCandProcessorDescriptor.getAggregationInfo().computeHeaderAggregationKey(candidate);
candidate.setHeaderAggregationKey(headerAggregationKey);
olCandBL.saveCandidate(candidate);
}
}
@Builder
@Value
private stati... | repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\api\async\C_OLCandToOrderEnqueuer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getTaskUrl() {
return taskUrl;
}
public void setTaskUrl(String taskUrl) {
this.taskUrl = taskUrl;
}
@JsonInclude(JsonInclude.Include.NON_NULL)
public String getProcessInstanceUrl() {
return processInstanceUrl;
}
public void setProcessInstanceUrl(Strin... | public List<String> getMessage() {
return message;
}
public void setMessage(List<String> message) {
this.message = message;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
} | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\engine\EventResponse.java | 2 |
请完成以下Java代码 | 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);
}
/** Set Sequence.
@param SeqNo
Method of ordering records; lowest number comes first
... | */
public void setValidTo (Timestamp ValidTo)
{
set_Value (COLUMNNAME_ValidTo, ValidTo);
}
/** Get Valid to.
@return Valid to including this date (last day)
*/
public Timestamp getValidTo ()
{
return (Timestamp)get_Value(COLUMNNAME_ValidTo);
}
/** Set Search Key.
@param Value
Search key for the... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_Concept.java | 1 |
请完成以下Java代码 | class ClusterNodes implements Streamable<TransportAddress> {
public static ClusterNodes DEFAULT = ClusterNodes.of("127.0.0.1:9300");
private static final String COLON = ":";
private static final String COMMA = ",";
private final List<TransportAddress> clusterNodes;
/**
* Creates a new {@lin... | /**
* Creates a new {@link ClusterNodes} by parsing the given source. The expected format is a comma separated list of
* host-port-combinations separated by a colon: {@code host:port,host:port,…}.
*
* @param source must not be {@literal null} or empty.
* @return
*/
public static Cluste... | repos\SpringBoot-Labs-master\lab-40\lab-40-elasticsearch\src\main\java\cn\iocoder\springboot\lab40\zipkindemo\spring\ClusterNodes.java | 1 |
请完成以下Java代码 | public VariableInstanceQuery excludeTaskVariables() {
wrappedVariableInstanceQuery.excludeTaskVariables();
return this;
}
@Override
public VariableInstanceQuery excludeLocalVariables() {
wrappedVariableInstanceQuery.excludeLocalVariables();
return this;
}
@Override
... | @Override
public VariableInstanceQuery asc() {
wrappedVariableInstanceQuery.asc();
return this;
}
@Override
public VariableInstanceQuery desc() {
wrappedVariableInstanceQuery.desc();
return this;
}
@Override
public VariableInstanceQuery orderBy(QueryProperty... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\CmmnVariableInstanceQueryImpl.java | 1 |
请完成以下Java代码 | protected CaseDefinitionEntity findDefinitionByDeploymentAndKey(String deploymentId, String definitionKey) {
return getCaseDefinitionManager().findCaseDefinitionByDeploymentAndKey(deploymentId, definitionKey);
}
@Override
protected CaseDefinitionEntity findLatestDefinitionByKeyAndTenantId(String definitionKe... | }
public void setExpressionManager(ExpressionManager expressionManager) {
this.expressionManager = expressionManager;
}
public CmmnTransformer getTransformer() {
return transformer;
}
public void setTransformer(CmmnTransformer transformer) {
this.transformer = transformer;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\deployer\CmmnDeployer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getDeploymentUrl() {
return deploymentUrl;
}
public void setDeploymentUrl(String deploymentUrl) {
this.deploymentUrl = deploymentUrl;
}
@ApiModelProperty(example = "null")
@Override
public String getTenantId() {
return tenantId;
}
@Override
pu... | public String getSourceUrl() {
return sourceUrl;
}
public void setSourceUrl(String sourceUrl) {
this.sourceUrl = sourceUrl;
}
public String getSourceExtraUrl() {
return sourceExtraUrl;
}
public void setSourceExtraUrl(String sourceExtraUrl) {
this.sourceExtraUrl... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\repository\ModelResponse.java | 2 |
请完成以下Java代码 | private void notifyExecutions(List<EventSubscriptionEntity> catchSignalEventSubscription) {
for (EventSubscriptionEntity signalEventSubscriptionEntity : catchSignalEventSubscription) {
if (isActiveEventSubscription(signalEventSubscriptionEntity)) {
signalEventSubscriptionEntity.eventReceived(builder.... | if (subscription.getExecutionId() != null) {
result.add(subscription);
}
}
return result;
}
protected List<EventSubscriptionEntity> filterStartSubscriptions(List<EventSubscriptionEntity> subscriptions) {
List<EventSubscriptionEntity> result = new ArrayList<EventSubscriptionEntity>();
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\SignalEventReceivedCmd.java | 1 |
请完成以下Java代码 | public NamePair getNullAttributeValue()
{
final IAttributeValuesProvider attributeValuesProvider = getAttributeValuesProvider();
return attributeValuesProvider.getNullValue();
}
@Override
public final boolean isNumericValue()
{
return X_M_Attribute.ATTRIBUTEVALUETYPE_Number.equals(valueType);
}
@Override... | {
final int uomId = attribute.getC_UOM_ID();
if (uomId > 0)
{
return Services.get(IUOMDAO.class).getById(uomId);
}
else
{
return null;
}
}
private IAttributeValueCallout _attributeValueCallout = null;
@Override
public IAttributeValueCallout getAttributeValueCallout()
{
if (_attributeValueCa... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\impl\AbstractAttributeValue.java | 1 |
请完成以下Java代码 | public int getAD_ReplicationStrategy_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_ReplicationStrategy_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_AD_Table getAD_Table() throws RuntimeException
{
return (I_AD_Table)MTable.get(getCtx(), I_AD_Table.Table_Name)
.getPO(ge... | public void setDescription (String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** ReplicationType AD_Reference_ID=126 *... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ReplicationDocument.java | 1 |
请完成以下Java代码 | public @Nullable Integer getActive() {
try {
return getDataSource().getBorrowedConnectionsCount();
}
catch (SQLException ex) {
return null;
}
}
@Override
public @Nullable Integer getIdle() {
try {
return getDataSource().getAvailableConnectionsCount();
}
catch (SQLException ex) {
return nul... | return getDataSource().getMaxPoolSize();
}
@Override
public @Nullable Integer getMin() {
return getDataSource().getMinPoolSize();
}
@Override
public @Nullable String getValidationQuery() {
return getDataSource().getSQLForValidateConnection();
}
@Override
public @Nullable Boolean getDefaultAutoCommit() {... | repos\spring-boot-4.0.1\module\spring-boot-jdbc\src\main\java\org\springframework\boot\jdbc\metadata\OracleUcpDataSourcePoolMetadata.java | 1 |
请完成以下Java代码 | public class CountdownLatchResetExample {
private int count;
private int threadCount;
private final AtomicInteger updateCount;
CountdownLatchResetExample(int count, int threadCount) {
updateCount = new AtomicInteger(0);
this.count = count;
this.threadCount = threadCount;
}
... | if (countDownLatch.getCount() != prevValue) {
updateCount.incrementAndGet();
}
});
}
es.shutdown();
return updateCount.get();
}
public static void main(String[] args) {
CountdownLatchResetExample ex = new Co... | repos\tutorials-master\core-java-modules\core-java-concurrency-advanced-2\src\main\java\com\baeldung\concurrent\countdownlatch\CountdownLatchResetExample.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.