Class DuWebEntityRepository
- java.lang.Object
-
- com.dulanywebsite.sharedresources.repositories.DuWebEntityRepository
-
- Direct Known Subclasses:
GameMembershipRepository,GameRepository,GiftRepository,GroupRepository,UserRepository
public class DuWebEntityRepository 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DuWebEntitycreate(DuWebEntity createEntity)voiddelete(java.lang.Long id)DuWebEntityListgetAll()java.util.Optional<DuWebEntity>getEntity(java.lang.Long id)DuWebEntityupdate(java.lang.Long id, DuWebEntity updateEntity)
-
-
-
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 DuWebEntityList getAll() throws java.io.IOException
- Throws:
java.io.IOException
-
getEntity
public java.util.Optional<DuWebEntity> getEntity(java.lang.Long id) throws java.io.IOException
- Throws:
java.io.IOException
-
create
public DuWebEntity create(DuWebEntity createEntity) throws java.io.IOException
- Throws:
java.io.IOException
-
update
public DuWebEntity update(java.lang.Long id, DuWebEntity updateEntity) throws java.io.IOException
- Throws:
java.io.IOException
-
delete
public void delete(java.lang.Long id)
-
-