Skip to content

Commit

Permalink
HHH-7803 Refactored the attribute type discovery and moved into Refle…
Browse files Browse the repository at this point in the history
…ctHelper
  • Loading branch information
gbadner committed Nov 20, 2012
1 parent 037f081 commit d779125
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -57,7 +57,6 @@
import org.hibernate.metamodel.internal.source.annotations.util.JandexHelper;
import org.hibernate.metamodel.spi.binding.SingularAttributeBinding;
import org.hibernate.metamodel.spi.source.MappingException;
import org.hibernate.validator.util.ReflectionHelper;
import org.jboss.jandex.AnnotationInstance;
import org.jboss.jandex.AnnotationTarget;
import org.jboss.jandex.ClassInfo;
Expand Down Expand Up @@ -323,7 +322,7 @@ private boolean isPersistentMember(Set<String> transientNames, Set<String> expli
return false;
}

if ( explicitlyConfiguredMemberNames.contains( ReflectionHelper.getPropertyName( member ) ) ) {
if ( explicitlyConfiguredMemberNames.contains( ReflectHelper.getPropertyName( member ) ) ) {
return false;
}

Expand Down Expand Up @@ -396,7 +395,7 @@ private Set<String> createExplicitlyConfiguredAccessProperties(ResolvedTypeWithM
}
if ( ReflectHelper.isProperty( member ) ) {
createMappedAttribute( member, resolvedMembers, accessType );
explicitAccessPropertyNames.add( ReflectionHelper.getPropertyName( member ) );
explicitAccessPropertyNames.add( ReflectHelper.getPropertyName( member ) );
}
}
return explicitAccessPropertyNames;
Expand Down Expand Up @@ -437,7 +436,7 @@ private void checkExplicitJpaAttributeAccessAnnotationPlacedCorrectly(Annotation
}

private void createMappedAttribute(Member member, ResolvedTypeWithMembers resolvedType, AccessType accessType) {
final String attributeName = ReflectionHelper.getPropertyName( member );
final String attributeName = ReflectHelper.getPropertyName( member );
final ResolvedMember[] resolvedMembers = Field.class.isInstance( member ) ? resolvedType.getMemberFields() : resolvedType
.getMemberMethods();
ResolvedMember resolvedMember = findResolvedMember( member.getName(), resolvedMembers );
Expand Down Expand Up @@ -581,7 +580,7 @@ private EmbeddableClass resolveEmbeddable(String attributeName, Class<?> type, M
* Given the annotations defined on a persistent attribute this methods determines the attribute type.
*
* @param annotations the annotations defined on the persistent attribute
* @param type the attribute's type
* @param attributeType the attribute's type
* @param referencedCollectionType the type of the collection element in case the attribute is collection valued
*
* @return an instance of the {@code AttributeType} enum
Expand Down

0 comments on commit d779125

Please sign in to comment.