Instead of inserting a javatype key and value in the dictionary for each column, at the top level of the dictionary we create a lookup table called sql2java which contains one key for each SQL data type with its corresponding Java data type as the value. Here, an SQL char will become a Java String, and an SQL number will become a Java Integer.
Then we add a javatype key with a value that is itself a key. This is a new concept. In previous examples, key values were text to be replaced in the template, or lists of objects. When the value of a key is itself another key, that key is in turn evaluated to determine what value to generate.
Here the key is a compound one which says to look for the type key in the sql2java dictionary. Our first observation is that there is in fact no type key in the sql2java dictionary. This illustrates another feature of how Intercalate looks up keys in the dictionary. If a particular key is not found, the last component of the key is looked up independently, and the value so discovered used in its place. So, for example, in the Name column, the value of type is char. Char is then used in place of type, and lookup for the key sql2java.char succeeds, returning the value String.