Fully qualified JPA annotations?


#1

Is it possible to get SDE to generate fully qualified JPA annotations instead of importing javax.persistence.*?

I ask because I have an ORM Persistable class called Entity in my model. As a result, SDE generates that doesn’t compile. It would be pretty easy to modify the code to compile, but I’d rather not do that every time I change my model.

Here’s the code that comes out of SDE:


import java.io.Serializable;
import javax.persistence.*;
@Entity
@org.hibernate.annotations.Proxy(lazy=false)
@Table(name="Entity_Master")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name="EntityType", discriminatorType=DiscriminatorType.STRING)
@DiscriminatorValue("Entity")
public class Entity implements Serializable {

Here’s what I want:


@javax.persistence.Entity
@org.hibernate.annotations.Proxy(lazy=false)
@javax.persistence.Table(name="Entity_Master")
@javax.persistence.Inheritance(strategy=javax.persistence.InheritanceType.SINGLE_TABLE)
@javax.persistence.DiscriminatorColumn(name="EntityType", discriminatorType=javax.persistence.DiscriminatorType.STRING)
@javax.persistence.DiscriminatorValue("Entity")
public class Entity implements java.io.Serializable {

It’s a lot uglier, but it’s guaranteed to never step on my toes. Is it possible to get here in SDE? I’ve got VP Professional Suite 5.1, if that matters.

Thanks!