|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IRecord
Specifies the behavior of objects that represent a row of a table.
| Method Summary | |
|---|---|
void |
afterDelete(Database db)
Called to perform extra processing after record has been deleted. |
void |
afterInsert(Database db)
Called to perform extra processing after record has been inserted |
void |
afterUpdate(Database db,
IRecord oldValue)
Called to perform extra processing after record has been updated |
void |
beforeDelete(Database db)
Called to perform extra processing before record is deleted |
void |
beforeInsert(Database db)
Called to perform extra processing before record is inserted |
void |
beforeUpdate(Database db)
Called to perform extra processing before record is updated |
boolean |
bindSpecial(Database db,
java.sql.PreparedStatement ps,
int pidx,
java.lang.String columnName,
java.lang.String propertyName)
Provides a plug point for implementers to override default binding for the named column. |
boolean |
delete()
Deletes row from home database, returns whether row was actually deleted. |
boolean |
exists()
Returns whether row with embodied key exists in home database. |
java.util.List<ChangedColumn> |
getChanges()
Returns which columns have changed since instantiation or last makeClean. |
java.lang.String[] |
getKey()
Returns key to be used to find rows. |
java.lang.String[] |
getNullableNumerics()
Returns names of columns that should update the database as null rather than 0, which is most often used for optional foreign keys. |
IRecord |
getOldValue()
Returns value of record when makeClean was last called. |
java.lang.String |
getSequenceColumn()
Returns record's sequence column, or null if not applicable. |
java.lang.String |
getSequenceName()
Returns record's sequence name, or null if not applicable. |
java.lang.String |
getTable()
Gets the record's home table. |
void |
insert()
Inserts row to home database. |
boolean |
isDirty()
Indicates whether record has been modified since it was last made clean. |
void |
makeClean()
Explicitly makes record clean |
void |
makeDirty()
Explicitly makes record dirty - could be used to force an update. |
boolean |
select(java.lang.Object... keys)
Selects row with passed keys, or embodied keys if none are passed, from home database. |
boolean |
update()
Updates row, returns whether an update occurred. |
boolean |
write()
Executes exists() ? update() : insert() |
| Methods inherited from interface ir.thinkinsql.IRow |
|---|
afterRead, getColumns, getDatabase, getFields, getTemporaryProperty, putTemporaryProperty, setValueSpecial |
| Method Detail |
|---|
void afterDelete(Database db)
throws java.lang.Exception
java.lang.Exception
void afterInsert(Database db)
throws java.lang.Exception
java.lang.Exception
void afterUpdate(Database db,
IRecord oldValue)
throws java.lang.Exception
java.lang.Exception
void beforeDelete(Database db)
throws java.lang.Exception
java.lang.Exception
void beforeInsert(Database db)
throws java.lang.Exception
java.lang.Exception
void beforeUpdate(Database db)
throws java.lang.Exception
java.lang.Exception
boolean bindSpecial(Database db,
java.sql.PreparedStatement ps,
int pidx,
java.lang.String columnName,
java.lang.String propertyName)
throws java.lang.Exception
java.lang.Exception
boolean delete()
throws java.lang.Exception
java.lang.Exception
boolean exists()
throws java.lang.Exception
java.lang.Exception
java.util.List<ChangedColumn> getChanges()
throws java.lang.Exception
java.lang.Exception
java.lang.String[] getKey()
throws java.lang.Exception
java.lang.Exceptionjava.lang.String[] getNullableNumerics()
IRecord getOldValue()
java.lang.String getSequenceColumn()
java.lang.String getSequenceName()
java.lang.String getTable()
void insert()
throws java.lang.Exception
java.lang.Exceptionboolean isDirty()
void makeClean()
void makeDirty()
boolean select(java.lang.Object... keys)
throws java.lang.Exception
java.lang.Exception
boolean update()
throws java.lang.Exception
java.lang.Exception
boolean write()
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||