165166167168169170171172173174175
try { OQLQuery query = odmg.newOQLQuery(); query.create( oql ); profiles = (List) query.execute(); txw.commit(); } catch (Exception e ) { log.warn( "Error fetching record: " + e.getMessage() ); txw.abort(); return null; }
197198199200201202203204205206207
try { OQLQuery query = odmg.newOQLQuery(); query.create( oql ); txw.flush(); profiles = (List) query.execute(); txw.commit(); } catch (Exception e ) { log.warn( "Error fetching records: " + e.getMessage() ); e.printStackTrace(); txw.abort(); return null;
289290291292293294295296297298299
i.profileId = p.id; p.addInstance( i ); txw.lock( i, Transaction.WRITE ); txw.commit(); return p; } } /**
166167168169170171172173174175176
} QueryByCriteria q = new QueryByCriteria( PhotoInfo.class, crit ); Collection result = broker.getCollectionByQuery( q ); photos.addAll( result ); txw.commit(); } catch ( Exception e ) { log.warn( "Error executing query: " + e.getMessage() ); e.printStackTrace( System.out ); txw.abort(); }
16451646164716481649165016511652165316541655
@return value of prefRotation. */ public double getPrefRotation() { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.READ ); txw.commit(); return prefRotation; } /** Set the value of prefRotation.
16721673167416751676167716781679168016811682
invalidateThumbnail(); purgeInvalidInstances(); } this.prefRotation = v; modified(); txw.commit(); } /** Check that the e crop bounds are defined in consistent manner. This is needed since in old installations the max parameters can be larger than min ones.
17011702170317041705170617071708170917101711
*/ public Rectangle2D getCropBounds() { ODMGXAWrapper txw = new ODMGXAWrapper(); checkCropBounds(); txw.lock( this, Transaction.READ ); txw.commit(); return new Rectangle2D.Double( cropMinX, cropMinY, cropMaxX-cropMinX, cropMaxY-cropMinY ); }
17251726172717281729173017311732173317341735
cropMinY = cropBounds.getMinY(); cropMaxX = cropBounds.getMaxX(); cropMaxY = cropBounds.getMaxY(); checkCropBounds(); modified(); txw.commit(); } /**
17631764176517661767176817691770177117721773
purgeInvalidInstances(); } } channelMap = cm; modified(); txw.commit(); } /** Get currently preferred color channe?l mapping. @return The current color channel mapping
17731774177517761777177817791780178117821783
@return The current color channel mapping */ public ChannelMapOperation getColorChannelMapping() { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.READ ); txw.commit(); return channelMap; } /**