Search in sources :

Example 1 with ViewCursor

use of ru.curs.celesta.dbutils.ViewCursor in project celesta by CourseOrchestra.

the class FieldsLookup method and.

public FieldsLookup and(BasicCursor otherCursor) {
    if (BasicTable.class.equals(targetClass)) {
        FieldsLookup fieldsLookup = new FieldsLookup((Cursor) cursor, otherCursor, lookupChangeCallback, newLookupCallback);
        newLookupCallback.apply(fieldsLookup);
        return fieldsLookup;
    } else if (View.class.equals(targetClass)) {
        FieldsLookup fieldsLookup = new FieldsLookup((ViewCursor) cursor, otherCursor, lookupChangeCallback, newLookupCallback);
        newLookupCallback.apply(fieldsLookup);
        return fieldsLookup;
    } else {
        throw new CelestaException("Can't apply %s to %s for FieldsLookup", otherCursor.meta().getClass().getSimpleName(), filtered.getClass().getSimpleName());
    }
}
Also used : View(ru.curs.celesta.score.View) CelestaException(ru.curs.celesta.CelestaException) ViewCursor(ru.curs.celesta.dbutils.ViewCursor)

Aggregations

CelestaException (ru.curs.celesta.CelestaException)1 ViewCursor (ru.curs.celesta.dbutils.ViewCursor)1 View (ru.curs.celesta.score.View)1