The way I've approached this problem is to move all the pagination logic into your base controller in generic form and then have the child controllers take on the responsibility for casting the data into the form your visualforce page expects.
public List<Foo__c> getFooPagedData() {
List<Foo__c> fooPagedData = new List<Foo__c>();
for(SObject record : getPagedData()) {
fooPagedData.add((Foo__c) record));
}
return fooPageData;
}
You might also consider using the StandardSetController to control your pagination. It works great for custom objects and most standard objects, but not for custom ApexClasses and some standard objects. That said you'll still need to cast your result set as it to returns a List from its getRecords() method.
To learn in-depth about Salesforce, sign up for industry-based Salesforce Training!