001package org.kuali.kpme.edo.reviewernote;
002
003import java.sql.Timestamp;
004import java.util.Date;
005
006import org.kuali.kpme.edo.api.reviewernote.EdoReviewerNote;
007import org.kuali.kpme.edo.api.reviewernote.EdoReviewerNoteContract;
008import org.kuali.rice.core.api.mo.ModelObjectUtils;
009import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
010
011public class EdoReviewerNoteBo extends PersistableBusinessObjectBase implements EdoReviewerNoteContract {
012
013        private static final long serialVersionUID = 4600890413203389445L;
014        /*
015        static class KeyFields {
016                private static final String EDO_ITEM_TYPE = "itemTypeName";
017        }*/
018        
019        private String edoReviewerNoteId;
020        private String edoDossierId;
021    private String userPrincipalId;
022    private String note;
023    private Date reviewDateVal;
024    private Timestamp createdAtVal;
025
026        @Override
027        public String getObjectId() {
028                return super.getObjectId();
029        }
030
031        @Override
032        public Long getVersionNumber() {
033                return super.getVersionNumber();
034        }
035        
036    public String getEdoReviewerNoteId() {
037                return edoReviewerNoteId;
038        }
039
040        public void setEdoReviewerNoteId(String edoReviewerNoteId) {
041                this.edoReviewerNoteId = edoReviewerNoteId;
042        }
043
044        public String getEdoDossierId() {
045                return edoDossierId;
046        }
047
048        public void setEdoDossierId(String edoDossierId) {
049                this.edoDossierId = edoDossierId;
050        }
051
052        public String getUserPrincipalId() {
053                return userPrincipalId;
054        }
055
056        public void setUserPrincipalId(String userPrincipalId) {
057                this.userPrincipalId = userPrincipalId;
058        }
059
060        public String getNote() {
061                return note;
062        }
063
064        public void setNote(String note) {
065                this.note = note;
066        }
067
068        public Date getReviewDateVal() {
069                return reviewDateVal;
070        }
071
072        public void setReviewDateVal(Date reviewDateVal) {
073                this.reviewDateVal = reviewDateVal;
074        }
075
076        public Timestamp getCreatedAtVal() {
077                return createdAtVal;
078        }
079
080        public void setCreatedAtVal(Timestamp createdAtVal) {
081                this.createdAtVal = createdAtVal;
082        }
083  
084    
085    public static EdoReviewerNoteBo from(EdoReviewerNote im) {
086        if (im == null) {
087            return null;
088        }
089        EdoReviewerNoteBo edoReviewerNoteBo = new EdoReviewerNoteBo();
090        
091        edoReviewerNoteBo.setEdoReviewerNoteId(im.getEdoReviewerNoteId());
092        edoReviewerNoteBo.setEdoDossierId(im.getEdoDossierId());
093        edoReviewerNoteBo.setUserPrincipalId(im.getUserPrincipalId());
094        edoReviewerNoteBo.setNote(im.getNote());
095        edoReviewerNoteBo.setCreatedAtVal(im.getCreatedAtVal());
096        edoReviewerNoteBo.setReviewDateVal(im.getReviewDateVal());
097        edoReviewerNoteBo.setVersionNumber(im.getVersionNumber());
098        edoReviewerNoteBo.setObjectId(im.getObjectId());
099        
100     
101        return edoReviewerNoteBo;
102    } 
103    
104    public static EdoReviewerNote to(EdoReviewerNoteBo bo) {
105        if (bo == null) {
106            return null;
107        }
108        return EdoReviewerNote.Builder.create(bo).build();
109    }
110    
111    public static final ModelObjectUtils.Transformer<EdoReviewerNoteBo, EdoReviewerNote> toImmutable = new ModelObjectUtils.Transformer<EdoReviewerNoteBo, EdoReviewerNote>() {
112        public EdoReviewerNote transform(EdoReviewerNoteBo input) {
113            return EdoReviewerNoteBo.to(input);
114        };
115    };
116            
117    public static final ModelObjectUtils.Transformer<EdoReviewerNote, EdoReviewerNoteBo> toBo = new ModelObjectUtils.Transformer<EdoReviewerNote, EdoReviewerNoteBo>() {
118        public EdoReviewerNoteBo transform(EdoReviewerNote input) {
119            return EdoReviewerNoteBo.from(input);
120        };
121    };
122
123}