public class JsonFileBasedLoader<T extends Identifiable> extends AbstractLoader<T>
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
protected JacksonObjectMapper |
objectMapper |
protected Class<T> |
type |
| Constructor and Description |
|---|
JsonFileBasedLoader(JacksonObjectMapper objectMapper,
Class<T> type) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Path directory,
String objectId)
Find if an object is used in another objects.
|
List<T> |
findByObjectId(Path directory,
String objectId)
Find all the objects which contain an object id.
|
Map<String,List<T>> |
findByObjectIds(Path directory,
List<String> objectIds)
Returns a Map of object ids, with all the objects which contain an object id.
|
T |
getByUUID(Path directory,
String uuid) |
protected int |
indexOf(byte[] file,
byte[] occurence)
Returns the start position of the first occurrence of the specified target within array, or -1 if there is
no such occurrence.
|
get, getAll, getAll, getNextAvailableObjectId, load, loadAll, loadAll, loadAll, resolveprotected static final org.slf4j.Logger logger
protected JacksonObjectMapper objectMapper
protected Class<T extends Identifiable> type
public JsonFileBasedLoader(JacksonObjectMapper objectMapper, Class<T> type)
public List<T> findByObjectId(Path directory, String objectId) throws IOException
LoaderIOExceptionpublic Map<String,List<T>> findByObjectIds(Path directory, List<String> objectIds) throws IOException
LoaderIOExceptionpublic T getByUUID(Path directory, String uuid) throws IOException
IOExceptionpublic boolean contains(Path directory, String objectId) throws IOException
LoaderIOExceptionprotected int indexOf(byte[] file,
byte[] occurence)
Copyright © 2020. All rights reserved.