Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

PlayingNow プロパティの定義

映画が現在上映されているかどうかを表すもう 1 つのプロパティ、PlayingNow を追加します。これには別の埋め込みデータ型、%BooleanOpens in a new tab を使用します。%BooleanOpens in a new tab の値には、0 (False) または 1 (True) を指定できます。PlayingNow の初期値は 1 です。

プロパティを直接 Film に追加するか、新規プロパティ・ウィザードを使用します。

完了すると、Cinema.FilmOpens in a new tab クラス定義は以下のようになります。

Class Cinema.Film Extends %Persistent 
{
/// Title of a film
Property Title As %String [ Required ];

/// Index for property Title
Index TitleIndex On Title;

Property Description As %String(MAXLEN = 300);

Property TicketsSold As %Integer [ InitialExpression = 0 ];

/// Index for property TicketsSold
Index TicketsSoldIndex On TicketsSold;

Property PlayingNow As %Boolean [ InitialExpression = 1 ];

}
FeedbackOpens in a new tab