Template construction for Java follows much the same pattern as with the SQL example. The class name is replaced by the table key. The instance variable names are replaced with column keys, and text is repeated for each entry in the columns list.
We’ve introduced a new key, javatype, for the Java data type. We could add this key with the corresponding value to each entry in the columns list, but since the Java type and the SQL type are systematically related, there is a better way.