I wouldn't know of a way to do this with SQL only in SQLite. So this is the best solution I can think of:
1. Get all different entity1/entity2-pairs:
SELECT DISTINCT entity1, entity2 FROM Events;
2. In Java filter out the duplicates (those pairs that only differ in order).
3. Loop through the remaining pairs and query the matching events:
SELECT * FROM Events WHERE (entity1=@e1 AND entity2=@e2) OR (entity1=@e2 AND entity2=@e1);
Where @e1 and @e2 are the parameter names for the filtered entity pairs.