1 package com.dotmarketing.portlets.workflowmessages.factories; 2 3 import com.dotmarketing.db.DotHibernate; 4 import com.dotmarketing.portlets.workflowmessages.model.Action; 5 6 7 8 12 public class ActionFactory { 13 14 16 public static Action getActionById(long actionId) { 17 DotHibernate dh = new DotHibernate(Action.class); 18 Action myAction = null; 19 dh.setQuery( 20 "from action in class com.dotmarketing.portlets.workflowmessages.model.Action where id = ?"); 21 dh.setParam(actionId); 22 return (Action) dh.load(); 23 } 24 25 public static java.util.List getActionsByAntiStatusId(long statusId) { 26 DotHibernate dh = new DotHibernate(Action.class); 27 dh.setQuery( 28 "from action in class com.dotmarketing.portlets.workflowmessages.model.Action where anti_status_id = ?"); 29 dh.setParam(statusId); 30 return dh.list(); 31 } 32 33 } 34 | Popular Tags |