How to copy dynamic links from one query to another

See example below:

public void init()
{
    Query query = new Query(queryStr(myQuery));
    super();
    SysQuery::copyDynalinks(query, this.query());
    this.query(query);
}