OK, if I understand correctly, you are creating the changelog using java code? If so, please understand that yours is a fairly unusual situation. I don't know of anyone else doing that.
In that case, yes, you should be using the CreateViewChange class, and you can set the select part of the change by calling CreateViewChange.setSelectQuery. When Liquibase serializes the change to XML, this value will be written to the correct location.
Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/
Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/