Search in sources :

Example 1 with ResourceRepositoryStub

use of io.crnk.client.legacy.ResourceRepositoryStub in project crnk-framework by crnk-project.

the class CrnkClient method getQueryParamsRepository.

/**
 * @param resourceClass resource class
 * @return stub for the given resourceClass
 * @deprecated make use of QuerySpec
 */
@SuppressWarnings({ "unchecked", "rawtypes" })
@Deprecated
public <T, I extends Serializable> ResourceRepositoryStub<T, I> getQueryParamsRepository(Class<T> resourceClass) {
    init();
    RegistryEntry entry = resourceRegistry.findEntry(resourceClass);
    // TODO fix this in crnk, should be able to get original document
    ResourceRepositoryAdapter repositoryAdapter = entry.getResourceRepository(null);
    return (ResourceRepositoryStub<T, I>) repositoryAdapter.getResourceRepository();
}
Also used : ResourceRepositoryAdapter(io.crnk.core.engine.internal.repository.ResourceRepositoryAdapter) ResourceRepositoryStub(io.crnk.client.legacy.ResourceRepositoryStub)

Aggregations

ResourceRepositoryStub (io.crnk.client.legacy.ResourceRepositoryStub)1 ResourceRepositoryAdapter (io.crnk.core.engine.internal.repository.ResourceRepositoryAdapter)1