Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dali-dev] How to find the Java type for a PersistentAttribute?

My quick answer is:
OrmPersistentAttribute.getMapping().getJavaPersistentAttribute() and then the same code you used below.

My long answer is that I need to think about this more because this doesn't seem like the best approach.  Especially since JavaPersistentAttribute is exposing the JavaResourcePersistentAttribute while JavaPersistentType is not exposing the JavaResourcePersisetntType.  What are you trying to do that you need to get the type name from a PersistentAttribute?  Maybe this would help me figure out what API might be appropriate for your use case. Then we can use this as we slowly transition from provisional API to actual API.

thanks,
Karen

Christopher Jaun wrote:

Hello,

I'm trying to figure out the underlying Java type of a PersistentAttribute instance.

Currently I'm doing something like this:

public String getFullyQualifiedAttributeType(PersistentAttribute attribute) {
return ((JavaPersistentAttribute)attribute).getResourcePersistentAttribute().getQualifiedTypeName();
}

This works fine in the case my PersistentAttribute is a JavaPersistentAttribute, but how would I handle this when my PersistentAttribute is an OrmPersistentType?

Is there any common API that will do this for me or is there a specific OrmPersistentAttribute way of going about this?

Thanks for any help.

Chris


_______________________________________________ dali-dev mailing list dali-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/dali-dev

Back to the top