Package com.jengine.orm.model.multi.field

Examples of com.jengine.orm.model.multi.field.MultiModelField


    public BaseQuery target(Object field) {
        if (field instanceof CalcMultiField)  {
            return target((CalcMultiField) field);
        else {
            MultiModelField multiModelField = multiModel.getField((String) field);
            Target target = new FieldTarget((String) field, multiModelField);
            target.config(this);
            this.targets.put(target.getName(), target);
        }
View Full Code Here


    public BaseQuery order(String field) {
        return order(field, null);
    }

    public BaseQuery order(String field, String orderType) {
        MultiModelField multiModelField = multiModel.getField(field);
        orderList.add(new OrderItem(multiModelField, orderType));
        return this;
    }
View Full Code Here

        return this;
    }

    public BaseQuery value(String name, Object value) throws DBException {
        MultiModelField multiModelField = multiModel.getField(name);
        this.values.put(multiModelField.getName(), value);
        return this;
    }
View Full Code Here

            sqlParams.add(param instanceof ModelQuery ? ((ModelQuery) param).toSQL() : param);
        }
        stringFilter = new SQLStringFilter(this.source, sqlParams);
        List<String> columns = stringFilter.findColumns();
        for (int index = 0; index < columns.size(); index++) {
            MultiModelField multiModelField = query.getMultiModel().getField(columns.get(index));
            multiModelFields.add(multiModelField);
            stringFilter.setColumnSQLName(index, multiModelField.getSQLName());
        }
    }
View Full Code Here

    public MultiModelField getMultiModelField(Field field) {
        return modelFields.get(field.getFieldName());
    }

    public MultiModelField addField(Field field) {
        MultiModelField multiModelField = null;
        if (field instanceof FunctionField) {
            multiModelField = new FunctionMultiField(this, (FunctionField) field);
        } else {
            multiModelField = new MultiModelField(this, field);
        }
        fields.put(multiModelField.getName(), multiModelField);
        modelFields.put(field.getFieldName(), multiModelField);
        if (field.isPrimaryKey()) {
            primaryKey = multiModelField;
        }
        return multiModelField;
View Full Code Here

        }
        for (OrderItem orderItem : orderList) {
            orderItem.setSQL(query);
        }
        for (String fieldName : values.keySet()) {
            MultiModelField field = multiModel.getFields().get(fieldName);
            query.addValue(field.getSQLName(), values.get(fieldName));
        }
        if (page.get("start") != null && page.get("end") != null) {
            query.setStart(page.get("start"));
            query.setEnd(page.get("end"));
            query.addParam(page.get("start"));
View Full Code Here

TOP

Related Classes of com.jengine.orm.model.multi.field.MultiModelField

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.