gov.nasa.pds.report.update.db
Class DBUtil

java.lang.Object
  extended by gov.nasa.pds.report.update.db.DatabaseManager
      extended by gov.nasa.pds.report.update.db.DBUtil

public class DBUtil
extends DatabaseManager

Author:
jpadams

Field Summary
 
Fields inherited from class gov.nasa.pds.report.update.db.DatabaseManager
conn, dbProps, log
 
Constructor Summary
DBUtil(String path)
           
 
Method Summary
 void createNew(Profile profile)
           
 List<Profile> findAllProfiles()
          Query the database for all active profiles
 Profile findByProfileId(int profileId)
          Query the report service database for a specific profile by ID
 Profile findByProfileName(String profileName)
          Query the report service database for a specific profile by ID
 void insertLogInfo(LogSet logSet)
           
 void insertProfile(Profile profile)
           
 void removeLogInfo(int id)
           
 void update(List<LogSet> lsList, int profileId)
           
 void updateLogInfo(LogSet logSet)
           
 void updateProfile(Profile profile)
           
 
Methods inherited from class gov.nasa.pds.report.update.db.DatabaseManager
closeConnect, connect, executeUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBUtil

public DBUtil(String path)
       throws FileNotFoundException
Parameters:
path -
Throws:
FileNotFoundException
Method Detail

findByProfileId

public final Profile findByProfileId(int profileId)
                              throws SQLException
Query the report service database for a specific profile by ID

Parameters:
profileId -
Returns:
Profile object
Throws:
SQLException

findByProfileName

public final Profile findByProfileName(String profileName)
                                throws SQLException
Query the report service database for a specific profile by ID

Parameters:
profileName -
Returns:
Profile object
Throws:
SQLException

findAllProfiles

public final List<Profile> findAllProfiles()
                                    throws SQLException
Query the database for all active profiles

Returns:
List<Profile>
Throws:
SQLException

createNew

public final void createNew(Profile profile)
                     throws SQLException
Parameters:
profile -
Throws:
SQLException

update

public final void update(List<LogSet> lsList,
                         int profileId)
                  throws SQLException
Parameters:
lsList -
profileId -
Throws:
SQLException

removeLogInfo

public final void removeLogInfo(int id)
                         throws SQLException
Parameters:
id -
Throws:
SQLException

updateProfile

public final void updateProfile(Profile profile)
                         throws SQLException
Parameters:
profile -
Throws:
SQLException

updateLogInfo

public final void updateLogInfo(LogSet logSet)
                         throws SQLException
Parameters:
logSet -
Throws:
SQLException

insertProfile

public final void insertProfile(Profile profile)
                         throws SQLException
Parameters:
profile -
Throws:
SQLException

insertLogInfo

public final void insertLogInfo(LogSet logSet)
                         throws SQLException
Parameters:
logSet -
Throws:
SQLException


Copyright © 2010-2014 Planetary Data System. All Rights Reserved.