studio.raptor.sqlparser.fast.result.Row Maven / Gradle / Ivy
/*
* Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package studio.raptor.sqlparser.fast.result;
import studio.raptor.sqlparser.fast.value.Value;
/**
* Represents a row in a table.
*/
public interface Row extends SearchRow {
int MEMORY_CALCULATE = -1;
Row[] EMPTY_ARRAY = {};
/**
* Get a copy of the row that is distinct from (not equal to) this row.
* This is used for FOR UPDATE to allow pseudo-updating a row.
*
* @return a new row with the same data
*/
Row getCopy();
/**
* Set version.
*
* @param version row version
*/
void setVersion(int version);
/**
* Check if this is an empty row.
*
* @return {@code true} if the row is empty
*/
boolean isEmpty();
/**
* Get session id.
*
* @return the session id
*/
int getSessionId();
/**
* Set session id.
*
* @param sessionId the session id
*/
void setSessionId(int sessionId);
/**
* This record has been committed. The session id is reset.
*/
void commit();
/**
* Check if the row is deleted.
*
* @return {@code true} if the row is deleted
*/
boolean isDeleted();
/**
* Mark the row as deleted.
*
* @param deleted deleted flag
*/
void setDeleted(boolean deleted);
/**
* Get values.
*
* @return values
*/
Value[] getValueList();
}