/*
 * Copyright 2011, Mysema Ltd
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.mysema.query.sql;

import com.mysema.query.QueryFactory;
import com.mysema.query.sql.dml.SQLDeleteClause;
import com.mysema.query.sql.dml.SQLInsertClause;
import com.mysema.query.sql.dml.SQLMergeClause;
import com.mysema.query.sql.dml.SQLUpdateClause;
import com.mysema.query.types.Expression;

/**
 * Factory interface for query and clause creation
 *
 * @author tiwe
 *
 * @param <Q> query type
 * @param <SQ> subquery type
 * @param <D> delete clause type
 * @param <U> update clause type
 * @param <I> insert clause type
 * @param <M> merge clause type
 */
public interface SQLQueryFactory<Q extends SQLCommonQuery<?>, // extends AbstractSQLQuery<?>
    SQ extends AbstractSQLSubQuery<?>,
    D extends SQLDeleteClause,
    U extends SQLUpdateClause,
    I extends SQLInsertClause,
    M extends SQLMergeClause> extends QueryFactory<Q,SQ> {

    /**
     * Create a new DELETE clause
     * 
     * @param path
     * @return
     */
    D delete(RelationalPath<?> path);

    /**
     * Create a new SELECT query
     * 
     * @param from
     * @return
     */
    Q from(Expression<?> from);

    /**
     * Create a new INSERT INTO clause
     * 
     * @param path
     * @return
     */
    I insert(RelationalPath<?> path);

    /**
     * Create a new MERGE clause
     * 
     * @param path
     * @return
     */
    M merge(RelationalPath<?> path);

    /**
     * Create a new UPDATE clause
     * 
     * @param path
     * @return
     */
    U update(RelationalPath<?> path);

    /* (non-Javadoc)
     * @see com.mysema.query.QueryFactory#query()
     */
    Q query();

    /* (non-Javadoc)
     * @see com.mysema.query.QueryFactory#subQuery()
     */
    SQ subQuery();

    /**
     * @param from
     * @return
     */
    SQ subQuery(Expression<?> from);

}

@@ -28,18 +28,17 @@
 a Ltd%0A *
- 
 %0A
+
  * Licen
@@ -939,16 +939,224 @@
 creation
+.%0A *%0A * %3Cp%3EThe default implementation is %7B@link SQLQueryFactoryImpl%7D and should be used for general%0A * query creation. Type specific variants are available if database specific queries need to be created.%3C/p%3E
 %0A *%0A * @
@@ -1684,33 +1684,32 @@
 TE clause%0A     *
- 
 %0A     * @param p
@@ -1817,25 +1817,24 @@
 query%0A     *
- 
 %0A     * @par
@@ -1942,33 +1942,32 @@
 TO clause%0A     *
- 
 %0A     * @param p
@@ -2071,33 +2071,32 @@
 GE clause%0A     *
- 
 %0A     * @param p
@@ -2208,17 +2208,16 @@
 e%0A     *
- 
 %0A     * 
@@ -2365,24 +2365,38 @@
 y()%0A     */%0A
+    @Override%0A
     Q query(
@@ -2469,32 +2469,32 @@
 #subQuery()%0A
-
      */%0A
     SQ subQu
@@ -2473,32 +2473,46 @@
 Query()%0A     */%0A
+    @Override%0A
     SQ subQuery(

Improve docs #499