Package org.photovault.dbhelper

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


   
    public void setHash( byte[] hash ) {
  ODMGXAWrapper txw = new ODMGXAWrapper();
  txw.lock( this, Transaction.WRITE );
  this.hash = hash;
  txw.commit();       
    }
   
    /**
       Id of the volume (for OJB)
    */
 
View Full Code Here


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

    public void setVolume(VolumeBase  v) {
  ODMGXAWrapper txw = new ODMGXAWrapper();
  txw.lock( this, Transaction.WRITE );
  this.volume = v;
  volumeId = volume.getName();
  txw.commit();
    }

    /**
       The image file
    */
 
View Full Code Here

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

    public void setImageFile(File  v) {
  ODMGXAWrapper txw = new ODMGXAWrapper();
  txw.lock( this, Transaction.WRITE );
  this.imageFile = v;
  fname = volume.mapFileToVolumeRelativeName( v );
  txw.commit();
    }

    /**
       Returns the file path relative to the volume base directory
    */
 
View Full Code Here

     Get the size of the image file <b>as stored in database</b>
     */
    public long getFileSize() {
  ODMGXAWrapper txw = new ODMGXAWrapper();
  txw.lock( this, Transaction.READ );
  txw.commit();
  return fileSize;       
    }
   
    /**
     Set the file size. NOTE!!! This method should only be used by XmlImporter.
View Full Code Here

     */
    public void setFileSize( long s ) {
  ODMGXAWrapper txw = new ODMGXAWrapper();
  txw.lock( this, Transaction.WRITE );
        this.fileSize = s;
        txw.commit();
    }
   
    private long mtime;
   
    /**
 
View Full Code Here

     database</b>. Measured as milliseconds since epoc(Jan 1, 1970 midnight)
     */
    public long getMtime() {
  ODMGXAWrapper txw = new ODMGXAWrapper();
  txw.lock( this, Transaction.READ );
  txw.commit();
  return mtime;               
    }
   
    private java.util.Date checkTime;
   
View Full Code Here

     the instance.
     */
    public java.util.Date getCheckTime() {
  ODMGXAWrapper txw = new ODMGXAWrapper();
  txw.lock( this, Transaction.READ );
  txw.commit();
  return checkTime != null ? (java.util.Date) checkTime.clone() : null;               
    }
   
    /**
     Check that the information in database and associated volume are consistent.
View Full Code Here

        
        if ( isConsistent ) {
            txw.lock( this, Transaction.WRITE );
            this.checkTime = new java.util.Date();
        }
        txw.commit();
        return isConsistent;
    }
   
    private int width;
   
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.