Exemplo n.º 1
0
 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
               + "')");
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
  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);
  }
Exemplo n.º 4
0
 public static MultiSnipe findFirstBy(String key, String value) {
   MultiSnipe rval = (MultiSnipe) ActiveRecord.findFirstBy(MultiSnipe.class, key, value);
   return cacheResult(rval);
 }
Exemplo n.º 5
0
 public static int count() {
   return ActiveRecord.count(AuctionInfo.class);
 }
Exemplo n.º 6
0
 public static AuctionInfo findFirstBy(String key, String value) {
   return (AuctionInfo) ActiveRecord.findFirstBy(AuctionInfo.class, key, value);
 }
Exemplo n.º 7
0
 public void fromXML(XMLElement inXML) {
   super.fromXML(inXML);
   if (mSeller != null) mSeller.saveDB();
 }