Package org.photovault.dbhelper

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


            return false;
        }
        PhotoInfo p = (PhotoInfo)obj;
        ODMGXAWrapper txw = new ODMGXAWrapper();
        txw.lock( this, Transaction.READ );
        txw.lock( p, Transaction.READ );
        txw.commit();
       
        return ( isEqual( p.photographer, this.photographer )
        && isEqual( p.shootingPlace, this.shootingPlace )
        && isEqual( p.shootTime, this.shootTime )
View Full Code Here


     Set the revision of database schema.
     @param version the version number.
     */
    public void setVersion( int version ) {
        ODMGXAWrapper txw = new ODMGXAWrapper();
        txw.lock( this, Transaction.WRITE );
        this.version = version;
        txw.commit();
    }
   
    /**
 
View Full Code Here

  i.volumeId = vol.getName();
  i.imageFile = imgFile;
        i.fileSize = imgFile.length();
        i.mtime = imgFile.lastModified();
        i.fname = vol.mapFileToVolumeRelativeName( imgFile );
        txw.lock( i, Transaction.WRITE );
        // Read the rest of fields from the image file
  try {
      i.readImageFile();
  } catch (Exception e ) {
      txw.abort();
View Full Code Here

  f.imageFile = imageFile;
        f.fileSize = imageFile.length();
        f.mtime = imageFile.lastModified();
        f.fname = volume.mapFileToVolumeRelativeName( imageFile );
        f.instanceType = instanceType;
  txw.lock( f, Transaction.WRITE );
  log.debug( "locked instance" );
 
  f.photoUid = photo.getUid();
  // Read the rest of fields from the image file
  try {
View Full Code Here

        return uuid;
    }   
   
    public void setUUID( UUID uuid ) {
        ODMGXAWrapper txw = new ODMGXAWrapper();
  txw.lock( this, Transaction.WRITE );
  this.uuid = uuid;
  txw.commit();
    }
       
   
View Full Code Here

        return  (hash != null) ? (byte[]) hash.clone() : null;
    }
   
    public void setHash( byte[] hash ) {
  ODMGXAWrapper txw = new ODMGXAWrapper();
  txw.lock( this, Transaction.WRITE );
  this.hash = hash;
  txw.commit();       
    }
   
    /**
 
View Full Code Here

     * Get the value of volume.
     * @return value of volume.
     */
    public VolumeBase getVolume() {
  ODMGXAWrapper txw = new ODMGXAWrapper();
  txw.lock( this, Transaction.READ );
  txw.commit();
  return volume;
    }
   
    /**
 
View Full Code Here

     * Set the value of volume.
     * @param v  Value to assign to volume.
     */
    public void setVolume(VolumeBase  v) {
  ODMGXAWrapper txw = new ODMGXAWrapper();
  txw.lock( this, Transaction.WRITE );
  this.volume = v;
  volumeId = volume.getName();
  txw.commit();
    }

View Full Code Here

     * Get the value of imageFile.
     * @return value of imageFile.
     */
    public File getImageFile() {
  ODMGXAWrapper txw = new ODMGXAWrapper();
  txw.lock( this, Transaction.READ );
  txw.commit();
  return imageFile;
    }
   
    /**
 
View Full Code Here

     * Set the value of imageFile.
     * @param v  Value to assign to imageFile.
     */
    public void setImageFile(File  v) {
  ODMGXAWrapper txw = new ODMGXAWrapper();
  txw.lock( this, Transaction.WRITE );
  this.imageFile = v;
  fname = volume.mapFileToVolumeRelativeName( v );
  txw.commit();
    }

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.