Package org.photovault.dbhelper

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


       
        ODMGXAWrapper txw = new ODMGXAWrapper();
        Database db = ODMG.getODMGDatabase();       
        db.makePersistent( photo );
        txw.lock( photo, Transaction.WRITE );
        txw.commit();
        return photo;
    }
   
    /**
     Add a new image to the database. Unless the image resides in an external
View Full Code Here


        txw.lock( subfolder, Transaction.WRITE );
  subfolders.remove( subfolder );
  modified();
  // Inform all parents & their that the structure has changed
  subfolderStructureChanged( this );
  txw.commit();
    }
   
    /**
       All subfolders for this folder
    */
 
View Full Code Here

        PhotoInfo photo = PhotoInfo.create();
        txw.lock( photo, Transaction.WRITE );
        photo.addInstance( vol, instanceFile, ImageInstance.INSTANCE_TYPE_ORIGINAL );
        photo.setCropBounds( new Rectangle2D.Float( 0.0F, 0.0F, 1.0F, 1.0F ) );
        photo.updateFromOriginalFile();
        txw.commit();
        return photo;
    }
   
    UUID uuid = null;
   
View Full Code Here

  this.parent = newParent;
  if ( parent != null ) {
      parent.addSubfolder( this );
  }
  modified();
  txw.commit();
    }
   
    /**
       Parent of this folder or <code>null</code> if this is a top-level folder
    */
 
View Full Code Here

            folder.setParentFolder( parent );
            txw.lock( folder, Transaction.WRITE );
        } catch (IllegalArgumentException e ) {
            throw e;
        } finally {
            txw.commit();
        }
        return folder;
    }

View Full Code Here

    public void setUUID( UUID uuid ) {
        ODMGXAWrapper txw = new ODMGXAWrapper();
  txw.lock( this, Transaction.WRITE );
  this.uuid = uuid;
  modified();
  txw.commit();
    }
   
    /**
     Reads field values from original file EXIF values
     @return true if successfull, false otherwise
View Full Code Here

            folder.setParentFolder( parent );
            txw.lock( folder, Transaction.WRITE );
        } catch (IllegalArgumentException e ) {
            throw e;
        } finally {
            txw.commit();
        }
        return folder;
    }   

    /**
 
View Full Code Here

                        updateFromFileMetadata( f );
                        success = true;
                    } else {
                        success = updateFromRawFileMetadata( f );
                    }
                    txw.commit();
                    return success;
                }
            }
        }
        txw.commit();
View Full Code Here

                return null;
            }
            rootFolder = (PhotoFolder) folders.get( 0 );
            PhotoFolder.rootFolder = rootFolder;
            // If a new transaction was created, commit it
            txw.commit();
        }
  return rootFolder;
    }
   
    /**
 
View Full Code Here

                    txw.commit();
                    return success;
                }
            }
        }
        txw.commit();
        return false;
    }
   
    /**
     This method reads the metadata from image file and updates the PhotoInfo record from it
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.