package keysmith.service.core;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "PUBLIC_KEY")
public class SimpleKey {

	@Id 
	@GeneratedValue(generator="system-uuid")
	@GenericGenerator(name="system-uuid", strategy = "uuid2")
	String id;

	@Basic
	@NotNull
	String data;

	public SimpleKey() {
		super();
	}

	public SimpleKey(String id, String data) {
		super();
		this.id = id;
		this.data = data;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getData() {
		return data;
	}

	public void setData(String data) {
		this.data = data;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("SimpleKey [").append(id).append("=").append(data)
				.append("]");
		return builder.toString();
	}

}

@@ -57,16 +57,49 @@
 .Basic;%0A
+import javax.persistence.Column;%0A
 import j
@@ -523,16 +523,38 @@
 NotNull%0A
+%09@Column(length=1024)%0A
 %09String 

increase key size