cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Path Expression => Attribute
Date Mon, 03 Apr 2006 14:44:59 GMT
You can evaluate an expression with root ObjEntity:

String path = "toArtist.exhibitArray.closingDate";
ObjEntity rootEntity = context.getEntityResolver().lookupObjEntity 
(Painting.class);
ObjAttribute attribute = Expression.fromString(path).evaluate 
(rootEntity);

Andrus

On Apr 3, 2006, at 6:36 PM, Tobias SCHOESSLER wrote:

> hi,
>
> How do I get from a path expression  to the resulting attribute  
> object.
>
> E.g. Is there anything that I can use to parse a path like
>
> toArtist.exhibitArray.closingDate
>
> and get the corresponding ObjAttribute for closingDate.
>
> As a precondition i would assume that the path evaluates to an  
> attribute.
>
> thanks
>
> regards
>
> Tobias
>
>


Mime
View raw message