Unit 3 - Lesson 1 - Code tables Flashcards

1
Q

Described codetables

A

Facilitates the restriction of values
Contains one or more code table items, which consist of the following components:
1)Code to be stored in the database (string)
2)Description which is a displayable text
3)The language setting which contains information relating to the localisation of the code table item
Codes appear in Curam drop-down fields on the client
Codes may be accessed programmatically
Codes need only be unique within a table
Adding new code table items to a code table - use different letter prefix for custom code items to avoid conflicts when upgrading.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe locale-specific codes

A

x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How code tables are stored in database

A

Stored in 3 database tables:
Code Table Header - a lookup table that groups a set of related codes.
(tableName, timeEntered, defaultCode)
Code Table Item - a translation of a code into a language-specific textual description.
(tableName, code, description, annotation, isEnabled, sortOrder, localeIdentified)
Code Table Hierarchy - the definition of a Code Table Hierarchy, specifying the top-level Code Table and a description of the hierarchy.
(hierarchyName, description, covetable)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How code tables maintained with CTX files

A

CTX is XML representation of a code table and its values.
Located in component’s covetable directory.
Can customise existing code table or create new ones.
Used to populated the code table database tables.
Used during development instead of Admin suite.
SERVER_COMPONENT_ORDER defines overrides.
SERVER_LOCALE_LIST - environment variable with coma separated list of locales.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The CTGEN build target

A

CTGEN

  • Merges code table definitions according to the component order.
  • Translates resultant merged code table file into Java source code and SQL files that populate the database.
  • SQL artefacts are generated to %SERVER_DIR%/build/svr/codetable/sql
  • Generated Java code compiled and packaged into %SERVER_DIR%/build/jar/codetable.jar
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Define simple code tables for your application

A
code tables package="curam.codetable"
- covetable java_identifier="GENDER" name="Gender"
-- code default="true" java_identifier="MALE" status="ENABLED" value="SX1"
--- locale language="en" sort_order="0"
---- description "Male"
---- annotation
--- locale
--code
- covetable
covetable

To use code tables programatically:
String code = curam.codeetable.GENDER.MALE;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Drop-down list

A

a FIELD can have a target connection mapped to a property based on a code-table domain. If so - drop-down list is displayed containing all enabled code-table entries. Sort order is alphabetical - but can be overridden by setting a sort order for each entry.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How to display a scrollable list

A
FIELD LABEL="Field.Label.Gender" USE_BLANK="true"  HEIGHT=2 USE_DEFAULT="false"
CONNECT
TARGET
CONNECT
FIELD
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

CTGEN target and relevant targets

A

Note: build ctgen must be executed whenever a change is made to a CTX file.
ctgen must always be followed by build database
You must also perform a build client for the changed to be picked up on the client side.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What CTGEN produces

A
Produces code table SQL file to place the codes on the database and a symbol definition file, which is a standard Java class file. Java file contacting constants for code table identifiers used in the code table XML file.
build/svr/codetable/gen
Two files will be produced for each defined code table.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Code Table Hierarchy

A

Links multiple code tables into several levels.
By selecting a code at one level, you reduce the number of codes at the next level.
Note, lowest-level code is returned and stored, but the parents can be found via the covetable API.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Displaying Codes based on a Hierarchy

A

FIELD element has a CONTROL attribute. It can be set to CT_HIERARCHY_HORIZONTAL (default) or CT_HIERARCHY)VERTICAL.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Configure Codes using Admin suite

A

Dynamic, on the fly.
Publish so changes are picked up by the application
All changes must be reflected back to the CTX files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly