// Path: yodao-annotations/src/main/java/com/yoda/yodao/annotation/GenerationType.java
// public enum GenerationType { 
// 
//     /**
//      * Indicates that the persistence provider must assign 
//      * primary keys for the entity using an underlying 
//      * database table to ensure uniqueness.
//      */
//     TABLE, 
// 
//     /**
//      * Indicates that the persistence provider must assign 
//      * primary keys for the entity using database sequence column.
//      */
//     SEQUENCE, 
// 
//     /**
//      * Indicates that the persistence provider must assign 
//      * primary keys for the entity using database identity column.
//      */
//     IDENTITY, 
// 
//     /**
//      * Indicates that the persistence provider should pick an 
//      * appropriate strategy for the particular database. The 
//      * <code>AUTO</code> generation strategy may expect a database 
//      * resource to exist, or it may attempt to create one. A vendor 
//      * may provide documentation on how to create such resources 
//      * in the event that it does not support schema generation 
//      * or cannot create the schema resource at runtime.
//      */
//     AUTO,
//     
//     UUID
// }


import static javax.tools.Diagnostic.Kind.ERROR;
import static javax.tools.Diagnostic.Kind.NOTE;
import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.Filer;
import javax.annotation.processing.Messager;
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.Processor;
import javax.annotation.processing.RoundEnvironment;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.TypeElement;
import javax.lang.model.util.Elements;
import javax.lang.model.util.Types;
import javax.tools.JavaFileObject;
import com.google.auto.service.AutoService;
import com.yoda.yodao.annotation.Column;
import com.yoda.yodao.annotation.Entity;
import com.yoda.yodao.annotation.GeneratedValue;
import com.yoda.yodao.annotation.GenerationType;
import com.yoda.yodao.annotation.Id;
import com.yoda.yodao.annotation.JoinColumn;
import com.yoda.yodao.annotation.ManyToMany;
import com.yoda.yodao.annotation.ManyToOne;
import com.yoda.yodao.annotation.NotColumn;
import com.yoda.yodao.annotation.OneToMany;
import com.yoda.yodao.annotation.OneToOne;
import com.yoda.yodao.annotation.Repository;

			return element.asType().toString();
		}
		return null;
	}

	private String getColumnType(Element element) {
		if (element != null) {
			return element.asType().toString();
		}
		return null;
	}

	private String getColumnName(Element element) {
		String columnName = null;
		Column column = element.getAnnotation(Column.class);
		Id id = element.getAnnotation(Id.class);
		if (column != null) {
			columnName = column.name();
		}
		// is id or name is empty
		if (columnName == null || columnName.length() == 0) {
			columnName = Utils.toLowerCase(element.getSimpleName().toString()); // field
																				// name
		}
		return columnName;
	}

	private Field.IdGenerator getIdGenerator(Element element) {
		GeneratedValue gv = element.getAnnotation(GeneratedValue.class);
		if (gv != null) {

// Path: yodao-annotations/src/main/java/com/yoda/yodao/annotation/GenerationType.java
// public enum GenerationType { 
// 
//     /**
//      * Indicates that the persistence provider must assign 
//      * primary keys for the entity using an underlying 
//      * database table to ensure uniqueness.
//      */
//     TABLE, 
// 
//     /**
//      * Indicates that the persistence provider must assign 
//      * primary keys for the entity using database sequence column.
//      */
//     SEQUENCE, 
// 
//     /**
//      * Indicates that the persistence provider must assign 
//      * primary keys for the entity using database identity column.
//      */
//     IDENTITY, 
// 
//     /**
//      * Indicates that the persistence provider should pick an 
//      * appropriate strategy for the particular database. The 
//      * <code>AUTO</code> generation strategy may expect a database 
//      * resource to exist, or it may attempt to create one. A vendor 
//      * may provide documentation on how to create such resources 
//      * in the event that it does not support schema generation 
//      * or cannot create the schema resource at runtime.
//      */
//     AUTO,
//     
//     UUID
// }


// Path: yodao-compiler/src/main/java/com/yoda/yodao/internal/YodaoProcessor.java
import static javax.tools.Diagnostic.Kind.ERROR;
import static javax.tools.Diagnostic.Kind.NOTE;
import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.Filer;
import javax.annotation.processing.Messager;
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.Processor;
import javax.annotation.processing.RoundEnvironment;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.TypeElement;
import javax.lang.model.util.Elements;
import javax.lang.model.util.Types;
import javax.tools.JavaFileObject;
import com.google.auto.service.AutoService;
import com.yoda.yodao.annotation.Column;
import com.yoda.yodao.annotation.Entity;
import com.yoda.yodao.annotation.GeneratedValue;
import com.yoda.yodao.annotation.GenerationType;
import com.yoda.yodao.annotation.Id;
import com.yoda.yodao.annotation.JoinColumn;
import com.yoda.yodao.annotation.ManyToMany;
import com.yoda.yodao.annotation.ManyToOne;
import com.yoda.yodao.annotation.NotColumn;
import com.yoda.yodao.annotation.OneToMany;
import com.yoda.yodao.annotation.OneToOne;
import com.yoda.yodao.annotation.Repository;

			return element.asType().toString();
		}
		return null;
	}

	private String getColumnType(Element element) {
		if (element != null) {
			return element.asType().toString();
		}
		return null;
	}

	private String getColumnName(Element element) {
		String columnName = null;
		Column column = element.getAnnotation(Column.class);
		Id id = element.getAnnotation(Id.class);
		if (column != null) {
			columnName = column.name();
		}
		// is id or name is empty
		if (columnName == null || columnName.length() == 0) {
			columnName = Utils.toLowerCase(element.getSimpleName().toString()); // field
																				// name
		}
		return columnName;
	}

	private Field.IdGenerator getIdGenerator(Element element) {
		GeneratedValue gv = element.getAnnotation(GeneratedValue.class);
		if (gv != null) {

			GenerationType gt = gv.strategy();
