Generating solutions for charged stellar models in general relativity