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?

ZENDemo.Data.Employee

persistent class ZENDemo.Data.Employee extends %Library.Persistent, %Library.Populate

SQL Table Name: ZENDemo_Data.Employee

Sample data for Zen sample pages.

Property Inventory

Method Inventory

Properties

property Active as %Boolean;
Property methods: ActiveDisplayToLogical(), ActiveGet(), ActiveGetStored(), ActiveIsValid(), ActiveLogicalToDisplay(), ActiveNormalize(), ActiveSet()
property FavoriteColor as %String (MAXLEN = 25, POPSPEC = ".GenColor()", VALUELIST = ",red,green,blue,black");
Property methods: FavoriteColorDisplayToLogical(), FavoriteColorGet(), FavoriteColorGetStored(), FavoriteColorIsValid(), FavoriteColorLogicalToDisplay(), FavoriteColorLogicalToOdbc(), FavoriteColorNormalize(), FavoriteColorSet()
property FireDate as %Date (FORMAT = 3, POPSPEC = ".MakeDate()");
Property methods: FireDateDisplayToLogical(), FireDateGet(), FireDateGetStored(), FireDateIsValid(), FireDateLogicalToDisplay(), FireDateLogicalToOdbc(), FireDateNormalize(), FireDateOdbcToLogical(), FireDateSet()
property HireDate as %Date (FORMAT = 3, POPSPEC = ".MakeDate()");
Property methods: HireDateDisplayToLogical(), HireDateGet(), HireDateGetStored(), HireDateIsValid(), HireDateLogicalToDisplay(), HireDateLogicalToOdbc(), HireDateNormalize(), HireDateOdbcToLogical(), HireDateSet()
property Home as Address;
Property methods: HomeGet(), HomeGetObject(), HomeGetObjectId(), HomeGetStored(), HomeGetSwizzled(), HomeIsEmpty(), HomeIsValid(), HomeNewObject(), HomeSet(), HomeSetObject(), HomeSetObjectId(), HomeUnSwizzle()
property KeyWords as list of %String;
Property methods: KeyWordsBuildValueArray(), KeyWordsCollectionToDisplay(), KeyWordsCollectionToOdbc(), KeyWordsDisplayToCollection(), KeyWordsDisplayToLogical(), KeyWordsGet(), KeyWordsGetObject(), KeyWordsGetObjectId(), KeyWordsGetStored(), KeyWordsGetSwizzled(), KeyWordsIsValid(), KeyWordsLogicalToDisplay(), KeyWordsLogicalToOdbc(), KeyWordsNormalize(), KeyWordsOdbcToCollection(), KeyWordsSet(), KeyWordsSetObject(), KeyWordsSetObjectId()
property Name as %String (MAXLEN = 100) [ Required ];
Property methods: NameDisplayToLogical(), NameGet(), NameGetStored(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize(), NameSet()
property Ranking as %Integer [ Calculated ];
Random number field used to demonstrate table refresh!
Property methods: RankingCompute(), RankingDisplayToLogical(), RankingGet(), RankingIsValid(), RankingLogicalToDisplay(), RankingNormalize(), RankingSQLCompute()
property SSN as %String (MAXLEN = 15);
Property methods: SSNDisplayToLogical(), SSNGet(), SSNGetStored(), SSNIsValid(), SSNLogicalToDisplay(), SSNLogicalToOdbc(), SSNNormalize(), SSNSet()
property Salary as %Numeric (MINVAL = 0);
Property methods: SalaryDisplayToLogical(), SalaryGet(), SalaryGetStored(), SalaryIsValid(), SalaryLogicalToDisplay(), SalaryNormalize(), SalarySet()
property Title as %String (MAXLEN = 100);
Property methods: TitleDisplayToLogical(), TitleGet(), TitleGetStored(), TitleIsValid(), TitleLogicalToDisplay(), TitleLogicalToOdbc(), TitleNormalize(), TitleSet()

Methods

method %OnSubmit(pSubmit As %ZEN.Submit) as %Status
This user callback is invoked when the form bound to this class is submitted.
classmethod Cube(val As %Integer) as %Integer [ SQLProc = Employee_Cube ]
Projected as the stored procedure: Employee_Cube
A sample SQL function used for some of the demo queries against this class.
method GenColor() as %String
method MakeDate() as %Date
Return random date for data population.

Queries

query ListEmployees(City As %String = "", Title As %String = "")
SQL Query:
SELECT ID,Name,Title,Home_City FROM Employee WHERE (Home_City %STARTSWITH :City) ORDER BY Name

Indexes

index ($Employee on ) [Extent, Type = bitmap];
index (ActiveIdx on Active) [Type = bitmap];
Index on active flag
index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()
index (NameIdx on Name);
Index on name
Index methods: NameIdxExists()

Inherited Members

Inherited Methods

Storage

Storage Model: CacheStorage (ZENDemo.Data.Employee)

^ZENDemo.Data.EmployeeD(ID)
=
%%CLASSNAME
FavoriteColor
FireDate
HireDate
Home
Name
SSN
Title
CField
Nombre
HealthPlan
KeyWords
Salary
Active
FeedbackOpens in a new tab