Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package in.shop2020.metamodel.core;

import java.util.ArrayList;
import java.util.List;

import in.shop2020.metamodel.util.ReusableMetaModelComponent;

/**
 * @author rajveer
 *
 */
public class Helpdoc extends ReusableMetaModelComponent {

        private static final long serialVersionUID = 1L;
        
        /**
         * Help Document name
         */
        private String name;

        private String content;
        
        private List<String> terms;
        
        private List<Long> relatedDocIds;
        
        /**
         * 
         * @param newID
         * @param name
         */
        public Helpdoc(long newID, String name) {
                super(newID);
                this.setName(name);
        }
        
        
    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }


    /**
     * @return the name
     */
    public String getName() {
        return name;
    }


        /**
         * @param content the content to set
         */
        public void setContent(String content) {
                this.content = content;
        }


        /**
         * @return the content
         */
        public String getContent() {
                return content;
        }


        /**
         * @param terms the terms to set
         */
        public void addTerm(String term) {
                if(this.terms == null ){
                        this.terms = new ArrayList<String>();
                }
                this.terms.add(term);
        }
        
        
        /**
         * @param terms the terms to set
         */
        public void setTerms(List<String> terms) {
                this.terms = terms;
        }


        /**
         * @return the terms
         */
        public List<String> getTerms() {
                return terms;
        }


        /**
         * @param relatedDocIds the relatedDocIds to set
         */
        public void addrelatedDocId(long relatedDocId) {
                if(this.relatedDocIds == null ){
                        this.relatedDocIds = new ArrayList<Long>();
                }
                this.relatedDocIds.add(relatedDocId);
        }
        
        /**
         * @param relatedDocIds the relatedDocIds to set
         */
        public void setRelatedDocIds(List<Long> relatedDocIds) {
                this.relatedDocIds = relatedDocIds;
        }


        /**
         * @return the relatedDocIds
         */
        public List<Long> getRelatedDocIds() {
                return relatedDocIds;
        }


        @Override
        public String toString() {
                return "Helpdoc [name=" + name + ", content=" + content + ", terms="
                                + terms + ", relatedDocIds=" + relatedDocIds + ", id=" + id
                                + "]";
        }
        
}