Package 

Class PanacheMongoEntityBase


  • 
    public abstract class PanacheMongoEntityBase
    
                        

    Represents an entity. If your Mongo entities extend this class they gain auto-generated accessors to all their public fields, as well as a lot of useful methods. Unless you have a custom ID strategy, you should not extend this class directly but extend PanacheMongoEntity instead.

    • Method Summary

      Modifier and Type Method Description
      final Unit persist() Persist this entity in the database.
      final Unit update() Update this entity in the database.
      final Unit persistOrUpdate() Persist this entity in the database or update it if it already exists.
      final Unit delete() Delete this entity from the database if it is already persisted.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PanacheMongoEntityBase

        PanacheMongoEntityBase()
    • Method Detail

      • persist

         final Unit persist()

        Persist this entity in the database. This will set its ID field if not already set.

      • update

         final Unit update()

        Update this entity in the database.

      • persistOrUpdate

         final Unit persistOrUpdate()

        Persist this entity in the database or update it if it already exists.

      • delete

         final Unit delete()

        Delete this entity from the database if it is already persisted.