@Test(dependsOnMethods = "insert") public void partialLoad() { Customer found = new QCustomer() .name.equalTo("Jack") .id.eq(jack.getId()) .select(id) .findOne(); assertThat(found).isNotNull(); BeanState beanState = DB.getBeanState(found); Set<String> loadedProps = beanState.getLoadedProps(); assertThat(loadedProps).containsExactly("id", "contacts", "orders"); String name = found.getName(); assertThat(name).isEqualTo("Jack"); assertThat(beanState.getLoadedProps()).contains("id", "name", "inactive"); }
public String getName() { return name; }
Customer extends BaseModel { public String getName() { return name; } }
Customer extends BaseModel { public String getName() { return name; } Customer(String name); }
Customer extends BaseModel { public String getName() { return name; } Customer(String name); String toString(); void addContact(Contact contact); List<UUID> getUids(); void setUids(List<UUID> uids); boolean isInactive(); void setInactive(boolean inactive); String getName(); void setName(String name); LocalDate getRegistered(); void setRegistered(LocalDate registered); String getComments(); Customer comments(String comments); Address getBillingAddress(); void setBillingAddress(Address billingAddress); Address getShippingAddress(); void setShippingAddress(Address shippingAddress); List<Contact> getContacts(); void setContacts(List<Contact> contacts); List<Order> getOrders(); void setOrders(List<Order> orders); }
Customer extends BaseModel { public String getName() { return name; } Customer(String name); String toString(); void addContact(Contact contact); List<UUID> getUids(); void setUids(List<UUID> uids); boolean isInactive(); void setInactive(boolean inactive); String getName(); void setName(String name); LocalDate getRegistered(); void setRegistered(LocalDate registered); String getComments(); Customer comments(String comments); Address getBillingAddress(); void setBillingAddress(Address billingAddress); Address getShippingAddress(); void setShippingAddress(Address shippingAddress); List<Contact> getContacts(); void setContacts(List<Contact> contacts); List<Order> getOrders(); void setOrders(List<Order> orders); static final CustomerFinder find; }