Set<String> idPropertiesIfIdClass) { Set<String> missingIdProperties = new HashSet<>( idPropertiesIfIdClass ); for ( PropertyData propertyAnnotatedElement : elementsToProcess.getElements() ) { String propertyName = propertyAnnotatedElement.getPropertyName(); if ( !idPropertiesIfIdClass.contains( propertyName ) ) {
private static void processIdPropertiesIfNotAlready(Map<XClass, InheritanceState> inheritanceStatePerClass, ExtendedMappings mappings, PersistentClass persistentClass, EntityBinder entityBinder, PropertyHolder propertyHolder, HashMap<String, IdGenerator> classGenerators, InheritanceState.ElementsToProcess elementsToProcess, boolean subclassAndSingleTableStrategy, Set<String> idPropertiesIfIdClass) { Set<String> missingIdProperties = new HashSet<String>( idPropertiesIfIdClass ); for ( PropertyData propertyAnnotatedElement : elementsToProcess.getElements() ) { String propertyName = propertyAnnotatedElement.getPropertyName(); if ( !idPropertiesIfIdClass.contains( propertyName ) ) { processElementAnnotations( propertyHolder, subclassAndSingleTableStrategy ? Nullability.FORCED_NULL : Nullability.NO_CONSTRAINT, propertyAnnotatedElement, classGenerators, entityBinder, false, false, false, mappings, inheritanceStatePerClass ); } else { missingIdProperties.remove( propertyName ); } } if ( missingIdProperties.size() != 0 ) { StringBuilder missings = new StringBuilder(); for ( String property : missingIdProperties ) { missings.append( property ).append( ", " ); } throw new AnnotationException( "Unable to find properties (" + missings.substring( 0, missings.length() - 2 ) + ") in entity annotated with @IdClass:" + persistentClass.getEntityName() ); } }
Set<String> idPropertiesIfIdClass) { Set<String> missingIdProperties = new HashSet<String>( idPropertiesIfIdClass ); for ( PropertyData propertyAnnotatedElement : elementsToProcess.getElements() ) { String propertyName = propertyAnnotatedElement.getPropertyName(); if ( !idPropertiesIfIdClass.contains( propertyName ) ) {
Set<String> idPropertiesIfIdClass) { Set<String> missingIdProperties = new HashSet<>( idPropertiesIfIdClass ); for ( PropertyData propertyAnnotatedElement : elementsToProcess.getElements() ) { String propertyName = propertyAnnotatedElement.getPropertyName(); if ( !idPropertiesIfIdClass.contains( propertyName ) ) {
Set<String> idPropertiesIfIdClass) { Set<String> missingIdProperties = new HashSet<String>( idPropertiesIfIdClass ); for ( PropertyData propertyAnnotatedElement : elementsToProcess.getElements() ) { String propertyName = propertyAnnotatedElement.getPropertyName(); if ( !idPropertiesIfIdClass.contains( propertyName ) ) {
public Boolean hasIdClassOrEmbeddedId() { if ( hasIdClassOrEmbeddedId == null ) { hasIdClassOrEmbeddedId = false; if ( getClassWithIdClass( true ) != null ) { hasIdClassOrEmbeddedId = true; } else { final ElementsToProcess process = getElementsToProcess(); for ( PropertyData property : process.getElements() ) { if ( property.getProperty().isAnnotationPresent( EmbeddedId.class ) ) { hasIdClassOrEmbeddedId = true; break; } } } } return hasIdClassOrEmbeddedId; }
public Boolean hasIdClassOrEmbeddedId() { if ( hasIdClassOrEmbeddedId == null ) { hasIdClassOrEmbeddedId = false; if ( getClassWithIdClass( true ) != null ) { hasIdClassOrEmbeddedId = true; } else { final ElementsToProcess process = getElementsToProcess(); for ( PropertyData property : process.getElements() ) { if ( property.getProperty().isAnnotationPresent( EmbeddedId.class ) ) { hasIdClassOrEmbeddedId = true; break; } } } } return hasIdClassOrEmbeddedId; }
public Boolean hasIdClassOrEmbeddedId() { if ( hasIdClassOrEmbeddedId == null ) { hasIdClassOrEmbeddedId = false; if ( getClassWithIdClass( true ) != null ) { hasIdClassOrEmbeddedId = true; } else { final ElementsToProcess process = getElementsToProcess(); for ( PropertyData property : process.getElements() ) { if ( property.getProperty().isAnnotationPresent( EmbeddedId.class ) ) { hasIdClassOrEmbeddedId = true; break; } } } } return hasIdClassOrEmbeddedId; }
public Boolean hasIdClassOrEmbeddedId() { if (hasIdClassOrEmbeddedId == null) { hasIdClassOrEmbeddedId = false; if ( getClassWithIdClass( true ) != null ) { hasIdClassOrEmbeddedId = true; } else { final ElementsToProcess process = getElementsToProcess(); for(PropertyData property : process.getElements() ) { if ( property.getProperty().isAnnotationPresent( EmbeddedId.class ) ) { hasIdClassOrEmbeddedId = true; break; } } } } return hasIdClassOrEmbeddedId; }
public Boolean hasIdClassOrEmbeddedId() { if ( hasIdClassOrEmbeddedId == null ) { hasIdClassOrEmbeddedId = false; if ( getClassWithIdClass( true ) != null ) { hasIdClassOrEmbeddedId = true; } else { final ElementsToProcess process = getElementsToProcess(); for ( PropertyData property : process.getElements() ) { if ( property.getProperty().isAnnotationPresent( EmbeddedId.class ) ) { hasIdClassOrEmbeddedId = true; break; } } } } return hasIdClassOrEmbeddedId; }