// Path: testapps/morphia_model/src/main/java/test/model/Order.java
// @Entity("order")
// public class Order extends MorphiaAdaptiveRecord<Order> implements UserLinked, CustomerLinked {
// 
//     public String agent;
// 
//     public String customer;
// 
//     public String product;
// 
//     public int quantity;
// 
//     @Override
//     public boolean isLinkedTo(Principal user) {
//         String username = user.getName();
//         return S.eq(username, agent);
//     }
// 
//     @Override
//     public boolean isLinkedToCustomer(Principal principal) {
//         String username = principal.getName();
//         return S.eq(username, customer);
//     }
// 
//     @Stateless
//     public static class Dao extends MorphiaDao<Order> {
//     }
// 
// }


import act.controller.annotation.UrlContext;
import act.db.DbBind;
import org.osgl.aaa.AAA;
import org.osgl.mvc.annotation.GetAction;
import org.osgl.mvc.annotation.PostAction;
import test.model.Order;
import javax.inject.Inject;
package test.endpoint;



@UrlContext("orders")
public class OrderService extends AuthenticatedServiceBaseV1 {

    @Inject
// Path: testapps/morphia_model/src/main/java/test/model/Order.java
// @Entity("order")
// public class Order extends MorphiaAdaptiveRecord<Order> implements UserLinked, CustomerLinked {
// 
//     public String agent;
// 
//     public String customer;
// 
//     public String product;
// 
//     public int quantity;
// 
//     @Override
//     public boolean isLinkedTo(Principal user) {
//         String username = user.getName();
//         return S.eq(username, agent);
//     }
// 
//     @Override
//     public boolean isLinkedToCustomer(Principal principal) {
//         String username = principal.getName();
//         return S.eq(username, customer);
//     }
// 
//     @Stateless
//     public static class Dao extends MorphiaDao<Order> {
//     }
// 
// }


// Path: testapps/morphia_model/src/main/java/test/endpoint/OrderService.java
import act.controller.annotation.UrlContext;
import act.db.DbBind;
import org.osgl.aaa.AAA;
import org.osgl.mvc.annotation.GetAction;
import org.osgl.mvc.annotation.PostAction;
import test.model.Order;
import javax.inject.Inject;

package test.endpoint;



@UrlContext("orders")
public class OrderService extends AuthenticatedServiceBaseV1 {

    @Inject
    private Order.Dao orderDao;