Examples of ActiveRecord


Examples of com.jbidwatcher.util.db.ActiveRecord

    return old;
  }

  public MultiSnipe getForAuctionIdentifier(String identifier) {
    ActiveRecord hash = EntryCorral.getInstance().takeForRead(identifier);
    Integer multisnipeId = hash.getInteger("multisnipe_id");
    return multisnipeId == null ? null : MultiSnipe.find(multisnipeId);
  }
View Full Code Here

Examples of com.scooterframework.orm.activerecord.ActiveRecord

*/
public class OTest extends ScooterTestHelper {
 
  @Test
  public void test_allAssociatedRecordsOf() {
    ActiveRecord owner6 = Owner.where("id=6").getRecord();
    List<ActiveRecord> records = O.allAssociatedRecordsOf(owner6, "pets.visits");
    assertEquals("total visits of owner #6", 4, records.size());
  }
View Full Code Here

Examples of com.scooterframework.orm.activerecord.ActiveRecord

    assertEquals("total visits of owner #6", 4, records.size());
  }
 
  @Test
  public void test_allAssociatedRecordsOf_eager_loading() {
    ActiveRecord owner6 = Owner.where("owners.id=6").includes("pets=>visits").getRecord();
    List<ActiveRecord> records = O.allAssociatedRecordsOf(owner6, "pets.visits");
    assertEquals("total visits of owner #6", 4, records.size());
  }
View Full Code Here

Examples of com.scooterframework.orm.activerecord.ActiveRecord

    assertEquals("total visits of owner #6", 4, records.size());
  }
 
  @Test
  public void test_associatedRecordOf() {
    ActiveRecord visit1 = Visit.where("id=1").getRecord();
    String firstName = (String)O.associatedRecordOf(visit1, "pet.owner").getField("first_name");
    assertEquals("first name of owner of visit#1", "Jean", firstName);
  }
View Full Code Here

Examples of com.scooterframework.orm.activerecord.ActiveRecord

    assertEquals("first name of owner of visit#1", "Jean", firstName);
  }
 
  @Test
  public void test_associatedRecordOf_eager_loading() {
    ActiveRecord visit1 = Visit.where("visits.id=1").includes("pet=>owner").getRecord();
    String firstName = (String)O.associatedRecordOf(visit1, "pet.owner").getField("first_name");
    assertEquals("first name of owner of visit#1", "Jean", firstName);
  }
View Full Code Here

Examples of com.scooterframework.orm.activerecord.ActiveRecord

    assertEquals("first name of owner of visit#1", "Jean", firstName);
  }
 
  @Test
  public void test_property() {
    ActiveRecord visit1 = Visit.where("id=1").getRecord();
    String firstName = (String)O.property(visit1, "pet.owner.first_name");
    assertEquals("first name of owner of visit#1", "Jean", firstName);
  }
View Full Code Here

Examples of com.scooterframework.orm.activerecord.ActiveRecord

    assertEquals("first name of owner of visit#1", "Jean", firstName);
  }
 
  @Test
  public void test_property_eager_loading() {
    ActiveRecord visit1 = Visit.where("visits.id=1").includes("pet=>owner").getRecord();
    String firstName = (String)O.property(visit1, "pet.owner.first_name");
    assertEquals("first name of owner of visit#1", "Jean", firstName);
  }
View Full Code Here

Examples of com.scooterframework.orm.activerecord.ActiveRecord

    assertEquals("first name of owner of visit#1", "Jean", firstName);
  }
 
  @Test
  public void test_value() {
    ActiveRecord visit1 = Visit.where("id=1").getRecord();
    ACH.getAC().storeToRequest("visit1", visit1);
    String firstName = (String)O.value("visit1.pet.owner.first_name");
    assertEquals("first name of owner of visit#1", "Jean", firstName);
  }
View Full Code Here

Examples of com.scooterframework.orm.activerecord.ActiveRecord

    assertEquals("first name of owner of visit#1", "Jean", firstName);
  }
 
  @Test
  public void test_value_eager_loading() {
    ActiveRecord visit1 = Visit.where("visits.id=1").includes("pet=>owner").getRecord();
    ACH.getAC().storeToRequest("visit1", visit1);
    String firstName = (String)O.value("visit1.pet.owner.first_name");
    assertEquals("first name of owner of visit#1", "Jean", firstName);
  }
View Full Code Here

Examples of com.scooterframework.orm.activerecord.ActiveRecord

     
        Object userId = null;
        try {
            userId = ACH.getAC().getFromSessionData(SESSION_KEY_LOGIN_USER_ID);
            if (userId == null) {
                ActiveRecord user = loginUser();
                if (user != null) {
                    userId = user.getRestfulId();
                    if (userId != null) cacheLoggedInUserId(userId);
                }
            }
        }
        catch(Exception ex) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.