Hibernate Criteria Restrictions AND / OR 的 组合

希望在 Hibernate 中创建下面的表达式:

(((A='X') and (B in('X',Y))) or ((A='Y') and (B='Z')))