RISE to Bloome Software
Log In    
Home
RISE
Marshal
Download
 
 
Site Map Site Map
Link to Us Link to Us
r2bsoftware.se r2bsoftware.se
 
 
RISE Version 4.5RISE Version 4.5
RISE Visual ModelingRISE Visual Modeling
AJAX Code GeneratorAJAX Code Generator
 
 
Bookmark and Share
 
Click to hide navigation tree
The New method
RISE provides a method sterotype called New for creation of an instance of an entity.
 
The method is named New<entity name> by default.
 
Rules for the New method sterotype:
  • The method returns the ID of the created instance
  • The method requires all mandatory attributes as arguments
  • The method requires all non-nullable foreign keys as arguments
A mandatory attribute is one that is
  • required to be unique or 
  • must not be empty (not nullable) and does not have a default value.
The IDocument example
We examplify a New method with the method NewDocument in the interface IDocument in the model below.
 
 
Furthermore, suppose that the Document entity has attributes defined as below, i.e. a name that must be set and an author that is allowed to be empty.
 
 
This will result in the following NewDocument method viewed using the RISE method editor. Note that the caller must provide a name for the document, but not the author, and a reference to folder to which the document is related since these are mandatory according to the model.