public void populate ( Entity from , Object to ) { for ( Entry < String , Object > property : from . getProperties ( ) . entrySet ( ) ) { PropertyMetadata metadata = properties . get ( property . getKey ( ) ) ; if ( metadata != null ) { Object value = metadata . getConverter ( ) . datastoreToJava ( property . getValue ( ) ) ; metadata . setValue ( to , value ) ; } else { if ( log . isDebugEnabled ( ) ) { log . debug ( "Unmapped attribute found in DataStore entry. Ignoring: " + from . getKind ( ) + "." + property . getKey ( ) ) ; } } } keyProperty . setValue ( to , from . getKey ( ) ) ; }
Copy all properties from the datastore entity into the persistent class instance passed as an attribute .