|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.peter.db.DBAccess | +--com.peter.subject.DBSubject
This class handles the queries to the Database. It is ment to be used for Subject.
Constructor Summary | |
DBSubject(DBConHandler handler)
The constructor for this object |
Method Summary | |
int |
addSubject(Subject subject)
Adds one Subject to the database. |
int |
deleteSubject(Subject subject)
Deleting one Subject from the database. |
Subject[] |
getSubjectFromDBM(DBMatrix dbm)
Returns an array of fetched Subject from the database. |
Subject[] |
getSubjects()
Fetch an array of Subject from the database. |
Subject[] |
getSubjects(Subject subject)
Fetch an array of Subject from the database, with the same value as each variable in subject has. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DBSubject(DBConHandler handler)
handler
- The handler to use for SQL-queriesMethod Detail |
public Subject[] getSubjectFromDBM(DBMatrix dbm)
dbm
- The DBMatrixpublic int addSubject(Subject subject)
Adds one Subject to the database.
subject
- A Subjectpublic int deleteSubject(Subject subject)
Deleting one Subject from the database.
subject
- A Subjectpublic Subject[] getSubjects()
Fetch an array of Subject from the database.
public Subject[] getSubjects(Subject subject)
Fetch an array of Subject from the database, with the same value as each variable in subject has.
subject
- An Subject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |