Exemplo n.º 1
0
 public static void detachTM(Page<ProposalModel> result) {
   if (result == null || result.getContent() == null) {
     return;
   }
   for (ProposalModel t : result) {
     Hibernate.initialize(t);
     Hibernate.initialize(t.getVotes());
   }
 }
Exemplo n.º 2
0
 @Override
 protected ProposalListItem transferDbToViewModel(ProposalModel dbObject) {
   ProposalListItem item = new ProposalListItem();
   item.title = dbObject.getTitle();
   item.talk = dbObject;
   return item;
 }
Exemplo n.º 3
0
 public static ProposalModel detach(ProposalModel item) {
   Hibernate.initialize(item);
   Hibernate.initialize(item.getVotes());
   return item;
 }