Question: I'm starting a new project using JPA 2 + Hibernate 4.2.6 for data access.

I have two tables in my DB representing two different kinds of `Answer`, so I have `answer_type_a` and `answer_type_b` tables.
The are identical except for one field.

Now I'm creating my model classes and I'd like to inherit my `AnswerA` and `AnswerB` entities from a commom super-class or interface `Answer`.

I read some docs about entity inheritance:

* <http://docs.oracle.com/javaee/6/tutorial/doc/bnbqn.html>
* <http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/inheritance.html#inheritance-tablepersubclass>

but I have not a clear view on how to structure my DB and my entity classes to achieve this. Can you help me?

Answer: 
I've managed to create a workaround. It is pretty straightforward. I've subclassed UIWindow and used touchesBegan/touchesMoved/etc. methods to simulate gesture recognition.

It works. UIWindow is not rotated automatically, so I have to transform touch coordinates accordingly.

Here is my version of the transformation:

```
- (CGPoint)transformPoint:(CGPoint)point {
    CGPoint pointInView = point;

    if ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortraitUpsideDown) {
        pointInView.x = self.bounds.size.width - pointInView.x;
        pointInView.y = self.bounds.size.height - pointInView.y;
    } else if ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeLeft) {
        CGFloat x = pointInView.x;
        CGFloat y = pointInView.y;
        pointInView = CGPointMake(self.bounds.size.height - y, x);
    } else if ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeRight) {
        CGFloat x = pointInView.x;
        CGFloat y = pointInView.y;
        pointInView = CGPointMake(y, self.bounds.size.width - x);
    }
    return pointInView;
}

```
I think there's bugs. My app is always in landscape mode, and I've set up the same thing as you, with it detecting the right edge. If that edge is the camera side of the iPad, it detects sporadically. If I flip over the iPad and the right edge is the button side, it works just fine. In fact, I'm having this problem with any gesture, not just this one.