Package org.photovault.dbhelper

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


       
            try {
                OQLQuery query = odmg.newOQLQuery();
                query.create( oql );
                infos = (List) query.execute();
                txw.commit();
            } catch (Exception e ) {
                txw.abort();
            }
            if ( infos.size() > 0 ) {
                info = (DbInfo) infos.get(0);
View Full Code Here


     */
    public void setVersion( int version ) {
        ODMGXAWrapper txw = new ODMGXAWrapper();
        txw.lock( this, Transaction.WRITE );
        this.version = version;
        txw.commit();
    }
   
    /**
     Get the current version number.
     */
 
View Full Code Here

      // The image does not exist, so it cannot be read!!!
      return null;
  }
        i.calcHash();
        i.checkTime = new java.util.Date();
        txw.commit();
        return i;
    }
   
   
    /**
 
View Full Code Here

      // The image does not exist, so it cannot be read!!!
      return null;
  }
        f.calcHash();
  f.checkTime = new java.util.Date();
        txw.commit();
  return f;
    }
   
    /**
     Creates a new ImageInstance with a given UUID. This method should only be
View Full Code Here

        i.volumeId = "##nonexistingfiles##";
        i.fname = uuid.toString();
  ODMGXAWrapper txw = new ODMGXAWrapper();
        Database db = ODMG.getODMGDatabase();       
        db.makePersistent( i );
        txw.commit();
        return i;
    }

    /**
       Retrieves the info record for a image file based on its name and path.
View Full Code Here

  Implementation odmg = ODMG.getODMGImplementation();
  try {
      OQLQuery query = odmg.newOQLQuery();
      query.create( oql );
      instances = (List) query.execute();
      txw.commit();
  } catch ( Exception e ) {
      txw.abort();
      return null;
  }
       
View Full Code Here

  Implementation odmg = ODMG.getODMGImplementation();
  try {
      OQLQuery query = odmg.newOQLQuery();
      query.create( oql );
      instances = (List) query.execute();
      txw.commit();
  } catch ( Exception e ) {
      txw.abort();
      return null;
  }
       
View Full Code Here

   
    public void setUUID( UUID uuid ) {
        ODMGXAWrapper txw = new ODMGXAWrapper();
  txw.lock( this, Transaction.WRITE );
  this.uuid = uuid;
  txw.commit();
    }
       
   
    /**
       Inits the complex attributes volume and imageFile. Since these
View Full Code Here

        if ( !(volume instanceof ExternalVolume) ) {
            if ( imageFile != null && !imageFile.delete() ) {
                log.error( "File " + imageFile.getAbsolutePath() + " could not be deleted" );
            }
        }
  txw.commit();
    }

    /**
     Attempts to delete the instance
     @param deleteFromExtVol If true, the instance is deleted even if it resides
View Full Code Here

            if ( imageFile ==  null || imageFile.delete() ) {
          db.deletePersistent( this );
                success = true;
            }
        }
  txw.commit();
        return success;
    }
   
    /**
       Opens the image file specified by fname & dirname properties and reads the rest of fields from that
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.