|
||||||||||
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 IRecord
SQLException
public Object clone()
clone
in interface IRecord
clone
in interface IGenericData
clone
in class GenericData
public int compareTo(Object another)
compareTo
in interface Comparable
compareTo
in interface IRecord
compareTo
in interface IGenericData
compareTo
in class GenericData
public void delete() throws SQLException
delete
in interface IRecord
SQLException
public void disassociate(IRecord another) throws SQLException
disassociate
in interface IRecord
SQLException
public String getAsDBString(String propertyName)
getAsDBString
in interface IRecord
public List getAssociated() throws SQLException
getAssociated
in interface IRecord
SQLException
public List getAssociated(String tableName) throws SQLException
getAssociated
in interface IRecord
SQLException
public List getAssociated(ITableData tableData) throws SQLException
getAssociated
in interface IRecord
SQLException
public IDatabase getDatabase()
getDatabase
in interface IRecord
public int getId()
getId
in interface IRecord
public Iterator getJoins()
IAssociation
s which involve this
object's table.
getJoins
in interface IRecord
public Iterator getJunctions()
IAssociation
s which involve this
object's table.
getJunctions
in interface IRecord
public ITableData getTableData()
getTableData
in interface IRecord
public String getTableName()
getTableName
in interface IRecord
public int hashCode()
hashCode
in interface IGenericData
hashCode
in class GenericData
public void insert() throws SQLException
insert
in interface IRecord
SQLException
public void reload() throws SQLException
reload
in interface IRecord
SQLException
public void set(String propertyName, Class type, Object value)
set
in interface IRecord
set
in interface IGenericData
set
in class GenericData
public String toDebugString()
toDebugString
in interface IRecord
public String toString()
toString
in interface IRecord
toString
in interface IGenericData
toString
in class GenericData
public String toXMLString()
toXMLString
in interface IRecord
public void update() throws SQLException
update
in interface IRecord
SQLException
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 |