Figure shown above illustrates the three primary interfaces ADF provides for accessing runtime metadata about view objects and entity objects. The
ViewObject
interface extends the StructureDef
interface. The class representing the entity definition (EntityDefImpl
) also implements this interface. As its name implies, the StructureDef
defines the structure and the component and provides access to a collection of AttributeDef
objects that offer runtime metadata about each attribute in the view object row or entity row. Using an AttributeDef
, you can access its companion AttributeHints
object to reference hints like the display label, format mask, tooltip, etc.Now you can use this understanding to get runtime meta info about view object or entity object e.g. if i want to find whether a ViewObject is readonly non entity based object or not. i can find it by:
isFullSql()
istrue
This method returns true if the view object's SQL query is completely specified by the developer, as opposed to having the select list derived automatically based on the participating entity usages.
getEntityDefs()
isnull
This method returns an array of
EntityDefImpl
objects representing the view object's entity usages. If it returnsnull
, then the view object has no entity usages.