// Path: src/java/is/idega/idegaweb/egov/course/data/rent/RentableItem.java
// public interface RentableItem extends IDOEntity {
// 
// 	public String getType();
// 	public void setType(String type);
// 
// 	public String getName();
// 	public void setName(String name);
// 
// 	public Double getRentPrice(SchoolSeason season);
// 	public void setRentPrice(SchoolSeason season, Double rentPrice);
// 
// 	public Integer getQuantity();
// 	public void setQuantity(Integer quantity);
// 
// 	public Integer getRentedAmount();
// 	public void setRentedAmount(Integer rented);
// 
// 	public void addPrice(CoursePrice price) throws IDOAddRelationshipException;
// 	public Collection<CoursePrice> getAllPrices();
// 	public void removePrice(CoursePrice price) throws IDORemoveRelationshipException;
// 	public void removeAllPrices() throws IDORemoveRelationshipException;
// }


import is.idega.idegaweb.egov.course.data.rent.RentableItem;
import java.sql.Date;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
import java.util.logging.Level;
import javax.ejb.FinderException;
import org.springframework.web.context.support.WebApplicationContextUtils;
import com.idega.block.school.data.School;
import com.idega.block.school.data.SchoolSeason;
import com.idega.block.school.data.SchoolType;
import com.idega.data.GenericEntity;
import com.idega.data.IDOAddRelationshipException;
import com.idega.data.IDOException;
import com.idega.data.IDOFinderException;
import com.idega.data.IDOLookupException;
import com.idega.data.IDORelationshipException;
import com.idega.data.IDORemoveRelationshipException;
import com.idega.data.query.AND;
import com.idega.data.query.Column;
import com.idega.data.query.CountColumn;
import com.idega.data.query.InCriteria;
import com.idega.data.query.MatchCriteria;
import com.idega.data.query.MaxColumn;
import com.idega.data.query.OR;
import com.idega.data.query.SelectQuery;
import com.idega.data.query.Table;
import com.idega.idegaweb.IWMainApplication;
import com.idega.util.ListUtil;
		return ENTITY_NAME;
	}

	@SuppressWarnings("unchecked")
	@Override
	public void initializeAttributes() {
		addAttribute(getIDColumnName());
		addAttribute(COLUMN_COURSE_NUMBER, "Course number", Integer.class);
		addAttribute(COLUMN_NAME, "Name", String.class, 50);
		addAttribute(COLUMN_USER, "User", String.class);
		addAttribute(COLUMN_DESCRIPTION, "Description", String.class);
		addAttribute(COLUMN_START_DATE, "Start date", Timestamp.class);
		addAttribute(COLUMN_END_DATE, "End date", Timestamp.class);
		addAttribute(COLUMN_REGISTRATION_END, "Registration end", Timestamp.class);
		addAttribute(COLUMN_ACCOUNTING_KEY, "Accounting key", String.class, 30);
		addAttribute(COLUMN_BIRTHYEAR_FROM, "Birthyear from", Integer.class);
		addAttribute(COLUMN_BIRTHYEAR_TO, "Birthyear from", Integer.class);
		addAttribute(COLUMN_MAX_PARTICIPANTS, "Max", Integer.class);
		addAttribute(COLUMN_PRICE, "Price", Float.class);
		addAttribute(COLUMN_COST, "Cost", Float.class);
		addAttribute(COLUMN_OPEN_FOR_REGISTRATION, "Open for registration", Boolean.class);
		addAttribute(COLUMN_PRE_CARE, "Has pre care", Boolean.class);
		addAttribute(COLUMN_POST_CARE, "Has post care", Boolean.class);

		addManyToOneRelationship(COLUMN_COURSE_TYPE, CourseType.class);
		addManyToOneRelationship(COLUMN_COURSE_PRICE, CoursePrice.class);
		addManyToOneRelationship(COLUMN_PROVIDER, School.class);
		addManyToManyRelationShip(CoursePrice.class, COLUMN_COURSE_PRICES);
		addManyToManyRelationShip(SchoolSeason.class, COLUMN_COURSE_SEASONS);

// Path: src/java/is/idega/idegaweb/egov/course/data/rent/RentableItem.java
// public interface RentableItem extends IDOEntity {
// 
// 	public String getType();
// 	public void setType(String type);
// 
// 	public String getName();
// 	public void setName(String name);
// 
// 	public Double getRentPrice(SchoolSeason season);
// 	public void setRentPrice(SchoolSeason season, Double rentPrice);
// 
// 	public Integer getQuantity();
// 	public void setQuantity(Integer quantity);
// 
// 	public Integer getRentedAmount();
// 	public void setRentedAmount(Integer rented);
// 
// 	public void addPrice(CoursePrice price) throws IDOAddRelationshipException;
// 	public Collection<CoursePrice> getAllPrices();
// 	public void removePrice(CoursePrice price) throws IDORemoveRelationshipException;
// 	public void removeAllPrices() throws IDORemoveRelationshipException;
// }


// Path: src/java/is/idega/idegaweb/egov/course/data/CourseBMPBean.java
import is.idega.idegaweb.egov.course.data.rent.RentableItem;
import java.sql.Date;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
import java.util.logging.Level;
import javax.ejb.FinderException;
import org.springframework.web.context.support.WebApplicationContextUtils;
import com.idega.block.school.data.School;
import com.idega.block.school.data.SchoolSeason;
import com.idega.block.school.data.SchoolType;
import com.idega.data.GenericEntity;
import com.idega.data.IDOAddRelationshipException;
import com.idega.data.IDOException;
import com.idega.data.IDOFinderException;
import com.idega.data.IDOLookupException;
import com.idega.data.IDORelationshipException;
import com.idega.data.IDORemoveRelationshipException;
import com.idega.data.query.AND;
import com.idega.data.query.Column;
import com.idega.data.query.CountColumn;
import com.idega.data.query.InCriteria;
import com.idega.data.query.MatchCriteria;
import com.idega.data.query.MaxColumn;
import com.idega.data.query.OR;
import com.idega.data.query.SelectQuery;
import com.idega.data.query.Table;
import com.idega.idegaweb.IWMainApplication;
import com.idega.util.ListUtil;

		return ENTITY_NAME;
	}

	@SuppressWarnings("unchecked")
	@Override
	public void initializeAttributes() {
		addAttribute(getIDColumnName());
		addAttribute(COLUMN_COURSE_NUMBER, "Course number", Integer.class);
		addAttribute(COLUMN_NAME, "Name", String.class, 50);
		addAttribute(COLUMN_USER, "User", String.class);
		addAttribute(COLUMN_DESCRIPTION, "Description", String.class);
		addAttribute(COLUMN_START_DATE, "Start date", Timestamp.class);
		addAttribute(COLUMN_END_DATE, "End date", Timestamp.class);
		addAttribute(COLUMN_REGISTRATION_END, "Registration end", Timestamp.class);
		addAttribute(COLUMN_ACCOUNTING_KEY, "Accounting key", String.class, 30);
		addAttribute(COLUMN_BIRTHYEAR_FROM, "Birthyear from", Integer.class);
		addAttribute(COLUMN_BIRTHYEAR_TO, "Birthyear from", Integer.class);
		addAttribute(COLUMN_MAX_PARTICIPANTS, "Max", Integer.class);
		addAttribute(COLUMN_PRICE, "Price", Float.class);
		addAttribute(COLUMN_COST, "Cost", Float.class);
		addAttribute(COLUMN_OPEN_FOR_REGISTRATION, "Open for registration", Boolean.class);
		addAttribute(COLUMN_PRE_CARE, "Has pre care", Boolean.class);
		addAttribute(COLUMN_POST_CARE, "Has post care", Boolean.class);

		addManyToOneRelationship(COLUMN_COURSE_TYPE, CourseType.class);
		addManyToOneRelationship(COLUMN_COURSE_PRICE, CoursePrice.class);
		addManyToOneRelationship(COLUMN_PROVIDER, School.class);
		addManyToManyRelationShip(CoursePrice.class, COLUMN_COURSE_PRICES);
		addManyToManyRelationShip(SchoolSeason.class, COLUMN_COURSE_SEASONS);

		Map<String, ? extends RentableItem> entities = null;