Class DTOMapper


  • @Component
    public class DTOMapper
    extends Object
    • Constructor Detail

      • DTOMapper

        public DTOMapper()
    • Method Detail

      • entityToDto

        public <E extends BaseEntity,​D extends org.cxbox.api.data.dto.DataResponseDTO> D entityToDto​(BcIdentifier bc,
                                                                                                           E entity,
                                                                                                           Class<D> dtoClass,
                                                                                                           boolean flushRequired,
                                                                                                           Map<String,​Object> attributes)
        Creates a dto with the required set of fields for the current screen
      • entityToDto

        public <E extends BaseEntity,​D extends org.cxbox.api.data.dto.DataResponseDTO> D entityToDto​(BcIdentifier bc,
                                                                                                           E entity,
                                                                                                           Class<D> dtoClass,
                                                                                                           boolean flushRequired)
        Creates a dto with the required set of fields for the current screen
      • entityToDto

        public <E extends BaseEntity,​D extends org.cxbox.api.data.dto.DataResponseDTO> D entityToDto​(BcIdentifier bc,
                                                                                                           E entity,
                                                                                                           Class<D> dtoClass)
        Creates a dto with the required set of fields for the current screen
      • entityToDto

        public <E extends BaseEntity,​D extends org.cxbox.api.data.dto.DataResponseDTO> D entityToDto​(BcIdentifier bc,
                                                                                                           E entity,
                                                                                                           Class<D> dtoClass,
                                                                                                           Map<String,​Object> attributes)
        Creates a dto with the required set of fields for the current screen
      • entityToDto

        public <E extends BaseEntity,​D extends org.cxbox.api.data.dto.DataResponseDTO> D entityToDto​(E entity,
                                                                                                           Class<D> dtoClass)
        Creates a dto with a complete set of fields
      • entityToDto

        public <E extends BaseEntity,​D extends org.cxbox.api.data.dto.DataResponseDTO> D entityToDto​(E entity,
                                                                                                           Class<D> dtoClass,
                                                                                                           Set<DtoField<D,​?>> fields,
                                                                                                           boolean flushRequired)
        Creates a dto with a given set of fields
      • entityToDto

        public <E extends BaseEntity,​D extends org.cxbox.api.data.dto.DataResponseDTO> D entityToDto​(E entity,
                                                                                                           Class<D> dtoClass,
                                                                                                           DtoField<D,​?> field)
      • entityToDto

        public <E extends BaseEntity,​D extends org.cxbox.api.data.dto.DataResponseDTO> D entityToDto​(E entity,
                                                                                                           Class<D> dtoClass,
                                                                                                           Set<DtoField<D,​?>> fields)
        Creates a dto with a given set of fields