Renamed the to>Entity Name>() functiuons to toEntity()

ref #76
This commit is contained in:
2021-01-10 16:31:55 +01:00
parent a00231dd3c
commit e6b9d4f273
22 changed files with 25 additions and 25 deletions

View File

@@ -56,7 +56,7 @@ export class CreateAddress {
/**
* Creates a new Address entity from this.
*/
public toAddress(): Address {
public toEntity(): Address {
let newAddress: Address = new Address();
newAddress.address1 = this.address1;

View File

@@ -18,7 +18,7 @@ export class CreateDonor extends CreateParticipant {
/**
* Creates a new Donor entity from this.
*/
public async toDonor(): Promise<Donor> {
public async toEntity(): Promise<Donor> {
let newDonor: Donor = new Donor();
newDonor.firstname = this.firstname;

View File

@@ -72,7 +72,7 @@ export class CreateGroupContact {
/**
* Creates a new Address entity from this.
*/
public async toGroupContact(): Promise<GroupContact> {
public async toEntity(): Promise<GroupContact> {
let contact: GroupContact = new GroupContact();
contact.firstname = this.firstname;
contact.middlename = this.middlename;

View File

@@ -39,7 +39,7 @@ export class CreatePermission {
/**
* Creates a new Permission entity from this.
*/
public async toPermission(): Promise<Permission> {
public async toEntity(): Promise<Permission> {
let newPermission: Permission = new Permission();
newPermission.principal = await this.getPrincipal();

View File

@@ -21,7 +21,7 @@ export class CreateRunner extends CreateParticipant {
/**
* Creates a new Runner entity from this.
*/
public async toRunner(): Promise<Runner> {
public async toEntity(): Promise<Runner> {
let newRunner: Runner = new Runner();
newRunner.firstname = this.firstname;

View File

@@ -36,7 +36,7 @@ export class CreateRunnerOrganisation extends CreateRunnerGroup {
/**
* Creates a new RunnerOrganisation entity from this.
*/
public async toRunnerOrganisation(): Promise<RunnerOrganisation> {
public async toEntity(): Promise<RunnerOrganisation> {
let newRunnerOrganisation: RunnerOrganisation = new RunnerOrganisation();
newRunnerOrganisation.name = this.name;

View File

@@ -36,7 +36,7 @@ export abstract class CreateScan {
/**
* Creates a new Scan entity from this.
*/
public async toScan(): Promise<Scan> {
public async toEntity(): Promise<Scan> {
let newScan = new Scan();
newScan.distance = this.distance;

View File

@@ -18,7 +18,7 @@ export class CreateStatsClient {
/**
* Converts this to a StatsClient entity.
*/
public async toStatsClient(): Promise<StatsClient> {
public async toEntity(): Promise<StatsClient> {
let newClient: StatsClient = new StatsClient();
newClient.description = this.description;

View File

@@ -31,7 +31,7 @@ export class CreateTrack {
/**
* Creates a new Track entity from this.
*/
public toTrack(): Track {
public toEntity(): Track {
let newTrack: Track = new Track();
newTrack.name = this.name;

View File

@@ -30,7 +30,7 @@ export class CreateTrackScan {
/**
* Creates a new Track entity from this.
*/
public async toScan(): Promise<TrackScan> {
public async toEntity(): Promise<TrackScan> {
let newScan: TrackScan = new TrackScan();
newScan.station = await this.getStation();

View File

@@ -89,7 +89,7 @@ export class CreateUser {
/**
* Converts this to a User entity.
*/
public async toUser(): Promise<User> {
public async toEntity(): Promise<User> {
let newUser: User = new User();
if (this.email === undefined && this.username === undefined) {

View File

@@ -22,7 +22,7 @@ export class CreateUserGroup {
/**
* Creates a new UserGroup entity from this.
*/
public async toUserGroup(): Promise<UserGroup> {
public async toEntity(): Promise<UserGroup> {
let newUserGroup: UserGroup = new UserGroup();
newUserGroup.name = this.name;