package com.chenyang.nse.bussiness.dao.table.core.fieldscope;

import com.chenyang.nse.bussiness.dao.BaseDao;
import com.chenyang.nse.bussiness.entity.orm.table.core.TCoreFullChart;
import com.chenyang.nse.bussiness.entity.orm.table.core.fieldscope.TCoreScopeField;
import java.util.List;
import org.hibernate.transform.Transformers;
import org.springframework.stereotype.Repository;

@Repository
public class FullChartDao extends BaseDao<TCoreFullChart, String> {
   public void saveTCoreScopeField(StringBuilder sql) {
      this.getSession().createNativeQuery(sql.toString()).executeUpdate();
   }

   public List<TCoreScopeField> getTCoreScopeField(StringBuilder sql) {
      List<TCoreScopeField> vo = this.getSession().createNativeQuery(sql.toString()).setResultTransformer(Transformers.aliasToBean(TCoreScopeField.class)).getResultList();
      return vo;
   }

   public List<TCoreFullChart> getTCoreScopeFieldDistinct(String sql) {
      List<TCoreFullChart> vo = this.getSession().createNativeQuery(sql).setResultTransformer(Transformers.aliasToBean(TCoreFullChart.class)).getResultList();
      return vo;
   }
}
