org.hsqldb.Session - java examples

Here are the examples of the java api org.hsqldb.Session taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

155 Examples 7

19 View Complete Implementation : RowSetNavigatorData.java
Copyright Apache License 2.0
Author : SERG-Delft
public void intersect(Session session, RowSetNavigatorData other) {
    removeDuplicates(session);
    other.sortFull(session);
    while (hasNext()) {
        Object[] currentData = getNext();
        boolean hasRow = other.containsRow(currentData);
        if (!hasRow) {
            removeCurrent();
        }
    }
    reset();
}

19 View Complete Implementation : Type.java
Copyright Apache License 2.0
Author : SERG-Delft
public static TypedComparator newComparator(Session session) {
    return new TypedComparator(session);
}

19 View Complete Implementation : SimpleStore.java
Copyright Apache License 2.0
Author : SERG-Delft
public void postCommitAction(Session session, RowAction rowAction) {
}

19 View Complete Implementation : RowSetNavigatorData.java
Copyright Apache License 2.0
Author : SERG-Delft
public void exceptAll(Session session, RowSetNavigatorData other) {
    Object[] compareData = null;
    RowIterator it;
    Object[] otherData = null;
    sortFull(session);
    other.sortFull(session);
    it = fullIndex.emptyIterator();
    while (hasNext()) {
        Object[] currentData = getNext();
        boolean newGroup = compareData == null || fullIndex.compareRowNonUnique(session, currentData, compareData, fullIndex.getColumnCount()) != 0;
        if (newGroup) {
            compareData = currentData;
            it = other.findFirstRow(currentData);
        }
        otherData = it.getNext();
        if (otherData != null && fullIndex.compareRowNonUnique(session, currentData, otherData, fullIndex.getColumnCount()) == 0) {
            removeCurrent();
        }
    }
    reset();
}

19 View Complete Implementation : RowType.java
Copyright Apache License 2.0
Author : SERG-Delft
public int compare(Session session, Object a, Object b) {
    if (a == b) {
        return 0;
    }
    if (a == null) {
        return -1;
    }
    if (b == null) {
        return 1;
    }
    Object[] arra = (Object[]) a;
    Object[] arrb = (Object[]) b;
    int length = arra.length;
    if (arrb.length < length) {
        length = arrb.length;
    }
    for (int i = 0; i < length; i++) {
        int result = dataTypes[i].compare(session, arra[i], arrb[i]);
        if (result != 0) {
            return result;
        }
    }
    if (arra.length > arrb.length) {
        return 1;
    } else if (arra.length < arrb.length) {
        return -1;
    }
    return 0;
}

19 View Complete Implementation : ArrayType.java
Copyright Apache License 2.0
Author : SERG-Delft
public Object concat(Session session, Object a, Object b) {
    if (a == null || b == null) {
        return null;
    }
    int size = ((Object[]) a).length + ((Object[]) b).length;
    Object[] array = new Object[size];
    System.arraycopy(a, 0, array, 0, ((Object[]) a).length);
    System.arraycopy(b, 0, array, ((Object[]) a).length, ((Object[]) b).length);
    return array;
}

19 View Complete Implementation : ArrayType.java
Copyright Apache License 2.0
Author : SERG-Delft
public int cardinality(Session session, Object a) {
    if (a == null) {
        return 0;
    }
    return ((Object[]) a).length;
}

19 View Complete Implementation : RowStoreAVLHybrid.java
Copyright Apache License 2.0
Author : SERG-Delft
public void postCommitAction(Session session, RowAction action) {
}

19 View Complete Implementation : OtherType.java
Copyright Apache License 2.0
Author : SERG-Delft
public Type getCombinedType(Session session, Type other, int operation) {
    return this;
}

19 View Complete Implementation : BitType.java
Copyright Apache License 2.0
Author : SERG-Delft
public int compare(Session session, Object a, Object b) {
    int i = super.compare(session, a, b);
    if (i == 0 && a != null) {
        if (((BinaryData) a).bitLength(null) == ((BinaryData) b).bitLength(null)) {
            return 0;
        }
        return ((BinaryData) a).bitLength(null) > ((BinaryData) b).bitLength(null) ? 1 : -1;
    }
    return i;
}

19 View Complete Implementation : RowSetNavigatorData.java
Copyright Apache License 2.0
Author : SERG-Delft
public boolean hasUniqueNotNullRows(Session session) {
    sortFull(session);
    reset();
    Object[] lastRowData = null;
    while (hasNext()) {
        Object[] currentData = getNext();
        if (hasNull(currentData)) {
            continue;
        }
        if (lastRowData != null && fullIndex.compareRow(session, lastRowData, currentData) == 0) {
            return false;
        } else {
            lastRowData = currentData;
        }
    }
    return true;
}

19 View Complete Implementation : RowSetNavigatorData.java
Copyright Apache License 2.0
Author : SERG-Delft
public void removeDuplicates(Session session) {
    sortFull(session);
    reset();
    int lastRowPos = -1;
    Object[] lastRowData = null;
    while (hasNext()) {
        Object[] currentData = getNext();
        if (lastRowData == null) {
            lastRowPos = currentPos;
            lastRowData = currentData;
            continue;
        }
        if (fullIndex.compareRow(session, lastRowData, currentData) != 0) {
            lastRowPos++;
            lastRowData = currentData;
            table[lastRowPos] = currentData;
        }
    }
    for (int i = lastRowPos + 1; i < size; i++) {
        table[i] = null;
    }
    super.size = lastRowPos + 1;
    reset();
}

19 View Complete Implementation : BinaryUUIDType.java
Copyright Apache License 2.0
Author : SERG-Delft
public int compare(Session session, Object a, Object b) {
    if (a == b) {
        return 0;
    }
    if (a == null) {
        return -1;
    }
    if (b == null) {
        return 1;
    }
    if (a instanceof BinaryData && b instanceof BinaryData) {
        byte[] data1 = ((BinaryData) a).getBytes();
        byte[] data2 = ((BinaryData) b).getBytes();
        int length = data1.length > data2.length ? data2.length : data1.length;
        for (int i = 0; i < length; i++) {
            if (data1[i] == data2[i]) {
                continue;
            }
            return (((int) data1[i]) & 0xff) > (((int) data2[i]) & 0xff) ? 1 : -1;
        }
        if (data1.length == data2.length) {
            return 0;
        }
        return data1.length > data2.length ? 1 : -1;
    }
    throw Error.runtimeError(ErrorCode.U_S0500, "BinaryUUIDType");
}

19 View Complete Implementation : RowType.java
Copyright Apache License 2.0
Author : SERG-Delft
public int compare(Session session, Object a, Object b, SortAndSlice sort) {
    if (a == b) {
        return 0;
    }
    // not related to sort
    if (a == null) {
        return -1;
    }
    if (b == null) {
        return 1;
    }
    Object[] arra = (Object[]) a;
    Object[] arrb = (Object[]) b;
    int length = sort.sortOrder.length;
    for (int i = 0; i < length; i++) {
        a = arra[sort.sortOrder[i]];
        b = arrb[sort.sortOrder[i]];
        if (a == b) {
            continue;
        }
        if (sort.sortNullsLast[i]) {
            if (a == null) {
                return 1;
            }
            if (b == null) {
                return -1;
            }
        }
        int result = dataTypes[i].compare(session, a, b);
        if (result != 0) {
            if (sort.sortDescending[i]) {
                return -result;
            }
            return result;
        }
    }
    return 0;
}

19 View Complete Implementation : RowSetNavigatorData.java
Copyright Apache License 2.0
Author : SERG-Delft
public void except(Session session, RowSetNavigatorData other) {
    removeDuplicates(session);
    other.sortFull(session);
    while (hasNext()) {
        Object[] currentData = getNext();
        boolean hasRow = other.containsRow(currentData);
        if (hasRow) {
            removeCurrent();
        }
    }
    reset();
}

19 View Complete Implementation : ScriptReaderBase.java
Copyright Apache License 2.0
Author : SERG-Delft
public void readAll(Session session) {
    readDDL(session);
    readExistingData(session);
}

19 View Complete Implementation : RowSetNavigatorDataTable.java
Copyright Apache License 2.0
Author : SERG-Delft
public void intersect(Session session, RowSetNavigatorData other) {
    removeDuplicates(session);
    other.sortFull(session);
    while (hasNext()) {
        Object[] currentData = getNext();
        boolean hasRow = other.containsRow(currentData);
        if (!hasRow) {
            removeCurrent();
        }
    }
    other.release();
}

19 View Complete Implementation : Type.java
Copyright Apache License 2.0
Author : SERG-Delft
public int cardinality(Session session, Object a) {
    return 0;
}

19 View Complete Implementation : SimpleStore.java
Copyright Apache License 2.0
Author : SERG-Delft
public void moveDataToSpace(Session session) {
}

19 View Complete Implementation : Type.java
Copyright Apache License 2.0
Author : SERG-Delft
public int compare(Session session, Object a, Object b, int opType) {
    if (a == b) {
        return 0;
    }
    return compare(session, a, b);
}

19 View Complete Implementation : BlobType.java
Copyright Apache License 2.0
Author : SERG-Delft
public int compare(Session session, Object a, Object b) {
    if (a == b) {
        return 0;
    }
    if (a == null) {
        return -1;
    }
    if (b == null) {
        return 1;
    }
    if (b instanceof BinaryData) {
        return session.database.lobManager.compare((BlobData) a, ((BlobData) b).getBytes());
    }
    return session.database.lobManager.compare((BlobData) a, (BlobData) b);
}

19 View Complete Implementation : RowSetNavigatorData.java
Copyright Apache License 2.0
Author : SERG-Delft
public void union(Session session, RowSetNavigatorData other) {
    Object[] currentData;
    removeDuplicates(session);
    other.removeDuplicates(session);
    mainIndex = fullIndex;
    while (other.hasNext()) {
        currentData = other.getNext();
        int position = ArraySort.searchFirst(table, 0, size, currentData, this);
        if (position < 0) {
            position = -position - 1;
            currentPos = position;
            insert(currentData);
        }
    }
    reset();
}

19 View Complete Implementation : RowStoreAVL.java
Copyright Apache License 2.0
Author : SERG-Delft
public boolean canRead(Session session, long pos, int mode, int[] colMap) {
    return true;
}

19 View Complete Implementation : BooleanType.java
Copyright Apache License 2.0
Author : SERG-Delft
public int compare(Session session, Object a, Object b) {
    if (a == b) {
        return 0;
    }
    if (a == null) {
        return -1;
    }
    if (b == null) {
        return 1;
    }
    boolean boola = ((Boolean) a).booleanValue();
    boolean boolb = ((Boolean) b).booleanValue();
    return (boola == boolb) ? 0 : (boolb ? -1 : 1);
}

19 View Complete Implementation : BinaryUUIDType.java
Copyright Apache License 2.0
Author : SERG-Delft
public BlobData overlay(Session session, BlobData data, BlobData overlay, long offset, long length, boolean hasLength) {
    if (data == null || overlay == null) {
        return null;
    }
    if (!hasLength) {
        length = overlay.length(session);
    }
    BinaryData binary = new BinaryData(session, substring(session, data, 0, offset, true), overlay);
    binary = new BinaryData(session, binary, substring(session, data, offset + length, 0, false));
    return binary;
}

19 View Complete Implementation : RowSetNavigatorDataTable.java
Copyright Apache License 2.0
Author : SERG-Delft
public void union(Session session, RowSetNavigatorData other) {
    Object[] currentData;
    int colCount = table.getColumnTypes().length;
    removeDuplicates(session);
    other.reset();
    while (other.hasNext()) {
        currentData = other.getNext();
        RowIterator it = findFirstRow(currentData);
        if (!it.hasNext()) {
            currentData = (Object[]) ArrayUtil.resizeArrayIfDifferent(currentData, colCount);
            add(currentData);
        }
        it.release();
    }
    other.release();
    reset();
}

19 View Complete Implementation : RowSetNavigatorData.java
Copyright Apache License 2.0
Author : SERG-Delft
public void intersectAll(Session session, RowSetNavigatorData other) {
    Object[] compareData = null;
    RowIterator it;
    Object[] otherData = null;
    sortFull(session);
    other.sortFull(session);
    it = fullIndex.emptyIterator();
    while (hasNext()) {
        Object[] currentData = getNext();
        boolean newGroup = compareData == null || fullIndex.compareRowNonUnique(session, currentData, compareData, visibleColumnCount) != 0;
        if (newGroup) {
            compareData = currentData;
            it = other.findFirstRow(currentData);
        }
        otherData = it.getNext();
        if (otherData != null && fullIndex.compareRowNonUnique(session, currentData, otherData, visibleColumnCount) == 0) {
            continue;
        }
        removeCurrent();
    }
    reset();
}

19 View Complete Implementation : RowSetNavigatorDataTable.java
Copyright Apache License 2.0
Author : SERG-Delft
public void removeDuplicates(Session session) {
    sortFull(session);
    Object[] lastRowData = null;
    while (next()) {
        Object[] currentData = getCurrent();
        if (lastRowData != null && fullIndex.compareRow(session, lastRowData, currentData) == 0) {
            removeCurrent();
        } else {
            lastRowData = currentData;
        }
    }
    reset();
}

19 View Complete Implementation : RowStoreDataChange.java
Copyright Apache License 2.0
Author : SERG-Delft
/*
 * Implementation of PersistentStore for data change lists.
 *
 * @author Fred Toussi (fredt@users dot sourceforge.net)
 * @version 2.3.0
 * @since 2.2.7
 */
public clreplaced RowStoreDataChange extends RowStoreAVLHybrid {

    Session session;

    public RowStoreDataChange(Session session, PersistentStoreCollection manager, TableBase table) {
        super(session, table, true);
        this.session = session;
        super.changeToDiskTable(session);
    }

    public CachedObject getNewCachedObject(Session session, Object object, boolean tx) {
        Row row = new RowDiskDataChange(table, (Object[]) object, this, null);
        add(session, row, tx);
        return row;
    }

    public CachedObject get(RowInputInterface in) {
        try {
            return new RowDiskDataChange(session, table, in);
        } catch (HsqlException e) {
            return null;
        } catch (IOException e1) {
            return null;
        }
    }
}

19 View Complete Implementation : SimpleStore.java
Copyright Apache License 2.0
Author : SERG-Delft
public boolean canRead(Session session, CachedObject object, int mode, int[] colMap) {
    return true;
}

19 View Complete Implementation : Log.java
Copyright Apache License 2.0
Author : SERG-Delft
/**
 * Performs checkpoint including pre and post operations. Returns to the
 * same state as before the checkpoint.
 */
void checkpoint(Session session, boolean defrag) {
    if (filesReadOnly) {
        return;
    }
    if (cache == null) {
        defrag = false;
    } else if (forceDefrag()) {
        defrag = true;
    }
    if (defrag) {
        defrag(session);
    } else {
        checkpoint();
    }
}

19 View Complete Implementation : ClobType.java
Copyright Apache License 2.0
Author : SERG-Delft
public int compare(Session session, Object a, Object b, int opType) {
    if (a == b) {
        return 0;
    }
    if (a == null) {
        return -1;
    }
    if (b == null) {
        return 1;
    }
    if (b instanceof String) {
        return session.database.lobManager.compare(collation, (ClobData) a, (String) b);
    }
    return session.database.lobManager.compare(collation, (ClobData) a, (ClobData) b);
}

19 View Complete Implementation : ArrayType.java
Copyright Apache License 2.0
Author : SERG-Delft
public Type getCombinedType(Session session, Type other, int operation) {
    ArrayType type = (ArrayType) getAggregateType(other);
    if (other == null) {
        return type;
    }
    if (operation != OpTypes.CONCAT) {
        return type;
    }
    if (type.maxCardinality == ArrayType.defaultLargeArrayCardinality) {
        return type;
    }
    long card = (long) ((ArrayType) other).maxCardinality + maxCardinality;
    if (card > ArrayType.defaultLargeArrayCardinality) {
        card = ArrayType.defaultLargeArrayCardinality;
    }
    return new ArrayType(dataType, (int) card);
}

19 View Complete Implementation : RowSetNavigatorDataTable.java
Copyright Apache License 2.0
Author : SERG-Delft
public void except(Session session, RowSetNavigatorData other) {
    removeDuplicates(session);
    other.sortFull(session);
    while (hasNext()) {
        Object[] currentData = getNext();
        boolean hasRow = other.containsRow(currentData);
        if (hasRow) {
            removeCurrent();
        }
    }
    other.release();
}

19 View Complete Implementation : RowStoreAVLHybrid.java
Copyright Apache License 2.0
Author : SERG-Delft
public void add(Session session, CachedObject object, boolean tx) {
    if (isCached) {
        int size = object.getRealSize(cache.rowOut);
        size += indexList.length * NodeAVLDisk.SIZE_IN_BYTE;
        size = cache.rowOut.getStorageSize(size);
        object.setStorageSize(size);
        long pos = tableSpace.getFilePosition(size, false);
        object.setPos(pos);
        cache.add(object, false);
    }
    Object[] data = ((Row) object).getData();
    for (int i = 0; i < nullsList.length; i++) {
        if (data[i] == null) {
            nullsList[i] = true;
        }
    }
}

19 View Complete Implementation : ArrayType.java
Copyright Apache License 2.0
Author : SERG-Delft
public int compare(Session session, Object a, Object b) {
    if (a == b) {
        return 0;
    }
    if (a == null) {
        return -1;
    }
    if (b == null) {
        return 1;
    }
    Object[] arra = (Object[]) a;
    Object[] arrb = (Object[]) b;
    int length = arra.length;
    if (arrb.length < length) {
        length = arrb.length;
    }
    for (int i = 0; i < length; i++) {
        int result = dataType.compare(session, arra[i], arrb[i]);
        if (result != 0) {
            return result;
        }
    }
    if (arra.length > arrb.length) {
        return 1;
    } else if (arra.length < arrb.length) {
        return -1;
    }
    return 0;
}

19 View Complete Implementation : RowSetNavigatorDataTable.java
Copyright Apache License 2.0
Author : SERG-Delft
public boolean hasUniqueNotNullRows(Session session) {
    sortFull(session);
    Object[] lastRowData = null;
    while (hasNext()) {
        Object[] currentData = getNext();
        if (hasNull(currentData)) {
            continue;
        }
        if (lastRowData != null && fullIndex.compareRow(session, lastRowData, currentData) == 0) {
            return false;
        } else {
            lastRowData = currentData;
        }
    }
    return true;
}

19 View Complete Implementation : DatabaseInformation.java
Copyright Apache License 2.0
Author : SERG-Delft
/**
 * Retrieves a table with the specified name whose content may depend on
 * the execution context indicated by the session argument as well as the
 * current value of <code>withContent</code>. <p>
 *
 * @param session the context in which to produce the table
 * @param name the name of the table to produce
 * @return a table corresponding to the name and session arguments, or
 *      <code>null</code> if there is no such table to be produced
 */
public Table getSystemTable(Session session, String name) {
    return null;
}

18 View Complete Implementation : RowStoreAVLDiskData.java
Copyright Apache License 2.0
Author : SERG-Delft
public void commitRow(Session session, Row row, int changeAction, int txModel) {
    switch(changeAction) {
        case RowAction.ACTION_DELETE:
            cache.removePersistence(row);
            break;
        case RowAction.ACTION_INSERT:
            commitPersistence(row);
            break;
        case RowAction.ACTION_INSERT_DELETE:
            // INSERT + DELETE
            if (txModel == TransactionManager.LOCKS) {
                remove(row);
            } else {
                delete(session, row);
                remove(row);
            }
            break;
        case RowAction.ACTION_DELETE_FINAL:
            throw Error.runtimeError(ErrorCode.U_S0500, "RowStore");
    }
}

18 View Complete Implementation : ScriptReaderText.java
Copyright Apache License 2.0
Author : SERG-Delft
public boolean readLoggedStatement(Session session) {
    if (!sessionChanged) {
        try {
            rawStatement = dataStreamIn.readLine();
        } catch (EOFException e) {
            return false;
        } catch (IOException e) {
            throw Error.error(e, ErrorCode.FILE_IO_ERROR, null);
        }
        lineCount++;
        // System.out.println(lineCount);
        statement = StringConverter.unicodeStringToString(rawStatement);
        if (statement == null) {
            return false;
        }
    }
    processStatement(session);
    return true;
}

18 View Complete Implementation : RowStoreAVLMemory.java
Copyright Apache License 2.0
Author : SERG-Delft
public void rollbackRow(Session session, Row row, int changeAction, int txModel) {
    switch(changeAction) {
        case RowAction.ACTION_DELETE:
            if (txModel == TransactionManager.LOCKS) {
                ((RowAVL) row).setNewNodes(this);
                indexRow(session, row);
            }
            break;
        case RowAction.ACTION_INSERT:
            delete(session, row);
            remove(row);
            break;
        case RowAction.ACTION_INSERT_DELETE:
            // INSERT + DELETE
            remove(row);
            break;
    }
}

18 View Complete Implementation : RowStoreAVLDisk.java
Copyright Apache License 2.0
Author : SERG-Delft
public CachedObject getNewCachedObject(Session session, Object object, boolean tx) {
    Row row;
    if (largeData) {
        row = new RowAVLDiskLarge(table, (Object[]) object, this);
    } else {
        row = new RowAVLDisk(table, (Object[]) object, this);
    }
    add(session, row, tx);
    return row;
}

18 View Complete Implementation : ScriptWriterText.java
Copyright Apache License 2.0
Author : SERG-Delft
public void writeCommitStatement(Session session) throws IOException {
    writeSessionIdAndSchema(session);
    rowOut.reset();
    rowOut.write(BYTES_COMMIT);
    rowOut.write(BYTES_LINE_SEP);
    writeRowOutToFile();
    needsSync = true;
    if (writeDelay == 0) {
        sync();
    }
}

18 View Complete Implementation : RowType.java
Copyright Apache License 2.0
Author : SERG-Delft
public Type getCombinedType(Session session, Type other, int operation) {
    if (operation != OpTypes.CONCAT) {
        return getAggregateType(other);
    }
    if (other == null) {
        return this;
    }
    if (!other.isRowType()) {
        throw Error.error(ErrorCode.X_42562);
    }
    Type[] newTypes = new Type[dataTypes.length];
    Type[] otherTypes = ((RowType) other).getTypesArray();
    if (dataTypes.length != otherTypes.length) {
        throw Error.error(ErrorCode.X_42564);
    }
    for (int i = 0; i < dataTypes.length; i++) {
        newTypes[i] = dataTypes[i].getAggregateType(otherTypes[i]);
    }
    return new RowType(newTypes);
}

18 View Complete Implementation : CharacterType.java
Copyright Apache License 2.0
Author : SERG-Delft
/**
 * Memory limits apply to Upper and Lower implementations with Clob data
 */
public Object upper(Session session, Object data) {
    if (data == null) {
        return null;
    }
    if (typeCode == Types.SQL_CLOB) {
        String result = ((ClobData) data).getSubString(session, 0, (int) ((ClobData) data).length(session));
        result = collation.toUpperCase(result);
        ClobData clob = session.createClob(result.length());
        clob.setString(session, 0, result);
        return clob;
    }
    return collation.toUpperCase((String) data);
}

18 View Complete Implementation : RowStoreAVLHybridExtended.java
Copyright Apache License 2.0
Author : SERG-Delft
public void indexRow(Session session, Row row) {
    NodeAVL node = ((RowAVL) row).getNode(0);
    int count = 0;
    while (node != null) {
        count++;
        node = node.nNext;
    }
    if ((isCached ^ !row.isMemory()) || count != indexList.length) {
        row = (Row) getNewCachedObject(session, row.getData(), true);
    }
    super.indexRow(session, row);
}

18 View Complete Implementation : RowSetNavigatorDataTable.java
Copyright Apache License 2.0
Author : SERG-Delft
public void intersectAll(Session session, RowSetNavigatorData other) {
    Object[] compareData = null;
    RowIterator it;
    Row otherRow = null;
    Object[] otherData = null;
    sortFull(session);
    other.sortFull(session);
    it = fullIndex.emptyIterator();
    while (hasNext()) {
        Object[] currentData = getNext();
        boolean newGroup = compareData == null || fullIndex.compareRowNonUnique(session, currentData, compareData, fullIndex.getColumnCount()) != 0;
        if (newGroup) {
            compareData = currentData;
            it = other.findFirstRow(currentData);
        }
        otherRow = it.getNextRow();
        otherData = otherRow == null ? null : otherRow.getData();
        if (otherData != null && fullIndex.compareRowNonUnique(session, currentData, otherData, fullIndex.getColumnCount()) == 0) {
            continue;
        }
        removeCurrent();
    }
    other.release();
}

18 View Complete Implementation : RowStoreAVLHybridExtended.java
Copyright Apache License 2.0
Author : SERG-Delft
public synchronized void resetAccessorKeys(Session session, Index[] keys) {
    if (indexList.length == 0 || accessorList[0] == null) {
        indexList = keys;
        accessorList = new CachedObject[indexList.length];
        return;
    }
    if (isCached) {
        resetAccessorKeysForCached(keys);
        return;
    }
    super.resetAccessorKeys(session, keys);
}

18 View Complete Implementation : ScriptWriterText.java
Copyright Apache License 2.0
Author : SERG-Delft
public void writeLogStatement(Session session, String s) throws IOException {
    if (session != null) {
        schemaToLog = session.currentSchema;
        writeSessionIdAndSchema(session);
    }
    rowOut.reset();
    rowOut.writeString(s);
    rowOut.write(BYTES_LINE_SEP);
    writeRowOutToFile();
    needsSync = true;
}

18 View Complete Implementation : ScriptReaderDecode.java
Copyright Apache License 2.0
Author : SERG-Delft
public boolean readLoggedStatement(Session session) {
    if (dataInput == null) {
        return super.readLoggedStatement(session);
    }
    int count;
    try {
        count = dataInput.readInt();
        if (count * 2 > buffer.length) {
            buffer = new byte[count * 2];
        }
        dataInput.readFully(buffer, 0, count);
    } catch (Throwable t) {
        return false;
    }
    count = crypto.decode(buffer, 0, count, buffer, 0);
    String s;
    try {
        s = new String(buffer, 0, count, "ISO-8859-1");
    } catch (UnsupportedEncodingException e) {
        throw Error.error(e, ErrorCode.FILE_IO_ERROR, fileNamePath);
    }
    lineCount++;
    // System.out.println(lineCount);
    statement = StringConverter.unicodeStringToString(s);
    if (statement == null) {
        return false;
    }
    processStatement(session);
    return true;
}