package org.intellij.ibatis.dom.sqlMap;

import com.intellij.javaee.model.xml.CommonDomModelRootElement;
import com.intellij.util.xml.DomElement;
import com.intellij.util.xml.GenericAttributeValue;
import com.intellij.util.xml.SubTagList;
import com.intellij.util.xml.SubTagsList;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * iBATIS sqlmap configuration file
 */
public interface SqlMap extends CommonDomModelRootElement {
    @Nullable
    public GenericAttributeValue<String> getNamesapce();

    @SubTagList("typeAlias")
    public List<TypeAlias> getTypeAlias();

    @SubTagList("parameterMap")
    public List<ParameterMap> getParameterMap();

    @SubTagList("resultMap")
    public List<ResultMap> getResultMaps();

    @SubTagList("sql")
    public List<Sql> getSqls();

    @SubTagList("select")
    public List<Select> getSelects();

    @SubTagList("insert")
    public List<Insert> getInserts();

    @SubTagList("update")
    public List<Update> getUpdates();

    @SubTagList("delete")
    public List<Delete> getDeletes();

    @SubTagList("statement")
    public List<Statement> getStatements();

    @SubTagList("procedure")
    public List<Procedure> getProcedures();

    @SubTagsList({"select", "insert", "delete", "update", "statement", "procedure"})
    public List<DomElement> getAllReference();

    @SubTagList("cacheModel")
    public List<CacheModel> getCacheModels();

}

@@ -134,156 +134,52 @@
 xml.
-DomElement;%0D%0Aimport com.intellij.util.xml.GenericAttributeValue;%0D%0Aimport com.intellij.util.xml.SubTagList;%0D%0Aimport com.intellij.util.xml.SubTagsList
+*;%0D%0Aimport org.jetbrains.annotations.NotNull
 ;%0D%0Ai
@@ -789,32 +789,80 @@
 etSelects();%0D%0A%0D%0A
+    @NotNull%0D%0A    public Select addSelect();%0D%0A%0D%0A
     @SubTagList(
@@ -905,32 +905,80 @@
 etInserts();%0D%0A%0D%0A
+    @NotNull%0D%0A    public Insert addInsert();%0D%0A%0D%0A
     @SubTagList(
@@ -1021,32 +1021,84 @@
 etUpdates();%0D%0A%0D%0A
+    @NotNull%0D%0A    public Update addUpdate();%0D%0A    %0D%0A
     @SubTagList(
@@ -1141,32 +1141,84 @@
 etDeletes();%0D%0A%0D%0A
+    @NotNull%0D%0A    public Delete addDelete();%0D%0A    %0D%0A
     @SubTagList(
@@ -1270,32 +1270,86 @@
 tatements();%0D%0A%0D%0A
+    @NotNull%0D%0A    public Statement addStatement();%0D%0A%0D%0A
     @SubTagList(
@@ -1401,32 +1401,86 @@
 rocedures();%0D%0A%0D%0A
+    @NotNull%0D%0A    public Procedure addProcedure();%0D%0A%0D%0A
     @SubTagsList

add statement creation code