Package org.photovault.dbhelper

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


            query.create( oql );
            profiles = (List) query.execute();
            txw.commit();
        } catch (Exception e ) {
            log.warn( "Error fetching record: " + e.getMessage() );
            txw.abort();
            return null;
        }
        if ( profiles.size() == 0 ) {
            return null;
        }
View Full Code Here


            profiles = (List) query.execute();
            txw.commit();
        } catch (Exception e ) {
            log.warn( "Error fetching records: " + e.getMessage() );
            e.printStackTrace();
            txw.abort();
            return null;
        }
        return profiles;
    }
View Full Code Here

      photos.addAll( result );
      txw.commit();
  } catch ( Exception e ) {
      log.warn( "Error executing query: " + e.getMessage() );
      e.printStackTrace( System.out );
      txw.abort();
  }
     
  queryModified = false;
  log.debug( "Exit: PhotoQuery.query" );
View Full Code Here

                    o = f.create();
                    p.setColorChannelMapping( o );
                }
            }
        } catch ( LockNotGrantedException e ) {
            txw.abort();
            throw new PhotovaultException( "Photo locked for other use", e );
        }
        txw.commit();
    }
   
View Full Code Here

                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

        txw.lock( i, Transaction.WRITE );
        // Read the rest of fields from the image file
  try {
      i.readImageFile();
  } catch (Exception e ) {
      txw.abort();
      log.warn( "Error opening image file: " + e.getMessage() );
      // The image does not exist, so it cannot be read!!!
      return null;
  }
        i.calcHash();
View Full Code Here

  f.photoUid = photo.getUid();
  // Read the rest of fields from the image file
  try {
      f.readImageFile();
  } catch (Exception  e ) {
      txw.abort();
      log.warn( "Error opening image file: " + e.getMessage() );
      // The image does not exist, so it cannot be read!!!
      return null;
  }
        f.calcHash();
View Full Code Here

      OQLQuery query = odmg.newOQLQuery();
      query.create( oql );
      instances = (List) query.execute();
      txw.commit();
  } catch ( Exception e ) {
      txw.abort();
      return null;
  }
       
  ImageInstance instance = null;
        if ( instances != null && instances.size() > 0 ) {
View Full Code Here

      OQLQuery query = odmg.newOQLQuery();
      query.create( oql );
      instances = (List) query.execute();
      txw.commit();
  } catch ( Exception e ) {
      txw.abort();
      return null;
  }
       
  ImageInstance instance = null;
        if ( instances != null && instances.size() > 0 ) {
View Full Code Here

            query.create( oql );
            photos = (List) query.execute();
            txw.commit();
        } catch (Exception e ) {
            log.warn( "Error fetching record: " + e.getMessage() );
            txw.abort();
            throw new PhotoNotFoundException();
        }
        if ( photos.size() == 0 ) {
            throw new PhotoNotFoundException();
        }
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.