org.openehr.designer.repository.TemplateInfo.java Source code

Java tutorial

Introduction

Here is the source code for org.openehr.designer.repository.TemplateInfo.java

Source

/*
 * ADL Designer
 * Copyright (c) 2013-2014 Marand d.o.o. (www.marand.com)
 *
 * This file is part of ADL2-tools.
 *
 * ADL2-tools is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.openehr.designer.repository;

import org.apache.commons.lang.ObjectUtils;

public class TemplateInfo implements Comparable<TemplateInfo> {
    private String templateId;
    private String rmType;
    private String name;

    public TemplateInfo(String templateId, String rmType, String name) {
        this.templateId = templateId;
        this.rmType = rmType;
        this.name = name;
    }

    public TemplateInfo() {
    }

    public String getTemplateId() {
        return templateId;
    }

    public void setTemplateId(String templateId) {
        this.templateId = templateId;
    }

    public String getRmType() {
        return rmType;
    }

    public void setRmType(String rmType) {
        this.rmType = rmType;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public int compareTo(TemplateInfo o) {
        return ObjectUtils.compare(getName(), o.getName());
    }
}