[hibernate-dev] Another @Access quandry
Hardy Ferentschik
hardy at hibernate.org
Wed Apr 2 07:34:26 EDT 2014
On 2 Jan 2014, at 04:20, Steve Ebersole <steve at hibernate.org> wrote:
> I have heard no more comments, so I will move forward with this as stated earlier.
Sorry for the late reply. I had a read through and what you describe is what I would expect (in fact I hope
I basically implemented it this way on the metamodel branch).
There is a typo in example 4:
@Entity
@Access(PROPERTY)
public class PublishedDocument extends Document
Should be @Access(FIELD)
> Additionally, I started working the a PoC for the idea of making this resolution pluggable. Here is the initial stroke for the contract:
>
>
> /**
> * Contract responsible for resolving the members that identify the persistent
> * attributes for a given class descriptor representing a managed type.
> *
> * These members (field or method) would be where we look for mapping annotations
> * for the attribute.
> *
> * Additionally, whether the member is a field or method would tell us the default
> * runtime access strategy
> *
> * @author Steve Ebersole
> */
> public interface PersistentAttributeMemberResolver {
> /**
> * Given the ManagedType Java type descriptor and the implicit AccessType
> * to use, resolve the members that indicate persistent attributes.
> *
> * @param managedTypeDescriptor The ManagedType Java type descriptor
> * @param implicitAccessType The implicit AccessType for the resolution
> *
> * @return The list of "backing members"
> */
> public List<MemberDescriptor> resolveMembers(
> JavaTypeDescriptor managedTypeDescriptor,
> AccessType implicitAccessType);
> }
Where MemberDescriptor and JavaTypeDescriptor are the descriptors from the new reflite layer, right?
This should work.
—Hardy
More information about the hibernate-dev
mailing list