openSEAL Stereotypes Reference: <<Type>>

Summary

A type is a data structure that encapsulates the properties of an entity within your application (hence it is sometimes also referred to as an Entity).

General Characteristics:

  • Private members
  • Public accessors (getters) and mutators (setters).
  • Serializable
  • Lightweight, with little or no logic.

Usage:

Generally passed into or out of Service Methods (therefore crosses process and tier boundaries). Types are usually compiled into a separate library assembly that can be deployed wherever required (such as in a business tier and a web tier).

Example:

using System;
using System.Runtime.Serialization;

namespace org.openseal.refapp.types
{

    /// 
    /// Hello world Type.
    /// 
    [Serializable]
    public sealed class HelloWorldType
    {

        private string message_;
        
        /// Default constructor.
        public HelloWorldType()
        {
            //initialize the message
            message_ = "Hello World!";
        }

        /// 
        /// Property exposing the message.
        /// 
        public string Message
        {
            get
            {
                return message_;
            }

            set
            {
                message_ = value;
            }
        }

    } // end of class
    
} // end of namespace