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

### Nested Class Summary

Nested Classes
`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

Fields
`boolean` `willBeSaved`

### Constructor Summary

Constructors
Constructor and Description
`JPABase()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
`void` `_delete()`
`java.lang.Object` `_key()`
`void` `_save()`
`static javax.persistence.EntityManager` `em()`
`static javax.persistence.EntityManager` `em(java.lang.String name)` 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()`
`boolean` `isPersistent(java.lang.String name)`
`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 javax.persistence.EntityManager em(java.lang.String name)

Retrieve the current entityManager

Parameters:
  `name` - The DB name
Returns:
  the current entityManager

#### em

    public static javax.persistence.EntityManager em()

#### isPersistent

    public boolean isPersistent(java.lang.String name)

#### 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` - The object to compare to
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.