Package 

Class PanacheMongoEntity

  • All Implemented Interfaces:

    
    public abstract class PanacheMongoEntity
    extends PanacheMongoEntityBase
                        

    Represents an entity with a generated ID field id of type ObjectId. If your Mongo entities extend this class they gain the ID field and auto-generated accessors to all their public fields, as well as all the useful methods from PanacheMongoEntityBase.

    If you want a custom ID type or strategy, you can directly extend PanacheMongoEntityBase instead, and write your own ID field. You will still get auto-generated accessors and all the useful methods.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private ObjectId id
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final ObjectId getId() The auto-generated ID field.
      final Unit setId(ObjectId id) The auto-generated ID field.
      String toString() Default toString() implementation
      • Methods inherited from class io.quarkus.mongodb.panache.kotlin.PanacheMongoEntity

        delete, persist, persistOrUpdate, update
      • Methods inherited from class java.lang.Object

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

      • PanacheMongoEntity

        PanacheMongoEntity()
    • Method Detail

      • getId

         final ObjectId getId()

        The auto-generated ID field. This field is set by Mongo when this entity is persisted.

      • setId

         final Unit setId(ObjectId id)

        The auto-generated ID field. This field is set by Mongo when this entity is persisted.