play.db.jpa
Class JPABase
java.lang.Object
play.db.jpa.JPABase
- All Implemented Interfaces:
- java.io.Serializable, Model
- Direct Known Subclasses:
- GenericModel
@MappedSuperclass
public class JPABase
- extends java.lang.Object
- implements java.io.Serializable, Model
A super class for JPA entities
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
willBeSaved
public transient boolean willBeSaved
JPABase
public JPABase()
_save
public void _save()
- Specified by:
_save
in interface Model
_delete
public void _delete()
- Specified by:
_delete
in interface Model
_key
public java.lang.Object _key()
- Specified by:
_key
in interface Model
em
public static EntityManager em()
- Retrieve the current entityManager
- Returns:
- the current entityManager
isPersistent
public boolean isPersistent()
equals
public boolean equals(java.lang.Object other)
- JPASupport instances a and b are equals if either a == b or a and b have same
key
and class
- Overrides:
equals
in class java.lang.Object
- Parameters:
other
-
- Returns:
- true if equality condition above is verified
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getEntityId
@Deprecated
public java.lang.Object getEntityId()
- Deprecated.
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly