public static AuctionInfo findByIdentifier(String identifier) { return (AuctionInfo) ActiveRecord.findFirstBySQL( AuctionInfo.class, "SELECT * FROM auctions WHERE id IN (SELECT Max(id) FROM auctions WHERE identifier = '" + identifier + "')"); }
public static MultiSnipe find(Integer id) { MultiSnipe rval = singleSource.get(id); if (rval == null) { rval = (MultiSnipe) ActiveRecord.findFirstBy(MultiSnipe.class, "id", Integer.toString(id)); singleSource.put(id, rval); } return rval; }
public static void main(String[] args) { JConfig.setLogger(new ErrorManagement()); ActiveRecord.disableDatabase(); AuctionEntry.addObserver(EntryFactory.getInstance()); AuctionEntry.addObserver( new Observer<AuctionEntry>() { public void afterCreate(AuctionEntry o) { EntryCorral.getInstance().putWeakly(o); } }); JBTool tool = new JBTool(args); tool.execute(); System.exit(0); }
public static MultiSnipe findFirstBy(String key, String value) { MultiSnipe rval = (MultiSnipe) ActiveRecord.findFirstBy(MultiSnipe.class, key, value); return cacheResult(rval); }
public static int count() { return ActiveRecord.count(AuctionInfo.class); }
public static AuctionInfo findFirstBy(String key, String value) { return (AuctionInfo) ActiveRecord.findFirstBy(AuctionInfo.class, key, value); }
public void fromXML(XMLElement inXML) { super.fromXML(inXML); if (mSeller != null) mSeller.saveDB(); }