예제 #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());
   }
 }
예제 #2
0
 @Override
 protected ProposalListItem transferDbToViewModel(ProposalModel dbObject) {
   ProposalListItem item = new ProposalListItem();
   item.title = dbObject.getTitle();
   item.talk = dbObject;
   return item;
 }
예제 #3
0
 public static ProposalModel detach(ProposalModel item) {
   Hibernate.initialize(item);
   Hibernate.initialize(item.getVotes());
   return item;
 }