class RowLock extends Lock {

    @Override
    public String getLockType() {
        return "RowLock";
    }

    @Override
    public AOTransaction getTransaction() {
        return (AOTransaction) super.getTransaction();
    }

    @Override
    protected void addLock(Session session, Transaction t) {<FILL_FUNCTION_BODY>}

    @Override
    protected LockOwner createLockOwner(Transaction transaction, Object oldValue) {
        return new RowLockOwner(transaction, oldValue);
    }

    public boolean isInsert() {
        return false;
    }
}

        // 单元测试时session为null
        if (session != null)
            session.addLock(this);
        else
            ((AOTransaction) t).addLock(this);
    
<methods>public non-sealed void <init>() ,public int addWaitingTransaction(java.lang.Object, com.lealone.transaction.Transaction, com.lealone.db.session.Session) ,public com.lealone.db.lock.LockOwner getLockOwner() ,public abstract java.lang.String getLockType() ,public java.lang.Object getOldValue() ,public com.lealone.transaction.Transaction getTransaction() ,public boolean isLockedExclusivelyBy(com.lealone.db.session.Session) ,public boolean tryLock(com.lealone.transaction.Transaction, java.lang.Object, java.lang.Object) ,public void unlock(com.lealone.db.session.Session, boolean, com.lealone.db.session.Session) ,public void unlock(com.lealone.db.session.Session, com.lealone.db.session.Session) <variables>static final com.lealone.db.lock.NullLockOwner NULL,private final AtomicReference<com.lealone.db.lock.LockOwner> ref