Published on InterSystems Developer Community (https://community.intersystems.com)

Home > How to Get the Property's DisplayList data of ValueList from Java

Question
Vikram Annadurai · Dec 21, 2019

How to Get the Property's DisplayList data of ValueList from Java

Hi All,

I trying to get the DisplayList data of the ValueLIst from Java using Springboot. when I try to get the DislayList data via java code but I'm getting the VALUELIST data. I don't get any idea to get that DisplayList data. Below is the example

Property PetName As %Integer(DISPLAYLIST = ",Cat,Dog,Dove,Parrot", VALUELIST = ",1,2,3,4");

Java Code:

public String PetName;

public List<Pet> getPet() {
        return ser.findAll();
    }

List<Pet> arrayList = getPet();
        for (Patient list : arrayList) {

                 String pet= list.getPet();

                 System.out.println("Pet Name --->" + pet);

}

If PetName value is 2  I am getting output 2 not "Dog". Which means it return the interger value not the string value. So how to get that. Please help me...

 

 

Thanks,

Vikram

#Eclipse #Java #JDBC #ObjectScript #Caché #InterSystems IRIS

Source URL:https://community.intersystems.com/post/how-get-propertys-displaylist-data-valuelist-java