public static Map < String , Object > getKeyPropertyValues ( EntityType entityType , Object entity ) { Map < String , Object > keyPropertyValues = new HashMap <> ( ) ; for ( PropertyRef propertyRef : entityType . getKey ( ) . getPropertyRefs ( ) ) { String propertyName = propertyRef . getPath ( ) ; Object propertyValue = getPropertyValue ( entityType . getStructuralProperty ( propertyName ) , entity ) ; keyPropertyValues . put ( propertyName , propertyValue ) ; } return keyPropertyValues ; }
Gets the values of the properties that part of the key of an entity type .