34 lines
981 B
Java
34 lines
981 B
Java
package com.tenwa.customer.controller.group;
|
|
|
|
import com.amarsoft.are.jbo.BizObject;
|
|
import com.amarsoft.are.jbo.BizObjectManager;
|
|
import com.amarsoft.are.jbo.JBOFactory;
|
|
import com.amarsoft.are.jbo.JBOTransaction;
|
|
|
|
public class CheckGroup {
|
|
String customerid;
|
|
String group_id;
|
|
public String getCustomerid() {
|
|
return customerid;
|
|
}
|
|
public void setCustomerid(String customerid) {
|
|
this.customerid = customerid;
|
|
}
|
|
public String getGroup_id() {
|
|
return group_id;
|
|
}
|
|
public void setGroup_id(String group_id) {
|
|
this.group_id = group_id;
|
|
}
|
|
public String isexsist(JBOTransaction tx)throws Exception{
|
|
BizObjectManager bom=JBOFactory.getBizObjectManager(jbo.app.tenwa.customer.CUSTOMER_GROUP_RELATION.CLASS_NAME);
|
|
tx.join(bom);
|
|
BizObject bo1=bom.createQuery("group_id=:group_id and customer_id=:customer_id").setParameter("group_id",group_id).setParameter("customer_id", customerid).getSingleResult(false);
|
|
if(bo1!=null){
|
|
return "yes";
|
|
|
|
}
|
|
return "no";
|
|
}
|
|
}
|