You might want to create the view in a script instead of in Java, such as
in your ant build file, as it probably does not need to be created every
time.
You can create it from Java, using a SessionCustomizer you can execute the
DDL, either by registering a SessionEventListener with a postLogin event,
or just call login() on the Session in the SessionCustomizer, then execute
the DDL.