Disclaimer: I'm not a dog expert. Just a dog owner with three dogs and about ten years of experience as a dog owner.
I have two nine-year-old GSD mixes. One was trained before she came to me; she got through her training by having an outdoor routine where the owner just took her outside at certain times. They lived in an apartment so they didn't really have much choice on the matter. Eventually she got so good that the owner would open the door, tell her to go pee, and she would take herself downstairs, pee, and come back up. My first GSD I trained with a crate at 8 weeks old. As she got older and her bladder control improved, I took away the crate and took on her outside on a set schedule. Not too long after, she learned to use the doggy door and just takes herself outside as well. I think many methods are capable of helping the dog associate it's urge to urinate/defecate with going outside to a designated place during certain times of the day. Consistency is probably the most important thing. Even now as my dogs are older, they've lost some training they learned as pups because I wasn't consistent through the years.