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

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


    public Sprint sprintOfId(TenantId aTenantId, SprintId aSprintId) {
        LevelDBKey primaryKey = new LevelDBKey(PRIMARY, aTenantId.id(), aSprintId.id());

        Sprint sprint =
                LevelDBUnitOfWork.readOnly(this.database())
                    .readObject(primaryKey.key().getBytes(), Sprint.class);

        return sprint;
    }

    @Override
View Full Code Here


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

        LevelDBUnitOfWork uow = LevelDBUnitOfWork.current();

        uow.lock(lockKey.key());

        this.remove(aSprint, uow);
    }

    @Override
View Full Code Here

        for (Sprint sprint : aSprintCollection) {
            if (!locked) {
                LevelDBKey lockKey = new LevelDBKey(PRIMARY, sprint.tenantId().id());

                uow.lock(lockKey.key());

                locked = true;
            }

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

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

        LevelDBUnitOfWork uow = LevelDBUnitOfWork.current();

        uow.lock(lockKey.key());

        this.save(aSprint, uow);
    }

    @Override
View Full Code Here

        for (Sprint sprint : aSprintCollection) {
            if (!locked) {
                LevelDBKey lockKey = new LevelDBKey(PRIMARY, sprint.tenantId().id());

                uow.lock(lockKey.key());

                locked = true;
            }

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

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

        LevelDBUnitOfWork uow = LevelDBUnitOfWork.current();

        uow.lock(lockKey.key());

        this.remove(aTeam, uow);
    }

    @Override
View Full Code Here

        for (Team team : aTeamCollection) {
            if (!locked) {
                LevelDBKey lockKey = new LevelDBKey(PRIMARY, team.tenantId().id());

                uow.lock(lockKey.key());

                locked = true;
            }

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

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

        LevelDBUnitOfWork uow = LevelDBUnitOfWork.current();

        uow.lock(lockKey.key());

        this.save(aTeam, uow);
    }

    @Override
View Full Code Here

        for (Team team : aTeamCollection) {
            if (!locked) {
                LevelDBKey lockKey = new LevelDBKey(PRIMARY, team.tenantId().id());

                uow.lock(lockKey.key());

                locked = true;
            }

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

    public Team teamNamed(TenantId aTenantId, String aName) {
        LevelDBKey primaryKey = new LevelDBKey(PRIMARY, aTenantId.id(), aName);

        Team team =
                LevelDBUnitOfWork.readOnly(this.database())
                    .readObject(primaryKey.key().getBytes(), Team.class);

        return team;
    }

    private void remove(Team aTeam, LevelDBUnitOfWork aUoW) {
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.