Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package com.polsl.engineerproject.api.model;
- import com.polsl.engineerproject.model.Category;
- import com.polsl.engineerproject.model.HeadCategory;
- import com.polsl.engineerproject.model.Topic;
- import com.polsl.engineerproject.model.User;
- import java.util.Collection;
- import java.util.Date;
- public class CategoryApi {
- private Integer id;
- private String description;
- private Date createdDate;
- private Date modifiedDate;
- private String name;
- private UserApi authorId;
- private HeadCategoryApi headCategoryId;
- public CategoryApi(Category category, User user, HeadCategory headCategory) {
- this.id = category.getId();
- this.authorId = new UserApi(user);
- this.createdDate = category.getCreatedDate();
- this.description = category.getDescription();
- this.name = category.getName();
- this.modifiedDate = category.getModifiedDate();
- this.headCategoryId = new HeadCategoryApi(headCategory);
- }
- public Integer getId() {
- return id;
- }
- public void setId(int id) {
- this.id = id;
- }
- public String getDescription() {
- return description;
- }
- public void setDescription(String description) {
- this.description = description;
- }
- public Date getCreatedDate() {
- return createdDate;
- }
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
- public Date getModifiedDate() {
- return modifiedDate;
- }
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public UserApi getAuthorId() {
- return authorId;
- }
- public void setAuthorId(UserApi authorId) {
- this.authorId = authorId;
- }
- public HeadCategoryApi getHeadCategoryId() {
- return headCategoryId;
- }
- public void setHeadCategoryId(HeadCategoryApi headCategoryId) {
- this.headCategoryId = headCategoryId;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement