Read EDFs
To programmatically read an EDF on a model e.g. Book, use the following syntax:
Book book = Services.get(ModelDataService.class).readById(Book.class, 10000, userContext); //Access EDFs//string or string enumeration valueString sampleValue = (String) book.getAttribute("EPT.BookstoreEPT.TestString"); //nuumber valueDouble doubleValue = (Double) book.getAttribute("EPT.BookstoreEPT.TestDouble"); Integer integerValue = (Integer) book.getAttribute("EPT.BookstoreEPT.TestInteger"); //duration value DurationValue durationValue = (DurationValue) book.getAttribute("EPT.BookstoreEPT.TestDuration"); String value = durationValue.getValue(); //ModelLink field valueModelLinkAttributeValue modelLinkValue = (ModelLinkAttributeValue) book.getAttribute("EPT.BookstoreEPT.TestDuration"); String modelLinkCompValue = modelLinkValue.get("EPT.BookstoreEPT.TestModelLinkName");If you have selected EDFs in your view and user's role has access to the EPT then only those EDFs will be fetched selected in the view.
If you use generic read or readById and user's role has access to the EPT then all the EDFs will be fetched for that model.