protected Object getId(Object entity, EntityMetadata metadata)
    {
        try
        {
            return PropertyAccessorHelper.getId(entity, metadata);
        }
        catch (PropertyAccessException e)
        {
            log.error("Error while Getting ID for entity {}, Caused by: {}.", entity, e);
            throw new EntityReaderException("Error while Getting ID for entity " + entity, e);
        }

    }
protected Object getId ( Object entity , EntityMetadata metadata ) { try { return PropertyAccessorHelper . getId ( entity , metadata ) ; } catch ( PropertyAccessException e ) { log . error ( "Error while Getting ID for entity {}, Caused by: {}." , entity , e ) ; throw new EntityReaderException ( "Error while Getting ID for entity " + entity , e ) ; } }
Gets the id.

@param entity
the entity
@param metadata
the metadata
@return the id