package com.idega.block.building.data;
import com.idega.data.IDOFactory;
import javax.ejb.CreateException;
import com.idega.data.IDOEntity;
import javax.ejb.FinderException;
import java.util.Collection;
public class ApartmentCategoryHomeImpl extends IDOFactory implements
ApartmentCategoryHome {
public Class getEntityInterfaceClass() {
return ApartmentCategory.class;
}
public ApartmentCategory create() throws CreateException {
return (ApartmentCategory) super.createIDO();
}
public ApartmentCategory findByPrimaryKey(Object pk) throws FinderException {
return (ApartmentCategory) super.findByPrimaryKeyIDO(pk);
}
public Collection findAll() throws FinderException {
IDOEntity entity = this.idoCheckOutPooledEntity();
Collection ids = ((ApartmentCategoryBMPBean) entity).ejbFindAll();
this.idoCheckInPooledEntity(entity);
return this.getEntityCollectionForPrimaryKeys(ids);
}
public ApartmentCategory findByName(String name) throws FinderException {
IDOEntity entity = this.idoCheckOutPooledEntity();
Object pk = ((ApartmentCategoryBMPBean) entity).ejbFindByName(name);
this.idoCheckInPooledEntity(entity);
return this.findByPrimaryKey(pk);
}
public Collection findByComplex(Integer complexID) throws FinderException {
IDOEntity entity = this.idoCheckOutPooledEntity();
Collection ids = ((ApartmentCategoryBMPBean) entity)
.ejbFindByComplex(complexID);
this.idoCheckInPooledEntity(entity);
return this.getEntityCollectionForPrimaryKeys(ids);
}
}