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

com.bixuebihui.jdbc.AbstractViewBaseDao Maven / Gradle / Ivy

Go to download

a fast small database connection pool and a active record flavor mini framework

There is a newer version: 1.15.8.3
Show newest version
package com.bixuebihui.jdbc;

import com.bixuebihui.DbException;
import org.springframework.beans.factory.annotation.Qualifier;

import javax.sql.DataSource;

/**
 * @author xwx
 */
public abstract class AbstractViewBaseDao extends BaseDao{

    protected AbstractViewBaseDao(DataSource ds){
        super(ds);
    }
    protected AbstractViewBaseDao(@Qualifier("mobile_video") DataSource readWrite, @Qualifier("mobile_video_r") DataSource readOnly)
    {
        super(readWrite,readOnly);
    }

    @Override
    protected String getInsertSql(){
        return "";
    }


    @Override
    protected String getUpdateSql(){
        return "";
    }

    @Override
    protected Object[] getInsertObjs(T info){
        return new Object[]{ };
    }

    @Override
    protected Object[] getUpdateObjs(T  info){
        return new Object[]{};
    }

    @Override
    public void setId(T info, ID id) {
        throw new DbException("no key to set, don't use this method!");
    }

    @Override
    public void setIdLong(T info, long id) {
        throw new DbException("no key to set, don't use this method!");
    }

    @Override
    public boolean updateByKey(T info)  {
        throw new DbException("This operation is not supported, because table video_recommend_view not have a unique key!");
    }

    @Override
    public boolean deleteByKey(ID key)  {
        throw new DbException("This operation is not supported, because table video_recommend_view not have a unique key!");
    }

    @Override
    public boolean insertDummy(){
        throw new DbException("This operation is not supported, because table video_recommend_view not have a unique key!");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy