Class DuWebEntityRepository<T extends DuWebEntity>
- java.lang.Object
-
- com.dulanywebsite.sharedresources.repositories.DuWebEntityRepository<T>
-
- Direct Known Subclasses:
GameMembershipRepository,GameRepository,GiftRepository,GroupRepository,UserRepository
public class DuWebEntityRepository<T extends DuWebEntity> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringbaseApiUrlprotected EntityHttpClientclientprotected java.lang.StringentityTypeprotected java.util.Map<java.lang.String,java.lang.String>headerMapprotected com.fasterxml.jackson.databind.ObjectMapperobjectMapper
-
Constructor Summary
Constructors Constructor Description DuWebEntityRepository(EntityHttpClient client, java.lang.String entityType)
-
-
-
Field Detail
-
client
protected EntityHttpClient client
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
headerMap
protected java.util.Map<java.lang.String,java.lang.String> headerMap
-
entityType
protected final java.lang.String entityType
-
baseApiUrl
protected final java.lang.String baseApiUrl
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DuWebEntityRepository
public DuWebEntityRepository(EntityHttpClient client, java.lang.String entityType)
-
-
Method Detail
-
getAll
public java.util.List<T> getAll() throws java.io.IOException
- Throws:
java.io.IOException
-
getEntity
public java.util.Optional<T> getEntity(java.lang.Long id) throws java.io.IOException
- Throws:
java.io.IOException
-
update
public T update(java.lang.Long id, T updateEntity) throws java.io.IOException
- Throws:
java.io.IOException
-
delete
public void delete(java.lang.Long id)
-
-