instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | public String home() {
return format("HTTP Session Caching Example");
}
@GetMapping("/ping")
@ResponseBody
public String ping() {
return format("PONG");
}
@GetMapping("/session")
public ModelAndView sessionRequestCounts(HttpSession session) {
this.sessionIds.add(session.getId());
Map<String, Object> ... | Integer requestCount = (Integer) session.getAttribute("requestCount");
requestCount = requestCount != null ? requestCount : 0;
requestCount++;
session.setAttribute("requestCount", requestCount);
return requestCount;
}
private String format(String value) {
return String.format("<h1>%s</h1>", value);
}
}... | repos\spring-boot-data-geode-main\spring-geode-samples\caching\http-session\src\main\java\example\app\caching\session\http\controller\CounterController.java | 2 |
请完成以下Java代码 | public HUAttributeQueryFilterVO addValues(final Collection<? extends Object> values)
{
setMatchingType(AttributeValueMatchingType.ValuesList);
final boolean added = _values.addAll(values);
if (added)
{
_valuesAndSubstitutes = null;
}
return this;
}
private AttributeId getAttributeId()
{
return at... | {
if (_valuesAndSubstitutes != null)
{
return _valuesAndSubstitutes;
}
final ModelColumn<I_M_HU_Attribute, Object> valueColumn = getHUAttributeValueColumn();
final boolean isStringValueColumn = I_M_HU_Attribute.COLUMNNAME_Value.equals(valueColumn.getColumnName());
final Set<Object> valuesAndSubstitutes... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUAttributeQueryFilterVO.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ImmutableSet<HuId> filterSplitHUsForSharingQr(@NonNull final I_M_HU sourceHU, @NonNull final ImmutableList<I_M_HU> newHUs)
{
if (!isOneQrCodeForAggregatedHUsEnabledFor(sourceHU))
{
return ImmutableSet.of();
}
return newHUs.stream()
.flatMap(newHU -> {
if (handlingUnitsBL.isLoadingUnit(newHU... | public boolean isAtLeastOneActiveConfig()
{
return repository.isAtLeastOneActiveConfig();
}
@NonNull
public ImmutableMap<QRCodeConfigurationId, QRCodeConfiguration> getByIds(@NonNull final ImmutableSet<QRCodeConfigurationId> qrCodeConfigurationIds)
{
return repository.getActiveByIds(qrCodeConfigurationIds);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\qrcodes\service\QRCodeConfigurationService.java | 2 |
请完成以下Java代码 | private static String buildRequestUrl(String servletPath, String requestURI, String contextPath, String pathInfo,
String queryString) {
StringBuilder url = new StringBuilder();
if (servletPath != null) {
url.append(servletPath);
if (pathInfo != null) {
url.append(pathInfo);
}
}
else {
url.app... | /**
* Returns true if the supplied URL starts with a "/" or is absolute.
*/
public static boolean isValidRedirectUrl(String url) {
return url != null && (url.startsWith("/") || isAbsoluteUrl(url));
}
/**
* Decides if a URL is absolute based on whether it contains a valid scheme name, as
* defined in RFC 1... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\util\UrlUtils.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8000
http2:
# 启用 HTTP/2 支持,提升传输效率
enabled: true
compression:
# 启用 GZIP 压缩,减少传输数据量
enabled: true
# 需要压缩的 MIME 类型
mime-types: text/html, text/xml, text/plain, application/json
# 最小压缩响应大小(字节)
spring:
freemarker:
check-template-location: false
profiles:
# 激活的环境,如... |
expiration: 300
#密码加密传输,前端公钥加密,后端私钥解密
rsa:
private_key: MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdbHkB8mp0f3FE0GYP3AYPaJF7jUd1M0XxFSE2ceK3k2kw20YvQ09NJKk+OMjWQl9WitG9pB6tSCQIDAQABAkA2SimBrWC2/wvauBuYqjCFwLvYiRYqZKThUS3MZlebXJiLB+Ue/gUifAAKIg1avttUZsHBHrop4qfJCwAI0+YRAiEA+W3NK/RaXtnRqmoUUkb59zsZUB... | repos\eladmin-master\eladmin-system\src\main\resources\config\application.yml | 2 |
请完成以下Java代码 | public CaseServiceTask clone() {
CaseServiceTask clone = new CaseServiceTask();
clone.setValues(this);
return clone;
}
public void setValues(CaseServiceTask otherElement) {
super.setValues(otherElement);
setCaseDefinitionKey(otherElement.getCaseDefinitionKey());
... | inParameters = new ArrayList<>();
if (otherElement.getInParameters() != null && !otherElement.getInParameters().isEmpty()) {
for (IOParameter parameter : otherElement.getInParameters()) {
inParameters.add(parameter.clone());
}
}
outParameters = new ArrayL... | repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\CaseServiceTask.java | 1 |
请完成以下Java代码 | public class BankStatementLineRow implements IViewRow
{
@ViewColumn(seqNo = 10, widgetType = DocumentFieldWidgetType.Integer, widgetSize = WidgetSize.Small, captionKey = "Line")
private final int lineNo;
@ViewColumn(seqNo = 20, widgetType = DocumentFieldWidgetType.LocalDate, widgetSize = WidgetSize.Small, captionKe... | public DocumentId getId()
{
return rowId;
}
@Override
public boolean isProcessed()
{
return isReconciled();
}
@Override
public DocumentPath getDocumentPath()
{
return null;
}
@Override
public Set<String> getFieldNames()
{
return values.getFieldNames();
}
@Override
public ViewRowFieldNameAndJ... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\bankstatement_reconciliation\BankStatementLineRow.java | 1 |
请完成以下Java代码 | public class X_AD_User_Occupation_Job extends org.compiere.model.PO implements I_AD_User_Occupation_Job, org.compiere.model.I_Persistent
{
private static final long serialVersionUID = -804898259L;
/** Standard Constructor */
public X_AD_User_Occupation_Job (final Properties ctx, final int AD_User_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_Occupation_ID, org.compiere.model.I_CRM_Occupation.class, CRM_Occupation);
}
@... | 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 void setM_Transaction_ID (int M_Transaction_ID)
{
if (M_Transaction_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Transaction_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_Transaction_ID, Integer.valueOf(M_Transaction_ID));
}
/** Get Bestands-Transaktion.
@return Bestands-Transaktion */
@Override
... | public void setPP_Cost_Collector_ID (int PP_Cost_Collector_ID)
{
if (PP_Cost_Collector_ID < 1)
set_Value (COLUMNNAME_PP_Cost_Collector_ID, null);
else
set_Value (COLUMNNAME_PP_Cost_Collector_ID, Integer.valueOf(PP_Cost_Collector_ID));
}
/** Get Manufacturing Cost Collector.
@return Manufacturing Cost ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Transaction.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Country {
@Id
private Long id;
private String iso;
private String name;
private String emoji;
public Country(Long id, String iso, String name, String emoji) {
this.id = id;
this.iso = iso;
this.name = name;
this.emoji = emoji;
}
public Coun... | public Long getId() {
return id;
}
public String getIso() {
return iso;
}
public String getName() {
return name;
}
public String getEmoji() {
return emoji;
}
} | repos\tutorials-master\docker-modules\docker-multi-module-maven\domain\src\main\java\com\baeldung\domain\Country.java | 2 |
请完成以下Java代码 | public class SupplementaryDataEnvelope1 {
@XmlAnyElement(lax = true)
protected Object any;
/**
* Gets the value of the any property.
*
* @return
* possible object is
* {@link Element }
* {@link Object }
*
*/
public Object getAny() {
ret... | /**
* Sets the value of the any property.
*
* @param value
* allowed object is
* {@link Element }
* {@link Object }
*
*/
public void setAny(Object value) {
this.any = value;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\SupplementaryDataEnvelope1.java | 1 |
请完成以下Java代码 | public String getCredentialId() {
return credentialId;
}
public void setCredentialId(String credentialId) {
this.credentialId = credentialId;
}
public String getPublicKeyCose() {
return publicKeyCose;
}
public void setPublicKeyCose(String publicKeyCose) {
this.... | }
public Boolean getBackupState() {
return backupState;
}
public void setBackupState(Boolean backupState) {
this.backupState = backupState;
}
public String getAttestationObject() {
return attestationObject;
}
public void setAttestationObject(String attestationObje... | repos\tutorials-master\spring-security-modules\spring-security-passkey\src\main\java\com\baeldung\tutorials\passkey\domain\PasskeyCredential.java | 1 |
请完成以下Java代码 | public IQueryOrderByBuilder<T> addColumn(@NonNull final ModelColumn<T, ?> column, final Direction direction, final Nulls nulls)
{
final String columnName = column.getColumnName();
return addColumn(columnName, direction, nulls);
}
private Nulls getNulls(final Direction direction)
{
// NOTE: keeping backward c... | {
return Nulls.First;
}
else
{
return Nulls.Last;
}
}
@Override
public IQueryOrderBy createQueryOrderBy()
{
final QueryOrderBy orderBy = new QueryOrderBy(orderBys);
return orderBy;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\QueryOrderByBuilder.java | 1 |
请完成以下Java代码 | public RequestTypeId retrieveDefaultRequestTypeIdOrFirstActive()
{
return Optionals.firstPresentOfSuppliers(
this::retrieveDefaultRequestTypeId,
this::retrieveFirstActiveRequestTypeId)
.orElseThrow(() -> new AdempiereException("@NotFound@ @R_RequestType_ID@").markAsUserValidationError());
}
privat... | final RequestTypeId requestTypeId = queryBL.createQueryBuilderOutOfTrx(I_R_RequestType.class)
.addOnlyActiveRecordsFilter()
.orderBy(I_R_RequestType.COLUMNNAME_R_RequestType_ID)
.create()
.firstId(RequestTypeId::ofRepoIdOrNull);
return Optional.ofNullable(requestTypeId);
}
@Override
public I_R_Re... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\request\api\impl\RequestTypeDAO.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void downLoadFiles(String id, HttpServletRequest request, HttpServletResponse response) {
// 参数校验
if (oConvertUtils.isEmpty(id)) {
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
return;
}
// 获取文章信息
SysAnnouncement sysAnnouncement = this.baseMapper.selectById(id);
if (oConvertUtils.isE... | String uploadUrl = jeecgBaseConfig.getPath().getUpload();
// 下载单个文件并添加到ZIP
FileDownloadUtils.downLoadSingleFile(fileUrl,fileName,uploadUrl, zous);
}
// 完成ZIP写入
zous.finish();
// 刷新缓冲区确保数据发送
response.flushBuffer();
} catch (IOException e) {
log.error("文件下载失败"+e.getMessage(), e);
response.s... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\service\impl\SysAnnouncementServiceImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | protected boolean isValidValueForResumePreviousBy(String resumePreviousBy) {
return resumePreviousBy.equals(ResumePreviousBy.RESUME_BY_DEPLOYMENT_NAME) || resumePreviousBy.equals(ResumePreviousBy.RESUME_BY_PROCESS_DEFINITION_KEY);
}
/**
* @param deploymentMap2
* @param deploymentName
*/
protected vo... | LOGGER.log(Level.WARNING, "Exception while deleting process engine deployment", e);
}
}
}
@Override
public ProcessApplicationDeploymentService getValue() throws IllegalStateException, IllegalArgumentException {
return this;
}
public ProcessApplicationDeployment getDeployment() {
return d... | repos\camunda-bpm-platform-master\distro\wildfly\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\service\ProcessApplicationDeploymentService.java | 2 |
请完成以下Java代码 | public void setSuspended(Boolean suspended) {
this.suspended = suspended;
}
protected boolean isValidSortByValue(String value) {
return VALID_SORT_BY_VALUES.contains(value);
}
protected BatchQuery createNewQuery(ProcessEngine engine) {
return engine.getManagementService().createBatchQuery();
}
... | if (tenantIds != null && !tenantIds.isEmpty()) {
query.tenantIdIn(tenantIds.toArray(new String[tenantIds.size()]));
}
if (TRUE.equals(suspended)) {
query.suspended();
}
if (FALSE.equals(suspended)) {
query.active();
}
}
protected void applySortBy(BatchQuery query, String sortB... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\batch\BatchQueryDto.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class TelemetryRestServiceImpl extends AbstractRestProcessEngineAware implements TelemetryRestService {
public TelemetryRestServiceImpl(String engineName, ObjectMapper objectMapper) {
super(engineName, objectMapper);
}
@Override
public void configureTelemetry(TelemetryConfigurationDto dto) {
bo... | public TelemetryConfigurationDto getTelemetryConfiguration() {
ManagementService managementService = getProcessEngine().getManagementService();
Boolean telemetryEnabled = managementService.isTelemetryEnabled();
return new TelemetryConfigurationDto(telemetryEnabled);
}
@Override
public TelemetryDataD... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\TelemetryRestServiceImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public StringToLocalDateConverter stringToLocalDateConverter() {
return new StringToLocalDateConverter();
}
@Bean
public LocalDateToStringConverter localDateToStringConverter() {
return new LocalDateToStringConverter();
}
@Bean
public StringToListConverter sringToListConverter(... | @Bean
public SetToStringConverter setToStringConverter(@Lazy ObjectMapper objectMapper) {
return new SetToStringConverter(objectMapper);
}
@Bean
public StringToObjectValueConverter stringToObjectValueConverter(@Lazy ObjectMapper objectMapper) {
return new StringToObjectValueConverter(ob... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\conf\impl\ProcessModelAutoConfiguration.java | 2 |
请完成以下Java代码 | public String translate(final Properties ctx, final String text)
{
return text;
}
@Override
public String translate(final String adLanguage, final String text)
{
return text;
}
@Override
public String translate(final Properties ctx, final String text, final boolean isSOTrx)
{
return text;
}
@Overrid... | @Override
public String getBaseLanguageMsg(@NonNull final AdMessageKey adMessage, @Nullable final Object... msgParameters)
{
return TranslatableStrings.adMessage(adMessage, msgParameters)
.translate(Language.getBaseAD_Language());
}
@Override
public Optional<AdMessageId> getIdByAdMessage(@NonNull final AdMe... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\impl\PlainMsgBL.java | 1 |
请完成以下Java代码 | public String getName() {
return name;
}
@Override
public void setName(String name) {
this.name = name;
}
@Override
public byte[] getBytes() {
return bytes;
}
@Override
public void setBytes(byte[] bytes) {
this.bytes = bytes;
}
@Override
... | }
@Override
public void setGenerated(boolean generated) {
this.generated = generated;
}
/**
* Indicated whether or not the resource has been generated while deploying rather than being actual part of the deployment.
*/
@Override
public boolean isGenerated() {
return g... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\ResourceEntityImpl.java | 1 |
请完成以下Java代码 | public <T extends RepoIdAware> Optional<T> getValueAsId(@NonNull final String keyColumnName, @NonNull final Class<T> type)
{
return getValueAsInteger(keyColumnName).map(repoId -> RepoIdAwares.ofRepoIdOrNull(repoId, type));
}
/**
* @return all values (including nulls) in the same order as the key column names ar... | return sqlBuilder.build();
}
public String getSqlWhereClauseById(@NonNull final String tableAlias)
{
final StringBuilder sql = new StringBuilder();
for (final String keyFieldName : keyColumnNames)
{
final Object idPart = getValue(keyFieldName);
if (sql.length() > 0)
{
sql.append(" AND ");
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\sql\SqlComposedKey.java | 1 |
请完成以下Java代码 | public String say() {
return "Hello!" + this.getClass().getName();
}
public InitBeanAndDestroyBean() {
System.out.println("执行InitBeanAndDestroyBean构造方法");
}
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.appl... | public void postConstructstroy() {
System.out.println("注解-执行InitBeanAndDestroyBeanTest:preDestroy方法");
}
@PreDestroy
public void preDestroy() {
System.out.println("注解--执行InitBeanAndDestroyBeanTest:preDestroy方法");
}
/**
* 真正的Bean初始化方法
*/
public void initMethod() {
... | repos\spring-boot-student-master\spring-boot-student-spring\src\main\java\com\xiaolyuh\init\destory\InitBeanAndDestroyBean.java | 1 |
请完成以下Java代码 | public void setFieldExtensions(List<FieldExtension> fieldExtensions) {
this.fieldExtensions = fieldExtensions;
}
public String getMessageRef() {
return messageRef;
}
public void setMessageRef(String messageRef) {
this.messageRef = messageRef;
}
public String getMessage... | public void setCorrelationKey(String correlationKey) {
this.correlationKey = correlationKey;
}
public MessageEventDefinition clone() {
MessageEventDefinition clone = new MessageEventDefinition();
clone.setValues(this);
return clone;
}
public void setValues(MessageEventD... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\MessageEventDefinition.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public SecurityManager securityManager() {
DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
// 设置realm.
securityManager.setRealm(myShiroRealm());
//注入缓存管理器
securityManager.setCacheManager(ehCacheManager());
/*
* 关闭shiro自带的session,详情见文档... | public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager securityManager) {
AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor = new AuthorizationAttributeSourceAdvisor();
authorizationAttributeSourceAdvisor.setSecurityManager(securityManager);
... | repos\SpringBootBucket-master\springboot-jwt\src\main\java\com\xncoding\jwt\config\ShiroConfig.java | 2 |
请完成以下Spring Boot application配置 | mybatis.type-aliases-package=com.neo.entity
spring.datasource.druid.one.driverClassName = com.mysql.jdbc.Driver
spring.datasource.druid.one.url = jdbc:mysql://localhost:3306/test1?useUnicode=true&characterEncoding=utf-8
spring.datasource.druid.one.username = root
spring.datasource.druid.one.password = root
spring.dat... | datasource.druid.filter.stat.slow-sql-millis=2000
# Druid \u6570\u636E\u6E90 1 \u914D\u7F6E\uFF0C\u7EE7\u627Fspring.datasource.druid.* \u914D\u7F6E\uFF0C\u76F8\u540C\u5219\u8986\u76D6
spring.datasource.druid.one.max-active=20
spring.datasource.druid.one.max-wait=10000
# Druid \u6570\u636E\u6E90 2 \u914D\u7F6E\uFF0C\... | repos\spring-boot-leaning-master\1.x\第08课:Mybatis Druid 多数据源\spring-boot-multi-mybatis-druid\src\main\resources\application.properties | 2 |
请在Spring Boot框架中完成以下Java代码 | public class HUsToIssueViewFactory extends HUEditorViewFactoryTemplate
{
public static final String Window_ID_String = "husToIssueOnProject";
public static final WindowId Window_ID = WindowId.fromJson(Window_ID_String);
public static final String PARAM_HUsToIssueViewContext = "HUsToIssueViewContext";
private fina... | private DocumentFilter createEligibleHUsFilter(
@NonNull final ProductId productId)
{
return HUIdsFilterHelper.createFilter(
handlingUnitsBL.createHUQueryBuilder()
.addOnlyWithProductId(productId)
.addHUStatusToInclude(X_M_HU.HUSTATUS_Active)
.setExcludeReserved());
}
@Override
protected... | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.webui\src\main\java\de\metas\servicerepair\project\hu_to_issue\HUsToIssueViewFactory.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ReceiptEntity implements Serializable {
/** 主键 */
private String id;
/** 发票类型 */
private ReceiptTypeEnum receiptTypeEnum;
/** 发票抬头 */
private String title;
/** 纳税人识别号 */
private String taxpayerNo;
/** 发票内容 */
private String content;
public String getId() {
... | this.title = title;
}
public String getTaxpayerNo() {
return taxpayerNo;
}
public void setTaxpayerNo(String taxpayerNo) {
this.taxpayerNo = taxpayerNo;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.conte... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\entity\order\ReceiptEntity.java | 2 |
请完成以下Java代码 | public abstract class AbstractCmmnManager {
protected AppEngineConfiguration appEngineConfiguration;
public AbstractCmmnManager(AppEngineConfiguration appEngineConfiguration) {
this.appEngineConfiguration = appEngineConfiguration;
}
protected CommandContext getCommandContext() {
retur... | protected AppDeploymentEntityManager getAppDeploymentEntityManager() {
return appEngineConfiguration.getAppDeploymentEntityManager();
}
protected AppDefinitionEntityManager getAppDefinitionEntityManager() {
return appEngineConfiguration.getAppDefinitionEntityManager();
}
protec... | repos\flowable-engine-main\modules\flowable-app-engine\src\main\java\org\flowable\app\engine\impl\AbstractCmmnManager.java | 1 |
请完成以下Java代码 | public boolean isEmpty()
{
return cache.size() == 0;
} // isEmpty
/**
* @see java.util.Map#keySet()
*/
public Set<K> keySet()
{
return cache.asMap().keySet();
} // keySet
/**
* @see java.util.Map#size()
*/
@Override
public long size()
{
return cache.size();
} // size
/**
* @see j... | cache.invalidateAll();
}
}
public CCacheStats stats()
{
final CacheStats guavaStats = cache.stats();
return CCacheStats.builder()
.cacheId(cacheId)
.name(cacheName)
.labels(labels)
.config(config)
.debugAcquireStacktrace(debugAcquireStacktrace)
//
.size(cache.size())
.hitCount(... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\CCache.java | 1 |
请完成以下Java代码 | protected DelegateExecution getExecution(HistoricDecisionInstanceEntity event) {
return Context.getCommandContext().getExecutionManager().findExecutionById(event.getExecutionId());
}
protected DelegateCaseExecution getCaseExecution(HistoricDecisionInstanceEntity event) {
return Context.getCommandContext(... | historyEvent.setRemovalTime(removalTime);
}
}
}
protected boolean isHistoryRemovalTimeStrategyStart() {
return HISTORY_REMOVAL_TIME_STRATEGY_START.equals(getHistoryRemovalTimeStrategy());
}
protected String getHistoryRemovalTimeStrategy() {
return Context.getProcessEngineConfiguration()
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\producer\DefaultDmnHistoryEventProducer.java | 1 |
请完成以下Java代码 | public String getProcessDefinitionId() {
return processDefinitionId;
}
public void setProcessDefinitionId(String processDefinitionId) {
this.processDefinitionId = processDefinitionId;
}
public String getProcessDefinitionName() {
return processDefinitionName;
}
public void setProcessDefinition... | public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public static HistoricTaskInstanceReportResultDto fromHistoricTaskInstanceReportResult(HistoricTaskInstanceReportResult taskReportResult) {
HistoricTaskInstanceReportResultDto dto = new HistoricTaskInstanceReportResultDto();
dto.co... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricTaskInstanceReportResultDto.java | 1 |
请完成以下Java代码 | public void setPP_Plant_ID (final int PP_Plant_ID)
{
if (PP_Plant_ID < 1)
set_Value (COLUMNNAME_PP_Plant_ID, null);
else
set_Value (COLUMNNAME_PP_Plant_ID, PP_Plant_ID);
}
@Override
public int getPP_Plant_ID()
{
return get_ValueAsInt(COLUMNNAME_PP_Plant_ID);
}
@Override
public void setReplenish... | public java.lang.String getValue()
{
return get_ValueAsString(COLUMNNAME_Value);
}
@Override
public void setAD_User_ID (final int AD_User_ID)
{
if (AD_User_ID < 0)
set_Value (COLUMNNAME_AD_User_ID, null);
else
set_Value (COLUMNNAME_AD_User_ID, AD_User_ID);
}
@Override
public int getAD_User_ID()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Warehouse.java | 1 |
请完成以下Java代码 | public Collection<ComplexBehaviorDefinition> getComplexBehaviorDefinitions() {
return complexBehaviorDefinitionCollection.get(this);
}
public CompletionCondition getCompletionCondition() {
return completionConditionChild.getChild(this);
}
public void setCompletionCondition(CompletionCondition completi... | }
public void setCamundaAsyncAfter(boolean isCamundaAsyncAfter) {
camundaAsyncAfter.setValue(this, isCamundaAsyncAfter);
}
public boolean isCamundaExclusive() {
return camundaExclusive.getValue(this);
}
public void setCamundaExclusive(boolean isCamundaExclusive) {
camundaExclusive.setValue(this... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\MultiInstanceLoopCharacteristicsImpl.java | 1 |
请完成以下Java代码 | public PageData<User> findUsersByCustomerIds(UUID tenantId, List<CustomerId> customerIds, PageLink pageLink) {
return DaoUtil.toPageData(
userRepository
.findTenantAndCustomerUsers(
tenantId,
DaoUtil.toUUIDs(... | return userRepository.countByTenantIdAndAuthority(tenantId, Authority.TENANT_ADMIN);
}
@Override
public List<User> findUsersByTenantIdAndIds(UUID tenantId, List<UUID> userIds) {
return DaoUtil.convertDataList(userRepository.findUsersByTenantIdAndIdIn(tenantId, userIds));
}
@Override
pu... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\user\JpaUserDao.java | 1 |
请完成以下Java代码 | public class Order {
private UUID id;
@JsonUnwrapped
private Type type;
private int internalAudit;
public static class Type {
public long id;
public String name;
}
public Order() {
this.id = UUID.randomUUID();
}
public Order(Type type) {
this();
... | this.type = new Type();
this.type.id = 20;
this.type.name = "Order";
this.internalAudit = internalAudit;
}
public UUID getId() {
return id;
}
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
} | repos\tutorials-master\video-tutorials\jackson-annotations-video\src\main\java\com\baeldung\jacksonannotation\general\jsonunwrapped\Order.java | 1 |
请完成以下Java代码 | public void setM_PackagingTreeItem_ID(int M_PackagingTreeItem_ID)
{
if (M_PackagingTreeItem_ID < 1)
set_Value(COLUMNNAME_M_PackagingTreeItem_ID, null);
else
set_Value(COLUMNNAME_M_PackagingTreeItem_ID, Integer.valueOf(M_PackagingTreeItem_ID));
}
/**
* Get Packaging Tree Item.
*
* @return Packaging ... | /**
* Set Menge.
*
* @param Qty
* Menge
*/
public void setQty(BigDecimal Qty)
{
set_Value(COLUMNNAME_Qty, Qty);
}
/**
* Get Menge.
*
* @return Menge
*/
public BigDecimal getQty()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty);
if (bd == null)
return Env.ZERO;
re... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\compiere\model\X_M_PackagingTreeItemSched.java | 1 |
请完成以下Java代码 | public int getM_Product_Ingredients_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Product_Ingredients_ID);
}
@Override
public void setNRV (final int NRV)
{
set_Value (COLUMNNAME_NRV, NRV);
}
@Override
public int getNRV()
{
return get_ValueAsInt(COLUMNNAME_NRV);
}
@Override
public org.compiere.model.I... | public int getPrecision()
{
return get_ValueAsInt(COLUMNNAME_Precision);
}
@Override
public void setQty (final @Nullable java.lang.String Qty)
{
set_Value (COLUMNNAME_Qty, Qty);
}
@Override
public java.lang.String getQty()
{
return get_ValueAsString(COLUMNNAME_Qty);
}
@Override
public void setSeq... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_Ingredients.java | 1 |
请完成以下Java代码 | public void setTokenType (String TokenType)
{
set_Value (COLUMNNAME_TokenType, TokenType);
}
/** Get TokenType.
@return Wiki Token Type
*/
public String getTokenType ()
{
return (String)get_Value(COLUMNNAME_TokenType);
}
/** Set Sql WHERE. | @param WhereClause
Fully qualified SQL WHERE clause
*/
public void setWhereClause (String WhereClause)
{
set_Value (COLUMNNAME_WhereClause, WhereClause);
}
/** Get Sql WHERE.
@return Fully qualified SQL WHERE clause
*/
public String getWhereClause ()
{
return (String)get_Value(COLUMNNAME_WhereCla... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_WikiToken.java | 1 |
请完成以下Spring Boot application配置 | spring.datasource.url=jdbc:mysql://localhost:3306/bookstoredb?cachePrepStmts=true&useServerPrepStmts=true&rewriteBatchedStatements=true&createDatabaseIfNotExist=true
spring.datasource.username=root
spring.datasource.password=root
spring.jpa.hibernate.ddl-auto=create
spring.jpa.show-sql=true
spring.jpa.properties.hibe... | eeded for ordering updates in case of relationships
spring.jpa.properties.hibernate.order_updates=true
spring.jpa.properties.hibernate.cache.use_second_level_cache=false
spring.jpa.properties.hibernate.generate_statistics=true | repos\Hibernate-SpringBoot-master\HibernateSpringBootBatchUpdateOrder\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public String toString()
{
StringBuffer sb = new StringBuffer("MPrintColor[");
sb.append("ID=").append(get_ID())
.append(",Name=").append(getName())
.append(",RGB=").append(getCode())
.append(",").append(getColor())
.append("]");
return sb.toString();
} // toString
/******************************... | /**
// Create Colors
for (int i = 0; i < colors.length; i++)
create(colors[i], names[i]);
create(whiteGray, "Gray white");
create(darkGreen, "Green dark");
create(blackGreen, "Green black");
create(blackBlue, "Blue black");
create(brown, "Brown");
create(darkBrown, "Brown dark");
**/
// Read All C... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\MPrintColor.java | 1 |
请完成以下Java代码 | public String getImplementation() {
return implementationAttribute.getValue(this);
}
public void setImplementation(String implementation) {
implementationAttribute.setValue(this, implementation);
}
public boolean instantiate() {
return instantiateAttribute.getValue(this);
}
public void setIns... | public Message getMessage() {
return messageRefAttribute.getReferenceTargetElement(this);
}
public void setMessage(Message message) {
messageRefAttribute.setReferenceTargetElement(this, message);
}
public Operation getOperation() {
return operationRefAttribute.getReferenceTargetElement(this);
}
... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\ReceiveTaskImpl.java | 1 |
请完成以下Java代码 | public boolean isEvaluateRepetitionRule() {
// by default, we don't create new instances for repeatable plan items being terminated, however, if the exit type is set to only terminate active or
// enabled instances, we might want to immediately create a new instance for repetition, but only, if the curr... | public void setExitCriterionId(String exitCriterionId) {
this.exitCriterionId = exitCriterionId;
}
public String getExitType() {
return exitType;
}
public void setExitType(String exitType) {
this.exitType = exitType;
}
public String getExitEventType() {
return exi... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\agenda\operation\ExitPlanItemInstanceOperation.java | 1 |
请完成以下Java代码 | private I_C_Invoice_Detail syncToRecord(
@NonNull final OrgId orgId,
@NonNull final InvoiceDetailItem invoiceDetailItem,
@Nullable final I_C_Invoice_Detail existingInvoiceDetailRecord)
{
final I_C_Invoice_Detail recordToUpdate;
if (existingInvoiceDetailRecord == null)
{
recordToUpdate = InterfaceWrap... | {
return new StagingRecordKey(invoiceId, null, detailRecord.getLabel());
}
return null;
}
public static StagingRecordKey forItemOrNull(@NonNull final InvoiceId invoiceId, @NonNull final InvoiceDetailItem detailItem)
{
return new StagingRecordKey(invoiceId, null, detailItem.getLabel());
}
public... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\detail\InvoiceWithDetailsRepository.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ConditionMessageRepresentation {
private String condition;
private String data;
/**
* @return the condition
*/
public String getCondition() {
return condition;
}
/**
* @param condition the condition to set
*/
public void setCondition(String... | }
/**
* @return the data
*/
public String getData() {
return data;
}
/**
* @param data the data to set
*/
public void setData(String data) {
this.data = data;
}
} | repos\tutorials-master\gcp-firebase\src\main\java\com\baeldung\gcp\firebase\publisher\controller\ConditionMessageRepresentation.java | 2 |
请完成以下Java代码 | public long getPriority() {
return priority;
}
public String getErrorDetails() {
return errorDetails;
}
public String getBusinessKey() {
return businessKey;
}
public Map<String, String> getExtensionProperties(){
return extensionProperties;
}
public static LockedExternalTaskDto fromLo... | for (LockedExternalTask task : tasks) {
dtos.add(LockedExternalTaskDto.fromLockedExternalTask(task));
}
return dtos;
}
@Override
public String toString() {
return
"LockedExternalTaskDto [activityId=" + activityId
+ ", activityInstanceId=" + activityInstanceId
+ ", error... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\externaltask\LockedExternalTaskDto.java | 1 |
请完成以下Java代码 | public class CardholderAuthentication2 {
@XmlElement(name = "AuthntcnMtd", required = true)
@XmlSchemaType(name = "string")
protected AuthenticationMethod1Code authntcnMtd;
@XmlElement(name = "AuthntcnNtty", required = true)
@XmlSchemaType(name = "string")
protected AuthenticationEntity1Code au... | * Gets the value of the authntcnNtty property.
*
* @return
* possible object is
* {@link AuthenticationEntity1Code }
*
*/
public AuthenticationEntity1Code getAuthntcnNtty() {
return authntcnNtty;
}
/**
* Sets the value of the authntcnNtty property.
... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-xjc_camt054_001_06\de\metas\payment\camt054_001_06\CardholderAuthentication2.java | 1 |
请完成以下Java代码 | public int hashCode() {
return Objects.hash(name, age);
}
private String name;
private int age;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
public Long getId() {
return id;
}
public String getName() { | return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
} | repos\tutorials-master\persistence-modules\spring-data-jpa-repo\src\main\java\com\baeldung\flush\Customer.java | 1 |
请完成以下Java代码 | public class X_M_RMAType extends PO implements I_M_RMAType, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20090915L;
/** Standard Constructor */
public X_M_RMAType (Properties ctx, int M_RMAType_ID, String trxName)
{
super (ctx, M_RMAType_ID, trxName);
/** if (M_R... | */
public String getHelp ()
{
return (String)get_Value(COLUMNNAME_Help);
}
/** Set RMA Type.
@param M_RMAType_ID
Return Material Authorization Type
*/
public void setM_RMAType_ID (int M_RMAType_ID)
{
if (M_RMAType_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_RMAType_ID, null);
else
set_ValueNoCh... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_RMAType.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class GroupResource extends BaseGroupResource {
@ApiOperation(value = "Get a single group", tags = { "Groups" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Indicates the group exists and is returned."),
@ApiResponse(code = 404, message = "Indicates the requested ... | @ApiOperation(value = "Delete a group", tags = { "Groups" }, code = 204)
@ApiResponses(value = {
@ApiResponse(code = 204, message = "Indicates the group was found and has been deleted. Response-body is intentionally empty."),
@ApiResponse(code = 404, message = "Indicates the requested group... | repos\flowable-engine-main\modules\flowable-idm-rest\src\main\java\org\flowable\idm\rest\service\api\group\GroupResource.java | 2 |
请完成以下Java代码 | public <C> C mapInternalToJava(Object parameter, JavaType type) {
return mapInternalToJava(parameter, type, null);
}
public <C> C mapInternalToJava(Object parameter, JavaType type, DeserializationTypeValidator validator) {
JsonNode jsonNode = (JsonNode) parameter;
try {
validateType(type, validat... | if (type.isMapLikeType()) {
validateType(type.getKeyType(), validator, invalidTypes);
}
if (type.isContainerType() || type.hasContentType()) {
validateType(type.getContentType(), validator, invalidTypes);
}
}
}
protected void validateTypeInternal(JavaType type, Deserialization... | repos\camunda-bpm-platform-master\spin\dataformat-json-jackson\src\main\java\org\camunda\spin\impl\json\jackson\format\JacksonJsonDataFormatMapper.java | 1 |
请完成以下Java代码 | public abstract class AbstractProcessDocumentsTemplate extends JavaProcess
{
//
// services
private final ITrxManager trxManager = Services.get(ITrxManager.class);
private final IDocumentBL docActionBL = Services.get(IDocumentBL.class);
private final IDocumentBL documentBL = Services.get(IDocumentBL.class);
//
... | @Override
public void run(final String localTrxName)
{
InterfaceWrapperHelper.refresh(doc, localTrxName);
docActionBL.processEx(doc, docAction, null); // expectedDocStatus=null because it is *not* always equal to the docAaction (Prepay-Order)
addLog("Document " + doc + ": Processed");
count... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\process\AbstractProcessDocumentsTemplate.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setComment(String comment) {
this.comment = comment;
}
/**
* @return the posted
*/
@JsonSerialize(using = CustomDateToLongSerializer.class)
public Date getPosted() {
return posted;
}
/**
* @param posted
* the posted to set
*/
public void setPosted(Date posted) {
this.post... | return false;
} else if (!posted.equals(other.posted))
return false;
if (taskId == null) {
if (other.taskId != null)
return false;
} else if (!taskId.equals(other.taskId))
return false;
return true;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
@Override
public String t... | repos\spring-boot-microservices-master\comments-webservice\src\main\java\com\rohitghatol\microservices\comments\dtos\CommentDTO.java | 2 |
请完成以下Java代码 | public void getOrderResult(RpOrderResultQueryVo rpOrderResultQueryVo){
Integer notifyTimes = rpOrderResultQueryVo.getNotifyTimes(); // 得到当前通知对象的通知次数
Integer maxNotifyTimes = rpOrderResultQueryVo.getLimitNotifyTimes(); // 最大通知次数
Date notifyTime = new Date(); // 本次通知的时间
rpOrderResultQueryVo.s... | if (rpOrderResultQueryVo.getNotifyTimes() < maxNotifyTimes) {
// 判断是否超过重发次数,未超重发次数的,再次进入延迟发送队列
pollingQueue.addToNotifyTaskDelayQueue(rpOrderResultQueryVo);
LOG.info("===>bank order {} need processing again ", rpOrderResultQueryVo.getBankOrderNo());
} else {
... | repos\roncoo-pay-master\roncoo-pay-app-order-polling\src\main\java\com\roncoo\pay\app\polling\core\PollingPersist.java | 1 |
请完成以下Java代码 | public boolean isShowNotDue ()
{
Object oo = get_Value(COLUMNNAME_IsShowNotDue);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Is Statement.
@param IsStatement
Dunning Level is a definition of a state... | /** Set Notiz.
@param Note
Optional additional user defined information
*/
@Override
public void setNote (java.lang.String Note)
{
set_Value (COLUMNNAME_Note, Note);
}
/** Get Notiz.
@return Optional additional user defined information
*/
@Override
public java.lang.String getNote ()
{
return ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_DunningLevel.java | 1 |
请完成以下Java代码 | public static <T, R> Collector<T, ?, R> collectUsingHashSetAccumulator(@NonNull final Function<HashSet<T>, R> finisher)
{
final Supplier<HashSet<T>> supplier = HashSet::new;
final BiConsumer<HashSet<T>, T> accumulator = HashSet::add;
final BinaryOperator<HashSet<T>> combiner = (acc1, acc2) -> {
acc1.addAll(ac... | return Collector.of(supplier, accumulator, combiner, finisher);
}
public static <R, K, V> Collector<Map.Entry<K, V>, ?, R> collectUsingMapAccumulator(@NonNull final Function<Map<K, V>, R> finisher)
{
return collectUsingMapAccumulator(Map.Entry::getKey, Map.Entry::getValue, finisher);
}
public static <T> Collec... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\GuavaCollectors.java | 1 |
请完成以下Java代码 | protected boolean onLoginSuccess(AuthenticationToken token, Subject subject,
ServletRequest request, ServletResponse response) throws Exception {
issueSuccessRedirect(request, response);
//we handled the success redirect directly, prevent the chain from continuing:
... | String password = getPassword(request);
String captcha = getCaptcha(request);
boolean rememberMe = isRememberMe(request);
String host = getHost(request);
return new CaptchaUsernamePasswordToken(username, password.toCharArray(), rememberMe, host, captcha);
}
public String getCap... | repos\SpringBootBucket-master\springboot-shiro\src\main\java\com\xncoding\pos\shiro\KaptchaFilter.java | 1 |
请完成以下Java代码 | public class UserDto implements User, Serializable {
private static final long serialVersionUID = 1L;
protected final String id;
protected String password;
protected final String firstName;
protected final String lastName;
protected final String displayName;
protected final String email;
... | @Override
public String getDisplayName() {
return displayName;
}
@Override
public void setDisplayName(String displayName) {
// Not supported
}
@Override
public String getEmail() {
return email;
}
@Override
public void setEmail(String email) {
//... | repos\flowable-engine-main\modules\flowable-spring-security\src\main\java\org\flowable\spring\security\UserDto.java | 1 |
请完成以下Java代码 | public void setAD_BusinessRule_ID (final int AD_BusinessRule_ID)
{
if (AD_BusinessRule_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_BusinessRule_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_BusinessRule_ID, AD_BusinessRule_ID);
}
@Override
public int getAD_BusinessRule_ID()
{
return get_ValueAsInt(CO... | else
set_Value (COLUMNNAME_Precondition_Rule_ID, Precondition_Rule_ID);
}
@Override
public int getPrecondition_Rule_ID()
{
return get_ValueAsInt(COLUMNNAME_Precondition_Rule_ID);
}
@Override
public void setPreconditionSQL (final @Nullable java.lang.String PreconditionSQL)
{
set_Value (COLUMNNAME_Prec... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_BusinessRule_Precondition.java | 1 |
请完成以下Java代码 | public CamundaFormDefinitionEntity findDefinitionByDeploymentAndKey(String deploymentId, String definitionKey) {
Map<String, Object> parameters = new HashMap<>();
parameters.put("deploymentId", deploymentId);
parameters.put("camundaFormDefinitionKey", definitionKey);
return (CamundaFormDefinitionEntity)... | @Override
public CamundaFormDefinitionEntity findDefinitionByKeyVersionTagAndTenantId(String definitionKey,
String definitionVersionTag, String tenantId) {
throw new UnsupportedOperationException(
"Currently finding Camunda Form definition by version tag and tenant is not implemented.");
}
publ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\form\entity\CamundaFormDefinitionManager.java | 1 |
请完成以下Java代码 | public class CycleBusinessCalendar implements BusinessCalendar {
private final static EngineUtilLogger LOG = ProcessEngineLogger.UTIL_LOGGER;
public static String NAME = "cycle";
public Date resolveDuedate(String duedateDescription, Task task) {
return resolveDuedate(duedateDescription);
}
public Date... | try {
if (duedateDescription.startsWith("R")) {
DurationHelper durationHelper = new DurationHelper(duedateDescription, startDate);
durationHelper.setRepeatOffset(repeatOffset);
return durationHelper.getDateAfter(startDate);
} else {
CronTimer cronTimer = CronTimer.parse(dueda... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\calendar\CycleBusinessCalendar.java | 1 |
请完成以下Java代码 | protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new Strin... | set_ValueNoCheck (COLUMNNAME_CM_ChatType_ID, Integer.valueOf(CM_ChatType_ID));
}
/** Get Chat Type.
@return Type of discussion / chat
*/
public int getCM_ChatType_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_CM_ChatType_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Self-Se... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_ChatTypeUpdate.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static class ThymeleafWebFluxConfiguration {
@Bean
@ConditionalOnMissingBean(name = "thymeleafReactiveViewResolver")
ThymeleafReactiveViewResolver thymeleafViewResolver(ISpringWebFluxTemplateEngine templateEngine,
ThymeleafProperties properties) {
ThymeleafReactiveViewResolver resolver = new ThymeleafReac... | @Bean
@ConditionalOnMissingBean
LayoutDialect layoutDialect() {
return new LayoutDialect();
}
}
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(DataAttributeDialect.class)
static class DataAttributeDialectConfiguration {
@Bean
@ConditionalOnMissingBean
DataAttributeDialect dialect() {... | repos\spring-boot-4.0.1\module\spring-boot-thymeleaf\src\main\java\org\springframework\boot\thymeleaf\autoconfigure\ThymeleafAutoConfiguration.java | 2 |
请完成以下Java代码 | private UserNotificationRequest.UserNotificationRequestBuilder newUserNotificationRequest()
{
return UserNotificationRequest.builder()
.topic(EVENTBUS_TOPIC);
}
private AdMessageKey getNotificationAD_Message(final I_M_InOut inout)
{
final DocStatus docStatus = DocStatus.ofNullableCodeOrUnknown(inout.getDoc... | //
// Fallback: notify only the creator
else
{
return UserId.ofRepoId(inout.getCreatedBy());
}
}
public InOutUserNotificationsProducer notifyShipmentError(
@NonNull final String sourceInfo,
@NonNull final String errorMessage)
{
// don't send after commit, because the trx will very probably be ro... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inout\event\InOutUserNotificationsProducer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public int size()
{
return joinColumns.size();
}
@Override
public Iterator<FTSJoinColumn> iterator()
{
return joinColumns.iterator();
}
public String buildJoinCondition(
@NonNull final String targetTableNameOrAlias,
@Nullable final String selectionTableNameOrAlias)
{
Check.assumeNotEmpty(targetTab... | .append(targetTableNameOrAlias).append(".").append(joinColumn.getTargetTableColumnName())
.append(" IS NOT DISTINCT FROM ")
.append(selectionTableNameOrAliasWithDot).append(joinColumn.getSelectionTableColumnName())
.append(")");
}
else
{
sql.append(targetTableNameOrAlias).append(".").appe... | repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java\de\metas\fulltextsearch\config\FTSJoinColumnList.java | 2 |
请完成以下Java代码 | public String getBookList(ModelMap map) {
map.addAttribute("bookList",bookService.findAll());
return BOOK_LIST_PATH_NAME;
}
/**
* 获取创建 Book 表单
*/
@RequestMapping(value = "/create", method = RequestMethod.GET)
public String createBookForm(ModelMap map) {
map.addAttribut... | */
@RequestMapping(value = "/update/{id}", method = RequestMethod.GET)
public String getUser(@PathVariable Long id, ModelMap map) {
map.addAttribute("book", bookService.findById(id));
map.addAttribute("action", "update");
return BOOK_FORM_PATH_NAME;
}
/**
* 更新 Book
* 处... | repos\springboot-learning-example-master\chapter-5-spring-boot-data-jpa\src\main\java\demo\springboot\web\BookController.java | 1 |
请完成以下Java代码 | public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getYoutubeChannel() {
return youtubeChannel;
}
public void setYoutubeChannel(String youtubeChannel) {
this.youtubeChannel = youtubeChannel;
}
public String getHobby() {
return hobby; | }
public void setHobby(String hobby) {
this.hobby = hobby;
}
@Override
public String toString() {
return "InstructorDetail [id=" + id + ", youtubeChannel=" + youtubeChannel + ", hobby=" + hobby + "]";
}
} | repos\Spring-Boot-Advanced-Projects-main\springboot-jpa-one-to-one-example\src\main\java\net\alanbinu\springboot\jpa\model\InstructorDetail.java | 1 |
请完成以下Java代码 | public int getC_CompensationGroup_Schema_TemplateLine_ID()
{
return get_ValueAsInt(COLUMNNAME_C_CompensationGroup_Schema_TemplateLine_ID);
}
@Override
public void setC_Flatrate_Conditions_ID (final int C_Flatrate_Conditions_ID)
{
if (C_Flatrate_Conditions_ID < 1)
set_Value (COLUMNNAME_C_Flatrate_Conditio... | @Override
public boolean isHideWhenPrinting()
{
return get_ValueAsBoolean(COLUMNNAME_IsHideWhenPrinting);
}
@Override
public void setM_Product_ID (final int M_Product_ID)
{
if (M_Product_ID < 1)
set_Value (COLUMNNAME_M_Product_ID, null);
else
set_Value (COLUMNNAME_M_Product_ID, M_Product_ID);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\order\model\X_C_CompensationGroup_Schema_TemplateLine.java | 1 |
请完成以下Java代码 | public int vote(Authentication authentication, MethodInvocation object, Collection<ConfigAttribute> attributes) {
for (ConfigAttribute attr : attributes) {
if (!supports(attr)) {
continue;
}
// Need to make an access decision on this invocation
// Attempt to locate the domain object instance to proce... | logger.debug("Voting to deny access - no ACLs apply for this principal");
return ACCESS_DENIED;
}
}
// No configuration attribute matched, so abstain
return ACCESS_ABSTAIN;
}
private Object invokeInternalMethod(Object domainObject) {
try {
Class<?> domainObjectType = domainObject.getClass();
Me... | repos\spring-security-main\access\src\main\java\org\springframework\security\acls\AclEntryVoter.java | 1 |
请完成以下Java代码 | private void lock2(User a, User b) {
while (true) {
try {
if (a.getLock().tryLock()) {
try {
if (b.getLock().tryLock()) {
System.out.println(Thread.currentThread().getName() + " 死锁示例");
... | }
}
}
public static void sleep(int probe) {
try {
Thread.sleep(probe);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
} | repos\spring-boot-student-master\spring-boot-student-concurrent\src\main\java\com\xiaolyuh\LockTest.java | 1 |
请完成以下Java代码 | public void setM_AttributeSetExclude_ID (int M_AttributeSetExclude_ID)
{
if (M_AttributeSetExclude_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_AttributeSetExclude_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_AttributeSetExclude_ID, Integer.valueOf(M_AttributeSetExclude_ID));
}
/** Get Exclude Attribute Set... | set_ValueNoCheck (COLUMNNAME_M_AttributeSet_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_AttributeSet_ID, Integer.valueOf(M_AttributeSet_ID));
}
/** Get Attribute Set.
@return Product Attribute Set
*/
public int getM_AttributeSet_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSet_ID)... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_AttributeSetExclude.java | 1 |
请完成以下Java代码 | public CmmnClassDelegate createLifeCycleListener(String className, String sourceState, String targetState, List<FieldExtension> fieldExtensions) {
CmmnClassDelegate cmmnClassDelegate = create(className, fieldExtensions);
cmmnClassDelegate.setSourceState(sourceState);
cmmnClassDelegate.setTargetS... | } else if (allExpressions) {
value = new FixedValue(extension.getStringValue());
} else {
value = extension.getStringValue();
}
ReflectUtil.invokeSetterOrField(object, extension.getFieldName(), value, false);
}
... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\delegate\DefaultCmmnClassDelegateFactory.java | 1 |
请完成以下Java代码 | public class Link {
private final String href;
private final boolean templated;
/**
* Creates a new {@link Link} with the given {@code href}.
* @param href the href
*/
public Link(String href) {
Assert.notNull(href, "'href' must not be null");
this.href = href;
this.templated = href.contains("{");
}... | /**
* Returns whether the {@link #getHref() href} is templated.
* @return {@code true} if the href is templated, otherwise {@code false}
*/
public boolean isTemplated() {
return this.templated;
}
@Override
public String toString() {
return new ToStringCreator(this).append("href", this.href).toString();
... | repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\web\Link.java | 1 |
请完成以下Java代码 | public void setQtyReserved (final BigDecimal QtyReserved)
{
set_ValueNoCheck (COLUMNNAME_QtyReserved, QtyReserved);
}
@Override
public BigDecimal getQtyReserved()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyReserved);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void set... | @Override
public java.sql.Timestamp getValidTo()
{
return get_ValueAsTimestamp(COLUMNNAME_ValidTo);
}
/**
* VariantGroup AD_Reference_ID=540490
* Reference name: VariantGroup
*/
public static final int VARIANTGROUP_AD_Reference_ID=540490;
/** 01 = 01 */
public static final String VARIANTGROUP_01 = "01... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Order_BOMLine.java | 1 |
请完成以下Java代码 | public int getAD_Tree_ID(final PO po)
{
if (!InterfaceWrapperHelper.isInstanceOf(po, I_C_ElementValue.class))
{
return -1;
}
final I_C_ElementValue ev = InterfaceWrapperHelper.create(po, I_C_ElementValue.class);
final ChartOfAccountsId chartOfAccountsId = ChartOfAccountsId.ofRepoId(ev.getC_Element_ID());
... | final ChartOfAccountsId chartOfAccountsId = getChartOfAccountsId(tree).orElse(null);
if (chartOfAccountsId == null)
{
// the tree is not yet referenced from any C_Element record. maybe it was just created
return "0=1";
}
else
{
return I_C_ElementValue.COLUMNNAME_C_Element_ID + "=" + chartOfAccountsId... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\elementvalue\MElementValueTreeSupport.java | 1 |
请完成以下Java代码 | public List<File> getFiles() {
return this.files;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
DockerComposeFile other = (DockerComposeFile) obj;
return this.files.equals(other.files);
}
@O... | Assert.state(base.isDirectory(), () -> "'%s' is not a directory".formatted(base));
Path basePath = base.toPath();
for (String candidate : SEARCH_ORDER) {
Path resolved = basePath.resolve(candidate);
if (Files.exists(resolved)) {
return of(resolved.toAbsolutePath().toFile());
}
}
return null;
}
/... | repos\spring-boot-4.0.1\core\spring-boot-docker-compose\src\main\java\org\springframework\boot\docker\compose\core\DockerComposeFile.java | 1 |
请完成以下Java代码 | public void setAD_User_ID (int AD_User_ID)
{
if (AD_User_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_User_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID));
}
/** Get User/Contact.
@return User within the system - Internal or Business Partner Contact
*/
public int g... | 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 KeyNamePair getKeyNamePair()
{
r... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_B_Buyer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class RabbitMQConfig
{
public static final String QUEUENAME_MSV3ServerRequests = "msv3-server-requests";
public static final String QUEUENAME_UserChangedEvents = "msv3-server-UserChangedEvents";
public static final String QUEUENAME_StockAvailabilityUpdatedEvent = "msv3-server-StockAvailabilityUpdatedEvents";
... | @Bean(name = QUEUENAME_SyncOrderResponseEvents)
public Queue syncOrderResponseEventsQueue()
{
return new Queue(QUEUENAME_SyncOrderResponseEvents);
}
// Note: with spring boot-2 this somehow didn't work anymore. It didn't create the queues in rabbitmq, so i added the code above, which works.
// @Bean
// List<De... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server-peer\src\main\java\de\metas\vertical\pharma\msv3\server\peer\RabbitMQConfig.java | 2 |
请完成以下Spring Boot application配置 | feature.foo.by.id=Y
feature.new.foo=Y
last.active.after=2018-03-14T00:00:00Z
first.active.after=2999-03-15T00:00:00Z
logging.level.org.flips=info
#actuator properties
### server port
server.port=8080
#port used to expose actuator
management.port=8081
#CIDR allowed to hit actuator
management.address=127.0.0.1
# Actuato... | s/1.5.x/reference/html/production-ready-monitoring.html
management.security.enabled=false
endpoints.health.sensitive=false
# customize /info endpoint
info.app.name=Spring Sample Application
info.app.description=This is my first spring boot application
info.app.version=1.0.0 | repos\tutorials-master\spring-4\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public VariableInstanceEntity findVariableInstanceByExecutionAndName(String executionId, String variableName) {
Map<String, String> params = new HashMap<String, String>(2);
params.put("executionId", executionId);
params.put("name", variableName);
return (VariableInstanceEntity) getDbSqlS... | @Override
public VariableInstanceEntity findVariableInstanceByTaskAndName(String taskId, String variableName) {
Map<String, String> params = new HashMap<String, String>(2);
params.put("taskId", taskId);
params.put("name", variableName);
return (VariableInstanceEntity) getDbSqlSession... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\data\impl\MybatisVariableInstanceDataManager.java | 1 |
请完成以下Java代码 | public Map<String, TransitionImpl> getSequenceFlows() {
return sequenceFlows;
}
public ProcessDefinitionEntity getCurrentProcessDefinition() {
return currentProcessDefinition;
}
public void setCurrentProcessDefinition(ProcessDefinitionEntity currentProcessDefinition) {
this.cur... | public void removeCurrentSubProcess() {
currentSubprocessStack.pop();
}
public void setCurrentScope(ScopeImpl scope) {
currentScopeStack.push(scope);
}
public ScopeImpl getCurrentScope() {
return currentScopeStack.peek();
}
public void removeCurrentScope() {
cu... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\parser\BpmnParse.java | 1 |
请完成以下Java代码 | public T sql(String sqlStatement) {
this.sqlStatement = sqlStatement;
return (T) this;
}
@SuppressWarnings("unchecked")
@Override
public T parameter(String name, Object value) {
parameters.put(name, value);
return (T) this;
}
protected Map<String, Object> ge... | orderBy = "RES.ID_ asc";
}
parameterMap.put("orderBy", "order by " + orderBy);
parameterMap.put("orderByForWindow", "order by " + orderBy);
parameterMap.put("orderByColumns", orderBy);
int firstRow = firstResult + 1;
parameterMap.put("firstRow", firstRow);
int la... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\query\BaseNativeQuery.java | 1 |
请完成以下Java代码 | class QuizGeneratorAgent {
private final Resource promptTemplate;
QuizGeneratorAgent(@Value("classpath:prompt-templates/quiz-generation.txt") Resource promptTemplate) {
this.promptTemplate = promptTemplate;
}
@Action(toolGroups = CoreToolGroups.WEB)
Blog fetchBlogContent(UserInput userInp... | @Action
@AchievesGoal(description = "Quiz has been generated")
Quiz generateQuiz(Blog blog) throws IOException {
String prompt = promptTemplate
.getContentAsString(Charset.defaultCharset())
.formatted(
blog.getTitle(),
blog.getContent()
... | repos\tutorials-master\embabel-modules\embabel-quiz-generator\src\main\java\com\baeldung\quizzard\QuizGeneratorAgent.java | 1 |
请完成以下Java代码 | public boolean isExtended() {
return extensionId != null && !extensionId.isEmpty();
}
public String getSkipExpression() {
return skipExpression;
}
public void setSkipExpression(String skipExpression) {
this.skipExpression = skipExpression;
}
public boolean isUseLocalSc... | public void setValues(ServiceTask otherElement) {
super.setValues(otherElement);
setImplementation(otherElement.getImplementation());
setImplementationType(otherElement.getImplementationType());
setResultVariableName(otherElement.getResultVariableName());
setType(otherElement.get... | repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\ServiceTask.java | 1 |
请完成以下Java代码 | public Object getPrincipal() {
return this.clientId;
}
@Nullable
@Override
public Object getCredentials() {
return this.credentials;
}
/**
* Returns the authenticated {@link RegisteredClient registered client}, or
* {@code null} if not authenticated.
* @return the authenticated {@link RegisteredClient... | }
/**
* Returns the {@link ClientAuthenticationMethod authentication method} used by the
* client.
* @return the {@link ClientAuthenticationMethod} used by the client
*/
public ClientAuthenticationMethod getClientAuthenticationMethod() {
return this.clientAuthenticationMethod;
}
/**
* Returns the addi... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\OAuth2ClientAuthenticationToken.java | 1 |
请完成以下Java代码 | private PodTemplateSpec buildPodTemplate(DeptrackResource primary, ObjectMeta primaryMeta) {
return new PodTemplateSpecBuilder()
.withMetadata(primaryMeta)
.withSpec(buildPodSpec(primary))
.build();
}
private PodSpec buildPodSpec(DeptrackResource primary) {
// Ch... | .editContainer(0) // Assumes we have a single container
.withImage(imageName + imageVersion)
.and()
.build();
//@formatter:on
}
static class Discriminator extends ResourceIDMatcherDiscriminator<Deployment,DeptrackResource> {
public Discriminator() {
... | repos\tutorials-master\kubernetes-modules\k8s-operator\src\main\java\com\baeldung\operators\deptrack\resources\deptrack\DeptrackApiServerDeploymentResource.java | 1 |
请完成以下Java代码 | public IAllocationRequestBuilder addEmptyHUListener(@NonNull final EmptyHUListener emptyHUListener)
{
if (emptyHUListeners == null)
{
emptyHUListeners = new ArrayList<>();
}
emptyHUListeners.add(emptyHUListener);
return this;
}
@Override
public IAllocationRequestBuilder setClearanceStatusInfo(@Nullabl... | return baseAllocationRequest.isDeleteEmptyAndJustCreatedAggregatedTUs();
}
return false;
}
@Override
public IAllocationRequest create()
{
final IHUContext huContext = getHUContextToUse();
final ProductId productId = getProductIdToUse();
final Quantity quantity = getQuantityToUse();
final ZonedDateTime... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\AllocationRequestBuilder.java | 1 |
请完成以下Java代码 | public TaxAccounts getTaxAccounts(
@NonNull final AcctSchemaId acctSchemaId,
@NonNull final TaxId taxId)
{
return taxAccountsRepository.getAccounts(taxId, acctSchemaId);
}
@NonNull
public Account getProductAccount(
@NonNull final AcctSchemaId acctSchemaId,
@Nullable final ProductId productId,
@Nul... | if (productId == null)
{
return productCategoryAccountsRepository
.getAccounts(productBL.getDefaultProductCategoryId(), acctSchemaId)
.map(accounts -> accounts.getAccount(acctType))
.orElseThrow(() -> newPostingException().setDetailMessage("No Default Account for account type: " + acctType));
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\accounts\AccountProvider.java | 1 |
请完成以下Java代码 | public ProductionMaterialType getType()
{
return type;
}
@Override
public void setQM_QtyDeliveredPercOfRaw(final BigDecimal qtyDeliveredPercOfRaw)
{
Check.assumeNotNull(qtyDeliveredPercOfRaw, "qtyDeliveredPercOfRaw not null");
this.qtyDeliveredPercOfRaw = qtyDeliveredPercOfRaw;
}
@Override
public BigDec... | @Override
public BOMComponentType getComponentType()
{
return null;
}
@Override
public IHandlingUnitsInfo getHandlingUnitsInfo()
{
return handlingUnitsInfo;
}
@Override
public I_M_Product getMainComponentProduct()
{
return null;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\PlainProductionMaterial.java | 1 |
请完成以下Java代码 | public boolean lowerCaseContains() {
return src.toLowerCase()
.contains(dest.toLowerCase());
}
// matches() with Regular Expressions
@Benchmark
public boolean matchesRegularExpression() {
return src.matches("(?i).*" + dest + ".*");
}
public boolean processRegionMatc... | // Pattern CASE_INSENSITIVE with regexp
@Benchmark
public boolean patternCaseInsensitiveRegexp() {
return pattern.matcher(src)
.find();
}
// Apache Commons StringUtils containsIgnoreCase
@Benchmark
public boolean apacheCommonsStringUtils() {
return org.apache.commons... | repos\tutorials-master\core-java-modules\core-java-string-operations-2\src\main\java\com\baeldung\contains\CaseInsensitiveWorkarounds.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static class OAuth2LoginBeanConfig implements ApplicationContextAware {
private ApplicationContext context;
@Override
public void setApplicationContext(ApplicationContext context) throws BeansException {
this.context = context;
}
@SuppressWarnings({ "unchecked", "unused" })
Map<String, String>... | MediaTypeRequestMatcher mediaMatcher = new MediaTypeRequestMatcher(contentNegotiationStrategy,
MediaType.APPLICATION_XHTML_XML, new MediaType("image", "*"), MediaType.TEXT_HTML,
MediaType.TEXT_PLAIN);
mediaMatcher.setIgnoredMediaTypes(Collections.singleton(MediaType.ALL));
RequestMatcher notXRequestedWi... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\http\OAuth2LoginBeanDefinitionParser.java | 2 |
请完成以下Java代码 | public class SumUpCardReaderExternalId
{
@NonNull private final String value;
private SumUpCardReaderExternalId(@NonNull final String value)
{
final String valueNorm = StringUtils.trimBlankToNull(value);
if (valueNorm == null)
{
throw new AdempiereException("Invalid card reader id: " + value);
}
this.v... | @Nullable
public static SumUpCardReaderExternalId ofNullableString(@Nullable final String value)
{
final String valueNorm = StringUtils.trimBlankToNull(value);
return valueNorm != null ? new SumUpCardReaderExternalId(valueNorm) : null;
}
@Override
@Deprecated
public String toString() {return getAsString();}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sumup\src\main\java\de\metas\payment\sumup\SumUpCardReaderExternalId.java | 1 |
请完成以下Java代码 | public class UserOauth implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@JsonSerialize(using = ToStringSerializer.class)
@Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID)
private Long id;
/**
* 租户ID
*/
private String tenantId;
... | * 用户网址
*/
private String blog;
/**
* 所在公司
*/
private String company;
/**
* 位置
*/
private String location;
/**
* 用户邮箱
*/
private String email;
/**
* 用户备注(各平台中的用户个人介绍)
*/
private String remark;
/**
* 性别
*/
private String gender;
/**
* 用户来源
*/
private String source;
} | repos\SpringBlade-master\blade-service-api\blade-user-api\src\main\java\org\springblade\system\user\entity\UserOauth.java | 1 |
请完成以下Java代码 | public void setAppname(String appname) {
this.appname = appname;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public int getAddressType() {
return addressType;
}
public void setAddressType(int ... | public String getAddressList() {
return addressList;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public void setAddressList(String addressList) {
this.addressList = addressLis... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\model\XxlJobGroup.java | 1 |
请完成以下Java代码 | public boolean contains(PropertyKey<?> property) {
return properties.containsKey(property.getName());
}
/**
* Returns <code>true</code> if this properties contains a mapping for the specified property key.
*
* @param property
* the property key whose presence is to be tested
* @return... | * Returns a map view of this properties. Changes to the map are not reflected
* to the properties.
*
* @return a map view of this properties
*/
public Map<String, Object> toMap() {
return new HashMap<String, Object>(properties);
}
@Override
public String toString() {
return "Properties [pro... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\core\model\Properties.java | 1 |
请完成以下Java代码 | public void setM_Locator_ID (final int M_Locator_ID)
{
if (M_Locator_ID < 1)
set_Value (COLUMNNAME_M_Locator_ID, null);
else
set_Value (COLUMNNAME_M_Locator_ID, M_Locator_ID);
}
@Override
public int getM_Locator_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Locator_ID);
}
@Override
public void setM... | return get_ValueAsInt(COLUMNNAME_M_PickingSlot_ID);
}
@Override
public void setM_Warehouse_ID (final int M_Warehouse_ID)
{
if (M_Warehouse_ID < 1)
set_Value (COLUMNNAME_M_Warehouse_ID, null);
else
set_Value (COLUMNNAME_M_Warehouse_ID, M_Warehouse_ID);
}
@Override
public int getM_Warehouse_ID()
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\picking\model\X_M_PickingSlot.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setNonNullParameter(PreparedStatement ps, int i, BaseEnum parameter, JdbcType jdbcType)
throws SQLException {
ps.setInt(i, parameter.getCode());
}
@Override
public E getNullableResult(ResultSet rs, String columnName) throws SQLException {
int code = rs.getInt(columnN... | }
@Override
public E getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
int code = cs.getInt(columnIndex);
return cs.wasNull() ? null : codeOf(code);
}
private E codeOf(int code){
try {
return EnumUtil.codeOf(type, code);
} catch ... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\typehandler\EnumTypeHandler.java | 2 |
请完成以下Java代码 | public boolean isWillingToCommit ()
{
Object oo = get_Value(COLUMNNAME_IsWillingToCommit);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
... | }
/** Get Private Note.
@return Private Note - not visible to the other parties
*/
public String getPrivateNote ()
{
return (String)get_Value(COLUMNNAME_PrivateNote);
}
/** Set Text Message.
@param TextMsg
Text Message
*/
public void setTextMsg (String TextMsg)
{
set_Value (COLUMNNAME_TextMsg... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_B_Bid.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public State clone()
{
State state = new State(arcs.length - 1);
state.stack = new ArrayDeque<Integer>(stack);
for (int dependent = 0; dependent < arcs.length; dependent++)
{
if (arcs[dependent] != null)
{
Edge head = arcs[dependent];
... | if (leftMostArcs[h] != 0)
{
state.leftMostArcs[h] = leftMostArcs[h];
state.leftValency[h] = leftValency[h];
state.leftDepLabels[h] = leftDepLabels[h];
}
}
}
state.rootIndex = rootIndex;
state.... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dependency\perceptron\transition\configuration\State.java | 2 |
请完成以下Java代码 | public class JmxInvoker {
public static void main(String... args) throws Exception {
String serviceURL = args[0];
String name = args[1];
String operation = args[2];
String attributeValue = null;
if (args.length > 3) {
attributeValue = args[3];
}
... | JmxConnectionWrapper connection = new JmxConnectionWrapper(url, mBeanName);
if (connection.hasAttribute(operation)) {
Object value = connection.attributeValue(operation, attributeValue);
return operation + "=" + value;
} else {
Object result = con... | repos\tutorials-master\core-java-modules\core-java-perf-2\src\main\java\com\baeldung\jmxshell\custom\JmxInvoker.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.