All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.imunity.rest.mappers.registration.AdminCommentMapper Maven / Gradle / Ivy

There is a newer version: 4.0.4
Show newest version
/*
 * Copyright (c) 2021 Bixbit - Krzysztof Benedyczak. All rights reserved.
 * See LICENCE.txt file for licensing information.
 */

package io.imunity.rest.mappers.registration;

import io.imunity.rest.api.types.registration.RestAdminComment;
import pl.edu.icm.unity.base.registration.AdminComment;

public class AdminCommentMapper
{
	public static RestAdminComment map(AdminComment adminComment)
	{
		return RestAdminComment.builder()
				.withAuthorEntityId(adminComment.getAuthorEntityId())
				.withContents(adminComment.getContents())
				.withDate(adminComment.getDate())
				.withPublicComment(adminComment.isPublicComment())
				.build();
	}

	public static AdminComment map(RestAdminComment restAdminComment)
	{
		AdminComment adminComment = new AdminComment(restAdminComment.contents, restAdminComment.authorEntityId,
				restAdminComment.publicComment);
		adminComment.setDate(restAdminComment.date);
		return adminComment;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy