University Admission System

aquahellishSoftware and s/w Development

Dec 13, 2013 (3 years and 6 months ago)

92 views

























University Admission System

Data Access Layer Detailed Design



Author:


Yasser Sayed

Version:

1.0

Released
:

February 7, 2009
University Admission System


Nile University

Data Access Layer Detailed Design

Version:
1.0


Released
:
February 7, 2009

2


Table of Contents

1.

INTRODUCTION

................................
................................
................................
............................

3

1.1.

B
ACKGROUND
................................
................................
................................
................................
...

3

1.2.

P
URPOSE

................................
................................
................................
................................
........

3

1.3.

A
SSUMPTIONS

................................
................................
................................
................................
..

3

1.4.

O
UTSTANDING ISSUES

................................
................................
................................
........................

3

1.5.

L
IMITATIONS

................................
................................
................................
................................
...

3

2.

IMPLEMENTATION

................................
................................
................................
........................

4

2.1.

G
ENERAL DESIGN APPROA
CHES

................................
................................
................................
.............

4

2.2.

D
ESIGN OVERVIEW AND I
NTERACTIONS

................................
................................
................................
...

4

2.2.1.

Hibernate configuratio
n/mapping files
................................
................................
.....................

4

2.2.2.

Data classes

................................
................................
................................
..........................

4

2.2.3.

DAO interfaces

................................
................................
................................
......................

5

2.2.4.

Hibernate interfaces/classes

................................
................................
................................
...

6

2.3.

C
OMPONENTS DETAILED D
ESIGN

................................
................................
................................
...........

6

2.3.1.

Package eg.edu.nileu.ums.admission.dao

................................
................................
................

6

2.3.2.

Package eg.edu.nileu.ums.admission.dao.hibernate

................................
................................
.

7

2.3.3.

Package eg.edu.nileu.ums.admission.dao.hibernate.util

................................
...........................

8

2.4.

E
XTERNAL LIBRARIES
/
COMPONENTS USED

................................
................................
................................

8

2.5.

R
UNTIME ENVIRONMENT

................................
................................
................................
.....................

8

3.

DOCUMEN
T CONTROL

................................
................................
................................
...................

9

3.1.

R
EFERENCES

................................
................................
................................
................................
....

9

3.2.

D
OCUMENT HISTORY

................................
................................
................................
..........................

9


University Admission System


Nile University

Data Access Layer Detailed Design

Version:
1.0


Released
:
February 7, 2009

3


1.

Introduction

1.1.

Background

The architecture
of the University Admission System is divided into:

1.

The data

access

layer.

2.

The service layer.

3.

The front end.

The front end is responsible for interacting with the different users of the system and
serving their requests using the functionalities exposed by

the service layer. The data
access
layer provides lower
-
level CRUD operations for the data.


The overall functionality of the University Admission System can be divided into:

1.

Designing application forms, and overall administration of the system. This part

is
hereafter referred to as “Administration”

2.

Exposing the application forms to applicants so that they can fill and submit them.
This part is hereafter referred to as “Runtime”

3.

Exposing the applications to the admissions personnel so that they can execute

actions on them. This part is hereafter referred to as “Admission”.

Each of the above mentioned functionalities has a corresponding part in the front end.

1.2.

Purpose

The purpose of this document is to specify the design for the
data access layer part

as a
gu
ide to the subsequent coding activities to implement these parts.

1.3.

Assumptions

ID

Description





1.4.

Outstanding issues

ID

Description





1.5.

Limitations

ID

Description





University Admission System


Nile University

Data Access Layer Detailed Design

Version:
1.0


Released
:
February 7, 2009

4


2.

Implementation

2.1.

General design approaches



Use the hibernate frame work.



The data a
ccess layer is divided into
.

1.

Hibernate configuration/mapping files

2.

Data c
lasse
s
.

3.

DAO
i
nterfaces.

4.

Hibernate interfaces/c
lass
es
.




2.2.

Design overview

and interactions

2.2.1.

Hibernate configuration/mapping files

Files used to configure the connection to the database be
side the mapping between the
data classes and the database tables.

Configuration File:

-

hibernate.cfg.xml

Mapping Files:

-

Map file for each data class.

2.2.2.

Data classes

Simple java bean classes has a direct map to the database through hibernate framework
mapping

files

Classes:

1
-

Entity
:

represent an entity in the system
which can be (Basic or Extended)
and hold the main common attributes of the entity to be inherited by the
following classes

a.

ApplicationSummary
:

(Basic) represent the Applicant data
which hold
all th
e basic attribute that commonly needed for the
Applicant

as a
summarization for the attributes of the whole application to optimize
the time retrieving the data from the data source and to leave non
commonly used attribute to be included at the following c
lass.

i.

Application
:

which inherit from Application summary and
provide the extra attributes mi
ght needed about the applicant
.

b.

ExtendedEntity
:

(hold all Extended entities)
which also inherit from
Entit
y and hold all the custom entities

“extended” that should

be
created through the administration interface and it holds a list of
attributes
.

c.

Education

hold the education history of the applicant.

2
-

ApplicationDef
: hold the data that define the application form view that
should be viewed to the use that use the app
lication form from the web.

University Admission System


Nile University

Data Access Layer Detailed Design

Version:
1.0


Released
:
February 7, 2009

5


3
-

Attachment
: hold the data of the attachment including the binary format of
the attachment itself and which entity associated with and related for which
application “Applicant”

4
-

AttributeDef
:
hold all
data that define
the attribut
es of the systems which
include attributes at Basic entities and others at extended entities, and all
these

attributes could be basic attributes or extended attributes.

5
-

EntityDef
:

hold all definition data that define the entities of the system
include basi
c and extended entities.

6
-

ExtendedAttribute
: represent the attributes of the Basic/extended entities
and so a list of this should be holded by the extended entity.

7
-

FieldDef
: hold a data that define the view

of

fie
l
d inside a groupDef

8
-

GroupDef
: hold a data

that define the view
of
group inside a step of StepDef

9
-

Program
:
hold all
the
university
program
s

provided and each application form
should be associated with one program which
applicant
should apply

for
.

10
-

Semester
: hold all the semesters available with sta
rt dates of the semester
and available dates for the admission of that semesters and the application
should be associated also one or more semesters.

11
-

ServiceProperty
: hold some key , value configuration internally needed for
the system.

12
-

StepDef
:

hold a da
ta that define the view

of

step (page) in the
applicationDef.

13
-

Type
: hold the primitive types and custom types that should be used by the
attributes.

14
-

TypeValue
: hold a range of values of a custom type of “Type”.

2.2.3.

DAO interfaces

-

DAO interface

Provide the fo
llowing methods:

o

getById(ID id).

o

getAll()

o

delete(T entity)

o

deleteById(ID id)

-

DAO
Interface
s each

for each class in the data classes

that inherit from DAO
interface
.

o

Convention name should be “<
data class
name>DAO” for example
“ApplicationDAO”.

-

AbstractDAO
Factory

Provide a “get” method for each DAO class

with a convention name
“get<DAO interface name>”



University Admission System


Nile University

Data Access Layer Detailed Design

Version:
1.0


Released
:
February 7, 2009

6


2.2.4.

Hibernate interfaces/classes

-

HiberanteUtil class : retrieve hibernate session

-

AbstractHibernateDAO interface

o

R
etrieve hibernate
s
ession from Hibernate
Util

class.

-

Hibernate

DAO
C
lasses each one implement the
corresponding
DAO interface

and inherit from the interface AbstractHibernateDAO
.

o

Convention name “<
data class name
>
HibernateDAO


-

HibernateDAOFactory:

o

Inherit from the AbstractDAOFactory and provide th
e implementation
for each get method
at (AbstractDAOFactory)
to return the class
that
implement
the
corresponding

DAO interface

from the Hibernate DAO
classes
.



2.3.

Components detailed design

2.3.1.

Package eg.edu.nileu.ums.admission.dao

Interface Summary

Applicat
ionDAO



Represent the DAO interface to the Application class

ApplicationDefDAO



Represent the DAO interface to the ApplicationDef class

ApplicationSummaryDAO



Represent the DAO interface to the ApplicationSummary class

AttachmentDAO



Represent the D
AO interface to the Attachment class

AttributeDefDAO



Represent the DAO interface to the AttributeDef class

DAO<T,ID>


The DAO interface which provide basic methods to CRUD
operation and object T of the database


EducationDAO



Represent the DAO interf
ace to the Education class

EntityDAO



Represent the DAO interface to the Entity class

EntityDefDAO



Represent the DAO interface to the EntityDef class

ExtendedAttributeDAO



Represent the DAO interface to the ExtendedAttribute class

ExtendedEntityDAO



Represent the DAO interface to the ExtendedEntity class

FieldDefDAO



Represent the DAO interface to the FieldDef class

GroupDefDAO



Represent the DAO interface to the GroupDef class

ProgramDAO



Represent the DAO interface to the Program class

Sem
esterDAO



Represent the DAO interface to the Semester class

ServicePropertyDAO



Represent the DAO interface to the ServiceProperty class

SortableEntity



StepDefDAO



Represent the DAO interface to the StepDef class

TypeDAO



Represent the DAO interf
ace to the Type class

TypeValueDAO


Represent the DAO interface to the Type Value class




Class Summary

AbstractDAOFactory




Application




ApplicationDef




ApplicationSummary




ApplicationSummaryOrderingCriteria




University Admission System


Nile University

Data Access Layer Detailed Design

Version:
1.0


Released
:
February 7, 2009

7


Class Summary

ApplicationSummarySearchCrit
eria




Attachment




AttributeDef




DAOUtil




Education




Entity




EntityDef




ExtendedAttribute




ExtendedEntity




FieldDef




GroupDef




Program




Semester




ServiceProperty




StepDef




Type




TypeValue






Enum Summary

A
pplicationSummaryOrderingField


2.3.2.

Package eg.edu.nileu.ums.admission.dao.hibernate

Class Summary

AbstractHibernateDAO<T,ID extends
Serializable>




ApplicationDefHibernateDAO




ApplicationHibernateDAO




ApplicationSummaryHibernateDAO




AttachmentHi
bernateDAO




AttributeDefHibernateDAO




EducationHibernateDAO




EntityDefHibernateDAO




EntityHibernateDAO




ExtendedAttributeHibernateDAO




ExtendedEntityHibernateDAO




FieldDefHibernateDAO




GroupDefHibernateDAO




HibernateDAOFactory




ProgramHibernateDAO




SemeterHibernateDAO




ServicePropertyHibernateDAO




StepDefHibernateDAO




TypeHibernateDAO




TypeValueHibernateDAO






University Admission System


Nile University

Data Access Layer Detailed Design

Version:
1.0


Released
:
February 7, 2009

8


2.3.3.

Package eg.edu.nileu.ums.admission.dao.hibernate.util

Class Summary

HibernateUtil





2.4.

External lib
raries/components used

-

Hibernate library

-

My SQL library

2.5.

Runtime environment

Server
:
Apache Tomcat Application Server v6.0.16

Database:
My SQL

as an example (can be configured to any database through the
hibernate.cfg.xml file)

University Admission System


Nile University

Data Access Layer Detailed Design

Version:
1.0


Released
:
February 7, 2009

9


3.

Document control

3.1.

References

#

Title

Version

1

Software Architecture

1.0




3.2.

Document history

Version

Date

Description

Author

1.0

07/02/2009

Initial

version
.

Yasser Sayed