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
FieldsModifier and TypeFieldDescription(package private) PreparedStatement(package private) PreparedStatementFields inherited from class be.gaudry.dao.edu.derby.DerbySchool
loadSchoolClassLazyStatement, loadSchoolClassStatement, loadSchoolLazyStatement, loadSchoolStatement - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidadd(SchoolClass schoolClass, Student student)Adds a student into the school classvoidadd(SchoolClass schoolClass, Teacher teacher)Adds a teacher into the school classvoidAdds a teacher into the schoolintdeleteSchoolClass(int id)intvoidremove(SchoolClass schoolClass, Student student)Removes a student from the school classvoidremove(SchoolClass schoolClass, Teacher teacher)Removes a teacher from the school classvoidRemoves a teacher from the schoolintsaveOrUpdate(School school)intsaveOrUpdate(SchoolClass item)Methods inherited from class be.gaudry.dao.edu.derby.DerbySchool
loadAsyncSchoolClassesLos, loadAsyncSchoolClassesLos, loadAsyncSchoolsLos, loadAsyncTeachersLos, loadSchool, loadSchoolClass, loadSchoolClassesLos, loadSchoolsLosMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
 saveOrUpdatein interfaceISchoolAdminDao- Parameters:
 school- to save or update (only name and director)- Returns:
 - school id (-1 if an error occurs)
 
 - 
insert
- Specified by:
 insertin interfaceISchoolAdminDao- Returns:
 - school id (-1 if an error occurs)
 
 - 
saveOrUpdate
- Specified by:
 saveOrUpdatein interfaceISchoolAdminDao- Returns:
 - SchoolClass id (-1 if an error occurs)
 
 - 
remove
Description copied from interface:ISchoolAdminDaoRemoves a student from the school class- Specified by:
 removein interfaceISchoolAdminDao
 - 
remove
Description copied from interface:ISchoolAdminDaoRemoves a teacher from the school class- Specified by:
 removein interfaceISchoolAdminDao
 - 
add
Description copied from interface:ISchoolAdminDaoAdds a student into the school class- Specified by:
 addin interfaceISchoolAdminDao
 - 
add
Description copied from interface:ISchoolAdminDaoAdds a teacher into the school class- Specified by:
 addin interfaceISchoolAdminDao
 - 
add
Description copied from interface:ISchoolAdminDaoAdds a teacher into the school- Specified by:
 addin interfaceISchoolAdminDao
 - 
remove
Description copied from interface:ISchoolAdminDaoRemoves a teacher from the school- Specified by:
 removein interfaceISchoolAdminDao
 - 
deleteSchoolClass
public int deleteSchoolClass(int id)- Specified by:
 deleteSchoolClassin 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
 
 
 
 -