| java.lang.Object com.quadcap.sql.Constraint com.quadcap.sql.AutoNumberConstraint
AutoNumberConstraint | public class AutoNumberConstraint extends Constraint implements Externalizable(Code) | | Constraint class for SQL AUTO_NUMBER constraints.
author: Stan Bailes |
Method Summary | |
public void | add(Session session) | public void | applyDelete(Session session, Row row, long rowId, Constraint activeIndex) We don't care about deletes. | public void | applyInsert(Session session, Row row, long rowId, Constraint activeIndex) Our work is already done. | public void | applyUpdate(Session session, byte[] oldKey, Row row, Row oldRow, long rowId, Constraint activeIndex) 's cool. | public void | checkDelete(Session session, Row row, long rowId) We don't care about deletes. | public void | checkInsert(Session session, Row row) If the 'with identity' field is null or not an integer
we assign the number before the insert operation and increment
our little counter. | public void | checkUpdate(Session session, byte[] oldKey, Row row, Row oldRow, long rowId, Constraint activeIndex) We only operate during INSERT, basically. | public void | delete(Session session) | public int | getPriority() Do me first. | public void | readExternal(ObjectInput in) | public void | writeExternal(ObjectOutput out) Remember where we were. |
AutoNumberConstraint | public AutoNumberConstraint()(Code) | | Default constructor
|
AutoNumberConstraint | public AutoNumberConstraint(String name)(Code) | | Explicit name constructor
|
add | public void add(Session session) throws SQLException(Code) | | When added, I need to number all rows which already exist in the
table
|
checkInsert | public void checkInsert(Session session, Row row) throws SQLException, IOException(Code) | | If the 'with identity' field is null or not an integer
we assign the number before the insert operation and increment
our little counter.
|
getPriority | public int getPriority()(Code) | | Do me first.
|
Methods inherited from com.quadcap.sql.Constraint | abstract public void add(Session session) throws SQLException, IOException(Code)(Java Doc) abstract public void applyDelete(Session session, Row row, long rowId, Constraint activeIndex) throws SQLException, IOException(Code)(Java Doc) abstract public void applyInsert(Session session, Row row, long rowId, Constraint activeIndex) throws SQLException, IOException(Code)(Java Doc) abstract public void applyUpdate(Session session, byte[] oldKey, Row row, Row oldRow, long rowId, Constraint activeIndex) throws SQLException, IOException(Code)(Java Doc) abstract public void checkDelete(Session session, Row row, long rowId) throws SQLException, IOException(Code)(Java Doc) abstract public void checkInsert(Session session, Row row) throws SQLException, IOException(Code)(Java Doc) abstract public void checkUpdate(Session session, byte[] oldKey, Row row, Row oldRow, long rowId, Constraint activeIndex) throws SQLException, IOException(Code)(Java Doc) abstract public void delete(Session session) throws SQLException, IOException(Code)(Java Doc) public Column getColumn() throws SQLException(Code)(Java Doc) public Column getColumn(int c) throws SQLException(Code)(Java Doc) public int getColumnCount()(Code)(Java Doc) public Vector getColumnNames() throws SQLException(Code)(Java Doc) public int[] getColumns() throws SQLException(Code)(Java Doc) public Btree getIndex(Database db) throws IOException(Code)(Java Doc) public String getName()(Code)(Java Doc) public int getPriority()(Code)(Java Doc) public int getRefAction(int opType)(Code)(Java Doc) public String getRefActionString(int opType)(Code)(Java Doc) public int getSpec()(Code)(Java Doc) public Table getTable()(Code)(Java Doc) public boolean isDeferred()(Code)(Java Doc) public boolean isGlobal()(Code)(Java Doc) public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code)(Java Doc) public void resetColumns() throws SQLException(Code)(Java Doc) public void setColumn(Column column)(Code)(Java Doc) public void setDeferrable(int def)(Code)(Java Doc) public void setGlobal(boolean g)(Code)(Java Doc) public void setName(String name)(Code)(Java Doc) public void setRefSpec(int ref)(Code)(Java Doc) public void setTable(Table table) throws SQLException(Code)(Java Doc) public String toString()(Code)(Java Doc) public void undoAdd(Session session) throws SQLException, IOException(Code)(Java Doc) public void undoDelete(Session session) throws SQLException, IOException(Code)(Java Doc) public void writeExternal(ObjectOutput out) throws IOException(Code)(Java Doc)
|
|
|