// Path: src/java/is/idega/idegaweb/egov/company/EgovCompanyConstants.java
// public class EgovCompanyConstants {
// 
// 	private EgovCompanyConstants() {}
// 
// 	public static final String IW_BUNDLE_IDENTIFIER = "is.idega.idegaweb.egov.company";
// 
// 	public static final String COMPANY_SUPER_ADMIN_ROLE = "company_super_admin";
// 	public static final String COMPANY_ADMIN_ROLE = "company_admin";
// 	public static final String COMPANY_EMPLOYEE_ROLE = "company_staff";
// 
// 	public static final List<String> ALL_COMPANY_ROLES = Collections.unmodifiableList(Arrays.asList(
// 			StandardRoles.ROLE_KEY_COMPANY,
// 			COMPANY_SUPER_ADMIN_ROLE,
// 			COMPANY_ADMIN_ROLE,
// 			COMPANY_EMPLOYEE_ROLE
// 	));
// 
// 	public static final String GROUP_TYPE_COMPANY_ADMINS = "iw_company_admins_group";
// 	public static final String GROUP_TYPE_COMPANY_STAFF = "iw_company_staff_group";
// 	public static final List<String> ALL_COMPANY_TYPES = Collections.unmodifiableList(Arrays.asList(
// 			CompanyConstants.GROUP_TYPE_COMPANY,
// 			GROUP_TYPE_COMPANY_ADMINS,
// 			GROUP_TYPE_COMPANY_STAFF
// 	));
// 
// 	public static final String CASE_CODE_KEY = "COMPORT";
// 
// 	public static final String CONTENT_CODE_REQUEST_INFORMATION = "prm_company_code_request_information";
// 
// 	public static final Integer APPLICATION_TYPE_APPROVED = 0;
// 	public static final Integer APPLICATION_TYPE_REJECTED = 1;
// 	public static final Integer APPLICATION_TYPE_UNHANDLED = 2;
// 
// 	public static final String USER_LOGIN_METADATA = "userLoginEnabledMetaDataForCompanyPortal";
// 
// 	public static final String COMPANY_PORTAL_ROOT_GROUP = "Company Portal";
// 	public static final String COMPANY_ADMINS_GROUP_IN_COMPANY_PORTAL = "Company Admins";
// 	public static final String COMPANY_SUPER_ADMINS_GROUP_IN_COMPANY_PORTAL = "Company Super Admins";
// 
// 	public static final String COMPANY_PORTAL_HOME_PAGE_APPLICATION_PROPERTY = "companyPortalHomePage";
// 	public static final String COMPANY_STAFF_HOME_PAGE_APPLICATION_PROPERTY = "companyStaffHomePage";
// 
// 	public static final String COMPANY_PORTAL_CURRENT_COMPANY_ATTRIBUTE = "companyPortalCurrentCompanyId";
// 
// 	public static final String COMPANY_PERSONAL_ID_METADATA = "COMPANY_PERSONAL_ID";
// }


import is.idega.idegaweb.egov.application.data.ApplicationCategory;
import is.idega.idegaweb.egov.company.EgovCompanyConstants;
import java.sql.Timestamp;
import java.util.Collection;
import java.util.Locale;
import java.util.Map;
import javax.ejb.FinderException;
import com.idega.block.process.data.AbstractCaseBMPBean;
import com.idega.block.process.data.CaseCode;
import com.idega.block.text.data.LocalizedText;
import com.idega.company.data.Company;
import com.idega.company.data.CompanyType;
import com.idega.core.file.data.ICFile;
import com.idega.data.IDOAddRelationshipException;
import com.idega.data.IDORelationshipException;
import com.idega.data.IDORemoveRelationshipException;
import com.idega.data.query.InCriteria;
import com.idega.data.query.MatchCriteria;
import com.idega.data.query.SelectQuery;
import com.idega.data.query.Table;
import com.idega.user.data.Group;
import com.idega.user.data.User;
package is.idega.idegaweb.egov.company.data;





/**
 *
 *
 * @author <a href="anton@idega.com">Anton Makarov</a>
 * @version Revision: 1.1
 *
 * Last modified: Seo 23, 2008 by Author: Anton
 *
 */

public class CompanyApplicationBMPBean extends AbstractCaseBMPBean implements CompanyApplication {

	private static final long serialVersionUID = -7638155652762635917L;

	private static final String ENTITY_NAME = "COMPANY_APPLICATION";

	private static final String COLUMN_TYPE = "company_type";
	private static final String COLUMN_COMPANY = "company_id";

	private static final String COLUMN_ADMIN_USER = "admin_user";
	private static final String COLUMN_APPLICANT_USER = "applicant_user";

	private static final String CATEGORY = "application_category_id";
	private static final String CASE_CODE = "case_code";
	private static final String CONTRACT_FILE = "contract_file";

	private static final String EGOV_APPLICATION_GROUP = "EGOV_APPLICATION_GROUP";

	@Override
	public String getCaseCodeDescription() {
		return "Application for company portal";
	}

	@Override
	public String getCaseCodeKey() {
// Path: src/java/is/idega/idegaweb/egov/company/EgovCompanyConstants.java
// public class EgovCompanyConstants {
// 
// 	private EgovCompanyConstants() {}
// 
// 	public static final String IW_BUNDLE_IDENTIFIER = "is.idega.idegaweb.egov.company";
// 
// 	public static final String COMPANY_SUPER_ADMIN_ROLE = "company_super_admin";
// 	public static final String COMPANY_ADMIN_ROLE = "company_admin";
// 	public static final String COMPANY_EMPLOYEE_ROLE = "company_staff";
// 
// 	public static final List<String> ALL_COMPANY_ROLES = Collections.unmodifiableList(Arrays.asList(
// 			StandardRoles.ROLE_KEY_COMPANY,
// 			COMPANY_SUPER_ADMIN_ROLE,
// 			COMPANY_ADMIN_ROLE,
// 			COMPANY_EMPLOYEE_ROLE
// 	));
// 
// 	public static final String GROUP_TYPE_COMPANY_ADMINS = "iw_company_admins_group";
// 	public static final String GROUP_TYPE_COMPANY_STAFF = "iw_company_staff_group";
// 	public static final List<String> ALL_COMPANY_TYPES = Collections.unmodifiableList(Arrays.asList(
// 			CompanyConstants.GROUP_TYPE_COMPANY,
// 			GROUP_TYPE_COMPANY_ADMINS,
// 			GROUP_TYPE_COMPANY_STAFF
// 	));
// 
// 	public static final String CASE_CODE_KEY = "COMPORT";
// 
// 	public static final String CONTENT_CODE_REQUEST_INFORMATION = "prm_company_code_request_information";
// 
// 	public static final Integer APPLICATION_TYPE_APPROVED = 0;
// 	public static final Integer APPLICATION_TYPE_REJECTED = 1;
// 	public static final Integer APPLICATION_TYPE_UNHANDLED = 2;
// 
// 	public static final String USER_LOGIN_METADATA = "userLoginEnabledMetaDataForCompanyPortal";
// 
// 	public static final String COMPANY_PORTAL_ROOT_GROUP = "Company Portal";
// 	public static final String COMPANY_ADMINS_GROUP_IN_COMPANY_PORTAL = "Company Admins";
// 	public static final String COMPANY_SUPER_ADMINS_GROUP_IN_COMPANY_PORTAL = "Company Super Admins";
// 
// 	public static final String COMPANY_PORTAL_HOME_PAGE_APPLICATION_PROPERTY = "companyPortalHomePage";
// 	public static final String COMPANY_STAFF_HOME_PAGE_APPLICATION_PROPERTY = "companyStaffHomePage";
// 
// 	public static final String COMPANY_PORTAL_CURRENT_COMPANY_ATTRIBUTE = "companyPortalCurrentCompanyId";
// 
// 	public static final String COMPANY_PERSONAL_ID_METADATA = "COMPANY_PERSONAL_ID";
// }


// Path: src/java/is/idega/idegaweb/egov/company/data/CompanyApplicationBMPBean.java
import is.idega.idegaweb.egov.application.data.ApplicationCategory;
import is.idega.idegaweb.egov.company.EgovCompanyConstants;
import java.sql.Timestamp;
import java.util.Collection;
import java.util.Locale;
import java.util.Map;
import javax.ejb.FinderException;
import com.idega.block.process.data.AbstractCaseBMPBean;
import com.idega.block.process.data.CaseCode;
import com.idega.block.text.data.LocalizedText;
import com.idega.company.data.Company;
import com.idega.company.data.CompanyType;
import com.idega.core.file.data.ICFile;
import com.idega.data.IDOAddRelationshipException;
import com.idega.data.IDORelationshipException;
import com.idega.data.IDORemoveRelationshipException;
import com.idega.data.query.InCriteria;
import com.idega.data.query.MatchCriteria;
import com.idega.data.query.SelectQuery;
import com.idega.data.query.Table;
import com.idega.user.data.Group;
import com.idega.user.data.User;

package is.idega.idegaweb.egov.company.data;





/**
 *
 *
 * @author <a href="anton@idega.com">Anton Makarov</a>
 * @version Revision: 1.1
 *
 * Last modified: Seo 23, 2008 by Author: Anton
 *
 */

public class CompanyApplicationBMPBean extends AbstractCaseBMPBean implements CompanyApplication {

	private static final long serialVersionUID = -7638155652762635917L;

	private static final String ENTITY_NAME = "COMPANY_APPLICATION";

	private static final String COLUMN_TYPE = "company_type";
	private static final String COLUMN_COMPANY = "company_id";

	private static final String COLUMN_ADMIN_USER = "admin_user";
	private static final String COLUMN_APPLICANT_USER = "applicant_user";

	private static final String CATEGORY = "application_category_id";
	private static final String CASE_CODE = "case_code";
	private static final String CONTRACT_FILE = "contract_file";

	private static final String EGOV_APPLICATION_GROUP = "EGOV_APPLICATION_GROUP";

	@Override
	public String getCaseCodeDescription() {
		return "Application for company portal";
	}

	@Override
	public String getCaseCodeKey() {
		return EgovCompanyConstants.CASE_CODE_KEY;