public Field getIdentityProperty ( Class clazz ) { Field info = _idPropertyCache . get ( clazz ) ; if ( info != null ) { return info ; } try { Field idField = Arrays . stream ( Introspector . getBeanInfo ( clazz ) . getPropertyDescriptors ( ) ) . filter ( x -> _findIdentityProperty . apply ( x ) ) . findFirst ( ) . map ( x -> getField ( clazz , x . getName ( ) ) ) . orElse ( null ) ; _idPropertyCache . put ( clazz , idField ) ; return idField ; } catch ( IntrospectionException e ) { throw new RuntimeException ( e ) ; } }
Gets the identity property .