@SuppressWarnings("unchecked")
    public <M extends T> M byId(ID id) {
        return (M) server().find(getModelType(), id);
    }
@ SuppressWarnings ( "unchecked" ) public < M extends T > M byId ( ID id ) { return ( M ) server ( ) . find ( getModelType ( ) , id ) ; }
Retrieves an entity by ID.

@param id a ID object.
@return a M object.