Given this Hibernate snippet
@org.hibernate.annotations.NamedQueries({
@org.hibernate.annotations.NamedQuery(
name = "ASSIGNED_CONTINGENCIES",
query = "select ctg.id from Cont ctg join ctg.labels cl where cl.id = :label_id and ctg.datasetId = tscommon.rdsidtodsid(:datasetting_id)...."
)
})
Does it mean that everytime I execute this, is the "query" string being created every time or is this a case of string internment? Would it be beneficial to have query in a final static String QUERY
and then use it in the @NamedQuery
? Would the same be also valid for "name" then?