package com.fr.plugin.utils; import com.fr.plugin.yt.MyCoreDBAccess; import com.fr.plugin.dao.MyAgentDao; import com.fr.plugin.entitys.YTAgentEntity; import com.fr.stable.db.action.DBAction; import com.fr.stable.db.dao.DAOContext; import com.fr.stable.query.QueryFactory; import com.fr.stable.query.restriction.RestrictionFactory; import java.util.List; public class MyAgentUtils { public static String getAgentIdBySecret(String var9, String var10) { return ""; } public static List getAgentsSortedByTimeStamp() throws Exception { return (List) MyCoreDBAccess.getAccessor().runQueryAction(new DBAction>() { public List run(DAOContext var1) throws Exception { return ((MyAgentDao)var1.getDAO(MyAgentDao.class)).find(QueryFactory.create().addSort("timeStamp", true)); } }); } public static YTAgentEntity getAgentById(String agentId) throws Exception { return MyCoreDBAccess.getAccessor().runQueryAction(new DBAction() { public YTAgentEntity run(DAOContext var1) throws Exception { return var1.getDAO(MyAgentDao.class).findOne(QueryFactory.create().addRestriction(RestrictionFactory.eq("id",agentId))); } }); } }