If the battery goes dead, and the car is locked,how do you get in? on 2005 Cadillac CTS-V

The car set locked and now we cant get in to charge it.

Asked by for the 2005 Cadillac CTS-V
Battery is in the passenger rear of the engine compartment so the hood has to be opened to replace it. I am not that familiar with Cadillac, is there no key to open the door lock? I guess the AAA or local mechanic can open the door lock with a "slim jim" to open the door so you can open the hood.