Update QueryResource.java

add colswap functions