// Path: testapps/jpa_model_id/src/main/java/jpa_test/model/Order.java
// @Entity(name = "orders")
// public class Order implements SimpleBean, UserLinked, CustomerLinked {
// 
//     @Id
//     @GeneratedValue(strategy = GenerationType.IDENTITY)
//     public Long id;
// 
//     @ManyToOne(optional = false)
//     @JoinColumn(name = "agent_id")
//     public User agent;
// 
//     @ManyToOne(optional = false)
//     @JoinColumn(name = "cust_id", nullable = false)
//     public User customer;
// 
//     public String product;
// 
//     public int quantity;
// 
//     @Override
//     public boolean isLinkedTo(Principal user) {
//         String agentName = null == agent ? null : agent.email;
//         String username = user.getName();
//         return S.eq(username, agentName);
//     }
// 
//     @Override
//     public boolean isLinkedToCustomer(Principal principal) {
//         String customerName = null == customer ? null : customer.email;
//         String username = principal.getName();
//         return S.eq(username, customerName);
//     }
// 
//     @Stateless
//     public static class Dao extends JPADao<Long, Order> {
//     }
// 
// }


import act.controller.annotation.UrlContext;
import act.db.DbBind;
import act.db.sql.tx.Transactional;
import org.osgl.$;
import org.osgl.aaa.AAA;
import org.osgl.mvc.annotation.GetAction;
import org.osgl.mvc.annotation.PostAction;
import org.osgl.mvc.annotation.PutAction;
import jpa_test.model.Order;
import java.util.Map;
import javax.inject.Inject;
package jpa_test.endpoint;



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

    @Inject
// Path: testapps/jpa_model_id/src/main/java/jpa_test/model/Order.java
// @Entity(name = "orders")
// public class Order implements SimpleBean, UserLinked, CustomerLinked {
// 
//     @Id
//     @GeneratedValue(strategy = GenerationType.IDENTITY)
//     public Long id;
// 
//     @ManyToOne(optional = false)
//     @JoinColumn(name = "agent_id")
//     public User agent;
// 
//     @ManyToOne(optional = false)
//     @JoinColumn(name = "cust_id", nullable = false)
//     public User customer;
// 
//     public String product;
// 
//     public int quantity;
// 
//     @Override
//     public boolean isLinkedTo(Principal user) {
//         String agentName = null == agent ? null : agent.email;
//         String username = user.getName();
//         return S.eq(username, agentName);
//     }
// 
//     @Override
//     public boolean isLinkedToCustomer(Principal principal) {
//         String customerName = null == customer ? null : customer.email;
//         String username = principal.getName();
//         return S.eq(username, customerName);
//     }
// 
//     @Stateless
//     public static class Dao extends JPADao<Long, Order> {
//     }
// 
// }


// Path: testapps/jpa_model_id/src/main/java/jpa_test/endpoint/OrderService.java
import act.controller.annotation.UrlContext;
import act.db.DbBind;
import act.db.sql.tx.Transactional;
import org.osgl.$;
import org.osgl.aaa.AAA;
import org.osgl.mvc.annotation.GetAction;
import org.osgl.mvc.annotation.PostAction;
import org.osgl.mvc.annotation.PutAction;
import jpa_test.model.Order;
import java.util.Map;
import javax.inject.Inject;

package jpa_test.endpoint;



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

    @Inject
    private Order.Dao orderDao;