Created
February 28, 2011 04:11
-
-
Save jnorthrup/846925 to your computer and use it in GitHub Desktop.
static delegate for jpa em
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Transactional | |
public void persist() { | |
ModelTx.persist(this); | |
} | |
@Transactional | |
public void flush() { | |
ModelTx.flush(); | |
} | |
public static final EntityManager entityManager() { | |
return ModelTx.entityManager(); | |
} | |
@Transactional | |
public void remove() { | |
ModelTx.remove(this,TwImage.class); | |
} | |
@Transactional | |
public TwImage merge() { | |
return ModelTx.merge(this); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment