

package gov.va.med.cds.persistence;


import gov.va.med.cds.clinicaldata.DomainEntryPoint;
import gov.va.med.cds.filter.EntryFilterInterface;
import gov.va.med.cds.persistence.hibernate.PageableQueryWork;

import java.util.List;
import java.util.Map;

import org.hibernate.Session;


public class PageableAssociationBasedQueryStrategy
    extends
        DefaultAssociationBasedQueryStrategy
{
	
	private Map<DomainEntryPoint, Integer> defaultPageSizeByDomainMap = null;
	
    protected QueryWorkInterface createQueryWork( Session session, QueryAssociationInterface queryAssociation, EntryFilterInterface entryFilter,
                    List<String> personIdentifiers, Class<?> pointInTimeUserType, String siteId )
    {
        QueryWorkInterface queryWork = new PageableQueryWork( session, queryAssociation, entryFilter, queryNameBuilder, filterParameterExtractor,
                        parameterTransformerMap, queryParameterBinder, templateTimeoutMap, personIdentifiers, pointInTimeUserType, applicationName, siteId, null );
        return queryWork;
    }
    
    public void setDefaultPageSizeByDomainMap(
			Map<DomainEntryPoint, Integer> defaultPageSizeByDomainMap) {
		this.defaultPageSizeByDomainMap = defaultPageSizeByDomainMap;
	}
}
