Subversion Repositories DevTools

Rev

Rev 7114 | Rev 7163 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7114 Rev 7137
Line 398... Line 398...
398
     *  @param  connection      - Connection to use 
398
     *  @param  connection      - Connection to use 
399
     */
399
     */
400
    private RmConnection connect( RmConnection rmc ) throws SQLException
400
    private RmConnection connect( RmConnection rmc ) throws SQLException
401
    {
401
    {
402
        mLogger.debug("connect");
402
        mLogger.debug("connect");
-
 
403
        
-
 
404
        //  Reset the internal package caching mechanism
-
 
405
        findPackageResetCache();
403
 
406
 
404
        try
407
        try
405
        {
408
        {
406
            if ( rmc.mSession.isHeldByCurrentThread() )
409
            if ( rmc.mSession.isHeldByCurrentThread() )
407
            {
410
            {
Line 2484... Line 2487...
2484
     */
2487
     */
2485
    protected void queryPackageVersions(RippleEngine rippleEngine, ArrayList<Package> packageCollection, int baseline) throws SQLException, Exception
2488
    protected void queryPackageVersions(RippleEngine rippleEngine, ArrayList<Package> packageCollection, int baseline) throws SQLException, Exception
2486
    {
2489
    {
2487
        Phase phase = new Phase("rmData");
2490
        Phase phase = new Phase("rmData");
2488
        mLogger.debug("queryPackageVersions {}", mDaemon);
2491
        mLogger.debug("queryPackageVersions {}", mDaemon);
2489
 
2492
        
2490
        try
2493
        try
2491
        {
2494
        {
2492
            if (mDaemon)
2495
            if (mDaemon)
2493
            {
2496
            {
2494
                // Get package information on ALL released packages within the release of interest
2497
                // Get package information on ALL released packages within the release of interest
Line 3607... Line 3610...
3607
     */
3610
     */
3608
    int findPackageLastId = 0;
3611
    int findPackageLastId = 0;
3609
    int findPackageLastIndex = 0;
3612
    int findPackageLastIndex = 0;
3610
    Package findPackageLastPackage = NULL_PACKAGE;
3613
    Package findPackageLastPackage = NULL_PACKAGE;
3611
    
3614
    
-
 
3615
    /**
-
 
3616
     * Reset the values cached by findPackage
-
 
3617
     * Needed when a new plan is started as the only package versions are stale
-
 
3618
     */
-
 
3619
    public void findPackageResetCache() {
-
 
3620
        findPackageLastId = 0;
-
 
3621
        findPackageLastIndex = 0;
-
 
3622
        findPackageLastPackage = NULL_PACKAGE;
-
 
3623
    }
-
 
3624
 
3612
    public Package findPackage(int id, ArrayList<Package> packageCollection)
3625
    public Package findPackage(int id, ArrayList<Package> packageCollection)
3613
    {
3626
    {
3614
        mLogger.debug("findPackage id {}", id);
3627
        mLogger.debug("findPackage id {}", id);
3615
        Package retVal = NULL_PACKAGE;
3628
        Package retVal = NULL_PACKAGE;
3616
        
3629
        
Line 3670... Line 3683...
3670
        }
3683
        }
3671
 
3684
 
3672
        mLogger.info("findPackage alias {} returned {}", alias, retVal.mName);
3685
        mLogger.info("findPackage alias {} returned {}", alias, retVal.mName);
3673
        return retVal;
3686
        return retVal;
3674
    }
3687
    }
-
 
3688
    
-
 
3689
    
3675
 
3690
 
3676
    /**only used in daemon mode to determine version existence in the database
3691
    /**only used in daemon mode to determine version existence in the database
3677
     *  1 select pkg_id from release_manager.package_versions where pkg_id=<pkg_id> and pkg_version=<pkg_version>;
3692
     *  1 select pkg_id from release_manager.package_versions where pkg_id=<pkg_id> and pkg_version=<pkg_version>;
3678
     *  2 select pkg_id from release_manager.planned_versions where pkg_id=<pkg_id> and pkg_version=<pkg_version>;
3693
     *  2 select pkg_id from release_manager.planned_versions where pkg_id=<pkg_id> and pkg_version=<pkg_version>;
3679
     * returns true if either resultset contains one record to indicate it already exists
3694
     * returns true if either resultset contains one record to indicate it already exists