Kawai Wiki

Compare Revisions

Ignore whitespace Rev 76 → Rev 77

/trunk/src/main/java/org/kawai/dao/PageDAO.java
24,7 → 24,7
public boolean isSystemPage(String name);
public List<Page> loadAll();
public List<Page> loadAll(boolean includeSystemPages);
public boolean setNewFrontPage(Page p);
/trunk/src/main/java/org/kawai/dao/jdbc/JdbcPageDAO.java
111,7 → 111,7
}
@Override
public List<Page> loadAll() {
public List<Page> loadAll(boolean includeSystemPages) {
PreparedStatement stmt = null;
ResultSet rset = null;
125,8 → 125,11
query.append(" from Pages p");
query.append(" join Users creator on p.created_by = creator.id");
query.append(" left join Users modifier on p.modified_by = modifier.id");
query.append(" where p.deleted = 'F' and p.system_page = 'F'");
query.append(" order by p.name, p.language_id");
query.append(" where p.deleted = 'F'");
if (!includeSystemPages) {
query.append(" and p.system_page = 'F'");
}
query.append(" order by p.system_page, p.front_page, p.name, p.language_id");
stmt = conn.prepareStatement(query.toString());