Q:

How to query using vertexId if vertex is made using composite key in scala gremline

We are using this lib to query dse graph.
https://github.com/mpollmeier/gremlin-scala

we can query and get vertex using vertexId if vertex primary key just single key like UUID.
for ex. g.V("veretxId=UUID,~label=vertexLabel")
But if vertex primary key is made composite keys for
ex. 
    addressTD : UUId
    postCode: Int
    sName: String
    lName: String.

now vertex primary key is composite key of these four values.

Now if query in Datastax Studio and get vertex using this query 
g.V("{sName=\"TREVALLYN\",lName=\"TREVALLYN\",~label=tasLabel,postCode=7250,addressID=ad71d33c-0aaa-4014-a381-c189c30d45c5}")

it will return vertex in datastax studio.

While using https://github.com/mpollmeier/gremlin-scala this lib.
Its seems it is not working. I am sending vertexId in a prescribed format like this
"{sName=\"TREVALLYN\",lName=\"TREVALLYN\",~label=tasLabel,postCode=7250,addressID=ad71d33c-0aaa-4014-a381-c189c30d45c5}"

A:

Well, I found a solution for that.
Use java linked hash map in scala to generate vertexId and pass it to the scala gremlin query.
val javaLinkedHashMapVertexId = new java.util.LinkedHashMap[String, Any]()

//Putting values in hashmap
val vLabel =
  javaLinkedHashMapVertexId.put("~label", "vertexLabelName")
val pKeyLocaName =
  javaLinkedHashMapVertexId.put("localityName", "lName")
val pKeyPostCode =
  javaLinkedHashMapVertexId.put("postCode", postCode)
val pKeyStreetName =
  javaLinkedHashMapVertexId.put("streetName", "sname")
val pKeyAddId =
  javaLinkedHashMapVertexId.put("addressID","addressID")

val vertex = graph 
  .V(javaLinkedHashMapVertexId)
  .head()

Vertex variable will fetch vertex from dse graph using linked hashmap 

