private void process ( ) { metadata = new EmbeddedMetadata ( field ) ; // Make sure the class has @Embeddable annotation if ( ! clazz . isAnnotationPresent ( Embeddable . class ) ) { String message = String . format ( "Class %s must have %s annotation" , clazz . getName ( ) , Embeddable . class . getName ( ) ) ; throw new EntityManagerException ( message ) ; } // Check the mapped name and indexed attributes Embedded embeddedAnnotation = field . getField ( ) . getAnnotation ( Embedded . class ) ; String mappedName = embeddedAnnotation . name ( ) ; if ( mappedName == null || mappedName . trim ( ) . length ( ) == 0 ) { mappedName = field . getName ( ) ; } metadata . setMappedName ( mappedName ) ; metadata . setIndexed ( embeddedAnnotation . indexed ( ) ) ; metadata . setOptional ( embeddedAnnotation . optional ( ) ) ; // If there is an annotation for storing the embedded with Imploded // strategy... if ( field . getField ( ) . isAnnotationPresent ( Imploded . class ) ) { metadata . setStorageStrategy ( StorageStrategy . IMPLODED ) ; } processFields ( ) ; }
Worker class for introspection .