Class NamedEntityDto

    • Field Detail

      • id

        public final Long id
      • name

        public final String name
    • Constructor Detail

      • NamedEntityDto

        public NamedEntityDto​(de.xima.cmn.dao.interfaces.IEntity<Long> entity,
                              Function<de.xima.cmn.dao.interfaces.IEntity<Long>,​String> nameFunc)
        Creates a new instance based on an entity and a custom name provider.
        Parameters:
        entity - the entity
        nameFunc - function for creating the value of the DTO's 'name' attribute
      • NamedEntityDto

        public NamedEntityDto​(Long id,
                              String name)
        Creates a new instance based on the provided attributes.
        Parameters:
        id - the entity's id
        name - the entity's name