ca.gc.aafc.dina.service.JaversDataService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dina-base-api Show documentation
Show all versions of dina-base-api Show documentation
Base DINA API package for Java built on SpringBoot and Crnk
The newest version!
package ca.gc.aafc.dina.service;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.math.BigDecimal;
import java.util.List;
/**
* JaversDataService provides additional support for operations with the javers database.
*/
@Mapper
public interface JaversDataService {
/**
* Returns the total resource count by a given Author and/or (id + type). Parameters may be null if you do
* not want to filter by the given parameter. Id and type must be submitted together to be.
*
* @param id id of the resource
* @param type type of resource
* @param author author of the resource
* @return Returns the total resource count by a given Author and/or (id + type).
*/
@Select({""})
Long getResourceCount(@Param("id") String id, @Param("type") String type, @Param("author") String author);
/**
* Removes snapshots, commits, commit properties, and global id from the javers database. Based on the given
* parameters. Javers does not support the removal of snapshots by default, this may be used as an
* alternative.
*
* @param commitIds commit ids of the commits
* @param instanceId instance id of the snapshot
* @param type type of resource
*/
@Delete({""})
void removeSnapshots(
@Param("commitIds") List commitIds,
@Param("instanceId") String instanceId,
@Param("type") String type
);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy