/*
 * Copyright 2017, Red Hat, Inc. and individual contributors
 * as indicated by the @author tags. See the copyright.txt file in the
 * distribution for a full listing of individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.zanata.model;

import java.util.Objects;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;


/**
 * @author Patrick Huang <a href="mailto:pahuang@redhat.com">pahuang@redhat.com</a>
 */
@Entity
@NamedQueries(
        @NamedQuery(name = ReviewCriteria.QUERY_BY_DESCRIPTION, query = "from ReviewCriteria where description = :description")
)
public class ReviewCriteria extends ModelEntityBase {
    public static final String QUERY_BY_DESCRIPTION = "ReviewCriteriaByDescription";
    private static final long serialVersionUID = -8213113671271711837L;
    @Enumerated(EnumType.STRING)
    private IssuePriority priority;
    private boolean editable;
    private String description;

    public IssuePriority getPriority() {
        return priority;
    }

    public boolean isEditable() {
        return editable;
    }

    public String getDescription() {
        return description;
    }

    public ReviewCriteria(IssuePriority priority, boolean editable,
            String description) {
        this.priority = priority;
        this.editable = editable;
        this.description = description;
    }

    public ReviewCriteria() {
    }

    public void setPriority(IssuePriority priority) {
        this.priority = priority;
    }

    public void setEditable(boolean editable) {
        this.editable = editable;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof ReviewCriteria)) return false;
        if (!super.equals(o)) return false;
        ReviewCriteria that = (ReviewCriteria) o;
        return editable == that.editable &&
                priority == that.priority &&
                Objects.equals(description, that.description);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), priority, editable, description);
    }
}

@@ -1024,16 +1024,119 @@
 bjects;%0A
+import javax.persistence.Access;%0Aimport javax.persistence.AccessType;%0Aimport javax.persistence.Column;%0A
 import j
@@ -1160,16 +1160,16 @@
 Entity;%0A
-
 import j
@@ -1555,16 +1555,42 @@
 ion%22)%0A)%0A
+@Access(AccessType.FIELD)%0A
 public c
@@ -1792,16 +1792,16 @@
 11837L;%0A
-
     @Enu
@@ -1825,16 +1825,58 @@
 STRING)%0A
+    @Column(columnDefinition = %22varchar%22)%0A
     priv

fix test