public class ContainerStoreService<T> extends java.lang.Object implements IContainerStoreService<T>
Modifier and Type | Class and Description |
---|---|
static interface |
ContainerStoreService.IItemFlagsProvider<W> |
static interface |
ContainerStoreService.IWeightSeedProvider<W> |
Modifier and Type | Field and Description |
---|---|
protected ChangelogStore |
changelogStore |
protected Container |
container |
protected boolean |
hasChangeLog |
protected ItemStore |
itemStore |
protected IItemValueStore<T> |
itemValueStore |
protected static org.slf4j.Logger |
logger |
protected SecurityContext |
securityContext |
Constructor and Description |
---|
ContainerStoreService(javax.sql.DataSource pool,
SecurityContext securityContext,
Container container,
IItemValueStore<T> itemValueStore) |
ContainerStoreService(javax.sql.DataSource pool,
SecurityContext securityContext,
Container container,
IItemValueStore<T> itemValueStore,
ContainerStoreService.IItemFlagsProvider<T> fProv,
ContainerStoreService.IWeightSeedProvider<T> wsProv,
IWeightProvider wProv) |
Modifier and Type | Method and Description |
---|---|
java.util.List<ItemValue<T>> |
all() |
ListResult<java.lang.Long> |
allIds(IdQuery query) |
java.util.List<java.lang.String> |
allUids() |
void |
attach(java.lang.String uid,
java.lang.String displayName,
T value) |
ContainerChangelog |
changelog(java.lang.Long from,
long to) |
ItemChangelog |
changelog(java.lang.String itemUid,
java.lang.Long from,
long to) |
ContainerChangeset<java.lang.String> |
changeset(java.lang.Long from,
long to) |
ContainerChangeset<ItemVersion> |
changesetById(long from,
ItemFlagFilter filter) |
ContainerChangeset<java.lang.Long> |
changesetById(java.lang.Long from,
long to) |
Count |
count(ItemFlagFilter filter) |
ItemVersion |
create(java.lang.String uid,
java.lang.String extId,
java.lang.String displayName,
T value)
Create item with external ID
|
ItemVersion |
create(java.lang.String uid,
java.lang.String displayName,
T value)
Create item without external ID
|
protected void |
createValue(Item item,
T value) |
ItemVersion |
createWithId(java.lang.String uid,
java.lang.Long internalId,
java.lang.String extId,
java.lang.String displayName,
T value)
Create item with external and a given internal ID.
|
protected void |
decorate(Item item,
ItemValue<T> value) |
protected void |
decorate(java.util.List<Item> items,
java.util.List<ItemValue<T>> values) |
ItemVersion |
delete(long id) |
ItemVersion |
delete(java.lang.String uid) |
void |
deleteAll()
delete all values ( changelog is available for deleted values )
|
protected void |
deleteValue(Item item) |
protected void |
deleteValues() |
void |
detach(java.lang.String uid) |
<T> T |
doOrFail(JdbcAbstractStore.SqlOperation<T> op) |
ContainerChangeset<ItemIdentifier> |
fullChangesetById(java.lang.Long from,
long to) |
ItemValue<T> |
get(long id,
java.lang.Long version) |
ItemValue<T> |
get(java.lang.String uid,
java.lang.Long version) |
ItemValue<T> |
getByExtId(java.lang.String extId)
Get item by external ID
|
ItemStore |
getItemStore() |
java.util.List<ItemValue<T>> |
getItemsValue(java.util.List<Item> items) |
protected ItemValue<T> |
getItemValue(Item item) |
IItemValueStore<T> |
getItemValueStore() |
java.util.List<ItemValue<T>> |
getMultiple(java.util.List<java.lang.String> uids) |
java.util.List<ItemValue<T>> |
getMultipleById(java.util.List<java.lang.Long> ids) |
protected T |
getValue(Item item) |
long |
getVersion() |
void |
prepareContainerDelete()
delete all values.
|
long |
setExtId(java.lang.String uid,
java.lang.String extId) |
void |
touch(java.lang.String uid) |
ItemVersion |
update(long itemId,
java.lang.String displayName,
T value) |
ItemVersion |
update(java.lang.String uid,
java.lang.String displayName,
T value) |
protected void |
updateValue(Item item,
T value) |
void |
xfer(javax.sql.DataSource targetDataSource,
Container targetContainer,
IItemValueStore<T> targetItemValueStore) |
protected static final org.slf4j.Logger logger
protected Container container
protected ItemStore itemStore
protected IItemValueStore<T> itemValueStore
protected ChangelogStore changelogStore
protected SecurityContext securityContext
protected boolean hasChangeLog
public ContainerStoreService(javax.sql.DataSource pool, SecurityContext securityContext, Container container, IItemValueStore<T> itemValueStore, ContainerStoreService.IItemFlagsProvider<T> fProv, ContainerStoreService.IWeightSeedProvider<T> wsProv, IWeightProvider wProv)
public ContainerStoreService(javax.sql.DataSource pool, SecurityContext securityContext, Container container, IItemValueStore<T> itemValueStore)
public <T> T doOrFail(JdbcAbstractStore.SqlOperation<T> op)
public ContainerChangelog changelog(java.lang.Long from, long to)
changelog
in interface IContainerStoreService<T>
public Count count(ItemFlagFilter filter)
public ItemChangelog changelog(java.lang.String itemUid, java.lang.Long from, long to)
changelog
in interface IContainerStoreService<T>
public ContainerChangeset<java.lang.String> changeset(java.lang.Long from, long to)
public ContainerChangeset<java.lang.Long> changesetById(java.lang.Long from, long to)
public ContainerChangeset<ItemIdentifier> fullChangesetById(java.lang.Long from, long to)
public ContainerChangeset<ItemVersion> changesetById(long from, ItemFlagFilter filter)
public ItemValue<T> get(java.lang.String uid, java.lang.Long version)
get
in interface IContainerStoreService<T>
public ItemValue<T> get(long id, java.lang.Long version)
get
in interface IContainerStoreService<T>
public ItemValue<T> getByExtId(java.lang.String extId)
IContainerStoreService
getByExtId
in interface IContainerStoreService<T>
public ItemVersion create(java.lang.String uid, java.lang.String displayName, T value)
IContainerStoreService
create
in interface IContainerStoreService<T>
public ItemVersion create(java.lang.String uid, java.lang.String extId, java.lang.String displayName, T value)
IContainerStoreService
create
in interface IContainerStoreService<T>
public ItemVersion createWithId(java.lang.String uid, java.lang.Long internalId, java.lang.String extId, java.lang.String displayName, T value)
IContainerStoreService
createWithId
in interface IContainerStoreService<T>
public void attach(java.lang.String uid, java.lang.String displayName, T value)
attach
in interface IContainerStoreService<T>
protected void createValue(Item item, T value) throws java.sql.SQLException
java.sql.SQLException
public ItemVersion update(java.lang.String uid, java.lang.String displayName, T value)
update
in interface IContainerStoreService<T>
public ItemVersion update(long itemId, java.lang.String displayName, T value)
update
in interface IContainerStoreService<T>
protected void updateValue(Item item, T value) throws java.sql.SQLException
java.sql.SQLException
public ItemVersion delete(java.lang.String uid)
delete
in interface IContainerStoreService<T>
public ItemVersion delete(long id)
delete
in interface IContainerStoreService<T>
public void detach(java.lang.String uid)
detach
in interface IContainerStoreService<T>
protected void deleteValue(Item item) throws java.sql.SQLException
java.sql.SQLException
public void deleteAll()
IContainerStoreService
deleteAll
in interface IContainerStoreService<T>
public void prepareContainerDelete()
IContainerStoreService
prepareContainerDelete
in interface IContainerStoreService<T>
protected void deleteValues()
public ItemStore getItemStore()
public IItemValueStore<T> getItemValueStore()
public java.util.List<ItemValue<T>> getMultipleById(java.util.List<java.lang.Long> ids)
public void touch(java.lang.String uid)
touch
in interface IContainerStoreService<T>
public java.util.List<java.lang.String> allUids()
allUids
in interface IContainerStoreService<T>
public ListResult<java.lang.Long> allIds(IdQuery query)
allIds
in interface IContainerStoreService<T>
public long getVersion()
public long setExtId(java.lang.String uid, java.lang.String extId)
setExtId
in interface IContainerStoreService<T>
public void xfer(javax.sql.DataSource targetDataSource, Container targetContainer, IItemValueStore<T> targetItemValueStore)
xfer
in interface IContainerStoreService<T>
Copyright © 2021. All Rights Reserved.