本文整理了Java中net.java.ao.Query.where
方法的一些代码示例,展示了Query.where
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.where
方法的具体详情如下:
包路径:net.java.ao.Query
类名称:Query
方法名:where
暂无
代码示例来源:origin: com.marvelution.jira.plugins/jira-jenkins-plugin
@Override
public Set<String> doInTransaction() {
IssueMapping[] mappings = ao.find(IssueMapping.class, Query.select().where(ISSUE_KEY + " IS NOT NULL"));
return Sets.newHashSet(Lists.transform(Arrays.asList(mappings), new Function<IssueMapping, String>() {
@Override
public String apply(IssueMapping input) {
return input != null ? input.getIssueKey() : null;
}
}));
}
});
代码示例来源:origin: com.atlassian.plugins/atlassian-connect-server-core
public Optional<AddonProperty> getPropertyValue(@Nonnull final String addonKey, @Nonnull final String propertyKey) {
AddonPropertyAO[] properties = ao.find(AddonPropertyAO.class, Query.select().where("PLUGIN_KEY = ? AND PROPERTY_KEY = ?", addonKey, propertyKey));
Optional<AddonPropertyAO> option = Optional.ofNullable(Iterables.getFirst(Arrays.asList(properties), null));
return option.flatMap(addonPropertyAO -> Optional.of(AddonPropertyFactory.fromAO(addonPropertyAO)));
}
代码示例来源:origin: com.marvelution.jira.plugins/jira-jenkins-plugin
@Override
public List<JobMapping> doInTransaction() {
return Arrays.asList(ao.find(JobMapping.class, Query.select().where(NAME + " = ?", name)));
}
});
代码示例来源:origin: com.marvelution.jira.plugins/jira-jenkins-plugin
@Override
public IssueMapping[] doInTransaction() {
return ao.find(IssueMapping.class, Query.select().where(PORJECT_KEY + " = ?", projectKey));
}
});
代码示例来源:origin: com.marvelution.jira.plugins/jira-jenkins-plugin
@Override
public IssueMapping[] doInTransaction() {
return ao.find(IssueMapping.class, Query.select().where(ISSUE_KEY + " = ?", issueKey));
}
});
代码示例来源:origin: com.marvelution.jira.plugins/jira-jenkins-plugin
@Override
public BuildMapping doInTransaction() {
BuildMapping[] mappings = ao.find(BuildMapping.class, Query.select().where(JOB_ID + " = ? AND " +
BUILD_NUMBER + " = ?", jobId, buildNumber));
if (mappings != null && mappings.length == 1) {
return mappings[0];
} else {
return null;
}
}
});
代码示例来源:origin: com.marvelution.jira.plugins/jira-jenkins-plugin
@Override
public List<IssueMapping> doInTransaction() {
IssueMapping[] mappings = ao.find(IssueMapping.class, Query.select().where(BUILD_ID + " = ?",
build.getId()));
return Arrays.asList(mappings);
}
});
代码示例来源:origin: com.marvelution.jira.plugins/jira-jenkins-plugin
@Override
public List<IssueMapping> doInTransaction() {
IssueMapping[] mappings = ao.find(IssueMapping.class, Query.select().where(JOB_ID + " = ?",
job.getId()));
return Arrays.asList(mappings);
}
});
代码示例来源:origin: com.marvelution.jira.plugins/jira-jenkins-plugin
@Override
public List<JobMapping> doInTransaction() {
Query query = Query.select();
if (!includeDeleted) {
query.where(DELETED + " = ?", Boolean.FALSE);
}
query.order(NAME);
return Arrays.asList(ao.find(JobMapping.class, query));
}
});
代码示例来源:origin: com.marvelution.jira.plugins/jira-jenkins-plugin
@Override
public List<BuildMapping> doInTransaction() {
return Arrays.asList(ao.find(BuildMapping.class, Query.select()
.where(JOB_ID + " = ?", jobId)
.order(TIME_STAMP)));
}
});
代码示例来源:origin: com.marvelution.jira.plugins/jira-jenkins-plugin
@Override
public List<IssueMapping> doInTransaction() {
IssueMapping[] mappings = ao.find(IssueMapping.class, Query.select().where(BUILD_ID + " = ?",
build.getId()));
return Arrays.asList(mappings);
}
});
代码示例来源:origin: com.atlassian.plugin.automation/automation-module
@Override
public Rule getRule(final String name)
{
final RuleEntity[] ruleEntity = ao.find(RuleEntity.class, Query.select().where("RULE_NAME = ?", name));
Rule ret = null;
if (ruleEntity != null && ruleEntity.length == 1)
{
ret = transformRule(ruleEntity[0]);
}
return ret;
}
代码示例来源:origin: com.marvelution.jira.plugins/jira-jenkins-plugin
@Override
public SiteMapping doInTransaction() {
SiteMapping[] mappings = ao.find(SiteMapping.class, Query.select().where(SiteMapping.APPLINK_ID + " = ?",
applicationId.get()));
if (mappings != null && mappings.length == 1) {
return mappings[0];
} else {
return null;
}
}
});
代码示例来源:origin: com.marvelution.jira.plugins/jira-jenkins-plugin
@Override
public Integer doInTransaction() {
return ao.count(IssueMapping.class, Query.select().where(BUILD_ID + " = ?", build.getId()));
}
});
代码示例来源:origin: com.marvelution.jira.plugins/jira-jenkins-plugin
@Override
public Object doInTransaction() {
TestResultsMapping[] mappings = ao.find(TestResultsMapping.class, Query.select().where(TestResultsMapping.BUILD_ID +
" IN (" + StringUtils.join(ArrayUtils.toObject(buildIds), ",") + ")"));
ao.delete(mappings);
return null;
}
});
代码示例来源:origin: com.atlassian.plugins/base-hipchat-integration-plugin-api
@Override
public Option<AOHipChatLink> getLinkByUrlAndGroup(String apiUrl, int groupId) {
final Query query = Query.select()
.from(AOHipChatLink.class)
.where("GROUP_ID = ? and API_URL = ?",
groupId,
apiUrl
);
final AOHipChatLink[] links = ao.find(AOHipChatLink.class, query);
return first(ImmutableList.copyOf(links));
}
代码示例来源:origin: com.marvelution.bamboo.plugins/bamboo-sonar-tasks
@Override
public SonarServer doInTransaction() {
try {
return objects.find(SonarServer.class, Query.select().where("NAME = ?", name).limit(1))[0];
} catch (IndexOutOfBoundsException e) {
return null;
}
}
});
代码示例来源:origin: com.marvelution.jira.plugins/jira-jenkins-plugin
@Override
public List<BuildMapping> doInTransaction() {
return Arrays.asList(ao.find(BuildMapping.class, Query.select()
.where(JOB_ID + " = ? AND " + BUILD_NUMBER + " >= ? AND " + BUILD_NUMBER +
" <= ?", jobId, buildRange.getMinimumInteger(), buildRange.getMaximumInteger())
.order(TIME_STAMP)));
}
});
代码示例来源:origin: com.marvelution.jira.plugins/jira-jenkins-plugin
@Override
public JobMapping[] doInTransaction() {
return ao.find(JobMapping.class, Query.select()
.alias(JobMapping.class, "job")
.alias(SiteMapping.class, "site")
.from(JobMapping.class)
.join(SiteMapping.class, "site.ID = job." + SITE_ID)
.where(where.toString()));
}
});
代码示例来源:origin: Eernie/bitbucket-webhooks-plugin
public WebHookConfiguration[] getEnabledWebHookConfigurations(Repository repo, EventType eventType) {
return activeObjects.find(WebHookConfiguration.class, Query.select()
.where(COLUMN_REPO_ID + " = ? AND " + COLUMN_ENABLED + " = ? AND " + eventType.getQueryColumn() + " = ?",
repo.getId(), true, true)
.order(COLUMN_TITLE));
}
内容来源于网络,如有侵权,请联系作者删除!