public static <ENTITY> Key<ENTITY> create(Class<ENTITY> entityClass, Long id) {
        if (id == null) {
            throw new IllegalArgumentException("Cannot create Key with null ID!");
        }

        return new Key<ENTITY>(entityClass, id);
    }
public static < ENTITY > Key < ENTITY > create ( Class < ENTITY > entityClass , Long id ) { if ( id == null ) { throw new IllegalArgumentException ( "Cannot create Key with null ID!" ) ; } return new Key < ENTITY > ( entityClass , id ) ; }
@param entityClass Class of the target entity.
@param id Id of the entity.
@param <ENTITY> Type of the target entity.
@return An instance of a key for the given entity type and id.