es.upv.dsic.gti_ia.organization
Class DataBaseAccess

java.lang.Object
  extended by es.upv.dsic.gti_ia.organization.DataBaseAccess

public class DataBaseAccess
extends Object

This class is responsible for connection and database queries.


Field Summary
 Connection connection
          The connection to the database
 
Constructor Summary
DataBaseAccess()
           
 
Method Summary
 void closeConnection()
          This method closes the connection with the database
 void connect()
          This method sets the connection with the THOMAS database
 String getAgentServices(String agentID)
          This method returns Agent Services in the THOMAS organization
 ResultSet getListEntityPlay()
          This method returns a list of entity play in the THOMAS organization
 ResultSet getListNorms()
          This method returns a list of norms in the THOMAS organization
 ResultSet getListProcess()
          This method returns a list of process id in the THOMAS organization
 ResultSet getListProcess(String profileid)
          This method returns a list of process id in the THOMAS organization with an specific id.
 ResultSet getListProfileId()
          This method returns a list of profile id in the THOMAS organization
 ResultSet getListSubUnits(String idparentunit)
          This method makes the query of the subunits in the table and returns the corresponding ResultSet.
 ResultSet getRoleList()
          This method makes the query of the roles in the table and returns the corresponding ResultSet.
 ResultSet getServiceID(String url)
          This method returns a ServiceId in the THOMAS organization
 ResultSet getUnitEntities(String unit)
          This method returns a list of specific entity units in the THOMAS organization
 ResultSet getUnitID(String unit)
          This method returns a unit id in the THOMAS organization
 ResultSet getUnitList()
          This method makes the query of the units in the table and returns the corresponding ResultSet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connection

public Connection connection
The connection to the database

Constructor Detail

DataBaseAccess

public DataBaseAccess()
Method Detail

connect

public void connect()
This method sets the connection with the THOMAS database


getUnitList

public ResultSet getUnitList()
This method makes the query of the units in the table and returns the corresponding ResultSet.

Returns:
The result of the consultation

getListSubUnits

public ResultSet getListSubUnits(String idparentunit)
This method makes the query of the subunits in the table and returns the corresponding ResultSet.

Parameters:
idparentunit - Id of parent unit.
Returns:
The result of the consultation.

getRoleList

public ResultSet getRoleList()
This method makes the query of the roles in the table and returns the corresponding ResultSet.

Returns:
The result of the consultation

closeConnection

public void closeConnection()
This method closes the connection with the database


getListNorms

public ResultSet getListNorms()
This method returns a list of norms in the THOMAS organization

Returns:
The result of the consultation

getListEntityPlay

public ResultSet getListEntityPlay()
This method returns a list of entity play in the THOMAS organization

Returns:
The result of the consultation

getListProfileId

public ResultSet getListProfileId()
This method returns a list of profile id in the THOMAS organization

Returns:
The result of the consultation

getListProcess

public ResultSet getListProcess(String profileid)
This method returns a list of process id in the THOMAS organization with an specific id.

Parameters:
profileid - is a ID profile
Returns:
The result of the consultation

getListProcess

public ResultSet getListProcess()
This method returns a list of process id in the THOMAS organization

Returns:
The result of the consultation

getUnitEntities

public ResultSet getUnitEntities(String unit)
This method returns a list of specific entity units in the THOMAS organization

Parameters:
unit -
Returns:

getUnitID

public ResultSet getUnitID(String unit)
This method returns a unit id in the THOMAS organization

Parameters:
unit - name of unit

getServiceID

public ResultSet getServiceID(String url)
This method returns a ServiceId in the THOMAS organization

Parameters:
url - url process
Returns:

getAgentServices

public String getAgentServices(String agentID)
This method returns Agent Services in the THOMAS organization

Parameters:
agentID -
Returns:


Copyright © 2012 GTI-IA. All Rights Reserved.