Added java for OR-2 Query.