added getFactory and split up setRecordDefaults