Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Transactional(readOnly = true)
- public List<Social> getAllSocialData() throws FastestDAOException {
- try {
- Session session = sessionFactory.getCurrentSession();
- Query query = session.createQuery("Select social.followers From Social social where social.socialId=1");
- return query.list();
- }
- catch (Exception ex) {
- System.out.println("Unable to get data"+ex);
- }
- private static List<QuickStartSocial> followers = null;
- public String aBCForm(@ModelAttribute(value = "abcbean") QuickStartBean quickstartbean,Model model) {
- try {
- followers=quickStartDataService.getAllSocialData();
- model.addAttribute("followers",followers);
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- return "quickstart/create";
- }
- ID - socialId
- column1 - following
- column2- followers
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement