(a) Upon dismissal of a petition or complaint alleging delinquency or that a child is a child in need of services or completion of the process in a case handled through informal adjustment, mediation, or other nonadjudicatory procedure, the court shall order the sealing of the files and records in the case.
(b) On application of a person who has been adjudicated for committing a delinquent act or as a child in need of services or on the court's own motion, and after a hearing, the court shall order the sealing of the files and records in the proceeding if the court finds that:
(1) Two years have elapsed since the final discharge of the person;
(2) Since the final discharge of the person he or she has not been convicted of a felony or of a misdemeanor involving moral turpitude or adjudicated for committing a delinquent act or as a child in need of services and no proceeding seeking conviction or adjudication is pending against the person; and
(3) The person has been rehabilitated.
(c) On application of a person who has been adjudicated for a delinquent act or on the court's own motion, and after a hearing, the court shall order the sealing of the files and records in the proceeding, including those specified in Code Sections 15-11-702 and 15-11-708, if the court finds that the child was adjudicated for a delinquent act for a sexual crime as defined in Code Section 16-3-6 and such crime resulted from the child being:
(1) Trafficked for sexual servitude in violation of Code Section 16-5-46; or
(2) A victim of sexual exploitation as defined in Code Section 49-5-40.
(d) Reasonable notice of the hearing required by subsection (b) and (c) of this Code section shall be given to:
(1) The prosecuting attorney;
(2) DJJ, when appropriate;
(3) The authority granting the discharge if the final discharge was from an institution or from parole; and
(4) The law enforcement officers or department having custody of the files and records if the files and records specified in Code Sections 15-11-702 and 15-11-708 are included in the application or motion.
(e) Upon the entry of the order the proceeding shall be treated as if it had never occurred. All index references shall be deleted and the person, the court, the law enforcement officers, and the departments shall properly reply that no record exists pertaining to the person upon inquiry in any matter. Copies of the order shall be sent to each agency or designated official and shall also be sent to the deputy director of the Georgia Crime Information Center of the Georgia Bureau of Investigation. Inspection of the sealed files and records thereafter may be permitted by an order of the court upon petition by the person who is the subject of the records and otherwise only by those persons named in the order or to criminal justice officials upon petition to the court for official judicial enforcement or criminal justice purposes.
(f) The court may seal any record containing information identifying a victim of an act which, if done by an adult, would constitute a sexual offense under Chapter 6 of Title 16.