Hi,
I used Seam-gen to create a CRUD Application out of my database.
Works fine so far, but i now i, of course, need to customize it for my needs.
I need to run a query and i think i should use the package com.ccms30.entities;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.List;
import java.util.Arrays;
@Name("ccmsProductlineList") public class CcmsProductlineList extends EntityQuery { /** * */ private static final long serialVersionUID = 1L; private static final String[] RESTRICTIONS = { "lower(ccmsProductline.name) like concat(lower(#{ccmsProductlineList.ccmsProductline.name}),'%')", "lower(ccmsProductline.description) like concat(lower(#{ccmsProductlineList.ccmsProductline.description}),'%')",}; private CcmsProductline ccmsProductline = new CcmsProductline(); @Override public String getEjbql() { return "select ccmsProductline from CcmsProductline ccmsProductline"; } @Override public Integer getMaxResults() { return 25; } public CcmsProductline getCcmsProductline() { return ccmsProductline; } @Override public List<String> getRestrictions() { return Arrays.asList(RESTRICTIONS); } }
Yes, please help! I'm using Seam 2 and not finding any documentation for this.
Thanks.