instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public static String jiami(String content) {
SymmetricCrypto aes = new SymmetricCrypto(SymmetricAlgorithm.AES, key.getBytes());
String encryptResultStr = aes.encryptHex(content);
return encryptResultStr;
}
/**解密
* @param encryptResultStr
* @return
*/
publi... | }
//---AES加密---------end---------
/**
* 主函数
*/
public static void main(String[] args) {
String content="test1111";
String encrypt = jiami(content);
System.out.println(encrypt);
//构建
String decrypt = jiemi(encrypt);
//解密为字符串
System.out.println... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\util\SecurityUtil.java | 1 |
请完成以下Java代码 | public static DocumentLayoutElementFieldDescriptor.LookupSource extractLookupSource(final int displayType, @Nullable final ReferenceId adReferenceValueId)
{
if (DisplayType.Search == displayType)
{
return DocumentLayoutElementFieldDescriptor.LookupSource.lookup;
}
else if (DisplayType.List == displayType)
... | return DocumentLayoutElementFieldDescriptor.LookupSource.list;
}
else if (DisplayType.isAnyLookup(displayType))
{
return DocumentLayoutElementFieldDescriptor.LookupSource.lookup;
}
else if (DisplayType.Button == displayType && adReferenceValueId != null)
{
return DocumentLayoutElementFieldDescriptor.L... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\factory\standard\DescriptorsFactoryHelper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Object getDiscountDuration() {
return discountDuration;
}
/**
* Sets the value of the discountDuration property.
*
* @param value
* allowed object is
* {@link Object }
*
*/
public void setDiscountDuration(Object value) {
this.discountD... | /**
* Payment means coded. Please use EDIFACT code list values. (PAI 4461)
*
* @return
* possible object is
* {@link String }
*
*/
public String getPaymentMeans() {
return paymentMeans;
}
/**
* Sets the value of the paymentMeans property.
*... | 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\PaymentConditionsExtensionType.java | 2 |
请完成以下Java代码 | public boolean isUseStrongUuids() {
return useStrongUuids;
}
public void setUseStrongUuids(boolean useStrongUuids) {
this.useStrongUuids = useStrongUuids;
}
public boolean isCopyVariablesToLocalForTasks() {
return copyVariablesToLocalForTasks;
}
public void setCopyVari... | }
public void setJavaClassFieldForJackson(String javaClassFieldForJackson) {
this.javaClassFieldForJackson = javaClassFieldForJackson;
}
public Integer getProcessDefinitionCacheLimit() {
return processDefinitionCacheLimit;
}
public void setProcessDefinitionCacheLimit(Integer proce... | repos\Activiti-develop\activiti-core\activiti-spring-boot-starter\src\main\java\org\activiti\spring\boot\ActivitiProperties.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public SpringBeanJobFactory springBeanJobFactory() {
AutoWiringSpringBeanJobFactory jobFactory = new AutoWiringSpringBeanJobFactory();
logger.debug("Configuring Job factory");
jobFactory.setApplicationContext(applicationContext);
return jobFactory;
}
@Bean
public Scheduler ... | PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean();
propertiesFactoryBean.setLocation(new ClassPathResource("/quartz.properties"));
propertiesFactoryBean.afterPropertiesSet();
return propertiesFactoryBean.getObject();
}
@Bean
public JobDetail jobDetail() {
... | repos\tutorials-master\spring-quartz\src\main\java\org\baeldung\springquartz\basics\scheduler\QrtzScheduler.java | 2 |
请完成以下Java代码 | public void addHandler(final IFlatrateTermEventListener handler)
{
Check.assumeNotNull(handler, "handler not null");
handlers.addIfAbsent(handler);
}
@Override
public void beforeFlatrateTermReactivate(final I_C_Flatrate_Term term)
{
handlers.forEach(h -> h.beforeFlatrateTermReactivate(term));
}
@Override... | handlers.forEach(h -> h.afterSaveOfNextTermForPredecessor(next, predecessor));
}
@Override
public void afterFlatrateTermEnded(I_C_Flatrate_Term term)
{
handlers.forEach(h -> h.afterFlatrateTermEnded(term));
}
@Override
public void beforeSaveOfNextTermForPredecessor(I_C_Flatrate_Term next, I_C_Flatrate_Ter... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\impl\CompositeFlatrateTermEventListener.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String logoutPage(){
return "logout";
}
@GetMapping("/todos")
public String todos(Model model){
model.addAttribute("todos", todoRepository.findAll());
return "todos";
}
@PostMapping("/todoNew")
public String add(@RequestParam String todoItem, @RequestParam String... | public String delete(@PathVariable long id, Model model){
todoRepository.deleteById(id);
model.addAttribute("todos", todoRepository.findAll());
return "redirect:/todos";
}
@PostMapping("/todoUpdate/{id}")
public String update(@PathVariable long id, Model model){
ToDo toDo = t... | repos\Spring-Boot-Advanced-Projects-main\SpringBoot-Todo-Project\src\main\java\spring\project\controller\ToDoController.java | 2 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public void setAD_User_ID (final int AD_User_ID)
{
if (AD_User_ID < 0)
set_ValueNoCheck (COLUMNNAME_AD_User_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_User_ID, ... | @Override
public org.compiere.model.I_CRM_Occupation getCRM_Occupation()
{
return get_ValueAsPO(COLUMNNAME_CRM_Occupation_ID, org.compiere.model.I_CRM_Occupation.class);
}
@Override
public void setCRM_Occupation(final org.compiere.model.I_CRM_Occupation CRM_Occupation)
{
set_ValueFromPO(COLUMNNAME_CRM_Occupa... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User_Occupation_Job.java | 1 |
请完成以下Java代码 | public WFProcess continueWorkflow(final WFProcessId wfProcessId, final UserId callerId)
{
final InventoryId inventoryId = toInventoryId(wfProcessId);
final Inventory inventory = jobService.reassignJob(inventoryId, callerId);
return toWFProcess(inventory);
}
@Override
public void abort(final WFProcessId wfPro... | .build())
.entry(WFProcessHeaderProperty.builder()
.caption(TranslatableStrings.adElementOrMessage("MovementDate"))
.value(TranslatableStrings.date(inventory.getMovementDate().toLocalDate()))
.build())
.entry(WFProcessHeaderProperty.builder()
.caption(TranslatableStrings.adElementOrMessa... | repos\metasfresh-new_dawn_uat\backend\de.metas.inventory.mobileui\src\main\java\de\metas\inventory\mobileui\InventoryMobileApplication.java | 1 |
请完成以下Java代码 | public GatewayFilter apply(Config config) {
return new GatewayFilter() {
final UriTemplate uriTemplate = new UriTemplate(
Objects.requireNonNull(config.prefix, "prefix must not be null"));
@Override
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
boolean alreadyPref... | };
}
public static class Config {
private @Nullable String prefix;
public @Nullable String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
}
} | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\PrefixPathGatewayFilterFactory.java | 1 |
请完成以下Java代码 | public abstract class DockerUtils {
private static final Logger LOGGER = LoggerFactory.getLogger(DockerUtils.class);
/** Environment param keys */
private static final String ENV_KEY_HOST = "JPAAS_HOST";
private static final String ENV_KEY_PORT = "JPAAS_HTTP_PORT";
private static final String ENV_K... | // not found from 'JPAAS_HTTP_PORT', then try to find from 'JPAAS_HOST_PORT_8080'
if (StringUtils.isBlank(DOCKER_PORT)) {
DOCKER_PORT = System.getenv(ENV_KEY_PORT_ORIGINAL);
}
boolean hasEnvHost = StringUtils.isNotBlank(DOCKER_HOST);
boolean hasEnvPort = StringUtils.isNotBla... | repos\Spring-Boot-In-Action-master\id-spring-boot-starter\src\main\java\com\baidu\fsg\uid\utils\DockerUtils.java | 1 |
请完成以下Java代码 | public void execute(boolean writeUserOperationLog) {
commandExecutor.execute(new ProcessInstanceModificationCmd(this, writeUserOperationLog));
}
@Override
public void execute() {
execute(true);
}
@Override
public Batch executeAsync() {
return commandExecutor.execute(new ProcessInstanceModifica... | public List<AbstractProcessInstanceModificationCommand> getInstructions() {
return instructions;
}
public void setInstructions(List<AbstractProcessInstanceModificationCommand> instructions) {
this.instructions = instructions;
}
public boolean isSkipCustomListeners() {
return skipCustomListeners;
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ModificationBuilderImpl.java | 1 |
请完成以下Java代码 | public Integer getReceiveStatus() {
return receiveStatus;
}
public void setReceiveStatus(Integer receiveStatus) {
this.receiveStatus = receiveStatus;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
publ... | public String getRegion() {
return region;
}
public void setRegion(String region) {
this.region = region;
}
public String getDetailAddress() {
return detailAddress;
}
public void setDetailAddress(String detailAddress) {
this.detailAddress = detailAddress;
}... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\OmsCompanyAddress.java | 1 |
请完成以下Java代码 | public static boolean isOverlapping(@NonNull final Range<Instant> range1, @NonNull final Range<Instant> range2)
{
if (!range1.isConnected(range2))
{
return false;
}
return !range1.intersection(range2).isEmpty();
}
/**
* Compute the days between two dates as if each year is 360 days long.
* More deta... | dayTo = dayTo.withDayOfMonth(30);
}
final long months = ChronoUnit.MONTHS.between(
YearMonth.from(dayFrom), YearMonth.from(dayTo));
final int daysLeft = dayTo.getDayOfMonth() - dayFrom.getDayOfMonth();
return 30 * months + daysLeft;
}
/**
* Compute the days between two dates as if each year is 360 d... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\TimeUtil.java | 1 |
请完成以下Java代码 | public int getSeqNoGrid()
{
return get_ValueAsInt(COLUMNNAME_SeqNoGrid);
}
@Override
public void setSeqNo_SideList (final int SeqNo_SideList)
{
set_Value (COLUMNNAME_SeqNo_SideList, SeqNo_SideList);
}
@Override
public int getSeqNo_SideList()
{
return get_ValueAsInt(COLUMNNAME_SeqNo_SideList);
}
@O... | }
/**
* WidgetSize AD_Reference_ID=540724
* Reference name: WidgetSize_WEBUI
*/
public static final int WIDGETSIZE_AD_Reference_ID=540724;
/** Small = S */
public static final String WIDGETSIZE_Small = "S";
/** Medium = M */
public static final String WIDGETSIZE_Medium = "M";
/** Large = L */
public sta... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_UI_Element.java | 1 |
请完成以下Java代码 | public void bufferedWriter10Writes() {
try (BufferedWriter writer = new BufferedWriter(new FileWriter(FILE_PATH, true), BUFSIZE)) {
for (int i = 0; i < 10; i++) {
writer.write(CONTENT);
}
writer.close();
} catch (IOException e) {
log.error(... | @Benchmark
public void fileWriter100000Writes() {
try (FileWriter writer = new FileWriter(FILE_PATH, true)) {
for (int i = 0; i < 100000; i++) {
writer.write(CONTENT);
}
writer.close();
} catch (IOException e) {
log.error("Error in File... | repos\tutorials-master\core-java-modules\core-java-io-6\src\main\java\com\baeldung\filewritervsbufferedwriter\BenchmarkWriters.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ArticlesApi {
private ArticleRepository articleRepository;
private ArticleQueryService articleQueryService;
@Autowired
public ArticlesApi(ArticleRepository articleRepository, ArticleQueryService articleQueryService) {
this.articleRepository = articleRepository;
this.article... | public ResponseEntity getArticles(@RequestParam(value = "offset", defaultValue = "0") int offset,
@RequestParam(value = "limit", defaultValue = "20") int limit,
@RequestParam(value = "tag", required = false) String tag,
... | repos\spring-boot-realworld-example-app-master (1)\src\main\java\io\spring\api\ArticlesApi.java | 2 |
请完成以下Java代码 | private boolean isAttrDocumentRelevant(final I_M_Attribute attribute)
{
final String docTableName = getSourceTableName();
if (I_C_InvoiceLine.Table_Name.equals(docTableName))
{
return attribute.isAttrDocumentRelevant();
}
else
{
return true;
}
}
public BPartnerAwareAttributeUpdater setSourceMode... | Check.assumeNotNull(bpartnerAwareFactory, "bpartnerAwareFactory not null");
return bpartnerAwareFactory;
}
public final BPartnerAwareAttributeUpdater setBPartnerAwareAttributeService(final IBPartnerAwareAttributeService bpartnerAwareAttributeService)
{
this.bpartnerAwareAttributeService = bpartnerAwareAttribute... | repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\org\adempiere\mm\attributes\api\impl\BPartnerAwareAttributeUpdater.java | 1 |
请完成以下Java代码 | public int getKeepAliveTimeMillis ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_KeepAliveTimeMillis);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Name.
@param Name Name */
@Override
public void setName (java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name... | /**
* Priority AD_Reference_ID=154
* Reference name: _PriorityRule
*/
public static final int PRIORITY_AD_Reference_ID=154;
/** High = 3 */
public static final String PRIORITY_High = "3";
/** Medium = 5 */
public static final String PRIORITY_Medium = "5";
/** Low = 7 */
public static final String PRIORITY... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java-gen\de\metas\async\model\X_C_Queue_Processor.java | 1 |
请完成以下Java代码 | public ArticleRecord values(Integer value1, String value2, String value3, Integer value4) {
value1(value1);
value2(value2);
value3(value3);
value4(value4);
return this;
}
// -------------------------------------------------------------------------
// Constructors
... | public ArticleRecord() {
super(Article.ARTICLE);
}
/**
* Create a detached, initialised ArticleRecord
*/
public ArticleRecord(Integer id, String title, String description, Integer authorId) {
super(Article.ARTICLE);
set(0, id);
set(1, title);
set(2, descri... | repos\tutorials-master\persistence-modules\jooq\src\main\java\com\baeldung\jooq\model\tables\records\ArticleRecord.java | 1 |
请完成以下Java代码 | public void onMsg(TbContext ctx, TbMsg msg) {
withCallback(transform(ctx, msg),
m -> transformSuccess(ctx, msg, m),
t -> transformFailure(ctx, msg, t),
MoreExecutors.directExecutor());
}
protected abstract C loadNodeConfiguration(TbContext ctx, TbNodeConf... | @Override
public void onSuccess() {
ctx.ack(msg);
}
@Override
public void onFailure(RuleEngineException e) {
ctx.tellFailure(msg, e);
}
});
msgs.forEach(newMsg -> ctx.enqueueF... | repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\transform\TbAbstractTransformNode.java | 1 |
请完成以下Java代码 | public boolean equals(Object o)
{
return getDelegate().equals(o);
}
@SuppressWarnings("deprecation")
@Override
public void save(OutputStream out, String comments)
{
getDelegate().save(out, comments);
}
@Override
public int hashCode()
{
return getDelegate().hashCode();
}
@Override
public void store... | @Override
public String getProperty(String key, String defaultValue)
{
return getDelegate().getProperty(key, defaultValue);
}
@Override
public Enumeration<?> propertyNames()
{
return getDelegate().propertyNames();
}
@Override
public Set<String> stringPropertyNames()
{
return getDelegate().stringProper... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\AbstractPropertiesProxy.java | 1 |
请完成以下Java代码 | public boolean unlinkModelFromMaterialTrackings(final Object model)
{
final IMaterialTrackingDAO materialTrackingDAO = Services.get(IMaterialTrackingDAO.class);
final List<I_M_Material_Tracking_Ref> existingRefs = materialTrackingDAO.retrieveMaterialTrackingRefsForModel(model);
for (final I_M_Material_Tracking_R... | }
unlinkModelFromMaterialTracking(model, exitingRef);
atLeastOneUnlinked = true;
}
return atLeastOneUnlinked;
}
private final void unlinkModelFromMaterialTracking(final Object model, final I_M_Material_Tracking_Ref ref)
{
final I_M_Material_Tracking materialTrackingOld = ref.getM_Material_Tracking();
... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\impl\MaterialTrackingBL.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Oauth2AuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler {
private final HttpCookieOAuth2AuthorizationRequestRepository httpCookieOAuth2AuthorizationRequestRepository;
private final SystemSecurityService systemSecurityService;
@Autowired
public Oauth2Authentication... | String errorPrefix;
String callbackUrlScheme = null;
OAuth2AuthorizationRequest authorizationRequest = httpCookieOAuth2AuthorizationRequestRepository.loadAuthorizationRequest(request);
if (authorizationRequest != null) {
callbackUrlScheme = authorizationRequest.getAttribute(TbOAuth2P... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\security\auth\oauth2\Oauth2AuthenticationFailureHandler.java | 2 |
请完成以下Java代码 | public void printStats() {
if (log.isDebugEnabled()) {
storage.forEach((topic, queue) -> {
if (queue.size() > 0) {
log.debug("[{}] Queue Size [{}]", topic, queue.size());
}
});
}
}
@Override
public int getLagTotal()... | @Override
public <T extends TbQueueMsg> List<T> get(String topic) throws InterruptedException {
final BlockingQueue<TbQueueMsg> queue = storage.get(topic);
if (queue != null) {
final TbQueueMsg firstMsg = queue.poll();
if (firstMsg != null) {
final int queueSi... | repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\memory\DefaultInMemoryStorage.java | 1 |
请完成以下Java代码 | protected String getInternalValueString()
{
return attributeInstance.getValue();
}
@Override
protected BigDecimal getInternalValueNumber()
{
return attributeInstance.getValueNumber();
}
@Override
protected String getInternalValueStringInitial()
{
return null;
}
/**
* @return <code>null</code>.
*... | * @return {@link CopyHUAttributeTransferStrategy#instance}.
*/
@Override
public IHUAttributeTransferStrategy retrieveTransferStrategy()
{
return CopyHUAttributeTransferStrategy.instance;
}
/**
* @return {@code true}.
*/
@Override
public boolean isReadonlyUI()
{
return true;
}
/**
* @return {@cod... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\AIAttributeValue.java | 1 |
请完成以下Java代码 | public List<Model> executeList(CommandContext commandContext, Page page) {
checkQueryOk();
return commandContext.getModelEntityManager().findModelsByQueryCriteria(this, page);
}
// getters ////////////////////////////////////////////
public String getId() {
return id;
}
pu... | return key;
}
public boolean isLatest() {
return latest;
}
public String getDeploymentId() {
return deploymentId;
}
public boolean isNotDeployed() {
return notDeployed;
}
public boolean isDeployed() {
return deployed;
}
public String getTenant... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\ModelQueryImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable String getUsername() {
return this.username;
}
public void setUsername(@Nullable String username) {
this.username = username;
}
public @Nullable String getPassword() {
return this.password;
}
public void setPassword(@Nullable String password) {
this.password = password;
}
... | public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public @Nullable Resource getSchema() {
return this.schema;
}
public void setSchema(@Nullable Resource schema) {
this.schema = schema;
}
}
} | repos\spring-boot-4.0.1\module\spring-boot-ldap\src\main\java\org\springframework\boot\ldap\autoconfigure\embedded\EmbeddedLdapProperties.java | 2 |
请完成以下Java代码 | public Book where(Condition condition) {
return new Book(getQualifiedName(), aliased() ? this : null, null, condition);
}
/**
* Create an inline derived table from this table
*/
@Override
public Book where(Collection<? extends Condition> conditions) {
return where(DSL.and(cond... | @PlainSQL
public Book where(@Stringly.SQL String condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public Book where(@Stringly.SQL String condition, Object... binds) {
return where(DSL.con... | repos\tutorials-master\persistence-modules\jooq\src\main\java\com\baeldung\jooq\jointables\public_\tables\Book.java | 1 |
请完成以下Java代码 | private static void markCovered(final boolean[] pagesCovered,
final int pageFrom,
final int pageTo)
{
for (int i = pageFrom; i <= pageTo; i++)
{
pagesCovered[i - 1] = true;
}
}
public boolean hasData()
{
return data != null;
}
public int getNumberOfPages()
{
Integer numberOfPages... | {
}
}
}
}
public PrintingData onlyWithType(@NonNull final OutputType outputType)
{
final ImmutableList<PrintingSegment> filteredSegments = segments.stream()
.filter(segment -> segment.isMatchingOutputType(outputType))
.collect(ImmutableList.toImmutableList());
return toBuilder()
.clearSegm... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\printingdata\PrintingData.java | 1 |
请完成以下Java代码 | public boolean callStoredProcedure() throws SQLException {
try (CallableStatement callableStatement = connection.prepareCall("{CALL InsertMultipleUsers()}")) {
callableStatement.execute();
return true;
}
}
public List<User> executeMultipleSelectStatements() throws SQ... | do {
try (ResultSet resultSet = statement.getResultSet()) {
while (resultSet != null && resultSet.next()) {
int id = resultSet.getInt("id");
String name = resultSet.getString("name");
String email = resultSet.get... | repos\tutorials-master\persistence-modules\core-java-persistence-4\src\main\java\com\baeldung\sql\MultipleSQLExecution.java | 1 |
请完成以下Java代码 | public class Todo {
public Todo() {
}
public Todo(String title, String text) {
this.title = title;
this.text = text;
createdOn = new Date();
}
private String title;
private String text;
private boolean done = false;
private Date createdOn;
private Date com... | public boolean getDone() {
return done;
}
public Date getCreatedOn() {
return createdOn;
}
public Date getCompletedOn() {
return completedOn;
}
public void setDone(boolean done) {
this.done = done;
}
public void setCompletedOn(Date completedOn) {
... | repos\tutorials-master\mustache\src\main\java\com\baeldung\mustache\model\Todo.java | 1 |
请完成以下Java代码 | public org.compiere.model.I_C_DataImport getC_DataImport()
{
return get_ValueAsPO(COLUMNNAME_C_DataImport_ID, org.compiere.model.I_C_DataImport.class);
}
@Override
public void setC_DataImport(org.compiere.model.I_C_DataImport C_DataImport)
{
set_ValueFromPO(COLUMNNAME_C_DataImport_ID, org.compiere.model.I_C_D... | public int getC_DataImport_Run_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_DataImport_Run_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Beleg fertig stellen.
@param IsDocComplete
Legt fest, ob ggf erstellte Belege (z.B. Produktionsaufträge) auch direkt automatisch fertig ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_DataImport_Run.java | 1 |
请完成以下Spring Boot application配置 | spring.jackson.serialization.fail-on-empty-beans=false
server.servlet.session.timeout=65s
spring.mvc.view.prefix=/WEB-INF/view/
spring.mvc.view.suffix=.jsp
## Secure Session Cookie configurations
# | server.servlet.session.cookie.http-only=true
#server.servlet.session.cookie.secure=true | repos\tutorials-master\spring-security-modules\spring-security-web-mvc\src\main\resources\application.properties | 2 |
请完成以下Java代码 | private OrderQueryReq buildOrderQueryReq(String orderId, String buyerId) {
OrderQueryReq orderQueryReq = new OrderQueryReq();
orderQueryReq.setId(orderId);
orderQueryReq.setBuyerId(buyerId);
return orderQueryReq;
}
/**
* 构建prodIdCountMap
* @param ordersEntity 订单详情
... | /**
* 将prodIdCountMap装入Context
* @param prodIdCountMap
* @param payModeEnum
* @param orderProcessContext
*/
private void setIntoContext(Map<String, Integer> prodIdCountMap, PayModeEnum payModeEnum, OrderProcessContext orderProcessContext) {
// 构造 订单插入请求
OrderInsertReq order... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Order\src\main\java\com\gaoxi\order\component\datatransfer\ProdIdCountMapTransferComponent.java | 1 |
请完成以下Java代码 | public List<DDOrderReference> getCollectedItems()
{
processPendingRequests();
return _result;
}
@NonNull
private DistributionJobLoader newLoader()
{
return new DistributionJobLoader(loadingSupportServices);
}
private void processPendingRequests()
{
if (collectedDDOrders.isEmpty()) {return;}
newLoad... | .documentNo(job.getDocumentNo())
.seqNo(job.getSeqNo())
.datePromised(job.getDateRequired())
.pickDate(job.getPickDate())
.fromWarehouseId(job.getPickFromWarehouse().getWarehouseId())
.toWarehouseId(job.getDropToWarehouse().getWarehouseId())
.salesOrderId(job.getSalesOrderRef() != null ? job.get... | repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\launchers\DDOrderReferenceCollector.java | 1 |
请完成以下Java代码 | public void setRenderedAddressAndCapturedLocation(final @NonNull RenderedAddressAndCapturedLocation from)
{
IDocumentBillLocationAdapter.super.setRenderedAddressAndCapturedLocation(from);
}
@Override
public void setRenderedAddress(final @NonNull RenderedAddressAndCapturedLocation from)
{
IDocumentBillLocation... | return delegate;
}
@Override
public Optional<DocumentLocation> toPlainDocumentLocation(final IDocumentLocationBL documentLocationBL)
{
return documentLocationBL.toPlainDocumentLocation(this);
}
@Override
public OrderBillLocationAdapter toOldValues()
{
InterfaceWrapperHelper.assertNotOldValues(delegate);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\location\adapter\OrderBillLocationAdapter.java | 1 |
请完成以下Java代码 | private static final class VEditorInnerTextComponentUI implements PropertyChangeListener
{
public static final transient VEditorInnerTextComponentUI instance = new VEditorInnerTextComponentUI();
/** Component's UI property */
private static final String PROPERTY_UI = "UI";
private VEditorInnerTextComponentUI... | @Override
public void propertyChange(PropertyChangeEvent evt)
{
if (PROPERTY_UI.equals(evt.getPropertyName()))
{
final JComponent comp = (JComponent)evt.getSource();
updateUI(comp);
}
}
}
private VEditorUtils()
{
super();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VEditorUtils.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private String determineEmbeddedUsername(R2dbcProperties properties) {
String username = ifHasText(properties.getUsername());
return (username != null) ? username : "sa";
}
private ConnectionFactoryBeanCreationException connectionFactoryBeanCreationException(String message,
@Nullable String r2dbcUrl, Embedded... | EmbeddedDatabaseConnection embeddedDatabaseConnection) {
super(message);
this.url = url;
this.embeddedDatabaseConnection = embeddedDatabaseConnection;
}
@Nullable String getUrl() {
return this.url;
}
EmbeddedDatabaseConnection getEmbeddedDatabaseConnection() {
return this.embeddedDatabaseConnec... | repos\spring-boot-4.0.1\module\spring-boot-r2dbc\src\main\java\org\springframework\boot\r2dbc\autoconfigure\ConnectionFactoryOptionsInitializer.java | 2 |
请完成以下Java代码 | private int appendNode()
{
int id;
if (_recycleBin.empty())
{
id = _nodes.size();
_nodes.add(new DawgNode());
}
else
{
id = _recycleBin.get(_recycleBin.size() - 1);
_nodes.get(id).reset();
_recycleBin.deleteL... | private static int hash(int key)
{
key = ~key + (key << 15); // key = (key << 15) - key - 1;
key = key ^ (key >>> 12);
key = key + (key << 2);
key = key ^ (key >>> 4);
key = key * 2057; // key = (key + (key << 3)) + (key << 11);
key = key ^ (key >>> 16);
ret... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\dartsclone\details\DawgBuilder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setDateEnd(final LocalDate dateEnd)
{
this.dateEnd = DateUtils.toSqlDate(dateEnd);
}
public Long getBpartnerId()
{
return getBpartner().getId();
}
public LocalDate getDateClose()
{
return DateUtils.toLocalDate(dateClose);
}
public void setDateClose(final LocalDate dateClose)
{
this.date... | rfqQty.setRfq(this);
quantities.add(rfqQty);
}
@Nullable
public RfqQty getRfqQtyByDate(@NonNull final LocalDate date)
{
for (final RfqQty rfqQty : quantities)
{
if (date.equals(rfqQty.getDatePromised()))
{
return rfqQty;
}
}
return null;
}
private void updateConfirmedByUser()
{
this.c... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\model\Rfq.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void requestOrdersStatus() throws Exception{
List<Orders> ordersList = orderRepository.findAllByStatusAndPaymentNumberIsNotNull(OrderStatus.awaitingPayment);
for(Orders orders: ordersList){
PaymentStatusResponse paymentStatusResponse = paymentService.getPaymentStatus(orders.getPaymen... | break;
case "client_inside":
ordersSave(orders, OrderStatus.deliveryInProgress, mapResult);
break;
case "finished":
ordersSave(orders, OrderStatus.awaitingConfirmation, mapResult);
bre... | repos\SpringBoot-Projects-FullStack-master\Part-9.SpringBoot-React-Projects\Project-2.SpringBoot-React-ShoppingMall\fullstack\backend\src\main\java\com\urunov\schedule\OrderStatusRequester.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void audit(String userNo, String auditStatus){
RpUserPayConfig rpUserPayConfig = getByUserNo(userNo, null);
if(rpUserPayConfig == null){
throw new PayBizException(PayBizException.USER_PAY_CONFIG_IS_NOT_EXIST,"支付配置不存在!");
}
if(auditStatus.equals(PublicEnum.YES.name())){
//检查是否已关联生效的支付产品
RpPayP... | updateData(rpUserPayConfig);
}
/**
* 根据商户key获取已生效的支付配置
* @param payKey
* @return
*/
public RpUserPayConfig getByPayKey(String payKey){
Map<String , Object> paramMap = new HashMap<String , Object>();
paramMap.put("payKey", payKey);
paramMap.put("status", PublicStatusEnum.ACTIVE.name());
... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\user\service\impl\RpUserPayConfigServiceImpl.java | 2 |
请完成以下Java代码 | public boolean isZero()
{
return amtSource.signum() == 0 && amtAcct.signum() == 0;
}
public boolean isZeroAmtSource()
{
return amtSource.signum() == 0;
}
public AmountSourceAndAcct negate()
{
return isZero()
? this
: toBuilder().amtSource(this.amtSource.negate()).amtAcct(this.amtAcct.... | .amtAcct(this.amtAcct.add(other.amtAcct))
.build();
}
}
public AmountSourceAndAcct subtract(@NonNull final AmountSourceAndAcct other)
{
return add(other.negate());
}
private void assertCurrencyAndRateMatching(@NonNull final AmountSourceAndAcct other)
{
if (!Objects.equals(this.currencyAndRa... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java-legacy\org\compiere\acct\Doc_BankStatement.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class JsonCreatedUpdatedInfo
{
@ApiModelProperty( //
allowEmptyValue = false, //
dataType = "java.lang.Integer", //
value = "This translates to `AD_User_ID`.")
UserId createdBy;
ZonedDateTime created;
@ApiModelProperty( //
allowEmptyValue = false, //
dataType = "java.lang.Integer", //
val... | @Builder
@JsonCreator
private JsonCreatedUpdatedInfo(
@NonNull @JsonProperty("createdBy") final UserId createdBy,
@NonNull @JsonProperty("created") final ZonedDateTime created,
@NonNull @JsonProperty("updatedBy") final UserId updatedBy,
@NonNull @JsonProperty("updated") final ZonedDateTime updated)
{
t... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\utils\JsonCreatedUpdatedInfo.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private void validateAlgorithm(Token token) {
String algorithm = token.getSignatureAlgorithm();
if (algorithm == null) {
throw new CloudFoundryAuthorizationException(Reason.INVALID_SIGNATURE, "Signing algorithm cannot be null");
}
if (!algorithm.equals("RS256")) {
throw new CloudFoundryAuthorizationExcept... | private PublicKey getPublicKey(String key) throws NoSuchAlgorithmException, InvalidKeySpecException {
key = key.replace("-----BEGIN PUBLIC KEY-----\n", "");
key = key.replace("-----END PUBLIC KEY-----", "");
key = key.trim().replace("\n", "");
byte[] bytes = Base64.getDecoder().decode(key);
X509EncodedKeySpec... | repos\spring-boot-4.0.1\module\spring-boot-cloudfoundry\src\main\java\org\springframework\boot\cloudfoundry\autoconfigure\actuate\endpoint\servlet\TokenValidator.java | 2 |
请完成以下Java代码 | public static long getSerialversionuid() {
return serialVersionUID;
}
public String getKey() {
return key;
}
public boolean isLatest() {
return latest;
}
public String getDeploymentId() {
return deploymentId;
}
public boolean isNotDeployed() {
... | }
public boolean isDeployed() {
return deployed;
}
public String getTenantId() {
return tenantId;
}
public String getTenantIdLike() {
return tenantIdLike;
}
public boolean isWithoutTenantId() {
return withoutTenantId;
}
} | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\ModelQueryImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setAdditionalAddress2(String additionalAddress2) {
this.additionalAddress2 = additionalAddress2;
}
public OrderDeliveryAddress postalCode(String postalCode) {
this.postalCode = postalCode;
return this;
}
/**
* Get postalCode
* @return postalCode
**/
@Schema(example = "90489"... | @Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OrderDeliveryAddress {\n");
sb.append(" gender: ").append(toIndentedString(gender)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" name: ").app... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-orders-api\src\main\java\io\swagger\client\model\OrderDeliveryAddress.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public DataResponse<HistoricDetailResponse> getHistoricDetailInfo(@ApiParam(hidden = true) @RequestParam Map<String, String> allRequestParams) {
// Populate query based on request
HistoricDetailQueryRequest queryRequest = new HistoricDetailQueryRequest();
if (allRequestParams.get("id") != null)... | }
if (allRequestParams.get("taskId") != null) {
queryRequest.setTaskId(allRequestParams.get("taskId"));
}
if (allRequestParams.get("selectOnlyFormProperties") != null) {
queryRequest.setSelectOnlyFormProperties(Boolean.valueOf(allRequestParams.get("selectOnlyFormPropert... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricDetailCollectionResource.java | 2 |
请完成以下Java代码 | public class CoapEfentoUtils {
public static final int PULSE_CNT_ACC_MINOR_METADATA_FACTOR = 6;
public static final int PULSE_CNT_ACC_MAJOR_METADATA_FACTOR = 4;
public static final int ELEC_METER_ACC_MINOR_METADATA_FACTOR = 6;
public static final int ELEC_METER_ACC_MAJOR_METADATA_FACTOR = 4;
public... | values.addProperty("serial", serialNumber);
values.addProperty("battery", batteryStatus ? "ok" : "low");
values.addProperty("measured_at", convertTimestampToUtcString(startTimestampMillis));
values.addProperty("next_transmission_at", convertTimestampToUtcString(nextTransmissionAtMillis));
... | repos\thingsboard-master\common\transport\coap\src\main\java\org\thingsboard\server\transport\coap\efento\utils\CoapEfentoUtils.java | 1 |
请完成以下Java代码 | public static File getClasspathFile(String filename) {
if(filename == null) {
throw LOG.nullParameter("filename");
}
return getClasspathFile(filename, null);
}
/**
* Returns the File for a filename.
*
* @param filename the filename to load
* @param classLoader the classLoader to load... | // Try the current Thread context classloader
classLoader = Thread.currentThread().getContextClassLoader();
fileUrl = classLoader.getResource(filename);
if (fileUrl == null) {
// Finally, try the classloader for this class
classLoader = IoUtil.class.getClassLoader();
fileUrl =... | repos\camunda-bpm-platform-master\commons\utils\src\main\java\org\camunda\commons\utils\IoUtil.java | 1 |
请完成以下Java代码 | public static final Object[] getUIDefaults()
{
return new Object[] {
//
// Notifications settings
NOTIFICATIONS_MaxDisplayed, NOTIFICATIONS_MaxDisplayed_Default
, NOTIFICATIONS_AutoFadeAwayTimeMillis, NOTIFICATIONS_AutoFadeAwayTimeMillis_Default
, NOTIFICATIONS_BottomGap, NOTIFICATIONS_BottomGap_... | , ITEM_MinimumSize, new DimensionUIResource(230, 45)
, ITEM_MaximumSize, null
//
// Button settings (i.e. the close button)
, ITEM_Button_Insets, new InsetsUIResource(1, 4, 1, 4)
, ITEM_Button_Size, 20
, ITEM_Button_Border, new BorderUIResource(BorderFactory.createEmptyBorder())
};
}
privat... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\plaf\SwingEventNotifierUI.java | 1 |
请完成以下Java代码 | public String toString()
{
StringBuffer sb = new StringBuffer ("X_CM_AccessContainer[")
.append(get_ID()).append("]");
return sb.toString();
}
public I_CM_AccessProfile getCM_AccessProfile() throws RuntimeException
{
return (I_CM_AccessProfile)MTable.get(getCtx(), I_CM_AccessProfile.... | public void setCM_Container_ID (int CM_Container_ID)
{
if (CM_Container_ID < 1)
set_ValueNoCheck (COLUMNNAME_CM_Container_ID, null);
else
set_ValueNoCheck (COLUMNNAME_CM_Container_ID, Integer.valueOf(CM_Container_ID));
}
/** Get Web Container.
@return Web Container contains content like images, text e... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_AccessContainer.java | 1 |
请完成以下Java代码 | public void setPrintServiceName (java.lang.String PrintServiceName)
{
set_ValueNoCheck (COLUMNNAME_PrintServiceName, PrintServiceName);
}
@Override
public java.lang.String getPrintServiceName()
{
return (java.lang.String)get_Value(COLUMNNAME_PrintServiceName);
}
@Override
public void setPrintServiceTray ... | {
return get_ValueAsBoolean(COLUMNNAME_Status_Print_Job_Instructions);
}
@Override
public void setTrayNumber (int TrayNumber)
{
set_ValueNoCheck (COLUMNNAME_TrayNumber, Integer.valueOf(TrayNumber));
}
@Override
public int getTrayNumber()
{
return get_ValueAsInt(COLUMNNAME_TrayNumber);
}
@Override
p... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_C_Order_MFGWarehouse_Report_PrintInfo_v.java | 1 |
请完成以下Java代码 | public boolean isCondition() {
return (this.environment != null) && this.environment.acceptsProfiles(this.profiles);
}
@PluginBuilderFactory
static Builder newBuilder() {
return new Builder();
}
/**
* Standard Builder to create the Arbiter.
*/
static final class Builder implements org.apache.logging.log... | * @param name the profile name or expression
* @return this
* @see Profiles#of(String...)
*/
public Builder setName(String name) {
this.name = name;
return this;
}
@Override
public SpringProfileArbiter build() {
Environment environment = Log4J2LoggingSystem.getEnvironment(this.loggerContext);... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\logging\log4j2\SpringProfileArbiter.java | 1 |
请完成以下Java代码 | private void startQueueProcessors()
{
// task 04585: start queue processors only if we are running on the backend server.
// =>why not always run them?
// if we start it on clients without having a central monitoring-gathering point we never know what's going on
// => it can all be solved, but as of now isn't
... | public void onUserLogin(final int AD_Org_ID, final int AD_Role_ID, final int AD_User_ID)
{
if (!Ini.isSwingClient())
{
return;
}
final int delayMillis = getInitDelayMillis();
Services.get(IQueueProcessorExecutorService.class).init(delayMillis);
}
/**
* Destroy all queueud processors on user logout.
... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\model\validator\Main.java | 1 |
请完成以下Java代码 | public Duration getTimeout() {
return this.timeout;
}
public void setTimeout(Duration timeout) {
this.timeout = timeout;
}
public List<String> getArguments() {
return this.arguments;
}
}
/**
* Profiles properties.
*/
public static class Profiles {
/**
* Docker compose profiles that s... | public void setTimeout(Duration timeout) {
this.timeout = timeout;
}
public Tcp getTcp() {
return this.tcp;
}
/**
* Readiness wait strategies.
*/
public enum Wait {
/**
* Always perform readiness checks.
*/
ALWAYS,
/**
* Never perform readiness checks.
*/
NEVER,
... | repos\spring-boot-4.0.1\core\spring-boot-docker-compose\src\main\java\org\springframework\boot\docker\compose\lifecycle\DockerComposeProperties.java | 1 |
请完成以下Java代码 | public String getSameSiteCookieValue() {
return sameSiteCookieValue;
}
public void setSameSiteCookieValue(String sameSiteCookieValue) {
this.sameSiteCookieValue = sameSiteCookieValue;
}
public String getCookieName() {
return cookieName;
}
public void setCookieName(String cookieName) {
thi... | }
if (StringUtils.isNotBlank(cookieName)) {
initParams.put("cookieName", cookieName);
}
return initParams;
}
@Override
public String toString() {
return joinOn(this.getClass())
.add("targetOrigin=" + targetOrigin)
.add("denyStatus='" + denyStatus + '\'')
.add("randomClas... | repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\CsrfProperties.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected boolean isAsyncExecutorActive() {
return isExecutorActive(jobServiceConfiguration.getAsyncExecutor());
}
protected boolean isAsyncExecutorRemainingCapacitySufficient(int neededCapacity) {
return getAsyncExecutor().isActive() && getAsyncExecutor().getTaskExecutor().getRemainingCapacity... | return jobServiceConfiguration.getAsyncExecutor();
}
protected AsyncExecutor getAsyncHistoryExecutor() {
return jobServiceConfiguration.getAsyncHistoryExecutor();
}
protected void callJobProcessors(JobProcessorContext.Phase processorType, AbstractJobEntity abstractJobEntity) {
JobP... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\asyncexecutor\DefaultJobManager.java | 2 |
请完成以下Java代码 | 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;
} | public String getImagePath() {
return imagePath;
}
public void setImagePath(String imagePath) {
this.imagePath = imagePath;
}
public Integer getReadSum() {
return readSum;
}
public void setReadSum(Integer readSum) {
this.readSum = readSum;
}
} | repos\springBoot-master\springboot-dynamicDataSource\src\main\java\cn\abel\bean\News.java | 1 |
请完成以下Java代码 | private ProductsProposalRowsLoader createRowsLoaderFromOrderId(@NonNull final OrderId orderId)
{
final Order order = orderProductProposalsService.getOrderById(orderId);
final CampaignPriceProvider campaignPriceProvider = createCampaignPriceProvider(order);
return ProductsProposalRowsLoader.builder()
.looku... | {
return ImmutableList.of(
createProcessDescriptor(WEBUI_ProductsProposal_SaveProductPriceToCurrentPriceListVersion.class),
createProcessDescriptor(WEBUI_ProductsProposal_ShowProductsToAddFromBasePriceList.class),
createProcessDescriptor(WEBUI_ProductsProposal_ShowProductsSoldToOtherCustomers.class),
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\products_proposal\view\OrderProductsProposalViewFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ViewConfiguration implements InitializingBean
{
private static final Logger logger = LogManager.getLogger(ViewConfiguration.class);
private static final String SYSCONFIG_ClearViewSelectionsRateInSeconds = "metasfresh.view.clearViewSelectionsRateInSeconds";
@Override
public void afterPropertiesSet()
... | }
else
{
logger.info("Clearing view selections disabled (see {} sysconfig)", SYSCONFIG_ClearViewSelectionsRateInSeconds);
}
}
private ScheduledExecutorService viewMaintenanceScheduledExecutorService()
{
return Executors.newScheduledThreadPool(
1, // corePoolSize
CustomizableThreadFactory.builder(... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ViewConfiguration.java | 2 |
请完成以下Java代码 | public boolean doCatch(final Throwable e)
{
final String errmsg = "@Error@: @C_Payment_ID@ " + payment.getDocumentNo() + ": " + e.getLocalizedMessage();
addLog(errmsg);
log.error(errmsg, e);
return true; // rollback
}
});
}
private Iterator<I_C_Payment> retrievePayments()
{
final Stopwatch... | queryBuilder.addEqualsFilter(I_C_Payment.COLUMNNAME_IsReceipt, p_SOTrx.toBoolean());
}
if (p_PaymentDateFrom != null)
{
queryBuilder.addCompareFilter(I_C_Payment.COLUMNNAME_DateTrx, Operator.GREATER_OR_EQUAL, p_PaymentDateFrom);
}
if (p_PaymentDateTo != null)
{
queryBuilder.addCompareFilter(I_C_Payme... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\payment\process\C_Payment_MassWriteOff.java | 1 |
请完成以下Java代码 | public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
VariableInstanceEntity other = (VariableInstanceEntity) obj;
if (id == null) {
if (other.id != null)
return false;
} el... | if (processInstanceId != null){
referenceIdAndClass.put(processInstanceId, ExecutionEntity.class);
}
if (executionId != null){
referenceIdAndClass.put(executionId, ExecutionEntity.class);
}
if (caseInstanceId != null){
referenceIdAndClass.put(caseInstanceId, CaseExecutionEntity.class);... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\VariableInstanceEntity.java | 1 |
请完成以下Java代码 | public int getSeqNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo);
if (ii == null)
return 0;
return ii.intValue();
}
@Override
public boolean isTree()
{
Object oo = get_Value(COLUMNNAME_IsTree);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue(); ... | }
public String getColumnName ()
{
return (String)get_Value(COLUMNNAME_ColumnName);
}
/** Set Query Criteria Function.
@param QueryCriteriaFunction
column used for adding a sql function to query criteria
*/
public void setQueryCriteriaFunction (String QueryCriteriaFunction)
{
set_Value (COLUMNNAME_Q... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_InfoColumn.java | 1 |
请完成以下Java代码 | public void rollbackAndCloseActiveTrx(final String trxName)
{
final ITrxManager trxManager = getTrxManager();
if (trxManager.isNull(trxName))
{
throw new IllegalArgumentException("Only not null transactions are allowed: " + trxName);
}
final ITrx trx = trxManager.getTrx(trxName);
if (trxManager.isNull(... | if (!rollbackOk)
{
throw new RuntimeException("Could not rollback '" + trx + "' for unknown reason");
}
}
@Override
public void setDebugConnectionBackendId(boolean debugConnectionBackendId)
{
getTrxManager().setDebugConnectionBackendId(debugConnectionBackendId);
}
@Override
public boolean isDebugConn... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\jmx\JMXTrxManager.java | 1 |
请完成以下Java代码 | public ModelApiResponse type(String type) {
this.type = type;
return this;
}
/**
* Get type
* @return type
**/
@ApiModelProperty(value = "")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public ModelApiResponse message(String ... | if (o == null || getClass() != o.getClass()) {
return false;
}
ModelApiResponse _apiResponse = (ModelApiResponse) o;
return Objects.equals(this.code, _apiResponse.code) &&
Objects.equals(this.type, _apiResponse.type) &&
Objects.equals(this.message, _apiResponse.message);
}
@Overri... | repos\tutorials-master\spring-swagger-codegen-modules\spring-swagger-codegen-api-client\src\main\java\com\baeldung\petstore\client\model\ModelApiResponse.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void handleComponentLifecycleEvent(ComponentLifecycleMsg event) {
if (event.getEntityId().getEntityType() == EntityType.TENANT) {
if (event.getEvent() == ComponentLifecycleEvent.DELETED) {
List<QueueKey> toRemove = consumers.keySet().stream()
.filter(qu... | .scheduler(scheduler)
.taskExecutor(mgmtExecutor)
.build();
consumers.put(queueKey, consumer);
consumer.init(queue);
return consumer;
}
private Optional<TbRuleEngineQueueConsumerManager> removeConsumer(QueueKey queueKey) {
return Optional.ofNullab... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\queue\DefaultTbRuleEngineConsumerService.java | 2 |
请完成以下Java代码 | public void onEvent(ActivitiEvent event) {
if (isValidEvent(event)) {
getDelegateInstance().onEvent(event);
}
}
@Override
public boolean isFailOnException() {
if (delegateInstance != null) {
return delegateInstance.isFailOnException();
}
retur... | if (delegateInstance == null) {
Object instance = ReflectUtil.instantiate(className);
if (instance instanceof ActivitiEventListener) {
delegateInstance = (ActivitiEventListener) instance;
} else {
// Force failing of the listener invocation, since the ... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\helper\DelegateActivitiEventListener.java | 1 |
请完成以下Java代码 | public boolean isAckAfterHandle() {
return this.ackAfterHandle;
}
@Override
public void setAckAfterHandle(boolean ackAfterHandle) {
this.ackAfterHandle = ackAfterHandle;
}
@Override
public boolean handleOne(Exception thrownException, ConsumerRecord<?, ?> record, Consumer<?, ?> consumer,
MessageListenerCo... | StringBuilder message = new StringBuilder("Error occurred while processing:\n");
for (ConsumerRecord<?, ?> record : data) {
message.append(KafkaUtils.format(record)).append('\n');
}
LOGGER.error(thrownException, () -> message.substring(0, message.length() - 1));
}
@Override
public void handleOtherException... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\CommonLoggingErrorHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public CalculatedFieldType getType() {
return CalculatedFieldType.PROPAGATION;
}
@Override
public void validate() {
baseCalculatedFieldRestriction();
propagationRestriction();
if (!applyExpressionToResolvedArguments) {
arguments.forEach((name, argument) -> {
... | }
}
}
public Argument toPropagationArgument() {
var refDynamicSourceConfiguration = new RelationPathQueryDynamicSourceConfiguration();
refDynamicSourceConfiguration.setLevels(List.of(relation));
var propagationArgument = new Argument();
propagationArgument.setRefDynamicS... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\cf\configuration\PropagationCalculatedFieldConfiguration.java | 2 |
请完成以下Java代码 | public void setDLM_Partition_ID(final int DLM_Partition_ID)
{
if (DLM_Partition_ID < 1)
{
set_ValueNoCheck(COLUMNNAME_DLM_Partition_ID, null);
}
else
{
set_ValueNoCheck(COLUMNNAME_DLM_Partition_ID, Integer.valueOf(DLM_Partition_ID));
}
}
/**
* Get Partition.
*
* @return Partition
*/
@Ove... | else
{
set_Value(COLUMNNAME_Record_ID, Integer.valueOf(Record_ID));
}
}
/**
* Get Datensatz-ID.
*
* @return Direct internal record ID
*/
@Override
public int getRecord_ID()
{
final Integer ii = (Integer)get_Value(COLUMNNAME_Record_ID);
if (ii == null)
{
return 0;
}
return ii.intValue(... | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java-gen\de\metas\dlm\model\X_DLM_Partition_Workqueue.java | 1 |
请完成以下Java代码 | Set<String> getRouteEnabledHeaders() {
return routeEnabledHeaders;
}
/**
* bind the route specific/opt-out header names to disable, in lower case.
*/
void setDisable(Set<String> disable) {
if (disable != null) {
this.routeFilterConfigProvided = true;
this.routeDisabledHeaders = disable.stream... | * bind the route specific/opt-out permissions policy.
*/
void setPermissionsPolicy(@Nullable String permissionsPolicy) {
this.routeFilterConfigProvided = true;
this.routePermissionsPolicyHeaderValue = permissionsPolicy;
}
/**
* @return flag whether route specific arguments were bound.
*/
boolean... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\SecureHeadersGatewayFilterFactory.java | 1 |
请完成以下Java代码 | public void setProcessInstanceId(String processInstanceId) {
this.processInstanceId = processInstanceId;
}
public void setProcessDefinitionId(String processDefinitionId) {
this.processDefinitionId = processDefinitionId;
}
public void setProcessDefinitionKey(String processDefinitionKey) {
this.proc... | } else {
updateSuspensionStateBuilder.activate();
}
}
protected UpdateJobSuspensionStateBuilder createUpdateSuspensionStateBuilder(ProcessEngine engine) {
UpdateJobSuspensionStateSelectBuilder selectBuilder = engine.getManagementService().updateJobSuspensionState();
if (jobId != null) {
re... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\JobSuspensionStateDto.java | 1 |
请完成以下Java代码 | public void setRequestMatcher(RequestMatcher requestMatcher) {
Assert.notNull(requestMatcher, "requestMatcher cannot be null");
this.matcher = requestMatcher;
}
@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException... | * Sets the {@link PublicKeyCredentialCreationOptionsRepository} to use. The default
* is {@link HttpSessionPublicKeyCredentialCreationOptionsRepository}.
* @param creationOptionsRepository the
* {@link PublicKeyCredentialCreationOptionsRepository} to use. Cannot be null.
*/
public void setCreationOptionsReposi... | repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\registration\PublicKeyCredentialCreationOptionsFilter.java | 1 |
请完成以下Java代码 | public class HttpExchangesWebFilter implements WebFilter, Ordered {
private static final Object NONE = new Object();
// Not LOWEST_PRECEDENCE, but near the end, so it has a good chance of catching all
// enriched headers, but users can add stuff after this if they want to
private int order = Ordered.LOWEST_PRECED... | });
}
/**
* A {@link Principal} and {@link WebSession}.
*/
private static class PrincipalAndSession {
private final @Nullable Principal principal;
private final @Nullable WebSession session;
PrincipalAndSession(Object[] zipped) {
this.principal = (zipped[0] != NONE) ? (Principal) zipped[0] : null;
... | repos\spring-boot-4.0.1\module\spring-boot-webflux\src\main\java\org\springframework\boot\webflux\actuate\web\exchanges\HttpExchangesWebFilter.java | 1 |
请完成以下Java代码 | public PageData<WidgetTypeId> findAllWidgetTypesIds(PageLink pageLink) {
return widgetTypeDao.findAllWidgetTypesIds(pageLink);
}
@Override
public void deleteByTenantId(TenantId tenantId) {
deleteWidgetTypesByTenantId(tenantId);
}
@Override
public Optional<HasId<?>> findEntity(T... | }
};
private final PaginatedRemover<WidgetsBundleId, WidgetTypeInfo> bundleWidgetTypesRemover = new PaginatedRemover<>() {
@Override
protected PageData<WidgetTypeInfo> findEntities(TenantId tenantId, WidgetsBundleId widgetsBundleId, PageLink pageLink) {
return findWidgetTypesInfos... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\widget\WidgetTypeServiceImpl.java | 1 |
请完成以下Java代码 | protected Cache createCache(Class<? extends Cache> cacheClass, Map<String, Object> cacheConfiguration) {
Cache cache = createCacheInstance(cacheClass);
configureCache(cache, cacheConfiguration);
return cache;
}
protected void configureCache(Cache cache, Map<String, Object> cacheConfiguration) {
for... | if (setter == null) {
throw new HalRelationCacheConfigurationException("Unable to find setter for property " + property);
}
try {
setter.invoke(cache, value);
} catch (IllegalAccessException e) {
throw new HalRelationCacheConfigurationException("Unable to access setter for property " + p... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\hal\cache\HalRelationCacheBootstrap.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BatchPartCollectionResource {
@Autowired
protected RestResponseFactory restResponseFactory;
@Autowired
protected ManagementService managementService;
@Autowired(required=false)
protected BpmnRestApiInterceptor restApiInterceptor;
@ApiOperation(value = "List batch parts",... | if (restApiInterceptor != null) {
restApiInterceptor.accessBatchPartInfoOfBatch(batch);
}
List<BatchPart> batchParts = null;
if (allRequestParams.containsKey("status")) {
batchParts = managementService.findBatchPartsByBatchIdAndStatus(batchId, allRequestParams.ge... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\management\BatchPartCollectionResource.java | 2 |
请完成以下Java代码 | public String getExecutable() {
String os = System.getProperty("os.name").toLowerCase();
String dirPath = dir.getAbsolutePath();
String base = dirPath+FILESEPARATOR+script;
if (exists(base)) {
return base;
}
if (os.indexOf("windows")!=-1) {
if (exists(base+".exe")) {
ret... | this.dir = dir;
}
public void setScript(String script) {
this.script = script;
}
public void setMsg(String msg) {
this.msg = msg;
}
public void setArgs(String args) {
this.args = args;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ant\LaunchTask.java | 1 |
请完成以下Java代码 | public void setR_Request_ID (int R_Request_ID)
{
if (R_Request_ID < 1)
set_Value (COLUMNNAME_R_Request_ID, null);
else
set_Value (COLUMNNAME_R_Request_ID, Integer.valueOf(R_Request_ID));
}
/** Get Aufgabe.
@return Request from a Business Partner or Prospect
*/
@Override
public int getR_Request_ID... | @Override
public org.compiere.model.I_AD_User getTo_User() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_To_User_ID, org.compiere.model.I_AD_User.class);
}
@Override
public void setTo_User(org.compiere.model.I_AD_User To_User)
{
set_ValueFromPO(COLUMNNAME_To_User_ID, org.compiere.model.I_AD_User.... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Mail.java | 1 |
请完成以下Java代码 | public void delete(String s) {
}
@Override
public void delete(int i) {
}
@Override
public Scriptable getPrototype() {
return null;
}
@Override
public void setPrototype(Scriptable scriptable) {
}
@Override
public Scriptable getParentScope() {
return nul... | public void setParentScope(Scriptable scriptable) {
}
@Override
public Object[] getIds() {
return null;
}
@Override
public Object getDefaultValue(Class<?> aClass) {
return null;
}
@Override
public boolean hasInstance(Scriptable scriptable) {
return false;
... | repos\flowable-engine-main\modules\flowable-secure-javascript\src\main\java\org\flowable\scripting\secure\impl\SecureScriptScope.java | 1 |
请完成以下Java代码 | public String getSubScopeId() {
return subScopeId;
}
public void setSubScopeId(String subScopeId) {
this.subScopeId = subScopeId;
}
public String getScopeDefinitionId() {
return scopeDefinitionId;
}
public void setScopeDefinitionId(String scopeDefinitionId) {
this... | public void setHasExistingInstancesForUniqueCorrelation(boolean hasExistingInstancesForUniqueCorrelation) {
this.hasExistingInstancesForUniqueCorrelation = hasExistingInstancesForUniqueCorrelation;
}
@Override
public String toString() {
return new StringJoiner(", ", getClass().getSimpleName... | repos\flowable-engine-main\modules\flowable-event-registry-api\src\main\java\org\flowable\eventregistry\api\EventConsumerInfo.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public UserVO login(LoginUserRequest request) {
return userRepository
.findByEmail(request.email())
.filter(user -> passwordEncoder.matches(request.password(), user.getPassword()))
.map(user -> {
String token = bearerTokenSupplier.supply(user);... | throw new IllegalArgumentException("Username(`%s`) already exists.".formatted(request.username()));
}
user.updateEmail(email);
user.updateUsername(username);
user.updatePassword(passwordEncoder, request.password());
user.updateBio(request.bio());
user.updateImage(request... | repos\realworld-spring-boot-native-master\src\main\java\com\softwaremill\realworld\application\user\service\UserApplicationService.java | 2 |
请完成以下Java代码 | public String getMsg(@NonNull final AdMessageKey adMessage, final List<Object> params)
{
if (params == null || params.isEmpty())
{
return adMessage.toAD_Message();
}
return adMessage.toAD_Message() + "_" + params;
}
@Override
public Map<String, String> getMsgMap(final String adLanguage, final String pre... | {
return TranslatableStrings.constant(adMessage.toAD_Message() + " - " + Joiner.on(", ").useForNull("-").join(msgParameters));
}
}
@Override
public void cacheReset()
{
// nothing
}
@Override
public String getBaseLanguageMsg(@NonNull final AdMessageKey adMessage, @Nullable final Object... msgParameters)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\impl\PlainMsgBL.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8081
person:
lastName: zhangsan # 也可写成(松散语法) last-name:zhansang
age: 18
boss: false
birth: 2017/12/12
map: {k1: v1, k2 : 12}
list:
- lisi
- zhaoliu
dog: |
name: 史努比
age: 2
email: xxxxxx
cat:
name: Tom
age: 5
email: xxxxxx | repos\SpringBootLearning-master (1)\springboot-config\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public abstract class AbstractWidgetTypeEntity<T extends BaseWidgetType> extends BaseVersionedEntity<T> {
@Column(name = ModelConstants.WIDGET_TYPE_TENANT_ID_PROPERTY)
private UUID tenantId;
@Column(name = ModelConstants.WIDGET_TYPE_FQN_PROPERTY)
private String fqn;
@Column(name = ModelConstants.... | super(widgetTypeEntity);
this.tenantId = widgetTypeEntity.getTenantId();
this.fqn = widgetTypeEntity.getFqn();
this.name = widgetTypeEntity.getName();
this.deprecated = widgetTypeEntity.isDeprecated();
this.scada = widgetTypeEntity.isScada();
}
protected BaseWidgetType t... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\sql\AbstractWidgetTypeEntity.java | 1 |
请完成以下Java代码 | public void print(final PrintStream out)
{
final boolean printStackTrace = true; // backward compatibility
print(out, printStackTrace);
}
public void print(final PrintStream out, final boolean printStackTrace)
{
out.println("Error: " + getInnerMessage());
for (final Map.Entry<String, Object> param : getPa... | out.println("Stack trace: ");
this.printStackTrace(out);
}
}
public String toStringX()
{
final boolean printStackTrace = true; // backward compatibility
return toStringX(printStackTrace);
}
public String toStringX(final boolean printStackTrace)
{
final ByteArrayOutputStream baos = new ByteArrayOutput... | repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\exception\ScriptException.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public SAPGLJournal getByRecord(@NonNull final I_SAP_GLJournal record)
{
final SAPGLJournalId id = SAPGLJournalId.ofRepoId(record.getSAP_GLJournal_ID());
final SAPGLJournalLoaderAndSaver loader = new SAPGLJournalLoaderAndSaver();
loader.addToCacheAndAvoidSaving(record);
return loader.getById(id);
}
public S... | {
final SAPGLJournalLoaderAndSaver loaderAndSaver = new SAPGLJournalLoaderAndSaver();
return loaderAndSaver.updateById(glJournalId, processor);
}
public DocStatus getDocStatus(final SAPGLJournalId glJournalId)
{
final SAPGLJournalLoaderAndSaver loader = new SAPGLJournalLoaderAndSaver();
return loader.getDoc... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\gljournal_sap\service\SAPGLJournalRepository.java | 2 |
请完成以下Java代码 | public class CScrollPane extends JScrollPane
{
/**
*
*/
private static final long serialVersionUID = -2941967111871448295L;
/**
* Adempiere ScollPane
*/
public CScrollPane ()
{
this (null, VERTICAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_AS_NEEDED);
} // CScollPane
/**
* Adempiere ScollPane
... | * @param vsbPolicy vertical policy
* @param hsbPolicy horizontal policy
*/
public CScrollPane (Component view, int vsbPolicy, int hsbPolicy)
{
super (view, vsbPolicy, hsbPolicy);
setOpaque(false);
getViewport().setOpaque(false);
} // CScollPane
/**
* Set Background
* @param bg AdempiereColor for... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CScrollPane.java | 1 |
请完成以下Java代码 | private void setRecordsToOpen(@NonNull final Set<BankStatementId> importedBankStatementIds)
{
getResult().setRecordToOpen(ProcessExecutionResult.RecordsToOpen.builder()
.records(TableRecordReference.ofRecordIds(I_C_BankStatement.Table_Name, BankStatementId.toIntSet(importedBankStatementIds)))
.... | throw new AdempiereException(MSG_MULTIPLE_ATTACHMENTS)
.markAsUserValidationError();
}
return Optional.of(attachments.get(0).getId());
}
@NonNull
private AttachmentEntryDataResource retrieveAttachmentResource(@NonNull final BankStatementImportFileId bankStatementImportFileId)
{
final AttachmentEntryId ... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java\de\metas\banking\camt53\process\C_BankStatement_Import_File_Camt53_ImportAttachment.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ApiResponse<List<NursingHome>> getNewAndUpdatedNursingHomesWithHttpInfo(String albertaApiKey, String updatedAfter) throws ApiException {
com.squareup.okhttp.Call call = getNewAndUpdatedNursingHomesValidateBeforeCall(albertaApiKey, updatedAfter, null, null);
Type localVarReturnType = new TypeToken... | progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-patient-api\src\main\java\io\swagger\client\api\NursingHomeApi.java | 2 |
请完成以下Java代码 | private static class WorkplacesMap
{
private final ImmutableMap<WorkplaceId, Workplace> byId;
@Getter private final ImmutableList<Workplace> allActive;
WorkplacesMap(final List<Workplace> list)
{
this.byId = Maps.uniqueIndex(list, Workplace::getId);
this.allActive = ImmutableList.copyOf(list);
}
@N... | {
if (ids.isEmpty())
{
return ImmutableList.of();
}
return ids.stream()
.map(this::getById)
.collect(ImmutableList.toImmutableList());
}
public boolean isEmpty()
{
return byId.isEmpty();
}
public SeqNo getNextSeqNo()
{
final Workplace workplace = getAllActive().stream().ma... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\workplace\WorkplaceRepository.java | 1 |
请完成以下Spring Boot application配置 | management:
endpoints:
# Actuator HTTP 配置项,对应 WebEndpointProperties 配置类
web:
exposure:
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
spring:
application:
name: demo-application # 应用名
boot:
admin:
client:
url: http | ://127.0.0.1:8080 # Spring Boot Admin Server 地址
server:
port: 18080 # 设置自定义 Server 端口,避免和 Spring Boot Admin Server 端口冲突。 | repos\SpringBoot-Labs-master\lab-35\lab-35-admin-01-demo-application\src\main\resources\application.yaml | 2 |
请在Spring Boot框架中完成以下Java代码 | public LineBuilder endRef()
{
return parentbuilder.endRef();
}
/**
* Convenience method to end the current ref builder and start a new one.
*
* @return the new reference builder, <b>not</b> this instance.
*/
public RefBuilder newRef()
{
return endRef().ref();
}
/**
* Supposed to be ... | };
/**
* Note: it's important not to include {@link #getDLM_Partition_Config_Reference_ID()} in the result.
* Check the implementation of {@link PartitionerConfigLine.LineBuilder#endRef()} for details.
*/
@Override
public boolean equals(final Object obj)
{
if (this == obj)
{
return true;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\partitioner\config\PartitionerConfigReference.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Set<FlatrateTermId> retrieveMembershipSubscriptionIds(
@NonNull final BPartnerId bpartnerId,
@NonNull final Instant orgChangeDate,
@NonNull final OrgId orgId)
{
return queryMembershipRunningSubscription(bpartnerId, orgChangeDate, orgId)
.idsAsSet(FlatrateTermId::ofRepoId);
}
public IQuery<I_C_... | .addNotEqualsFilter(I_M_Product.COLUMNNAME_C_CompensationGroup_Schema_ID, null)
.addNotEqualsFilter(I_M_Product.COLUMNNAME_C_CompensationGroup_Schema_Category_ID, null)
.create();
}
public ImmutableSet<OrderId> retrieveMembershipOrderIds(
@NonNull final OrgId orgId,
@NonNull final Instant orgChangeDate... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\bpartner\repository\MembershipContractRepository.java | 2 |
请完成以下Java代码 | public class DomXmlDataFormatReader extends TextBasedDataFormatReader {
private static final DomXmlLogger LOG = DomXmlLogger.XML_DOM_LOGGER;
private static final Pattern INPUT_MATCHING_PATTERN = Pattern.compile("\\A(\\s)*<");
protected DomXmlDataFormat dataFormat;
public DomXmlDataFormatReader(DomXmlDataForm... | }
/**
* @return the DocumentBuilder used by this reader
*/
protected DocumentBuilder getDocumentBuilder() {
try {
DocumentBuilder docBuilder = dataFormat.getDocumentBuilderFactory().newDocumentBuilder();
LOG.createdDocumentBuilder();
return docBuilder;
} catch (ParserConfigurationE... | repos\camunda-bpm-platform-master\spin\dataformat-xml-dom\src\main\java\org\camunda\spin\impl\xml\dom\format\DomXmlDataFormatReader.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void decide(Authentication authentication, Object object, Collection<ConfigAttribute> configAttributes) throws AccessDeniedException, InsufficientAuthenticationException {
HttpServletRequest request = ((FilterInvocation) object).getHttpRequest();
String url, method;
AntPathRequestMatcher... | }
}
}
throw new AccessDeniedException("no right");
}
@Override
public boolean supports(ConfigAttribute attribute) {
return true;
}
@Override
public boolean supports(Class<?> clazz) {
return true;
}
} | repos\springBoot-master\springboot-springSecurity3\src\main\java\com\us\example\service\MyAccessDecisionManager.java | 2 |
请完成以下Java代码 | public final class ColoredNumberComparable implements Comparable<ColoredNumberComparable> {
private int value;
private String color;
public ColoredNumberComparable(int value, String color) {
this.value = value;
this.color = color;
}
@Override
public int compareTo(ColoredNumberC... | }
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
} | repos\tutorials-master\core-java-modules\core-java-collections\src\main\java\com\baeldung\collections\priorityqueue\ColoredNumberComparable.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static class CostElementIdAndAcctSchemaId
{
@NonNull CostElementId costTypeId;
@NonNull AcctSchemaId acctSchemaId;
}
private static class CostElementAccountsMap
{
private final ImmutableMap<CostElementIdAndAcctSchemaId, CostElementAccounts> map;
public CostElementAccountsMap(
@NonNull final Im... | public CostElementAccounts getAccounts(
@NonNull final CostElementId costElementId,
@NonNull final AcctSchemaId acctSchemaId)
{
final CostElementAccounts accounts = map.get(CostElementIdAndAcctSchemaId.of(costElementId, acctSchemaId));
if (accounts == null)
{
throw new AdempiereException("No acco... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\accounts\CostElementAccountsRepository.java | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.