app/src/main/java/db/juhaku/juhakudb/filter/QueryProcessor.java
/**
     * Resolves reverse join column name from given model class's table. Reverse join column name
     * is returned if reverse join table name is same as provided reverse join model.
     *
     * <p>Column is resolved by looking it for from {@link Schema} in order to maintain integrity.</p>
     *
     * @param model Instance of {@link Class} of model class of table where the join is made from.
     * @param reverseModel Instance of {@link Class} of reverse join model of table where the join is made to.
     * @return String reverse join column name from join table if found. If not found join processing
     * will fail to an exception.
     *
     * @since 1.2.0
     *
     * @hide
     */
Resolves reverse join column name from given model class's table. Reverse join column name
is returned if reverse join table name is same as provided reverse join model.

Column is resolved by looking it for from  Schema in order to maintain integrity.

@param model Instance of  Class of model class of table where the join is made from.
@param reverseModel Instance of  Class of reverse join model of table where the join is made to.
@return String reverse join column name from join table if found. If not found join processing
will fail to an exception.



@hide
Resolves reverse join column name from given model class ' s table . Reverse join column name is returned if reverse join table name is same as provided reverse join model . Column is resolved by looking it for from Schema in order to maintain integrity . @param model Instance of Class of model class of table where the join is made from . @param reverseModel Instance of Class of reverse join model of table where the join is made to . @return String reverse join column name from join table if found . If not found join processing will fail to an exception . @hide
private String resolveReverseJoinColumnName(Class<?> model, Class<?> reverseModel) {
        Schema table = findTableByName(resolveName(model));
        String reverseJoinTableName = resolveName(reverseModel);
        for (Reference reference : table.getReferences()) {
            if (reference.getReferenceTableName().equals(reverseJoinTableName)) {
                return reference.getColumnName();
            }
        }
        throw new IllegalJoinException("Failed to create join from entity: " + model.getName()
                + " to: " + reverseModel.getName() + " no reverse join column in table: " + table.getName());
    }
private String resolveReverseJoinColumnName ( Class < ? > model , Class < ? > reverseModel ) { Schema table = findTableByName ( resolveName ( model ) ) ; String reverseJoinTableName = resolveName ( reverseModel ) ; for ( Reference reference : table . getReferences ( ) ) { if ( reference . getReferenceTableName ( ) . equals ( reverseJoinTableName ) ) { return reference . getColumnName ( ) ; } } throw new IllegalJoinException ( "Failed to create join from entity: " + model . getName ( ) + " to: " + reverseModel . getName ( ) + " no reverse join column in table: " + table . getName ( ) ) ; }
Resolves reverse join column name from given model class's table.
Resolves reverse join column name from given model class ' s table .