|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.vizzini.util.GenericData
org.vizzini.database.Record
class Record
Provides a generic data object which can be stored in a database.
| Field Summary |
|---|
| Fields inherited from interface org.vizzini.database.IRecord |
|---|
INVALID_ID |
| Constructor Summary | |
|---|---|
Record(IDatabase database,
ITableData tableData)
Construct this object. |
|
Record(IDatabase database,
String tableName)
Construct this object. |
|
| Method Summary | |
|---|---|
void |
associate(IRecord another)
Associate this to the given record using a join known to the database. |
Object |
clone()
Clone this object. |
int |
compareTo(Object another)
Compare this object to another. |
void |
delete()
Delete this object from the database. |
void |
disassociate(IRecord another)
Diassociate this from the given object. |
String |
getAsDBString(String propertyName)
Return the property value for the given property name, formatted as a database string. |
List |
getAssociated()
Return objects of all tables which are associated to this object. |
List |
getAssociated(ITableData tableData)
Return objects of the given table which are associated to this object. |
List |
getAssociated(String tableName)
Return objects of the given table which are associated to this object. |
IDatabase |
getDatabase()
Return the database. |
int |
getId()
Return the object ID. |
Iterator |
getJoins()
Return an iterator over IAssociation s which involve this
object's table. |
Iterator |
getJunctions()
Return an iterator over IAssociation s which involve this
object's table. |
ITableData |
getTableData()
Return the table data. |
String |
getTableName()
Return the table name. |
int |
hashCode()
Return the hash code. |
void |
insert()
Insert this object into the database. |
protected static void |
printList(String title,
List rows)
|
void |
reload()
Reload this object from the database. |
void |
set(String propertyName,
Class type,
Object value)
Set the value of the named property. |
String |
toDebugString()
Return a string representation of this object. |
String |
toString()
Return a string representation of this object. |
String |
toXMLString()
Return an XML string representation of this object. |
void |
update()
Update this object in the database. |
| Methods inherited from class org.vizzini.util.GenericData |
|---|
clear, copy, equals, get, getPropertyNames, getType, set, set, set, set, set, set |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.vizzini.util.IGenericData |
|---|
clear, copy, equals, get, getPropertyNames, getType, set, set, set, set, set, set |
| Constructor Detail |
|---|
public Record(IDatabase database,
String tableName)
database - The database.tableName - The table name.
public Record(IDatabase database,
ITableData tableData)
database - The database.tableData - The table data.| Method Detail |
|---|
public void associate(IRecord another)
throws SQLException
associate in interface IRecordSQLExceptionpublic Object clone()
clone in interface IRecordclone in interface IGenericDataclone in class GenericDatapublic int compareTo(Object another)
compareTo in interface ComparablecompareTo in interface IRecordcompareTo in interface IGenericDatacompareTo in class GenericData
public void delete()
throws SQLException
delete in interface IRecordSQLException
public void disassociate(IRecord another)
throws SQLException
disassociate in interface IRecordSQLExceptionpublic String getAsDBString(String propertyName)
getAsDBString in interface IRecord
public List getAssociated()
throws SQLException
getAssociated in interface IRecordSQLException
public List getAssociated(String tableName)
throws SQLException
getAssociated in interface IRecordSQLException
public List getAssociated(ITableData tableData)
throws SQLException
getAssociated in interface IRecordSQLExceptionpublic IDatabase getDatabase()
getDatabase in interface IRecordpublic int getId()
getId in interface IRecordpublic Iterator getJoins()
IAssociation s which involve this
object's table.
getJoins in interface IRecordpublic Iterator getJunctions()
IAssociation s which involve this
object's table.
getJunctions in interface IRecordpublic ITableData getTableData()
getTableData in interface IRecordpublic String getTableName()
getTableName in interface IRecordpublic int hashCode()
hashCode in interface IGenericDatahashCode in class GenericData
public void insert()
throws SQLException
insert in interface IRecordSQLException
public void reload()
throws SQLException
reload in interface IRecordSQLException
public void set(String propertyName,
Class type,
Object value)
set in interface IRecordset in interface IGenericDataset in class GenericDatapublic String toDebugString()
toDebugString in interface IRecordpublic String toString()
toString in interface IRecordtoString in interface IGenericDatatoString in class GenericDatapublic String toXMLString()
toXMLString in interface IRecord
public void update()
throws SQLException
update in interface IRecordSQLException
protected static void printList(String title,
List rows)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |