@Override
public List<InformationToLayout> getInfoLayouts(Integer infoId) {
List<InformationToLayout> itlList = new ArrayList<InformationToLayout>();
for(Store store: storeAdminModel.getAll()){
InformationToLayout itl = new InformationToLayout();
itl.setStoreId(store.getId());
itl.setStoreName(store.getName());
String sql = "SELECT layout_id FROM "+quoteTable("information_to_layout")
+" WHERE information_id=? AND store_id=?";
Integer layoutId = getJdbcOperations().query(sql,
new Object[]{infoId, store.getId()},
new ScalarResultSetExtractor<Integer>());
itl.setLayoutId(layoutId);
itlList.add(itl);
}
return itlList;
}