Package be.gaudry.dao.edu.derby
Class DerbySchoolAdmin
java.lang.Object
be.gaudry.dao.edu.derby.DerbySchool
be.gaudry.dao.edu.derby.DerbySchoolAdmin
- All Implemented Interfaces:
ISchoolAdminDao
,ISchoolDao
- Since:
- 1.0 23 oct. 2008
- Author:
- Steph GAUDRY
-
Field Summary
Modifier and TypeFieldDescription(package private) PreparedStatement
(package private) PreparedStatement
Fields inherited from class be.gaudry.dao.edu.derby.DerbySchool
loadSchoolClassLazyStatement, loadSchoolClassStatement, loadSchoolLazyStatement, loadSchoolStatement
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add(SchoolClass schoolClass, Student student)
Adds a student into the school classvoid
add(SchoolClass schoolClass, Teacher teacher)
Adds a teacher into the school classvoid
Adds a teacher into the schoolint
deleteSchoolClass(int id)
int
void
remove(SchoolClass schoolClass, Student student)
Removes a student from the school classvoid
remove(SchoolClass schoolClass, Teacher teacher)
Removes a teacher from the school classvoid
Removes a teacher from the schoolint
saveOrUpdate(School school)
int
saveOrUpdate(SchoolClass item)
Methods inherited from class be.gaudry.dao.edu.derby.DerbySchool
loadAsyncSchoolClassesLos, loadAsyncSchoolClassesLos, loadAsyncSchoolsLos, loadAsyncTeachersLos, loadSchool, loadSchoolClass, loadSchoolClassesLos, loadSchoolsLos
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface be.gaudry.dao.edu.ISchoolDao
loadAsyncSchoolClassesLos, loadAsyncSchoolClassesLos, loadAsyncSchoolsLos, loadAsyncTeachersLos, loadSchool, loadSchoolClass, loadSchoolClassesLos, loadSchoolsLos
-
Field Details
-
insertSchoolStatement
PreparedStatement insertSchoolStatement -
insertSchoolClassStatement
PreparedStatement insertSchoolClassStatement
-
-
Constructor Details
-
DerbySchoolAdmin
public DerbySchoolAdmin()
-
-
Method Details
-
saveOrUpdate
- Specified by:
saveOrUpdate
in interfaceISchoolAdminDao
- Parameters:
school
- to save or update (only name and director)- Returns:
- school id (-1 if an error occurs)
-
insert
- Specified by:
insert
in interfaceISchoolAdminDao
- Returns:
- school id (-1 if an error occurs)
-
saveOrUpdate
- Specified by:
saveOrUpdate
in interfaceISchoolAdminDao
- Returns:
- SchoolClass id (-1 if an error occurs)
-
remove
Description copied from interface:ISchoolAdminDao
Removes a student from the school class- Specified by:
remove
in interfaceISchoolAdminDao
-
remove
Description copied from interface:ISchoolAdminDao
Removes a teacher from the school class- Specified by:
remove
in interfaceISchoolAdminDao
-
add
Description copied from interface:ISchoolAdminDao
Adds a student into the school class- Specified by:
add
in interfaceISchoolAdminDao
-
add
Description copied from interface:ISchoolAdminDao
Adds a teacher into the school class- Specified by:
add
in interfaceISchoolAdminDao
-
add
Description copied from interface:ISchoolAdminDao
Adds a teacher into the school- Specified by:
add
in interfaceISchoolAdminDao
-
remove
Description copied from interface:ISchoolAdminDao
Removes a teacher from the school- Specified by:
remove
in interfaceISchoolAdminDao
-
deleteSchoolClass
public int deleteSchoolClass(int id)- Specified by:
deleteSchoolClass
in interfaceISchoolAdminDao
- Returns:
- either
- the row count for (SQL) statements
- or 0 for (SQL) statements that return nothing
- or -1 if a persistent (database) error occurs
-