com.bixuebihui.jdbc.AbstractViewBaseDao Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of c-dbtools Show documentation
Show all versions of c-dbtools Show documentation
a fast small database connection pool and a active record flavor mini framework
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!");
}
}