How long until I gain residency?

Im a current sophomore planning on transferring out of state. The university’s website that I plan to transfer to says you must have residency in the date for a year before applying. My question is, the following year would I be classified as a resident? Thus not paying out of state tuition anymore. Or for the rest of my undergrad career would I have to pay out of state tuition? I also plan to go to grad school at this same college.