77import me .zort .sqllib .internal .query .QueryNode ;
88import me .zort .sqllib .mapping .annotation .*;
99import me .zort .sqllib .mapping .builder .DeleteQueryBuilder ;
10+ import me .zort .sqllib .mapping .builder .InsertQueryBuilder ;
1011import me .zort .sqllib .mapping .builder .SaveQueryBuilder ;
1112import me .zort .sqllib .mapping .builder .SelectQueryBuilder ;
1213import me .zort .sqllib .mapping .exception .SQLMappingException ;
@@ -40,6 +41,7 @@ public class QueryAnnotation {
4041 QUERY_ANNOT .put (Select .class , new QueryAnnotation (true , new SelectQueryBuilder ()));
4142 QUERY_ANNOT .put (Delete .class , new QueryAnnotation (false , new DeleteQueryBuilder ()));
4243 QUERY_ANNOT .put (Save .class , new QueryAnnotation (false , new SaveQueryBuilder ()));
44+ QUERY_ANNOT .put (Insert .class , new QueryAnnotation (false , new InsertQueryBuilder ()));
4345 // TODO: Populate
4446 }
4547
@@ -66,10 +68,6 @@ public interface QueryBuilder<T extends Annotation> {
6668 }
6769
6870 public static class Validator {
69- public static void requireTableDefinition (Method method , PlaceholderMapper placeholderMapper ) {
70- if (Table .Util .getFromContext (method , placeholderMapper ) == null )
71- throw new SQLMappingException ("Method " + method .getName () + " requires @Table annotation" , method , null );
72- }
7371 public static void requireWhereDefinition (Method method ) {
7472 if (!method .isAnnotationPresent (Where .class ))
7573 throw new SQLMappingException ("Method " + method .getName () + " requires @Where annotation" , method , null );
0 commit comments