io.yawp.repository.RepositoryApi Maven / Gradle / Ivy
package io.yawp.repository;
import io.yawp.commons.http.RequestContext;
import io.yawp.driver.api.Driver;
import io.yawp.driver.api.TransactionDriver;
import io.yawp.repository.actions.ActionKey;
import io.yawp.repository.features.EndpointFeatures;
import io.yawp.repository.features.RepositoryFeatures;
import io.yawp.repository.query.QueryBuilder;
import java.util.List;
import java.util.Map;
public interface RepositoryApi {
Repository namespace(String ns);
Namespace namespace();
String currentNamespace();
Repository setFeatures(RepositoryFeatures repositoryFeatures);
Repository setRequestContext(RequestContext requestContext);
Driver driver();
AsyncRepository async();
T saveWithHooks(T object);
T save(T object);
T fetch(IdRef id);
FutureObject fetchAsync(IdRef id);
Object action(IdRef> id, Class> clazz, ActionKey actionKey, String json, Map params);
QueryBuilder queryWithHooks(Class clazz);
QueryBuilder query(Class clazz);
void destroy(IdRef> id);
Class> getClazzByKind(String kind);
@SuppressWarnings("unchecked")
EndpointFeatures getEndpointFeatures(Class endpoint);
EndpointFeatures> getEndpointFeatures(String endpointPath);
RepositoryFeatures getFeatures();
IdRef parseId(Class clazz, String idString);
List> parseIds(Class clazz, List idsString);
void begin();
void beginX();
void rollback();
void commit();
boolean isTransationInProgress();
TransactionDriver currentTransaction();
RequestContext getRequestContext();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy