开发者

Java HQL tree display

开发者 https://www.devze.com 2023-04-11 09:21 出处:网络
I have a class named Rule, which contains a Set of childRules(each of the components of the Set are other classes). I am doing a HQL query which is marked as lazy=\"false\".

I have a class named Rule, which contains a Set of childRules(each of the components of the Set are other classes). I am doing a HQL query which is marked as lazy="false".

The problem I am facing is that the HQL brings out classes that match my search pattern on the top level, but those classes can have as a childRules which do not match the pattern.

My question is about how can I get to display only those rules that match my pattern(they can be childRules).

Thx

My class looks like this :

public class Rule
{

private Set<Rule> childRules = null;
private String name = null;
private Long id = 开发者_如何学JAVAnull;
private Long parentId = null;

//with the respective setters/getter
}


You could do re-search starting from the node you found to search for any rule that doesn't match your search pattern.

0

精彩评论

暂无评论...
验证码 换一张
取 消