private static Function < EntityTypeNode , Set < EntityTypeNode > > getDependencies ( ) { return entityTypeNode -> { // get referenced entities excluding entities of mappedBy attributes EntityType entityType = entityTypeNode . getEntityType ( ) ; Set < EntityTypeNode > refEntityMetaSet = stream ( entityType . getOwnAllAttributes ( ) ) . filter ( attribute -> isProcessableAttribute ( attribute , entityType ) ) . map ( attr -> new EntityTypeNode ( attr . getRefEntity ( ) ) ) . collect ( toCollection ( HashSet :: new ) ) ; EntityType extendsEntityMeta = entityType . getExtends ( ) ; if ( extendsEntityMeta != null ) { refEntityMetaSet . add ( new EntityTypeNode ( extendsEntityMeta ) ) ; } return refEntityMetaSet ; } ; }
Returns dependencies of the given entity meta data .