Package com.jengine.orm.model.query

Examples of com.jengine.orm.model.query.ModelQuery


        return (T) obj;
    }

    public T get(Object id) throws DBException {
        Model obj = getCache(manager.getPrimaryKey().cast(id));
        return (T) (obj != null ? obj : (Model) new ModelQuery(manager).filter(manager.getPrimaryKey().eq(id)).one());
    }
View Full Code Here


    public ModelQuery select(Object ... fields) throws DBException {
        return select(Arrays.asList(fields));
    }

    public ModelQuery select(List fields) throws DBException {
        return new ModelQuery(manager).targets(fields);
    }
View Full Code Here

    public ModelQuery select(List fields) throws DBException {
        return new ModelQuery(manager).targets(fields);
    }

    public ModelQuery filter(String query, Object ... params) throws DBException {
        return new ModelQuery(manager).filter(query, (Object[]) params);
    }
View Full Code Here

    public ModelQuery filter(String query, Object ... params) throws DBException {
        return new ModelQuery(manager).filter(query, (Object[]) params);
    }

    public ModelQuery filter(Map<String, Object> filter) throws DBException {
        return new ModelQuery(manager).filter(filter);
    }
View Full Code Here

    public ModelQuery filter(Filter... filters) throws DBException {
        return filter(Arrays.asList(filters));
    }

    public ModelQuery filter(List<Filter> filter) throws DBException {
        return new ModelQuery(manager).filter(filter);
    }
View Full Code Here

    public ModelQuery filter(List<Filter> filter) throws DBException {
        return new ModelQuery(manager).filter(filter);
    }

    public Long count() throws DBException {
        return (Long) new ModelQuery(manager).target(new Count(manager.getPrimaryKey())).one();
    }
View Full Code Here

    public Long count() throws DBException {
        return (Long) new ModelQuery(manager).target(new Count(manager.getPrimaryKey())).one();
    }

    public Long count(String field) throws DBException {
        return (Long) new ModelQuery(manager).target(new Count(field)).one();
    }
View Full Code Here

    public Long count(String field) throws DBException {
        return (Long) new ModelQuery(manager).target(new Count(field)).one();
    }

    public Object max(String field) throws DBException {
        return new ModelQuery(manager).target(new Max(field)).one();
    }
View Full Code Here

    public Object max(String field) throws DBException {
        return new ModelQuery(manager).target(new Max(field)).one();
    }

    public Object min(String field) throws DBException {
        return new ModelQuery(manager).target(new Min(field)).one();
    }
View Full Code Here

    public Object min(String field) throws DBException {
        return new ModelQuery(manager).target(new Min(field)).one();
    }

    public Object avg(String field) throws DBException {
        return new ModelQuery(manager).target(new Avg(field)).one();
    }
View Full Code Here

TOP

Related Classes of com.jengine.orm.model.query.ModelQuery

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.