All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.easy.query.api.proxy.base.MapProxy Maven / Gradle / Ivy

There is a newer version: 2.0.106
Show newest version
package com.easy.query.api.proxy.base;

import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.PropTypeColumn;
import com.easy.query.core.proxy.impl.SQLColumnSetPropColumnImpl;
import com.easy.query.core.proxy.impl.SQLColumnSetValueImpl;
import com.easy.query.core.util.EasyObjectUtil;

import java.util.Map;

/**
 * create time 2023/6/29 09:22
 *
 * @author xuejiaming
 */
//@Deprecated
public class MapProxy extends AbstractProxyEntity>{

    private static final Class> entityClass = EasyObjectUtil.typeCastNullable(Map.class);

    public static MapProxy createTable() {
        return new MapProxy();
    }

    public MapProxy() {
    }

    @Override
    public Class> getEntityClass() {
        return entityClass;
    }


    public void put(String key, Object val) {
        getEntitySQLContext().accept(new SQLColumnSetValueImpl(null, key, val));
    }

    public  MapProxy put(String key,PropTypeColumn val) {
        getEntitySQLContext().accept(new SQLColumnSetPropColumnImpl(null, key, val));
        return this;
    }
    public  MapProxy put(PropTypeColumn val) {
        getEntitySQLContext().accept(new SQLColumnSetPropColumnImpl(null, val.getValue(), val));
        return this;
    }

    //    public SQLAnyColumn getColumn(String key){
//        return getAnyColumn(key,Object.class);
//    }
//    public  SQLAnyColumn getColumn(String key,Class propType){
//        return getAnyColumn(key,propType);
//    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy