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

com.easy.query.core.proxy.SQLColumn Maven / Gradle / Ivy

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

import com.easy.query.core.proxy.columns.SQLAnyColumn;
import com.easy.query.core.proxy.columns.impl.SQLAnyColumnImpl;
import com.easy.query.core.proxy.extension.ColumnComparableExpression;
import com.easy.query.core.proxy.set.DSLColumnSet;
import com.easy.query.core.util.EasyObjectUtil;

/**
 * create time 2023/6/22 13:12
 * 文件说明
 *
 * @author xuejiaming
 */
public interface SQLColumn extends ColumnComparableExpression,
        PropTypeColumn, DSLColumnSet {

    default SQLAnyColumn asAny() {
        Class propertyType = getPropertyType();
        SQLAnyColumnImpl column = new SQLAnyColumnImpl<>(this.getEntitySQLContext(), this.getTable(), this.getValue(), EasyObjectUtil.typeCastNullable(propertyType));
        column._setProxy(castChain());
        return column;
    }

    @Override
    default  SQLColumn asAnyType(Class clazz) {
        _setPropertyType(clazz);
        return EasyObjectUtil.typeCastNullable(this);
    }
    void _setProxy(TProxy tProxy);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy