27 lines
537 B
Plaintext
27 lines
537 B
Plaintext
Class Serialize.Employee Extends %SerialObject
|
|
{
|
|
|
|
Method %OnNew(ByRef pId As %Integer = 0, pDepartment As %String, pName As %String) As %Status
|
|
{
|
|
Do ..IDSet(pId)
|
|
Set pId=pId+1
|
|
Do ..DepartmentSet(pDepartment)
|
|
Do ..NameSet(pName)
|
|
Quit $$$OK
|
|
}
|
|
|
|
Method Print()
|
|
{
|
|
Write "[", ..%ClassName(), "]", !
|
|
Write "- ID: "_..IDGet(), !
|
|
Write "- Name: "_..NameGet(), !
|
|
Write "- Department: "_..DepartmentGet(), !
|
|
Quit
|
|
}
|
|
|
|
Property ID As %Integer [ Private ];
|
|
Property Name As %String [ Private ];
|
|
Property Department As %String [ Private ];
|
|
|
|
}
|