Class Sample.Employee Extends %Persistent
{
/// The employee's name.
Property Name As %String(MAXLEN = 50);
/// The employee's job title.
Property Title As %String(MAXLEN = 50);
/// The employee's current salary.
Property Salary As %Integer(MAXVAL = 100000, MINVAL = 0);
/// This method prints employee information using ObjectScript.
Method PrintEmployee() [ Language = objectscript]
{
Write !,"Name: ", ..Name, " Title: ", ..Title
}
}
Class Sample.Employee Extends %Persistent
{
/// The employee's name.
Property Name As %String(MAXLEN = 50);
/// The employee's job title.
Property Title As %String(MAXLEN = 50);
/// The employee's current salary.
Property Salary As %Integer(MAXVAL = 100000, MINVAL = 0);
/// This method prints employee information using Embedded Python.
Method PrintEmployee() [ Language = python ]
{
print("\nName:", self.Name, "Title:", self.Title)
}
}