Package org.photovault.dbhelper

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


        }
        if ( folders.size() > 0 ) {
            f = (PhotoFolder) folders.get( 0 );
        }
        // If a new transaction was created, commit it
        txw.commit();
        return f;
    }

    /**
     Returns the root folder with givenId.
View Full Code Here


            }
        }
       
        // Then delete the PhotoInfo itself
        db.deletePersistent( this );
        txw.commit();
    }
   
    /**
     Tries to delete a this photo, including all of its instances. If some
     instances cannot be deleted, other instances are deleted anyway but the actual
View Full Code Here

            txw.abort();
            return null;
        }
        f = (PhotoFolder) folders.get( 0 );
        // If a new transaction was created, commit it
        txw.commit();
        return f;
    }

   
   
View Full Code Here

        for ( int i = 0 ; i < deletedInstances.size(); i++ ) {
            instances.remove( deletedInstances.elementAt( i ) );
        }
       
        if ( notDeletedInstances.size() > 0 ) {
            txw.commit();
            throw new PhotovaultException( "Unable to delete some instances of the photo" );
        }

        /*
         All instances were succesfully deleted, so we can delete metadata as well.
View Full Code Here

      }
  }
  Database db = ODMG.getODMGDatabase();
  db.deletePersistent( this );
 
  txw.commit();
    }
   


    /**
 
View Full Code Here

            }
        }
       
        // Then delete the PhotoInfo object itself
        db.deletePersistent( this );
        txw.commit();       
    }
       
   
    /**
     Adds a new listener to the list that will be notified of modifications to this object
View Full Code Here

     Returns the uid of the object
     */
    public int getUid() {
        ODMGXAWrapper txw = new ODMGXAWrapper();
        txw.lock( this, Transaction.READ );
        txw.commit();
        return uid;
    }
   
    /**
     Adds a new image instance for this photo
View Full Code Here

        instances.add( i );
        i.setPhotoUiduid );
        if ( i.getInstanceType() == ImageInstance.INSTANCE_TYPE_ORIGINAL ) {
            origInstanceHash = i.getHash();
        }
        txw.commit();
       
    }
   
    /**
     Adds a new instance of the photo into the database.
View Full Code Here

            origInstanceHash = instance.getHash();
            // If an original instance is added notify listeners since some of
            // them may be displaying the default thumbnail
            modified();
        }
        txw.commit();
        return instance;
    }
   
    public void removeInstance( int instanceNum throws IndexOutOfBoundsException {
        ODMGXAWrapper txw = new ODMGXAWrapper();
View Full Code Here

        }
        txw.lock( this, Transaction.WRITE );
        txw.lock( instance, Transaction.WRITE );
        instances.remove( instance );
        instance.delete();
        txw.commit();
    }
   
    /**
     Returns the number of instances of this photo that are stored in database
     */
 
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.