private void easyAddLock(String resource, String transaction, LockType type) {
        // When this is called, every thing should be safe.
        // So:
        if (this.type == null) {
            this.type = type;
            this.transactions.add(transaction);
        } else if (this.type == LockType.WRITE || type == LockType.WRITE)
            this.type = LockType.WRITE;
        else
            this.transactions.add(transaction);

    }