Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
I have list of attributes which might be String, Double, Boolean or List values. I would like to identify what type of attribute is it based on the name of the attribute. Could anyone help me how to get to know the type of attribute?
Use AttributeTypeSummary API to get this Data types for attribute defined on any object type.
PersistableAdapter obj = new PersistableAdapter(cr, null , Locale.US,null);
/* load attribute */
obj.load("GROUP_EFFECTIVITY");
Object enumValue = obj.get("GROUP_EFFECTIVITY");
System.out.println("IBA Value :: " + enumValue);
AttributeTypeSummary ats = obj.getAttributeDescriptor("GROUP_EFFECTIVITY");
System.out.println("Display Name :: " + ats.getLabel());
System.out.println("Data Type :: " + ats.getDataType());
System.out.println("Description :: " + ats.getDescription());
Output will looks like below:
Regards,
Shirish