posted 6 years ago
Thanks for Reply Boyarsky.
I have configured in a properties file (kind of hard coded) for each game, for this use case. Which looks similar to...
312.excludes=5,6
313.excludes=1
314.excludes=2,3
Please note that i have different configuration file for different use cases... For time being i am achieving the required query as below
if (excludes != null) {
queryStr.append(" and order_id not in (" + excludes + ")");
}
Query query = session.createSQLQuery((queryStr.toString()));
And iterating thorough results set and creating the Game object.