Class AllVersionHistoryService
- java.lang.Object
-
- org.linuxforhealth.fhir.database.utils.api.AllVersionHistoryService
-
- All Implemented Interfaces:
IVersionHistoryService
public class AllVersionHistoryService extends java.lang.Object implements IVersionHistoryService
Useful implementation for when you want to apply all versions (e.g. for tests)
-
-
Constructor Summary
Constructors Constructor Description AllVersionHistoryService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addVersion(java.lang.String objectSchema, java.lang.String objectType, java.lang.String objectName, int version)
Add this version (idempotent)boolean
applies(java.lang.String objectSchema, java.lang.String objectType, java.lang.String objectName, int version)
Check to see if we described object is newer than we have currently in the databasejava.lang.Integer
getVersion(java.lang.String objectSchema, java.lang.String objectType, java.lang.String objectName)
Get the current version of an object
-
-
-
Method Detail
-
addVersion
public void addVersion(java.lang.String objectSchema, java.lang.String objectType, java.lang.String objectName, int version)
Description copied from interface:IVersionHistoryService
Add this version (idempotent)- Specified by:
addVersion
in interfaceIVersionHistoryService
-
applies
public boolean applies(java.lang.String objectSchema, java.lang.String objectType, java.lang.String objectName, int version)
Description copied from interface:IVersionHistoryService
Check to see if we described object is newer than we have currently in the database- Specified by:
applies
in interfaceIVersionHistoryService
- Returns:
-
getVersion
public java.lang.Integer getVersion(java.lang.String objectSchema, java.lang.String objectType, java.lang.String objectName)
Description copied from interface:IVersionHistoryService
Get the current version of an object- Specified by:
getVersion
in interfaceIVersionHistoryService
- Returns:
- the current version of the given object or null if it doesn't exist
-
-