package org.nmdp.hmlfhirconverter.domain;

/**
 * Created by abrown3 on 12/21/16.
 */

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.Date;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@Document(collection = "Hml.TypingTestNames")
public class TypingTestName implements Serializable {

    @XmlAttribute
    @Id
    private String id;

    @XmlAttribute
    private String name;

    @XmlAttribute
    private String description;

    @XmlAttribute
    private Boolean active;

    @XmlAttribute
    private Date dateCreated;

    public TypingTestName() {

    }

    public TypingTestName(io.swagger.model.TypingTestName typingTestName) {
        this.name = typingTestName.getName();
        this.description = typingTestName.getDescription();
        this.id = typingTestName.getId();
        this.active = typingTestName.getActive();
        this.dateCreated = typingTestName.getDateCreated();
    }

    public TypingTestName(String name, String description) {
        this.name = name;
        this.description = description;
    }

    public TypingTestName(String id, String name, String description) {
        this.id = id;
        this.name = name;
        this.description = description;
    }

    public TypingTestNameDto toDto() {
        TypingTestNameDto dto = new TypingTestNameDto();

        dto.setName(this.name);
        dto.setId(this.id);
        dto.setDescription(this.description);

        return dto;
    }

    public String getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getDescription() {
        return description;
    }

    public Boolean getActive() { return active; }

    public Date getDateCreated() { return dateCreated; }

    @Override
    public String toString() {
        return "TypingTestName {" +
                " id = " + id +
                " name = " + name +
                " description = " + description +
                " }";
    }
}

package org.nmdp.hmlfhirconverter.domain;

/**
 * Created by abrown3 on 12/21/16.
 */

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.Date;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@Document(collection = "Hml.TypingTestNames")
public class TypingTestName implements Serializable {

    @XmlAttribute
    @Id
    private String id;

    @XmlAttribute
    private String name;

    @XmlAttribute
    private String description;

    @XmlAttribute
    private Boolean active;

    @XmlAttribute
    private Date dateCreated;

    public TypingTestName() {

    }

    public TypingTestName(io.swagger.model.TypingTestName typingTestName) {
        this.name = typingTestName.getName();
        this.description = typingTestName.getDescription();
        this.id = typingTestName.getId();
        this.active = typingTestName.getActive();
        this.dateCreated = typingTestName.getDateCreated();
    }

    public TypingTestName(String name, String description) {
        this.name = name;
        this.description = description;
    }

    public TypingTestName(String id, String name, String description) {
        this.id = id;
        this.name = name;
        this.description = description;
    }

    public TypingTestNameDto toDto() {
        TypingTestNameDto dto = new TypingTestNameDto();

        dto.setName(this.name);
        dto.setId(this.id);
        dto.setDescription(this.description);
        dto.setActive(this.active);
        dto.setDateCreated(this.dateCreated);

        return dto;
    }

    @Override
    public String toString() {
        return "TypingTestName {" +
                " id = " + id +
                " name = " + name +
                " description = " + description +
                " }";
    }
}

Add methods to carry date and activity to typing test names.