Java Doc for DatabaseImpl.java in  » Database-ORM » Speedo_1.4.5 » org » objectweb » speedo » j2eedo » bo » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » Speedo_1.4.5 » org.objectweb.speedo.j2eedo.bo 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.objectweb.speedo.j2eedo.bo.DatabaseImpl

DatabaseImpl
public class DatabaseImpl (Code)
This class handle each request on the J2EEDO application. The doAction() method performs the current requested action.

It starts and commits a transaction if needed

Call the asked action. When the action in the DatabaseImpl.actionArray action list , the 3 local static lists of id (department, employee and project) are redefined.


author:
   fmillevi@yahoo.com


Field Summary
final public static  StringPARAMETER_EVICTALL
    
final public static  StringPARAMETER_GET_DEPARTMENT
    
final public static  StringPARAMETER_GET_EMPLOYEE
    
final public static  StringPARAMETER_GET_PROJECT
    
final public static  StringPARAMETER_INCREASE_SALARY
     Defines the action PARAMETER_INCREASE_SALARY its value is ("incSalary") for good folsk only...
final public static  StringPARAMETER_MERGE_DEPARTMENT
    
final public static  StringPARAMETER_NEW_DEPARTMENT
     Defines the action PARAMETER_NEW_DEPARTMENT its value is ("newDept")

This action Creates a new department and some new employees (random number defined between 10 and 70).

final public static  StringPARAMETER_NEW_EMPLOYEE
     Defines the action PARAMETER_NEW_EMPLOYEE its value is ("newEmp")

Selects one of the known departments and creates a new employee.

final public static  StringPARAMETER_NEW_PROJECT
     Defines the action PARAMETER_NEW_PROJECT its value is ("newProj")

This action Creates a new project and affect few employees (random number defined between 5 and 20).

final public static  StringPARAMETER_PING
    
final public static  StringPARAMETER_QUERY_EMPLOYEES
    
final public static  StringPARAMETER_QUERY_PROJECTS
    
final public static  StringPARAMETER_REM_EMPLOYEE
    
final public static  StringPARAMETER_REM_PROJECT
    
final public static  StringPARAMETER_SET_BOSS
    
final public static  StringPARAMETER_SPLIT_DEPARTMENT
    
final public static  StringPARAMETER_SPLIT_PROJECT
    
final public static  intREAD
    
final public static  intWRITE
    
final public static  StringactionArray
    
final public static  intactionWeightArray
    
final public static  DatabaseImplinstance
    
static  Loggerlogger
    
final public static  VectorpoolOfDepartmentId
     The Vector poolOfDepartmentId is a static list of known departmentId used to keep in mind the list of department without doing any JDO request.
final public static  VectorpoolOfEmployeeId
     The Vector poolOfEmployeeId is a static list of known employeeId used to keep in mind the list of employee without doing any JDO request.
final public static  VectorpoolOfProjectId
     The Vector poolOfProjectId is a static list of known projectId used to keep in mind the list of project without doing any JDO request.


Method Summary
public  StringdoAction(String action, boolean performCommit, PMHolder pmHolder)
     This method initialize the action to be performed, enables or disables transaction management according the parameter withTransaction and calls the private doAction() method.
public static  longgetDepartmentIdFromPool()
    
public static  longgetEmployeeIdFromPool()
    
public static  longgetProjectIdFromPool()
    
public static  voidinitTestData(PMHolder pmHolder)
    

Field Detail
PARAMETER_EVICTALL
final public static String PARAMETER_EVICTALL(Code)



PARAMETER_GET_DEPARTMENT
final public static String PARAMETER_GET_DEPARTMENT(Code)
Defines the action PARAMETER_GET_DEPARTMENT its value is ("getDepartment")
See Also:   DepartmentFactory.getDepartment



PARAMETER_GET_EMPLOYEE
final public static String PARAMETER_GET_EMPLOYEE(Code)
Defines the action PARAMETER_GET_EMPLOYEE its value is ("getEmployee")
See Also:   EmployeeFactory.getEmployees



PARAMETER_GET_PROJECT
final public static String PARAMETER_GET_PROJECT(Code)
Defines the action PARAMETER_GET_PROJECT its value is ("getProject")
See Also:   ProjectFactory.getProject



PARAMETER_INCREASE_SALARY
final public static String PARAMETER_INCREASE_SALARY(Code)
Defines the action PARAMETER_INCREASE_SALARY its value is ("incSalary") for good folsk only...
See Also:   EmployeeFactory.increaseSalary



PARAMETER_MERGE_DEPARTMENT
final public static String PARAMETER_MERGE_DEPARTMENT(Code)
Defines the action PARAMETER_MERGE_DEPARTMENT its value is ("mergeDept")
See Also:   DepartmentFactory.mergeDepartment



PARAMETER_NEW_DEPARTMENT
final public static String PARAMETER_NEW_DEPARTMENT(Code)
Defines the action PARAMETER_NEW_DEPARTMENT its value is ("newDept")

This action Creates a new department and some new employees (random number defined between 10 and 70).


See Also:   DepartmentFactory.MIN_EMPLOYEE_PER_DEPARTMENT
See Also:   DepartmentFactory.MAX_EMPLOYEE_PER_DEPARTMENT
See Also:   DepartmentFactory.newDepartmentWithEmployees



PARAMETER_NEW_EMPLOYEE
final public static String PARAMETER_NEW_EMPLOYEE(Code)
Defines the action PARAMETER_NEW_EMPLOYEE its value is ("newEmp")

Selects one of the known departments and creates a new employee.


See Also:   EmployeeFactory.newEmployee



PARAMETER_NEW_PROJECT
final public static String PARAMETER_NEW_PROJECT(Code)
Defines the action PARAMETER_NEW_PROJECT its value is ("newProj")

This action Creates a new project and affect few employees (random number defined between 5 and 20).


See Also:   ProjectFactory.MIN_MEMBER_PER_PROJECT
See Also:   ProjectFactory.MAX_MEMBER_PER_PROJECT
See Also:   ProjectFactory.newProjectWithEmployees



PARAMETER_PING
final public static String PARAMETER_PING(Code)
Defines the action PARAMETER_PING its value is ("ping")

This action is use just to check if the application can be reached




PARAMETER_QUERY_EMPLOYEES
final public static String PARAMETER_QUERY_EMPLOYEES(Code)
Defines the action PARAMETER_QUERY_EMPLOYEES its value is ("queryEmployees")

Performs one of the two queries:

  • Get project by its id,
  • Get projects by member.


See Also:   ProjectFactory.getProjects



PARAMETER_QUERY_PROJECTS
final public static String PARAMETER_QUERY_PROJECTS(Code)
Defines the action PARAMETER_QUERY_PROJECTS its value is ("queryProjects")

Performs one of the four queries:

  • Get employee by its id,
  • Get employees between min and max,
  • Get employees having the same manager,
  • Get employees member of a project.


See Also:   EmployeeFactory.getEmployees



PARAMETER_REM_EMPLOYEE
final public static String PARAMETER_REM_EMPLOYEE(Code)
Defines the action PARAMETER_REM_EMPLOYEE its value is ("delEmployee")
See Also:   EmployeeFactory.deleteEmployee



PARAMETER_REM_PROJECT
final public static String PARAMETER_REM_PROJECT(Code)
Defines the action PARAMETER_REM_PROJECT its value is ("delProject")
See Also:   ProjectFactory.deleteProject



PARAMETER_SET_BOSS
final public static String PARAMETER_SET_BOSS(Code)
Defines the action PARAMETER_SET_BOSS its value is ("setDeptBoss")
See Also:   DepartmentFactory.setManagerForADepartment



PARAMETER_SPLIT_DEPARTMENT
final public static String PARAMETER_SPLIT_DEPARTMENT(Code)
Defines the action PARAMETER_SPLIT_DEPARTMENT its value is ("splitDepartment")
See Also:   DepartmentFactory.splitDepartment



PARAMETER_SPLIT_PROJECT
final public static String PARAMETER_SPLIT_PROJECT(Code)
Defines the action PARAMETER_SPLIT_PROJECT its value is ("splitProject")
See Also:   ProjectFactory.splitProject



READ
final public static int READ(Code)



WRITE
final public static int WRITE(Code)



actionArray
final public static String actionArray(Code)
The String array actionArray gives the liste of actions avalaibles



actionWeightArray
final public static int actionWeightArray(Code)
The double dimension array actionWeightArray gives for each action the relative read and write weight
See Also:   DatabaseImpl.actionArray



instance
final public static DatabaseImpl instance(Code)



logger
static Logger logger(Code)



poolOfDepartmentId
final public static Vector poolOfDepartmentId(Code)
The Vector poolOfDepartmentId is a static list of known departmentId used to keep in mind the list of department without doing any JDO request.

This is a local cache




poolOfEmployeeId
final public static Vector poolOfEmployeeId(Code)
The Vector poolOfEmployeeId is a static list of known employeeId used to keep in mind the list of employee without doing any JDO request.

This is a local cache




poolOfProjectId
final public static Vector poolOfProjectId(Code)
The Vector poolOfProjectId is a static list of known projectId used to keep in mind the list of project without doing any JDO request.

This is a local cache






Method Detail
doAction
public String doAction(String action, boolean performCommit, PMHolder pmHolder)(Code)
This method initialize the action to be performed, enables or disables transaction management according the parameter withTransaction and calls the private doAction() method.
Parameters:
  parameter - is the action to be performed
Parameters:
  withTransaction - is a boolean use to enable or disable the use of transaction threatment result as String
throws:
  JDOException -
throws:
  Exception -



getDepartmentIdFromPool
public static long getDepartmentIdFromPool()(Code)
Returns one of the existing department id a department id



getEmployeeIdFromPool
public static long getEmployeeIdFromPool()(Code)
Returns one of the existing employee id a employee id



getProjectIdFromPool
public static long getProjectIdFromPool()(Code)
Returns one of the existing project id a project id



initTestData
public static void initTestData(PMHolder pmHolder) throws JDOException, Exception(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.