Package org.photovault.dbhelper

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


         */
        public ColorProfileDesc execute() {
            log.debug( "CreateProfile#execute: " + name );
            ODMGXAWrapper txw = new ODMGXAWrapper();
            ColorProfileDesc p = new ColorProfileDesc();
            txw.lock( p, Transaction.WRITE );
            p.setName( name );
            p.setDescription( description );
           
            // Copy the file to the default volume
            VolumeBase defvol = VolumeBase.getDefaultVolume();
View Full Code Here


            i.volumeId = defvol.getName();
            i.profileId = p.id;
           
           
            p.addInstance( i );
            txw.lock( i, Transaction.WRITE );
            txw.commit();
            return p;
        }
    }
   
View Full Code Here

        /**
         * Do the changes to profile.
         */
        public void execute() {
            ODMGXAWrapper txw = new ODMGXAWrapper();
            txw.lock( p, Transaction.WRITE );
            if ( newName != null ) {
                p.setName( newName );
            }
            if ( newDesc != null ) {
                p.setDescription( newDesc );
View Full Code Here

     indicate that the image should be rotated clockwise.
     @return value of prefRotation.
     */
    public double getPrefRotation() {
        ODMGXAWrapper txw = new ODMGXAWrapper();
        txw.lock( this, Transaction.READ );
        txw.commit();
        return prefRotation;
    }
   
    /**
 
View Full Code Here

        while ( v >= 360.0 ) {
            v -= 360.0;
        }
       
        ODMGXAWrapper txw = new ODMGXAWrapper();
        txw.lock( this, Transaction.WRITE );
        if ( v != prefRotation ) {
            // Rotation changes, invalidate the thumbnail
            invalidateThumbnail();
            purgeInvalidInstances();
        }
View Full Code Here

     Get the preferred crop bounds of the original image
     */
    public Rectangle2D getCropBounds() {
        ODMGXAWrapper txw = new ODMGXAWrapper();
        checkCropBounds();
        txw.lock( this, Transaction.READ );
        txw.commit();
        return new Rectangle2D.Double( cropMinX, cropMinY,
                cropMaxX-cropMinX, cropMaxY-cropMinY );
    }
   
View Full Code Here

     Set the preferred cropping operation
     @param cropBounds New crop bounds
     */
    public void setCropBounds( Rectangle2D cropBounds ) {
        ODMGXAWrapper txw = new ODMGXAWrapper();
        txw.lock( this, Transaction.WRITE );
        if ( !cropBounds.equals( getCropBounds() ) ) {
            // Rotation changes, invalidate the thumbnail
            invalidateThumbnail();
            purgeInvalidInstances();           
        }
View Full Code Here

     Set the preferred color channel mapping
     @param cm the new color channel mapping
     */
    public void setColorChannelMapping( ChannelMapOperation cm ) {
        ODMGXAWrapper txw = new ODMGXAWrapper();
        txw.lock( this, Transaction.WRITE );
        if ( cm != null ) {
            if ( !cm.equals( channelMap ) ) {
                // Rotation changes, invalidate the thumbnail
                invalidateThumbnail();
                purgeInvalidInstances();
View Full Code Here

     Get currently preferred color channe?l mapping.
     @return The current color channel mapping
     */
    public ChannelMapOperation getColorChannelMapping() {
        ODMGXAWrapper txw = new ODMGXAWrapper();
        txw.lock( this, Transaction.READ );
        txw.commit();
        return channelMap;
    }
   
   
View Full Code Here

     the object.    
     */
    public void setRawSettings( RawConversionSettings s ) {
        log.debug( "entry: setRawSettings()" );
        ODMGXAWrapper txw = new ODMGXAWrapper();
        txw.lock( this, Transaction.WRITE );
        RawConversionSettings settings = null;
        if ( s != null ) {
            if ( !s.equals( rawSettings ) ) {
                invalidateThumbnail();
                purgeInvalidInstances();
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.