Package com.saasovation.common.port.adapter.persistence.leveldb

Examples of com.saasovation.common.port.adapter.persistence.leveldb.LevelDBKey.key()


    public ProductOwner productOwnerOfIdentity(TenantId aTenantId, String aUsername) {
        LevelDBKey primaryKey = new LevelDBKey(PRIMARY, aTenantId.id(), aUsername);

        ProductOwner productOwner =
                LevelDBUnitOfWork.readOnly(this.database())
                    .readObject(primaryKey.key().getBytes(), ProductOwner.class);

        return productOwner;
    }

    @Override
View Full Code Here


    public void remove(ProductOwner aProductOwner) {
        LevelDBKey lockKey = new LevelDBKey(PRIMARY, aProductOwner.tenantId().id());

        LevelDBUnitOfWork uow = LevelDBUnitOfWork.current();

        uow.lock(lockKey.key());

        this.remove(aProductOwner, uow);
    }

    @Override
View Full Code Here

        for (ProductOwner productOwner : aProductOwnerCollection) {
            if (!locked) {
                LevelDBKey lockKey = new LevelDBKey(PRIMARY, productOwner.tenantId().id());

                uow.lock(lockKey.key());

                locked = true;
            }

            this.remove(productOwner, uow);
View Full Code Here

    public void save(ProductOwner aProductOwner) {
        LevelDBKey lockKey = new LevelDBKey(PRIMARY, aProductOwner.tenantId().id());

        LevelDBUnitOfWork uow = LevelDBUnitOfWork.current();

        uow.lock(lockKey.key());

        this.save(aProductOwner, uow);
    }

    @Override
View Full Code Here

        for (ProductOwner productOwner : aProductOwnerCollection) {
            if (!locked) {
                LevelDBKey lockKey = new LevelDBKey(PRIMARY, productOwner.tenantId().id());

                uow.lock(lockKey.key());

                locked = true;
            }

            this.save(productOwner, uow);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.