package org.fedorahosted.flies.core.model;

import javax.persistence.MappedSuperclass;

import org.fedorahosted.flies.validator.url.Slug;
import org.hibernate.annotations.NaturalId;
import org.hibernate.validator.Length;

@MappedSuperclass
public class AbstractSlugEntity extends AbstractFliesEntity{
	private String slug;

	@NaturalId
	@Length(min = 2, max = 40)
	@Slug
	public String getSlug() {
		return slug;
	}

	public void setSlug(String slug) {
		this.slug = slug;
	}

}

@@ -213,16 +213,56 @@
 .Length;
+%0Aimport org.hibernate.validator.NotNull;
 %0A%0A@Mappe
@@ -404,16 +404,26 @@
 %0A%09@Slug%0A
+%09@NotNull%0A
 %09public 

add NotNull constraint on slug