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?

Sample.Employee

persistent class Sample.Employee extends Sample.Person

SQL Table Name: Sample.Employee

This sample persistent class represents an employee.

Property Inventory

Method Inventory

Properties

relationship Company as Company [ Inverse = Employees , Cardinality = one ];
The company this employee works for.
Property methods: CompanyGet(), CompanyGetObject(), CompanyGetObjectId(), CompanyGetStored(), CompanyGetSwizzled(), CompanyIsValid(), CompanyNewObject(), CompanyOnDelete(), CompanyRClose(), CompanyRExec(), CompanyRFetch(), CompanyRelate(), CompanySQLCompute(), CompanySet(), CompanySetObject(), CompanySetObjectId(), CompanyUnRelate(), CompanyUnSwizzle()
property Notes as %Stream.GlobalCharacter;
A character stream containing notes about this employee.
Property methods: NotesDelete(), NotesGet(), NotesGetObject(), NotesGetObjectId(), NotesGetStored(), NotesGetSwizzled(), NotesIsValid(), NotesNewObject(), NotesOid(), NotesOpen(), NotesSet(), NotesSetObject(), NotesSetObjectId(), NotesUnSwizzle()
property Picture as %Stream.GlobalBinary;
A picture of the employee
Property methods: PictureDelete(), PictureGet(), PictureGetObject(), PictureGetObjectId(), PictureGetStored(), PictureGetSwizzled(), PictureIsValid(), PictureNewObject(), PictureOid(), PictureOpen(), PictureSet(), PictureSetObject(), PictureSetObjectId(), PictureUnSwizzle()
property Salary as %Integer (MAXVAL = 100000, MINVAL = 0);
The employee's current salary.
Property methods: SalaryDisplayToLogical(), SalaryGet(), SalaryGetStored(), SalaryIsValid(), SalaryLogicalToDisplay(), SalaryNormalize(), SalarySet(), SalaryXSDToLogical()
property Title as %String (MAXLEN = 50, POPSPEC = "Title()");
The employee's job title.
Property methods: TitleDisplayToLogical(), TitleGet(), TitleGetStored(), TitleIsValid(), TitleLogicalToDisplay(), TitleLogicalToOdbc(), TitleNormalize(), TitleSet()

Methods

method PrintPerson()
This method overrides the method in Person.
Prints the properties Name and Title to the console.
method WritePicture()
writes a .png file containing the picture, if any, of this employee the purpose of this method is to prove that Picture really contains an image

Indexes

index ($Employee on ) [Extent, Type = bitmap];

Inherited Members

Inherited Properties

Inherited Methods

Storage

Gray indicates storage defined by superclasses.

Storage Model: CacheStorage (Sample.Person)

^Sample.PersonD(ID)
=
%%CLASSNAME
Name
SSN
DOB
Home
Office
Spouse
FavoriteColors

Storage Model: CacheStorage (Sample.Employee)

^Sample.PersonD(ID,"Employee")
=
Company
Notes
Salary
Title
Picture
FeedbackOpens in a new tab