Unit 4 - Lesson 1 - Operation Stereotypes Flashcards
Describe code packages
Created in model to organise elements. Can contain: Packages Classes Relationships Class Diagrams Package structure does not affect generated code. To generate elements into separate Java package you must use CODE_PACKAGE option.
Describe and use stereotyped methods for standard operations
Standard operations:
Developer models method - generators create keys, details and list as required.
Except for READMULTI:
* Developer specifies the key as input parameter
* Generators create list as return parameter.
Describe and use handcrafted SQL
NS and NSMULTI stereotyped operations.
These queries have access to all the tables on the database and all parameters of the operation.
Developer controls the whole SQL clause.
Two types of host variable:
* Parameter host variables correspond to the arguments of an operation, e.g. personID
* Return type host variable is used to return data from handcrafted SQL, e.g. personName
* Host variable must be prefixed by a colon (:)
* Host variables are case sensitive
Describe batch architecture
- Allows business processing to run outside the application server.
- Batch jobs are Java applications that connect to the database via JDBC.
- Batch jobs can be scheduled using any industry-standard scheduler tool
- Infrastructure contains a batch launcher process that executes the batch job.
- Some deferred processing and workflow features are available.
- Caching and streaming are used to improve performance.
External Scheduler > Curam Batch Launcher > Batch Process > Curam Database
Describe input meta-model
Input to generators. User-defined set of UML constructs. Contains: * Packages * Class diagrams * Classes * Relationships
Working with Fragments in RSA
Curam model is a single logical model consisting of separate physical fragments.
Fragments do not load when you open the model.
Fragments are loaded when you open by click on +
By default, model is stored in a single file, for example ServerWorkshop.emx
Possible to specify that any or all packages are stored in separate files called a fragment (.efx file).
Facilitates source code control.
Specifying code package
Set Code_package property in the Curam properties tab.
Value overrides parent value.
Root packages is defined in ‘project.package’ in Application.prx
Must be a valid Java identifier.
Describe Entity operations
Database operations: * Use Curam-specified stereotypes * Fully or partially generated for you * Includes INSERT READ and MODIFY Non-database operations: * No generator-regognized stereotype * Generator creates skeleton for the operations * Developer must implement the rest for the entity class in the impl package.
Operations that return parameter or require a primary key use Standard Structs in classes with stereotype KEY.
Describe Entity operations standard stereotypes
Normal CRUD operations using curam generated entity key and return structs, except READMULTI where developer specifies the key.
insert, modify, read, read multi, remove
Describe Entity operations non-keyed stereotypes
Operate on all records.
nkmodify, nkread, nkreadmulti, nkremove
Describe Entity operations non-standard stereotypes
CRUD operations using subset of attributes.
ns and nsmulti are for complex operations where a SQL query needs to be defined.
You must specify the input and output struct as required.
nsinsert, nsmodify, nsread, nsreadmulti, nsremove, ns, nsmulti.
Describe Entity operations for other stereotypes
Batch - Process large number of records in single transaction.
batchinsert, batchmodify, blank.
Describe and use stereotyped methods for non-keyed operations
Operate on all records on the table.
No inputs or outputs structs need be modelled - The generators create them.
Be very careful - can easily result in all records being dropped or amended.
Describe and use stereotyped methods for non-standard operations
Developer specifies input and output structs. Generators do the rest, except for NS and NSMULTI.
Developers may specify an optional WHERE clause for READMULTI or NSREADMULTI.
List handcrafted SQL Syntax considerations
All handcrafted SQL statements must end with a semicolon.
When writing SQL, consider Curam data type to store the value.
Some are stored as null values.
SVR_DATE, SVR_DATETIME, SVR_UNIQUEID, SVR_BLOB, SVR_STRING.