package com.caliverse.admin.dynamodb.repository;

import software.amazon.awssdk.enhanced.dynamodb.Expression;
import software.amazon.awssdk.enhanced.dynamodb.Key;

import java.util.List;

public interface DynamoDBRepository<T> {
    void save(T item);
    void saveWithCondition(T item, Expression condition);
    void update(T item);
    void updateWithCondition(T item, Expression condition);
    void delete(Key key);
    void deleteWithCondition(Key key, Expression condition);
    T findById(Key key);
    List<T> findAll(Key key);
    List<T> findAllScan(String prefix);
    List<T> findAllScan(String prefix, String sortKey);
    List<T> findByPrefix(String partitionKey, String sortKeyPrefix);
}
