play.db.jpa
Class JPABase

java.lang.Object
  extended by 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

Nested Class Summary
static class JPABase.JPAQueryException
           
 
Nested classes/interfaces inherited from interface play.db.Model
Model.BinaryField, Model.Choices, Model.Factory, Model.Manager, Model.Property
 
Field Summary
 boolean willBeSaved
           
 
Constructor Summary
JPABase()
           
 
Method Summary
 void _delete()
           
 java.lang.Object _key()
           
 void _save()
           
static EntityManager em()
          Retrieve the current entityManager
 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
 java.lang.Object getEntityId()
          Deprecated. 
 int hashCode()
           
 boolean isPersistent()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

willBeSaved

public transient boolean willBeSaved
Constructor Detail

JPABase

public JPABase()
Method Detail

_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