| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.hussam.database.sql.DatabaseRecord
public class DatabaseRecord
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.String,java.lang.Object> | entries |
| Constructor Summary | |
|---|---|
DatabaseRecord(RecordHome home, java.util.Map<java.lang.String,java.lang.Object> entries) | |
DatabaseRecord(RecordHome home, java.lang.Object primary) | |
DatabaseRecord(RecordHome home, Record record, java.lang.Object primary) | |
| Method Summary | |
|---|---|
void | canRead(java.lang.String entryName) Checks if you can read this entry. |
void | canWrite(java.lang.String entryName) Checks if the entry value can be changed. |
void | checkAlive() Checks if this Record is still usefull. |
int | compareTo(Record r) |
protected void | finalize() |
protected java.lang.Object | get(java.lang.String entryName) |
java.util.Map<java.lang.String,java.lang.Object> | getEntries() Returns all entries. a map of Map |
java.lang.Object | getEntry(java.lang.String entryName) returns the value of the given entry. |
RecordHome | getHome() Returns the RecordHome from which this Record belongs to. |
java.lang.Object | getKey() Returns the key of this Record. |
java.lang.Object | getRecord(java.lang.String entryName) returns the record given the entry name. |
boolean | isLocked() Sets the entry without checking the accessability. |
void | lock() |
protected void | set(java.lang.String entryName, java.lang.Object entry) |
void | setEntries(java.util.Map<java.lang.String,java.lang.Object> entries) Sets the given entries to this Record.Map |
void | setEntry(java.lang.String entryName, java.lang.Object entry) Sets the given entry with the given object. |
java.lang.String | toString() |
void | unlock() |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map<java.lang.String,java.lang.Object> entries
| Constructor Detail |
|---|
public DatabaseRecord(RecordHome home,
java.lang.Object primary)
public DatabaseRecord(RecordHome home,
java.util.Map<java.lang.String,java.lang.Object> entries)
public DatabaseRecord(RecordHome home,
Record record,
java.lang.Object primary)
throws DatabaseExceptionDatabaseException| Method Detail |
|---|
public RecordHome getHome()
RecordgetHome in interface Recordpublic boolean isLocked()
public void lock()
throws DatabaseExceptionDatabaseException
public void unlock()
throws DatabaseExceptionDatabaseException
protected void set(java.lang.String entryName,
java.lang.Object entry)
throws DatabaseExceptionDatabaseException
public void setEntry(java.lang.String entryName,
java.lang.Object entry)
throws DatabaseExceptionRecordsetEntry in interface RecordentryName - the name of the entry. it can reflect a column name in a database table.entry - the value of the entry. DatabaseException - if a problem happens.
protected java.lang.Object get(java.lang.String entryName)
throws DatabaseExceptionDatabaseException
public java.lang.Object getEntry(java.lang.String entryName)
throws DatabaseExceptionRecordgetEntry in interface RecordentryName - the entry name, can be column name in a database table. DatabaseException - if a problem occurs.
public java.lang.Object getRecord(java.lang.String entryName)
throws DatabaseExceptionRecordgetRecord in interface RecordentryName - the name of the entry, can be a column name in a database table. DatabaseException - if a problem happens.
public void setEntries(java.util.Map<java.lang.String,java.lang.Object> entries)
throws DatabaseExceptionRecordsetEntries in interface Recordentries - a map containg entry names, and their values. DatabaseException - If a problem occures.
public java.util.Map<java.lang.String,java.lang.Object> getEntries()
throws DatabaseExceptionRecordgetEntries in interface RecordDatabaseException - if a problem happens.public java.lang.Object getKey()
RecordgetKey in interface Record
public void canWrite(java.lang.String entryName)
throws DatabaseExceptionRecordcanWrite in interface RecordentryName - the name of the entry. DatabaseException - if a problem happens.
public void canRead(java.lang.String entryName)
throws DatabaseExceptionRecordcanRead in interface RecordentryName - the name of the entry. DatabaseException - if a problem happens.
public void checkAlive()
throws DatabaseExceptionRecordcheckAlive in interface RecordDatabaseException - if a problem happens.public java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(Record r)
compareTo in interface java.lang.Comparable<Record>protected void finalize()
finalize in class java.lang.Object
| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||