private static PropertyData getUniqueIdPropertyFromBaseClass( PropertyData inferredData, PropertyData baseInferredData, AccessType propertyAccessor, MetadataBuildingContext context) { List<PropertyData> baseClassElements = new ArrayList<>(); XClass baseReturnedClassOrElement = baseInferredData.getClassOrElement(); PropertyContainer propContainer = new PropertyContainer( baseReturnedClassOrElement, inferredData.getPropertyClass(), propertyAccessor ); addElementsOfClass( baseClassElements, propContainer, context ); //Id properties are on top and there is only one return baseClassElements.get( 0 ); }
public ElementsToProcess getElementsToProcess() { if ( elementsToProcess == null ) { InheritanceState inheritanceState = inheritanceStatePerClass.get( clazz ); assert !inheritanceState.isEmbeddableSuperclass(); getMappedSuperclassesTillNextEntityOrdered(); accessType = determineDefaultAccessType(); ArrayList<PropertyData> elements = new ArrayList<PropertyData>(); int idPropertyCount = 0; for ( XClass classToProcessForMappedSuperclass : classesToProcessForMappedSuperclass ) { PropertyContainer propertyContainer = new PropertyContainer( classToProcessForMappedSuperclass, clazz, accessType ); int currentIdPropertyCount = AnnotationBinder.addElementsOfClass( elements, propertyContainer, buildingContext ); idPropertyCount += currentIdPropertyCount; } if ( idPropertyCount == 0 && !inheritanceState.hasParents() ) { throw new AnnotationException( "No identifier specified for entity: " + clazz.getName() ); } elements.trimToSize(); elementsToProcess = new ElementsToProcess( elements, idPropertyCount ); } return elementsToProcess; }
PropertyContainer propContainer = new PropertyContainer( baseReturnedClassOrElement, xClassProcessed, propertyAccessor ); addElementsOfClass( baseClassElements, propContainer, buildingContext ); for ( PropertyData element : baseClassElements ) { PropertyContainer propContainer = new PropertyContainer( returnedClassOrElement, xClassProcessed, propertyAccessor ); addElementsOfClass( classElements, propContainer, buildingContext ); while ( superClass != null && superClass.isAnnotationPresent( MappedSuperclass.class ) ) { propContainer = new PropertyContainer( superClass, xClassProcessed, propertyAccessor ); addElementsOfClass( classElements, propContainer, buildingContext ); superClass = superClass.getSuperclass();
private static PropertyData getUniqueIdPropertyFromBaseClass(PropertyData inferredData, PropertyData baseInferredData, AccessType propertyAccessor, ExtendedMappings mappings) { List<PropertyData> baseClassElements = new ArrayList<PropertyData>(); XClass baseReturnedClassOrElement = baseInferredData.getClassOrElement(); PropertyContainer propContainer = new PropertyContainer( baseReturnedClassOrElement, inferredData.getPropertyClass() ); addElementsOfClass( baseClassElements, propertyAccessor, propContainer, mappings ); //Id properties are on top and there is only one final PropertyData idPropertyOnBaseClass = baseClassElements.get( 0 ); return idPropertyOnBaseClass; }
public ElementsToProcess getElementsToProcess() { if (elementsToProcess == null) { InheritanceState inheritanceState = inheritanceStatePerClass.get( clazz ); assert !inheritanceState.isEmbeddableSuperclass(); getMappedSuperclassesTillNextEntityOrdered(); accessType = determineDefaultAccessType( ); List<PropertyData> elements = new ArrayList<PropertyData>(); int deep = classesToProcessForMappedSuperclass.size(); int idPropertyCount = 0; for ( int index = 0; index < deep; index++ ) { PropertyContainer propertyContainer = new PropertyContainer( classesToProcessForMappedSuperclass.get( index ), clazz ); int currentIdPropertyCount = AnnotationBinder.addElementsOfClass( elements, accessType, propertyContainer, mappings ); idPropertyCount += currentIdPropertyCount; } if ( idPropertyCount == 0 && !inheritanceState.hasParents() ) { throw new AnnotationException( "No identifier specified for entity: " + clazz.getName() ); } elementsToProcess = new ElementsToProcess( elements, idPropertyCount); } return elementsToProcess; }
baseReturnedClassOrElement = baseInferredData.getClassOrElement(); bindTypeDefs( baseReturnedClassOrElement, mappings ); PropertyContainer propContainer = new PropertyContainer( baseReturnedClassOrElement, xClassProcessed ); addElementsOfClass( baseClassElements, propertyAccessor, propContainer, mappings ); for ( PropertyData element : baseClassElements ) { PropertyContainer propContainer = new PropertyContainer( returnedClassOrElement, xClassProcessed ); addElementsOfClass( classElements, propertyAccessor, propContainer, mappings ); while ( superClass != null && superClass.isAnnotationPresent( MappedSuperclass.class ) ) { propContainer = new PropertyContainer( superClass, xClassProcessed ); addElementsOfClass( classElements, propertyAccessor, propContainer, mappings ); superClass = superClass.getSuperclass();
private static PropertyData getUniqueIdPropertyFromBaseClass( PropertyData inferredData, PropertyData baseInferredData, AccessType propertyAccessor, Mappings mappings) { List<PropertyData> baseClassElements = new ArrayList<PropertyData>(); XClass baseReturnedClassOrElement = baseInferredData.getClassOrElement(); PropertyContainer propContainer = new PropertyContainer( baseReturnedClassOrElement, inferredData.getPropertyClass() ); addElementsOfClass( baseClassElements, propertyAccessor, propContainer, mappings ); //Id properties are on top and there is only one return baseClassElements.get( 0 ); }
private static PropertyData getUniqueIdPropertyFromBaseClass( PropertyData inferredData, PropertyData baseInferredData, AccessType propertyAccessor, MetadataBuildingContext context) { List<PropertyData> baseClassElements = new ArrayList<>(); XClass baseReturnedClassOrElement = baseInferredData.getClassOrElement(); PropertyContainer propContainer = new PropertyContainer( baseReturnedClassOrElement, inferredData.getPropertyClass(), propertyAccessor ); addElementsOfClass( baseClassElements, propContainer, context ); //Id properties are on top and there is only one return baseClassElements.get( 0 ); }
private static PropertyData getUniqueIdPropertyFromBaseClass( PropertyData inferredData, PropertyData baseInferredData, AccessType propertyAccessor, Mappings mappings) { List<PropertyData> baseClassElements = new ArrayList<PropertyData>(); XClass baseReturnedClassOrElement = baseInferredData.getClassOrElement(); PropertyContainer propContainer = new PropertyContainer( baseReturnedClassOrElement, inferredData.getPropertyClass() ); addElementsOfClass( baseClassElements, propertyAccessor, propContainer, mappings ); //Id properties are on top and there is only one return baseClassElements.get( 0 ); }
public ElementsToProcess getElementsToProcess() { if ( elementsToProcess == null ) { InheritanceState inheritanceState = inheritanceStatePerClass.get( clazz ); assert !inheritanceState.isEmbeddableSuperclass(); getMappedSuperclassesTillNextEntityOrdered(); accessType = determineDefaultAccessType(); List<PropertyData> elements = new ArrayList<PropertyData>(); int deep = classesToProcessForMappedSuperclass.size(); int idPropertyCount = 0; for ( int index = 0; index < deep; index++ ) { PropertyContainer propertyContainer = new PropertyContainer( classesToProcessForMappedSuperclass.get( index ), clazz ); int currentIdPropertyCount = AnnotationBinder.addElementsOfClass( elements, accessType, propertyContainer, mappings ); idPropertyCount += currentIdPropertyCount; } if ( idPropertyCount == 0 && !inheritanceState.hasParents() ) { throw new AnnotationException( "No identifier specified for entity: " + clazz.getName() ); } elementsToProcess = new ElementsToProcess( elements, idPropertyCount ); } return elementsToProcess; }
public ElementsToProcess getElementsToProcess() { if ( elementsToProcess == null ) { InheritanceState inheritanceState = inheritanceStatePerClass.get( clazz ); assert !inheritanceState.isEmbeddableSuperclass(); getMappedSuperclassesTillNextEntityOrdered(); accessType = determineDefaultAccessType(); List<PropertyData> elements = new ArrayList<PropertyData>(); int deep = classesToProcessForMappedSuperclass.size(); int idPropertyCount = 0; for ( int index = 0; index < deep; index++ ) { PropertyContainer propertyContainer = new PropertyContainer( classesToProcessForMappedSuperclass.get( index ), clazz ); int currentIdPropertyCount = AnnotationBinder.addElementsOfClass( elements, accessType, propertyContainer, mappings ); idPropertyCount += currentIdPropertyCount; } if ( idPropertyCount == 0 && !inheritanceState.hasParents() ) { throw new AnnotationException( "No identifier specified for entity: " + clazz.getName() ); } elementsToProcess = new ElementsToProcess( elements, idPropertyCount ); } return elementsToProcess; }
public ElementsToProcess getElementsToProcess() { if ( elementsToProcess == null ) { InheritanceState inheritanceState = inheritanceStatePerClass.get( clazz ); assert !inheritanceState.isEmbeddableSuperclass(); getMappedSuperclassesTillNextEntityOrdered(); accessType = determineDefaultAccessType(); ArrayList<PropertyData> elements = new ArrayList<PropertyData>(); int idPropertyCount = 0; for ( XClass classToProcessForMappedSuperclass : classesToProcessForMappedSuperclass ) { PropertyContainer propertyContainer = new PropertyContainer( classToProcessForMappedSuperclass, clazz, accessType ); int currentIdPropertyCount = AnnotationBinder.addElementsOfClass( elements, propertyContainer, buildingContext ); idPropertyCount += currentIdPropertyCount; } if ( idPropertyCount == 0 && !inheritanceState.hasParents() ) { throw new AnnotationException( "No identifier specified for entity: " + clazz.getName() ); } elements.trimToSize(); elementsToProcess = new ElementsToProcess( elements, idPropertyCount ); } return elementsToProcess; }
baseReturnedClassOrElement = baseInferredData.getClassOrElement(); bindTypeDefs( baseReturnedClassOrElement, mappings ); PropertyContainer propContainer = new PropertyContainer( baseReturnedClassOrElement, xClassProcessed ); addElementsOfClass( baseClassElements, propertyAccessor, propContainer, mappings ); for ( PropertyData element : baseClassElements ) { PropertyContainer propContainer = new PropertyContainer( returnedClassOrElement, xClassProcessed ); addElementsOfClass( classElements, propertyAccessor, propContainer, mappings ); while ( superClass != null && superClass.isAnnotationPresent( MappedSuperclass.class ) ) { propContainer = new PropertyContainer( superClass, xClassProcessed ); addElementsOfClass( classElements, propertyAccessor, propContainer, mappings ); superClass = superClass.getSuperclass();
baseReturnedClassOrElement = baseInferredData.getClassOrElement(); bindTypeDefs( baseReturnedClassOrElement, mappings ); PropertyContainer propContainer = new PropertyContainer( baseReturnedClassOrElement, xClassProcessed ); addElementsOfClass( baseClassElements, propertyAccessor, propContainer, mappings ); for ( PropertyData element : baseClassElements ) { PropertyContainer propContainer = new PropertyContainer( returnedClassOrElement, xClassProcessed ); addElementsOfClass( classElements, propertyAccessor, propContainer, mappings ); while ( superClass != null && superClass.isAnnotationPresent( MappedSuperclass.class ) ) { propContainer = new PropertyContainer( superClass, xClassProcessed ); addElementsOfClass( classElements, propertyAccessor, propContainer, mappings ); superClass = superClass.getSuperclass();
PropertyContainer propContainer = new PropertyContainer( baseReturnedClassOrElement, xClassProcessed, PropertyContainer propContainer = new PropertyContainer( returnedClassOrElement, xClassProcessed, while ( superClass != null && superClass.isAnnotationPresent( MappedSuperclass.class ) ) { propContainer = new PropertyContainer( superClass, xClassProcessed, propertyAccessor ); addElementsOfClass( classElements, propContainer, buildingContext ); superClass = superClass.getSuperclass();