app/src/main/java/db/juhaku/juhakudb/filter/QueryProcessor.java
/**
     * Generates select statement for given model class. Model class must be instance of database
     * entity classes. Select statement will be aliased and all the columns that are in database
     * will be returned.
     *
     * @param model Instance of {@link Class} of model class of database table entities.
     * @param alias String alias for model class.
     * @return String containing select statement without "SELECT" in the beginning for given model.
     *
     * @sine
     *
     * @hide
     */
Generates select statement for given model class. Model class must be instance of database
entity classes. Select statement will be aliased and all the columns that are in database
will be returned.

@param model Instance of  Class of model class of database table entities.
@param alias String alias for model class.
@return String containing select statement without "SELECT" in the beginning for given model.

@sine

@hide
Generates select statement for given model class . Model class must be instance of database entity classes . Select statement will be aliased and all the columns that are in database will be returned . @param model Instance of Class of model class of database table entities . @param alias String alias for model class . @return String containing select statement without " SELECT " in the beginning for given model . @sine @hide
private String generateSelectForModel(Class<?> model, String alias) {
        Schema table = schema.getElement(resolveName(model));
        StringBuilder select = new StringBuilder();
        Iterator<String> colIterator = table.getElements().keySet().iterator();
        while (colIterator.hasNext()) {
            select.append(alias).append(".").append(colIterator.next());
            if (colIterator.hasNext()) {
                select.append(", ");
            }
        }
        return select.toString();
    }
private String generateSelectForModel ( Class < ? > model , String alias ) { Schema table = schema . getElement ( resolveName ( model ) ) ; StringBuilder select = new StringBuilder ( ) ; Iterator < String > colIterator = table . getElements ( ) . keySet ( ) . iterator ( ) ; while ( colIterator . hasNext ( ) ) { select . append ( alias ) . append ( "." ) . append ( colIterator . next ( ) ) ; if ( colIterator . hasNext ( ) ) { select . append ( ", " ) ; } } return select . toString ( ) ; }
Generates select statement for given model class.
Generates select statement for given model class .