@Override
@Transactional(readOnly=true)
public List<ISubscription> getSubscriptionsForGraph(String graphName, String groupName) {
if (groupName == null) {
return getSubscriptionsForGraph(graphName);
} else {
Object[] args = new Object[2];
args[0] = graphName;
args[1] = groupName;
// <graphName> => lies waygraphs => <graph_id> => lies subscription_groups => <group_id> => lies subscriptions
return getJdbcTemplate().query("SELECT s.*, sg.name AS group_name, sg.graph_id AS group_graph_id, wg.name AS graph_name " +
"FROM " + schema + "subscriptions AS s, " +
schema + "subscription_groups AS sg " +
"LEFT JOIN " + schema + "waygraphs AS wg ON sg.graph_id = wg.id " +
"WHERE s.group_id = sg.id AND sg.graph_id = (SELECT w.id FROM " + schema + "waygraphs AS w WHERE name = ?) " +
"AND sg.name = ?",
args, subscriptionRowMapper);
}
}
SubscriptionDaoImpl.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:graphium
作者:
评论列表
文章目录