initial add of EbeanORM server based on v2.8.1

This commit is contained in:
rbygrave
2012-09-14 00:40:39 +12:00
parent 2b74d0f9d9
commit 96ce4c0ddf
1188 changed files with 135034 additions and 0 deletions
@@ -0,0 +1,48 @@
package com.avaje.tests.model.basic;
import javax.persistence.Entity;
import javax.persistence.OneToOne;
import com.avaje.ebean.annotation.Sql;
/**
* An example of an Aggregate object.
* <p>
* Note the &#064;Sql indicates to Ebean that this bean is not based on a table but
* instead uses RawSql.
* </p>
*/
@Entity
@Sql
public class CustomerAggregate {
@OneToOne
Customer customer;
int totalContacts;
public String toString() {
return customer.getId() + " totalContacts:" + totalContacts;
}
public Customer getCustomer() {
return customer;
}
public void setCustomer(Customer customer) {
this.customer = customer;
}
public int getTotalContacts() {
return totalContacts;
}
public void setTotalContacts(int totalContacts) {
this.totalContacts = totalContacts;
}
}