1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
| package com.laoujebosse.leprojet.ejb.session;
import java.util.ArrayList;
import com.laoujebosse.leprojet.beans.GenericBean;
/**
* Bean implementation class for Enterprise Bean: CaddieACommissions
*/
public class CaddieACommissionsBean implements javax.ejb.SessionBean {
static final long serialVersionUID = 3206093459760846163L;
private javax.ejb.SessionContext mySessionCtx;
/**
* getSessionContext
*/
public javax.ejb.SessionContext getSessionContext() {
return mySessionCtx;
}
/**
* setSessionContext
*/
public void setSessionContext(javax.ejb.SessionContext ctx) {
mySessionCtx = ctx;
}
/**
* ejbCreate
*/
public void ejbCreate() throws javax.ejb.CreateException {
}
/**
* ejbActivate
*/
public void ejbActivate() {
}
/**
* ejbPassivate
*/
public void ejbPassivate() {
}
/**
* ejbRemove
*/
public void ejbRemove() {
content = new ArrayList<GenericBean>();
}
ArrayList<GenericBean> content = new ArrayList<GenericBean>();
public ArrayList<GenericBean> addContent(GenericBean newContent) {
content.add(newContent);
return content;
}
public ArrayList<GenericBean> getContent() {
return content;
}
public GenericBean getContentDetails() {
Integer nbrFiles = content.size();
Integer nbrRows = 0;
for (GenericBean bean1 : content) {
ArrayList<GenericBean> bean2 = (ArrayList<GenericBean>) bean1
.getValue();
nbrRows += bean2.size();
}
GenericBean result = new GenericBean(nbrFiles, nbrRows);
return result;
}
} |
Partager