propertyAccess = true;
}
}
if (stack.peek() instanceof JpaManagedClass) {
JpaManagedClass entity = (JpaManagedClass) stack.peek();
// sanity check
if (fieldAccess && propertyAccess) {
throw new JpaProviderException("Entity '"
+ entity.getClassName()
+ "' has both property and field annotations.");
}
// TODO: andrus - 11/29/2006 - clean this redundancy - access field should be
// stored either in the entity or the descriptor.
if (fieldAccess) {
descriptor.setAccess(AccessType.FIELD);
entity.setAccess(AccessType.FIELD);
}
else if (propertyAccess) {
descriptor.setAccess(AccessType.PROPERTY);
entity.setAccess(AccessType.PROPERTY);
}
}
// === pop class-level stuff
for (int i = classAnnotations.length - 1; i >= 0; i--) {