View on GitHub

Library API Documentation

Documentation for Library API Packages

Library Core / src / PublicationMapper

Class: PublicationMapper

src.PublicationMapper

Maps raw Publication database rows to more accessible DTOs.

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new PublicationMapper(__namedParameters)

Parameters

Name Type
__namedParameters PublicationMapperCtor

Defined in

src/classes/Mapper.ts:16

Properties

contentsPath

contentsPath: string

Defined in

src/classes/Mapper.ts:15


filename

filename: string

Defined in

src/classes/Mapper.ts:14


languageId

languageId: number

Defined in

src/classes/Mapper.ts:16

Methods

MapImage

MapImage(image): ImageDTO

Maps a raw Image database row to a Image DTO.

Parameters

Name Type Description
image ImageRow The database row.

Returns

ImageDTO

Defined in

src/classes/Mapper.ts:32


MapImages

MapImages(images): ImageDTO[]

Maps multiple Image database rows using MapImage and returns the mapped array.

Parameters

Name Type Description
images ImageRow[] The database rows.

Returns

ImageDTO[]

Defined in

src/classes/Mapper.ts:49


MapRelatedPublication

MapRelatedPublication(publication): RelatedPublicationDTO

Maps a raw Related Publication database row to a Related Publication DTO.

Parameters

Name Type Description
publication RelatedPublicationRow The database row.

Returns

RelatedPublicationDTO

Defined in

src/classes/Mapper.ts:99


MapRelatedPublications

MapRelatedPublications(publications): RelatedPublicationDTO[]

Maps multiple Related Publication database rows using MapRelatedPublication and returns the mapped array.

Parameters

Name Type Description
publications RelatedPublicationRow[] The database rows.

Returns

RelatedPublicationDTO[]

Defined in

src/classes/Mapper.ts:112


MapVideo

MapVideo(video): VideoDTO

Maps a raw Video database row to a Video DTO.

Parameters

Name Type Description
video VideoRow The database row.

Returns

VideoDTO

Defined in

src/classes/Mapper.ts:72


MapVideos

MapVideos(videos): VideoDTO[]

Maps multiple Video database rows using MapVideo and returns the mapped array.

Parameters

Name Type Description
videos VideoRow[] The database rows.

Returns

VideoDTO[]

Defined in

src/classes/Mapper.ts:90