from http://code.google.com/p/gql4j