ctgen

Cúram code table files allow an application to use a level of indirection when storing commonly used constants on the database. This level of indirection enables efficient database storage. Codetable files are located in the source/codetable directory of a component. Like message files, code table files are shipped with the Social Program Management Platform and may be customized through the merge behavior.

The ctgen build target merges Cúram code table (.ctx) files and then translates the resultant merged code table file (which is stored in /build/svr/codetable/scp directory) into Java source code and SQL files which are used to return codes from the database at runtime.

The prp.noninternedstrings parameter indicates whether code table artefacts should be generated with strings that are not interned. The use of interned strings in Java avoids the creation of duplicate java.lang.String objects. Consequently memory usage may be reduced as there will be only one String object created for a string value, irrespective of how many references to that string value exist.

Note: The default value for this property is true. Setting prp.noninternedstrings to false means that strings will be interned. Although this may result in decreased memory usage by the final application, dependency checking will operate incorrectly when .ctx files are changed.

The generated Java code is then compiled and packed into /build/jar/codetable.jar.