|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.strangelight.db.TableRow
|
+--com.strangelight.db.OwnableRow
A TableRow which can be associated with a particular owner/user. It does this by requiring the the underlying database table has certain standardized columns:
_last_modified_BY_uidINT._created_BY_uidINT._createdDATETIME._last_modifiedTIMESTAMP.CREATE TABLE definition of
a database table encapsulated by a subclass of
KeyedRow must look something like this:
CREATE TABLE MyTableName (
id int PRIMARY KEY auto_increment,
_last_modified timestamp,
_last_modified_BY_uid int,
_created datetime,
_created_BY_uid int,
...
KeyedRow| Constructor Summary | |
OwnableRow()
|
|
| Method Summary | |
void |
commit()
Writes any changes made to this TableRow object back
to the database. |
void |
finalize()
|
User |
getUser()
gets the User who is currently using the database
(who may or may not be the "owner" of the object that this
database row represents). |
void |
setUser(User u)
sets the User who is currently using the database
(who may or may not be the "owner" of the object that this
database row represents). |
| Methods inherited from class com.strangelight.db.TableRow |
drop, getFields, getObject, getString, getTableName, getWhereClause, setObject, setString |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public OwnableRow()
| Method Detail |
public void setUser(User u)
User who is currently using the database
(who may or may not be the "owner" of the object that this
database row represents).
setUser in interface Ownablepublic User getUser()
User who is currently using the database
(who may or may not be the "owner" of the object that this
database row represents).
getUser in interface OwnableUser currently using the database.public void commit()
TableRow object back
to the database.This method is called automatically during garbage-collection.
commit in class TableRowpublic void finalize()
finalize in class TableRow
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||