Is there a function that returns a string or list with all the parameters of the class?
- Log in to post comments
Is there a function that returns a string or list with all the parameters of the class?
Thanks !
Is possible to use the return of the Method to build the VALUELIST ?
Or other property with the same purpose?
Hello everyone !
I thank the help of all!
with everyone's help, it was possible to create a property with the same behavior as VALUE LIST from the parameters of a class.
below is the test code:
First create the abstraction
Class ing.shared.abstracts.AbstractEnum [ Abstract ]{
ClassMethod BuildValueList() As %String{ Set valueList = ","_..GetValuesOfParametersString() Return valueList}
ClassMethod BuildDisplayList() As %String{ Set displayList = ","_..GetParametersString() Return displayList}
ClassMethod GetValuesOfParameters(){ Set parametersList = ..GetParameters() Set valueList= $lb("") For i=1:1:$LISTLENGTH(parametersList){ Set value = $PARAMETER($CLASSNAME(),$LIST(parametersList,i)) Set $LIST(valueList,i) = value } Return valueList}
ClassMethod GetParameters() [ CodeMode = objectgenerator ]{ Set parametersClass="" For i=1:1:%class.Parameters.Count(){ Set parametersClass=parametersClass_$LISTBUILD(%class.Parameters.GetAt(i).Name) } Do %code.WriteLine($char(9)_"Return """_parametersClass_"""")}
ClassMethod GetParametersString() As %String{ Return $listtostring(..GetParameters())}
ClassMethod GetValuesOfParametersString() As %String{ Return $listtostring(..GetValuesOfParameters())}
}Second I created the class with the parameters, containing extension of the abstract class
Class ing.dto.AbstractionItemSectorStatus Extends ing.shared.abstracts.AbstractEnum{Parameter Active = 1;Parameter Inactive = 2;Parameter Production = 3;Parameter Upkeep = 4;}Create a datatype class referencing a parameter class in your property:
Class ing.dataMap.DataTypeSectorStatusEnum Extends %Integer [ ClassType = datatype ]{
Parameter DISPLAYLIST = {##class(ing.dto.AbstractionItemSectorStatus).BuildDisplayList()};
Parameter VALUELIST = {##class(ing.dto.AbstractionItemSectorStatus).BuildValueList()};}And finally create a Persistent class:
Class ing.dataMap.TblSector Extends %Persistent{Property Description As %String;Property SectorStatus As DataTypeSectorStatusEnum;}This architecture can be useful for future code maintenance, creating or changing new abstract classes
output of $isobject(..ObjOrigem) is "1"
I tried to do the same test.
```
LISDEV>set obj={"Id":"myId"}
LISDEV>write $property(obj,"Id")
myId
LISDEV>write $method(obj,"IdGet")
WRITE $METHOD(obj,"IdGet")
^
<METHOD DOES NOT EXIST> *IdGet,%Library.DynamicObject
LISDEV>write $zv
IRIS for UNIX (Ubuntu Server 18.04 LTS for x86-64) 2022.1 (Build 209U) Tue May 31 2022 12:20:34 EDT
LISDEV>write obj
2@%Library.DynamicObject
LISDEV>```
@Julius Kavay, according to $zv , you are running IRIS 2021.1, I'm running IRIS 2022.1
cool !
We appreciate the recognition!
Hi @Evgeny Shvarov
About The app fhir-pex is counting only 2 points in the "Java PEX Interoperability" bonus.
we also use "LLM AI or LangChain" to make recommendations to diagnostic centers, through the class present in the project: https://github.com/flavioneubauer/fhir-pex/blob/master/java-orm/src/mai…
Community Hibernate is also being used, present in the project pom by hibernateirisdialect of io.github.yurimarx to persist and query fhir events. https://github.com/flavioneubauer/fhir-pex/blob/master/java-orm/pom.xml
Second Article on DC is published on pt-br Community by : https://pt.community.intersystems.com/post/enviando-de-mensagens-kafka-…
Thank you for your attention, and if you have any further questions or need additional information, please feel free to reach out.
Hi @Robert Cemper !
In reality I would like a terminal attached to the process I am debugging in vscode.
In STUDIO, when debugging a process, the output terminal is attached to the debugged process, where it makes it possible to run more complex commands such as ZW / SET.
already in VSCODE, I am having to include complex commands in XECUTE
for example:
.png)
Hi @Evgeny Shvarov !
About https://openexchange.intersystems.com/package/quarkus-iris-monitor-system on the curent
we published the online video demo on youtube : https://youtu.be/eQZATxytNvg
Can i update the README description now ?
I am unable to add the video through the Open Exchange portal: https://openexchange.intersystems.com/portal/products/quarkus-iris-monit....png)
If possible, could you add it?
Hi! @Semion Makarov
About https://openexchange.intersystems.com/package/quarkus-iris-monitor-syst…
We have:
Video on YouTube: https://www.youtube.com/embed/eQZATxytNvg
First Article on DC: https://community.intersystems.com/post/analyzing-iris-perfmon-runtime-…
Second Article on DC PT-BR: https://pt.community.intersystems.com/post/analisando-performance-em-te…