public int checkCodeOnly(DictionaryBean bean)throws DataAccessException,Exception { <br>Object[] sqlParams = new Object[4]; <br>int index = 0 ; <br>String sql=""; <br>/* Verify whether the page flag is unique*/ <br>if (bean.getFlag().equals("1")) { <br>sql = "select count( 1) from YHAO_PORTALS_PAGE where PAGE_FLAG = ? "; <br>sqlParams[index]=bean.getCode(); <br>index ; <br>} <br>/* Verify whether the type flag is unique*/ <br>if (bean.getFlag().equals("2")) { <br>sql = "select count(1) from YHAO_PORTALS_DOWNTYPE where DOWNTYPE_FLAG = ? "; <br>sqlParams[index]=bean.getCode(); <br>index ; <br>} <br>/* Verify whether the download log identifier is unique*/ <br>if (bean.getFlag().equals("3")) { <br>sql = "select count(1) from YHAO_PORTALS_DOWN where DOWN_FLAG = ? "; <br>sqlParams[index]=bean.getCode(); <br>index ; <br>} <br>if (bean.getFlag().equals("4")) { <br>sql = "select count(1) from YHAO_PORTALS_KUAI where KUAI_FLAG = ? "; <br>sqlParams[index]=bean.getCode(); <br>index ; <br>} <br>Object[] sqlParamsEnd = new Object[index]; <br>System.arraycopy(sqlParams, 0, sqlParamsEnd, 0, index); <br>int count = this.queryForInt(sql,sqlParamsEnd); <br>return count; <br>}< ;/PRE> <br><PRE>
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn