Search in sources :

Example 1 with IPlaceholderKey

use of com.servoy.j2db.query.IPlaceholderKey in project servoy-client by Servoy.

the class SQLGenerator method isDynamicPKSetCondition.

static boolean isDynamicPKSetCondition(ISQLCondition condition) {
    if (condition instanceof SetCondition) {
        Object values = ((SetCondition) condition).getValues();
        if (!(values instanceof Placeholder)) {
            return false;
        }
        IPlaceholderKey key = ((Placeholder) values).getKey();
        if (!(key instanceof TablePlaceholderKey)) {
            return false;
        }
        if (!SQLGenerator.PLACEHOLDER_FOUNDSET_PKS.equals(((TablePlaceholderKey) key).getName())) {
            return false;
        }
        return true;
    }
    return false;
}
Also used : Placeholder(com.servoy.j2db.query.Placeholder) TablePlaceholderKey(com.servoy.j2db.query.TablePlaceholderKey) SetCondition(com.servoy.j2db.query.SetCondition) IPlaceholderKey(com.servoy.j2db.query.IPlaceholderKey)

Aggregations

IPlaceholderKey (com.servoy.j2db.query.IPlaceholderKey)1 Placeholder (com.servoy.j2db.query.Placeholder)1 SetCondition (com.servoy.j2db.query.SetCondition)1 TablePlaceholderKey (com.servoy.j2db.query.TablePlaceholderKey)1