0

I'm using hibernate 3.3.1 and I need to get a list of entites which don't satisfies a criterion.

I've written my own Criterion implementation, called SimpleTemplateCriterion for an often use-case and I'd like to know am I going to have to write something like NotSimpleTemplateCriterion to use it for all entities not satisfying the SimpleTemplateCriterion criterion?

The thing I'd like to avoid code duplicate.

St.Antario
  • 26,175
  • 41
  • 130
  • 318

1 Answers1

1

You can use Restrictions.not, you can pass to it your criterion, have a look here.

Community
  • 1
  • 1
Mooolo
  • 428
  • 2
  • 7