Package org.photovault.dbhelper

Examples of org.photovault.dbhelper.ODMGXAWrapper.commit()


            ODMGXAWrapper txw = new ODMGXAWrapper();
            txw.lock( this, Transaction.WRITE );
            txw.lock( i, Transaction.WRITE );
            instances.remove( i );
            i.delete();
            txw.commit();
        }
        log.debug( "exit: purgeInvalidInstances" );       
    }

    /**
 
View Full Code Here


                allowedOps, minInstanceWidth, minInstanceHeight );
       
        if ( original == null ) {
            // If there are no uncorrupted instances, no thumbnail can be created
            log.warn( "Error - no original image was found!!!" );
            txw.commit();
            return;
        }
        txw.lock( original, Transaction.READ );
        log.debug( "Found original, reading it..." );
       
View Full Code Here

            log.warn( "Error reading image: " + e.getMessage() );
            // TODO: If we aborted here due to image writing problem we would have
            // problems later with non-existing transaction. We should really
            // rethink the error handling logic in the whole function. Anyway, we
            // haven't changed anything yet so we can safely commit the tx.
            txw.commit();
            return;
        }
        log.debug( "Done, finding name" );
       
        // Find where to store the file in the target volume
View Full Code Here

                    ": " + ex.getMessage() );
            // TODO: If we abort here due to image writing problem we will have
            // problems later with non-existing transaction. We should really
            // rethink the error handling login in the whole function. Anyway, we
            // haven't changed anything yet so we can safely commit the tx.
            txw.commit();
            return;
        }
       
        // add the created instance to this persistent object
        ImageInstance thumbInstance = addInstance( volume, thumbnailFile,
View Full Code Here

                        ": " + ex.getMessage() );
                // TODO: If we abort here due to image writing problem we will have
                // problems later with non-existing transaction. We should really
                // rethink the error handling login in the whole function. Anyway, we
                // haven't changed anything yet so we can safely commit the tx.
                txw.commit();
                return;
            }
            ImageInstance previewInstance = addInstance( volume, previewFile,
                    ImageInstance.INSTANCE_TYPE_MODIFIED );
            previewInstance.setColorChannelMapping( channelMap );
View Full Code Here

            ImageInstance previewInstance = addInstance( volume, previewFile,
                    ImageInstance.INSTANCE_TYPE_MODIFIED );
            previewInstance.setColorChannelMapping( channelMap );
            previewInstance.setRawSettings( rawSettings );
        }
        txw.commit();
    }
   
    /**
     Helper function to save a rendered image to file
     @param instanceFile The file into which the image will be saved
View Full Code Here

            }
        }
        if ( original == null ) {
            // If there are no instances, nothing can be exported
            log.warn( "Error - no original image was found!!!" );
            txw.commit();
            throw new PhotovaultException( "No image file found to export photo" );
        }
       
        // Read the image
        RenderedImage exportImage = null;
View Full Code Here

            log.warn( "Error writing exported image: " + e.getMessage() );
            txw.abort();
            throw new PhotovaultException( "Error writing exported image: " + e.getMessage(), e );
        }
       
        txw.commit();
    }
   
   
    /**
     MD5 hash code of the original instance of this PhotoInfo. It must is stored also
View Full Code Here

     */
    protected void setOrigInstanceHash( byte[] hash ) {
        ODMGXAWrapper txw = new ODMGXAWrapper();
        txw.lock( this, Transaction.WRITE );
        origInstanceHash = (byte[]) hash.clone();
        txw.commit();
    }
   
    java.util.Date shootTime;
   
    /**
 
View Full Code Here

     @return value of shootTime.
     */
    public java.util.Date getShootTime() {
        ODMGXAWrapper txw = new ODMGXAWrapper();
        txw.lock( this, Transaction.READ );
        txw.commit();
        return shootTime != null ? (java.util.Date) shootTime.clone() : null;
    }
   
    /**
     * Set the value of shootTime.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.