我对 Seam 很陌生,我需要在下面的代码中进行一些说明,我需要知道它是如何工作的,在这段代码中 RESTRICTIONS 的用途是什么......
package org.domain.pixel.action;
import org.domain.pixel.entity.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.Arrays;
@Name("projectList")
public class ProjectList extends EntityQuery<Project> {
private static final long serialVersionUID = -7673337640345325071L;
private static final String EJBQL = "select project from Project project";
private static final String[] RESTRICTIONS = {
"lower(project.processOwner) like lower(concat(#{projectList.project.processOwner},'%'))",
"lower(project.projectName) like lower(concat(#{projectList.project.projectName},'%'))",
};
private Project project = new Project();
public ProjectList() {
;
setEjbql(EJBQL);
setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
setMaxResults(25);
}
public Project getProject() {
return project;
}
}