package ua.com.fielden.platform.sample.domain;

import com.google.inject.Inject;

import java.util.Collection;
import java.util.List;

import ua.com.fielden.platform.entity.fetch.IFetchProvider;
import ua.com.fielden.platform.dao.CommonEntityDao;
import ua.com.fielden.platform.entity.query.IFilter;
import ua.com.fielden.platform.entity.query.model.EntityResultQueryModel;
import ua.com.fielden.platform.entity.annotation.EntityType;
import ua.com.fielden.platform.dao.annotations.SessionRequired;
/** 
 * DAO implementation for companion object {@link ITgGeneratedEntity}.
 * 
 * @author TG Team
 *
 */
@EntityType(TgGeneratedEntity.class)
public class TgGeneratedEntityDao extends CommonEntityDao<TgGeneratedEntity> implements ITgGeneratedEntity {

    @Inject
    public TgGeneratedEntityDao(final IFilter filter) {
        super(filter);
    }

    @Override
    @SessionRequired
    public int batchDelete(final EntityResultQueryModel<TgGeneratedEntity> model) {
        return defaultBatchDelete(model);
    }
    
    @Override
    @SessionRequired
    public int batchDelete(final Collection<Long> entitiesIds) {
        return defaultBatchDelete(entitiesIds);
    }
    
    @Override
    @SessionRequired
    public int batchDelete(final List<TgGeneratedEntity> entities) {
        return defaultBatchDelete(entities);
    }
    
    @Override
    protected IFetchProvider<TgGeneratedEntity> createFetchProvider() {
        return super.createFetchProvider().with("entityKey", "desc", "createdBy", "critOnlySingleProp");
    }
    
}
@@ -1504,30 +1504,8 @@
 dBy%22
-, %22critOnlySingleProp%22
 );%0A 

Revert "#1145 Fixed tests for generated centres by adding missing definition of crit-only single entity-typed property inside fetch provider."