@Override
public List<CategoryToLayout> getCatLayouts(Integer catId) {
List<CategoryToLayout> ctlList = new ArrayList<CategoryToLayout>();
for(Store store: storeAdminModel.getAll()){
CategoryToLayout ctl = new CategoryToLayout();
ctl.setStoreId(store.getId());
ctl.setStoreName(store.getName());
String sql = "SELECT layout_id FROM "+quoteTable("category_to_layout")
+" WHERE category_id=? AND store_id=?";
Integer layoutId = getJdbcOperations().query(sql,
new Object[]{catId, store.getId()},
new ScalarResultSetExtractor<Integer>());
ctl.setLayoutId(layoutId);
ctlList.add(ctl);
}
return ctlList;
}