Class AbstractNamedLongUniqueEntity

    • Constructor Detail

      • AbstractNamedLongUniqueEntity

        public AbstractNamedLongUniqueEntity()
      • AbstractNamedLongUniqueEntity

        public AbstractNamedLongUniqueEntity​(NamedLongUniqueObject that)
        Parameters:
        that -
      • AbstractNamedLongUniqueEntity

        public AbstractNamedLongUniqueEntity​(java.lang.Long id,
                                             java.lang.String name)
        Parameters:
        id -
        name -
      • AbstractNamedLongUniqueEntity

        public AbstractNamedLongUniqueEntity​(java.lang.Long id)
        Parameters:
        id -
      • AbstractNamedLongUniqueEntity

        public AbstractNamedLongUniqueEntity​(java.lang.String name)
        Parameters:
        name -
    • Method Detail

      • getId

        public java.lang.Long getId()
        Description copied from class: AbstractUniqueEntity
        Returns the ID of the object. Subclasses need to specify the Column annotation. The ID annotation is necessary: "You cannot override the [id] non-identifier property from the [...AbstractUniqueObject] base class or MappedSuperclass and make it an identifier in the subclass!" So we should not need it in the subclasses.
        Specified by:
        getId in interface UniqueObject<java.lang.Long>
        Overrides:
        getId in class AbstractUniqueEntity<java.lang.Long>
        Returns:
        the unique id of the object.