public IApp findByVendor() throws Exception { StringBuffer sql = new StringBuffer(); sql.append("select * from app"); sql.append(" where isdeleted=?isdeleted"); sql.append(" and comcode=?comcode"); sql.append(" order by appid desc"); IApp findListings = (IApp) Database.sql(IApp.class, sql.toString()); findListings.setComcode(this.getComcode()); findListings.setIsDeleted(false); findListings.select(); return findListings; }