Changeset 7372


Ignore:
Timestamp:
May 17, 2017, 2:11:46 PM (5 years ago)
Author:
Nicklas Nordborg
Message:

References #2084: Upgrade to Hibernate 5.2

A global search/replace of org.hibernate.Query with org.hibernate.query.Query. Down to 140 compilation errors but warnings up to 1311 (probably because we are missing a type-parameter for the Query).

Location:
branches/hibernate-5.2/src/core/net/sf/basedb/core
Files:
96 edited

Legend:

Unmodified
Added
Removed
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/AbstractHqlQuery.java

    r7371 r7372  
    224224   
    225225    @param dc The DbControl to use for executing the query
    226     @return A <code>org.hibernate.Query</code> object
     226    @return A <code>org.hibernate.query.Query</code> object
    227227  */
    228228  org.hibernate.query.Query<?> getMainHqlQuery(DbControl dc)
     
    262262   
    263263    @param dc The DbControl to use for executing the query
    264     @return A <code>org.hibernate.Query</code> object
     264    @return A <code>org.hibernate.query.Query</code> object
    265265  */
    266266  org.hibernate.query.Query<Long> getCountHqlQuery(DbControl dc)
     
    292292   
    293293    @param dc The DbControl to use for executing the query
    294     @return A <code>org.hibernate.Query</code> object
     294    @return A <code>org.hibernate.query.Query</code> object
    295295    @since 3.5
    296296  */
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Annotation.java

    r7318 r7372  
    285285        // Cloned annotations should remain
    286286        org.hibernate.Session session = getDbControl().getHibernateSession();
    287         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     287        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    288288          "NULLIFY_LINK_FROM_CLONES");
    289289        /*
     
    957957        if (annotationTypeIds == null)
    958958        {
    959           org.hibernate.Query atQuery = HibernateUtil.getPredefinedSQLQuery(dc.getHibernateSession(),
     959          org.hibernate.query.Query atQuery = HibernateUtil.getPredefinedSQLQuery(dc.getHibernateSession(),
    960960            "GET_ALL_ANNOTATIONTYPE_IDS_FOR_USER");
    961961         
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/AnnotationBatcher.java

    r7299 r7372  
    117117  // SQL query through Hibernate to load information about current annotations
    118118  // for a single item. Uses 'annotationSetId' as the only input parameter.
    119   private final org.hibernate.Query loadAnnotationInfo;
     119  private final org.hibernate.query.Query loadAnnotationInfo;
    120120 
    121121  // SQL query through Hibernate to load annotation values
     
    123123  // Uses a list of ParameterValue.id as input parameter so we can load
    124124  // values for multiple annotations with a single query
    125   private final org.hibernate.Query[] loadAnnotationValues;
     125  private final org.hibernate.query.Query[] loadAnnotationValues;
    126126
    127127  // Batcher for inserting rows into the "ParameterValues" table
     
    266266      loadAnnotationInfo.setInteger("activeProject", activeProjectId);
    267267      loadAnnotationInfo.setInteger("defaultProject", projectId == null ? 0 : projectId);
    268       this.loadAnnotationValues = new org.hibernate.Query[types.length];
     268      this.loadAnnotationValues = new org.hibernate.query.Query[types.length];
    269269      this.valueIds = new List[types.length];
    270270      for (Type t : types)
     
    628628        }
    629629       
    630         org.hibernate.Query query = loadAnnotationValues[typeIndex];
     630        org.hibernate.query.Query query = loadAnnotationValues[typeIndex];
    631631        query.setParameterList("listOfIds", valueIds[typeIndex], Type.INT.getTypeWrapper().getHibernateType());
    632632     
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/AnnotationBetweenRestriction.java

    r7340 r7372  
    2727import net.sf.basedb.util.EqualsHelper;
    2828
    29 import org.hibernate.SQLQuery;
     29import org.hibernate.query.NativeQuery;
    3030
    3131/**
     
    164164 
    165165  @Override
    166   void setRestrictionParameters(SQLQuery query)
     166  void setRestrictionParameters(NativeQuery query)
    167167  {
    168168    Type parameterType = valueType;
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/AnnotationInRestriction.java

    r7340 r7372  
    2727import net.sf.basedb.util.EqualsHelper;
    2828
    29 import org.hibernate.SQLQuery;
     29import org.hibernate.query.NativeQuery;
    3030import java.util.Arrays;
    3131import java.util.List;
     
    111111 
    112112  @Override
    113   void setRestrictionParameters(SQLQuery query)
     113  void setRestrictionParameters(NativeQuery query)
    114114  {
    115115    query.setParameterList("values", values);
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/AnnotationRestriction.java

    r7340 r7372  
    3030import net.sf.basedb.util.EqualsHelper;
    3131
    32 import org.hibernate.SQLQuery;
     32import org.hibernate.query.NativeQuery;
    3333import org.hibernate.dialect.Dialect;
    3434
     
    191191
    192192    org.hibernate.Session session = dc.getHibernateSession();
    193     SQLQuery sqlQuery = HibernateUtil.createSqlQuery(session, sql);
     193    NativeQuery sqlQuery = HibernateUtil.createSqlQuery(session, sql);
    194194    sqlQuery.addScalar("annotationset_id", TypeWrapper.INTEGER.getHibernateType());
    195195    if (options.includeInherited)
     
    333333      used to query the database
    334334  */
    335   abstract void setRestrictionParameters(SQLQuery query);
     335  abstract void setRestrictionParameters(NativeQuery query);
    336336 
    337337  /**
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/AnnotationSet.java

    r7299 r7372  
    139139      " FROM "+itemType.getDataClass().getName()+" item"+
    140140      " WHERE item.annotationSet = :annotationSet";
    141     org.hibernate.Query query = HibernateUtil.createQuery(session, hql);
     141    org.hibernate.query.Query query = HibernateUtil.createQuery(session, hql);
    142142    query.setInteger("annotationSet", annotationSetId);
    143143    return HibernateUtil.loadData(Integer.class, query);
     
    231231        " order by [aa].[item_type]";
    232232   
    233     org.hibernate.Query query = HibernateUtil.createSqlQuery(session, sql);
     233    org.hibernate.query.Query query = HibernateUtil.createSqlQuery(session, sql);
    234234    List<Object[]> allEmpty = (List<Object[]>)query.list();
    235235    if (progress != null)
     
    263263    // and nullify the reference from the item tables
    264264    String deleteSql = "delete from [AnnotationSets] where [id] in (:ids)";
    265     org.hibernate.Query deleteQuery = HibernateUtil.createSqlQuery(session, deleteSql);
     265    org.hibernate.query.Query deleteQuery = HibernateUtil.createSqlQuery(session, deleteSql);
    266266
    267267    // Divide the query into chunks since the database driver may not support
     
    275275
    276276      String nullifySql = "update [" + table + "] set [annotationset_id] = null where [annotationset_id] in (:ids)";
    277       org.hibernate.Query nullifyQuery = HibernateUtil.createSqlQuery(session, nullifySql);
     277      org.hibernate.query.Query nullifyQuery = HibernateUtil.createSqlQuery(session, nullifySql);
    278278
    279279      int startIndex = 0;
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/AnnotationSimpleRestriction.java

    r7340 r7372  
    3232import java.util.List;
    3333
    34 import org.hibernate.SQLQuery;
     34import org.hibernate.query.NativeQuery;
    3535
    3636/**
     
    265265 
    266266  @Override
    267   void setRestrictionParameters(SQLQuery query)
     267  void setRestrictionParameters(NativeQuery query)
    268268  {
    269269    for (ParameterExpression pe : parameters)
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/AnnotationType.java

    r7308 r7372  
    153153  public static Set<Integer> getAllAnnotationTypesWithInheritanceDisabled(DbControl dc)
    154154  {
    155     org.hibernate.Query query = HibernateUtil.createQuery(dc.getHibernateSession(),
     155    org.hibernate.query.Query query = HibernateUtil.createQuery(dc.getHibernateSession(),
    156156      "SELECT at.id FROM AnnotationTypeData at WHERE at.disableInheritance=true");
    157157    return Collections.unmodifiableSet(new HashSet<Integer>(HibernateUtil.loadList(Integer.class, query, dc.getSessionControl())));
     
    218218    if (!used)
    219219    {
    220       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     220      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    221221        "GET_ANNOTATIONS_FOR_ANNOTATIONTYPE", "count(*)");
    222222      /*
     
    230230    if (!used)
    231231    {
    232       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     232      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    233233        "GET_EXPERIMENTS_FOR_ANNOTATIONTYPE", "count(*)");
    234234      /*
     
    243243    if (!used)
    244244    {
    245       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     245      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    246246        "GET_PROTOCOLS_FOR_ANNOTATIONTYPE", "count(*)");
    247247      /*
     
    272272   
    273273    // Annotations
    274     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     274    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    275275      "GET_ANNOTATIONS_FOR_ANNOTATIONTYPE", "a.id");
    276276      /*
     
    382382            // Change the unit on all annotations
    383383            // The values should NOT be changed!!
    384             org.hibernate.Query query = HibernateUtil.getPredefinedQuery(
     384            org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(
    385385              getDbControl().getHibernateSession(),
    386386              "SET_UNIT_ON_ANNOTATIONS_WITH_ANNOTATIONTYPE");
     
    400400            double offset = (oldUnit.getReferenceOffset() - defaultUnit.getReferenceOffset()) / defaultUnit.getReferenceFactor();
    401401            String tableName = getValueType().getTableName();
    402             org.hibernate.Query query = HibernateUtil.getPredefinedSQLQuery(
     402            org.hibernate.query.Query query = HibernateUtil.getPredefinedSQLQuery(
    403403              getDbControl().getHibernateSession(),
    404404              "RECALCULATE_ANNOTATIONS_WITH_ANNOTATIONTYPE", tableName);
     
    10481048  {
    10491049    if (!getProjectAnnotations() || !isInDatabase()) return 0;
    1050     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(getDbControl().getHibernateSession(),
     1050    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(getDbControl().getHibernateSession(),
    10511051      "COUNT_PROJECT_ANNOTATIONS_FOR_ANNOTATIONTYPE");
    10521052    query.setInteger("annotationType", getId());
     
    15681568        org.hibernate.Session session = dc.getHibernateSession();
    15691569       
    1570         org.hibernate.Query query = HibernateUtil.getPredefinedSQLQuery(session, "LOAD_ANNOTATIONSET_INHERITING_ANNOTATIONTYPE");
     1570        org.hibernate.query.Query query = HibernateUtil.getPredefinedSQLQuery(session, "LOAD_ANNOTATIONSET_INHERITING_ANNOTATIONTYPE");
    15711571        query.setInteger("annotationType", at.getId());
    15721572        List<Integer> ids = HibernateUtil.loadList(Integer.class, query, dc.getSessionControl());
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/AnyToAny.java

    r6874 r7372  
    151151  {
    152152    name = name.trim();
    153     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     153    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    154154      "GET_ANYTOANY_FOR_NAME");
    155155    /*
     
    267267    if (name == null) throw new InvalidUseOfNullException("name");
    268268    from.checkPermission(Permission.WRITE);
    269     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
     269    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
    270270      "DELETE_ANYTOANY_FROM");
    271271    /*
     
    297297    from.checkPermission(Permission.WRITE);
    298298
    299     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
     299    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
    300300      "DELETE_ALL_ANYTOANY_FROM");
    301301    /*
     
    327327    if (name == null) throw new InvalidUseOfNullException("name");
    328328    name = name.trim();
    329     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
     329    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
    330330      "GET_ANYTOANY_FOR_NAME");
    331331    /*
     
    366366        progress.display(5, "Finding item types used by any-to-any links...");
    367367      }
    368       org.hibernate.Query query = HibernateUtil.getPredefinedSQLQuery(session,
     368      org.hibernate.query.Query query = HibernateUtil.getPredefinedSQLQuery(session,
    369369          "FIND_USED_TYPES_IN_ANYTOANY");
    370370      /*
     
    380380      int numItemTypes = itemTypes.size();
    381381      int maxParameters = HibernateUtil.getDbEngine().getMaxParametersInQuery();
    382       org.hibernate.Query deleteQuery =
     382      org.hibernate.query.Query deleteQuery =
    383383        HibernateUtil.getPredefinedQuery(session, "DELETE_STRAY_ANYTOANY");
    384384      for (int itemType : itemTypes)
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Application.java

    r7262 r7372  
    271271        schemaVersion++;
    272272        tx = HibernateUtil.newTransaction(session);
    273         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_SCHEMA_VERSION_FOR_APP");
     273        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_SCHEMA_VERSION_FOR_APP");
    274274        query.setString("appId", SchemaVersionData.BASE_APP_ID);
    275275        schemaVersion = HibernateUtil.loadData(SchemaVersionData.class, query).getSchemaVersion();
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/ArrayBatch.java

    r7308 r7372  
    175175  {
    176176    org.hibernate.Session session = getDbControl().getHibernateSession();
    177     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     177    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    178178      "GET_ARRAYSLIDES_FOR_BATCH", "count(*)");
    179179    /*
     
    197197    Set<ItemProxy> using = super.getUsingItems();
    198198    org.hibernate.Session session = getDbControl().getHibernateSession();
    199     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     199    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    200200      "GET_ARRAYSLIDES_FOR_BATCH", "a.id");
    201201      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/ArrayDesign.java

    r7308 r7372  
    272272  {
    273273    org.hibernate.Session session = getDbControl().getHibernateSession();
    274     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     274    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    275275      "GET_ARRAYBATCHES_FOR_ARRAYDESIGN", "count(*)");
    276276    /*
     
    310310   
    311311    // Array batches
    312     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     312    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    313313      "GET_ARRAYBATCHES_FOR_ARRAYDESIGN", "a.id");
    314314      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/ArraySlide.java

    r7308 r7372  
    112112    barcode = barcode.trim();
    113113    org.hibernate.Session session = dc.getHibernateSession();
    114     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     114    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    115115      "GET_ARRAYSLIDES_WITH_BARCODE", "count(*)");
    116116    /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/AuthenticationContext.java

    r6429 r7372  
    6666  public UserData getUserByLogin(String login)
    6767  {
    68     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_USER_FOR_LOGIN");
     68    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_USER_FOR_LOGIN");
    6969    /*
    7070      SELECT usr
     
    8383  public UserData getUserByExternalId(String id)
    8484  {
    85     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_USER_FOR_EXTERNAL_ID");
     85    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_USER_FOR_EXTERNAL_ID");
    8686    /*
    8787      SELECT usr
     
    112112      sql += " WHERE " + restriction;
    113113    }
    114     org.hibernate.Query query = HibernateUtil.createQuery(session, sql);
     114    org.hibernate.query.Query query = HibernateUtil.createQuery(session, sql);
    115115    if (parameters != null)
    116116    {
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/BasicItem.java

    r7121 r7372  
    221221  {
    222222    org.hibernate.Session session = getDbControl().getHibernateSession();
    223     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     223    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    224224      "COUNT_USED_ANYTOANY_TO");
    225225    /*
     
    245245    @throws BaseException If there is an error loading the items
    246246    @since 2.2
    247     @see #addUsingItems(Set, Item, org.hibernate.Query)
     247    @see #addUsingItems(Set, Item, org.hibernate.query.Query)
    248248  */
    249249  public Set<ItemProxy> getUsingItems()
     
    251251  {
    252252    org.hibernate.Session session = getDbControl().getHibernateSession();
    253     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "FIND_USING_ANYTOANY");
     253    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "FIND_USING_ANYTOANY");
    254254    /*
    255255      SELECT ana.fromId, ana.fromType
     
    327327    @since 2.2
    328328  */
    329   protected void addUsingItems(Set<ItemProxy> using, Item itemType, org.hibernate.Query query)
     329  protected void addUsingItems(Set<ItemProxy> using, Item itemType, org.hibernate.query.Query query)
    330330  {
    331331    for (Integer itemId : HibernateUtil.loadList(Integer.class, query, getSessionControl()))
     
    341341    @since 2.2
    342342  */
    343   protected void addUsingItems(Set<ItemProxy> using, org.hibernate.Query query)
     343  protected void addUsingItems(Set<ItemProxy> using, org.hibernate.query.Query query)
    344344  {
    345345    for (BasicData item : HibernateUtil.loadList(BasicData.class, query, getSessionControl()))
     
    508508      // ...and all links to this item that doesn't count as using it
    509509      org.hibernate.Session session = getDbControl().getHibernateSession();
    510       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     510      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    511511        "DELETE_UNUSED_ANYTOANY_TO");
    512512      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/BioAssaySet.java

    r7126 r7372  
    14151415   
    14161416    // 2a. Find all data cubes used by at least one of the bioassaysets
    1417     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "FIND_DATACUBES_FOR_BIOASSAYSETS");
     1417    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "FIND_DATACUBES_FOR_BIOASSAYSETS");
    14181418    /*
    14191419      SELECT DISTINCT cbe
     
    16061606    @see #addChildBioAssaySets(BioAssaySetData, Set)
    16071607  */
    1608   private org.hibernate.Query findChildren;
     1608  private org.hibernate.query.Query findChildren;
    16091609
    16101610  /**
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/BioPlate.java

    r7308 r7372  
    209209  {
    210210    org.hibernate.Session session = getDbControl().getHibernateSession();
    211     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     211    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    212212        "GET_BIOMATERIAL_ON_PLATE", "count(*)");
    213213    /*
     
    230230    Set<ItemProxy> using = super.getUsingItems();
    231231    org.hibernate.Session session = getDbControl().getHibernateSession();
    232     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     232    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    233233        "GET_BIOMATERIAL_ON_PLATE", "mbm");
    234234    /*
     
    250250    {
    251251      // Unlink all biomaterial events
    252       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(
     252      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(
    253253        getDbControl().getHibernateSession(), "CLEAR_PARTICIPANT_ON_BIOMATERIALEVENTS_FOR_BIOPLATE");
    254254      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/BioPlateEvent.java

    r7308 r7372  
    181181    {
    182182      // Unlink all biomaterial events
    183       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(
     183      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(
    184184        getDbControl().getHibernateSession(), "CLEAR_PARTICIPANT_ON_BIOMATERIALEVENTS_FOR_BIOPLATEEVENT");
    185185      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/BioPlateEventParticipant.java

    r6874 r7372  
    205205    {
    206206      // Unlink all biomaterial events from this participant
    207       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(
     207      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(
    208208        getDbControl().getHibernateSession(), "CLEAR_PARTICIPANT_ON_BIOMATERIALEVENTS_FOR_PARTICIPANT");
    209209      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/BioPlateEventType.java

    r7016 r7372  
    220220  {
    221221    org.hibernate.Session session = getDbControl().getHibernateSession();
    222     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     222    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    223223        "GET_BIOPLATEEVENTS_FOR_BIOPLATEEVENTTYPE", "count(*)");
    224224    /*
     
    242242    org.hibernate.Session session = getDbControl().getHibernateSession();
    243243    // Bioplates
    244     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     244    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    245245        "GET_BIOPLATEEVENTS_FOR_BIOPLATEEVENTTYPE", "bpe.id");
    246246    /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/BioPlateType.java

    r7016 r7372  
    179179  {
    180180    org.hibernate.Session session = getDbControl().getHibernateSession();
    181     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     181    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    182182        "GET_BIOPLATES_FOR_BIOPLATETYPE", "count(*)");
    183183    /*
     
    201201    org.hibernate.Session session = getDbControl().getHibernateSession();
    202202    // Bioplates
    203     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     203    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    204204        "GET_BIOPLATES_FOR_BIOPLATETYPE", "bpl.id");
    205205    /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/BioSource.java

    r7308 r7372  
    170170    Set<ItemProxy> using = super.getUsingItems();
    171171    org.hibernate.Session session = getDbControl().getHibernateSession();
    172     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     172    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    173173      "GET_SAMPLES_FOR_BIOSOURCE", "s.id");
    174174      /*
     
    224224  {
    225225    org.hibernate.Session session = getDbControl().getHibernateSession();
    226     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     226    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    227227      "GET_SAMPLES_FOR_BIOSOURCE", "count(*)");
    228228    /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/ChangeHistory.java

    r7166 r7372  
    182182        progress.display(5, "Finding item types with history...");
    183183      }
    184       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     184      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    185185          "FIND_USED_TYPES_IN_CHANGEHISTORY");
    186186      /*
     
    194194      int numItemTypes = itemTypes.size();
    195195      int maxParameters = HibernateUtil.getDbEngine().getMaxParametersInQuery();
    196       org.hibernate.Query deleteQuery =
     196      org.hibernate.query.Query deleteQuery =
    197197        HibernateUtil.getPredefinedQuery(session, "DELETE_STRAY_CHANGEHISTORY");
    198198      for (int itemType : itemTypes)
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Client.java

    r7308 r7372  
    120120  {
    121121    if (externalId != null) externalId = externalId.trim();
    122     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
     122    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
    123123      "GET_CLIENT_FOR_EXTERNAL_ID");
    124124    /*
     
    310310  {
    311311    if (externalId != null) externalId = externalId.trim();
    312     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
     312    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
    313313      "GET_HELP_FOR_EXTERNAL_ID");
    314314    /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/DataCube.java

    r6881 r7372  
    189189      */
    190190      org.hibernate.Session session = getDbControl().getHibernateSession();
    191       org.hibernate.Query query =
     191      org.hibernate.query.Query query =
    192192        HibernateUtil.getPredefinedQuery(session, "UPDATE_BYTES_FOR_DATACUBE");
    193193      /*
     
    318318       
    319319        // Increase the number of filter
    320         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "UPDATE_FILTERNO_FOR_DATACUBE");
     320        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "UPDATE_FILTERNO_FOR_DATACUBE");
    321321        /*
    322322          UPDATE DataCubeData dcb
     
    390390       
    391391        // Increase the number of extra values
    392         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "UPDATE_EXTRAVALUENO_FOR_DATACUBE");
     392        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "UPDATE_EXTRAVALUENO_FOR_DATACUBE");
    393393        /*
    394394          UPDATE DataCubeData dcb
     
    459459       
    460460        // Increase the number of extra values
    461         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "UPDATE_LAYERNO_FOR_DATACUBE");
     461        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "UPDATE_LAYERNO_FOR_DATACUBE");
    462462        /*
    463463          UPDATE DataCubeData dcb
     
    529529       
    530530        // Increase the number of extra values
    531         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "UPDATE_COLUMNNO_FOR_DATACUBE");
     531        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "UPDATE_COLUMNNO_FOR_DATACUBE");
    532532        /*
    533533          UPDATE DataCubeData dcb
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/DataFileType.java

    r7312 r7372  
    227227  {
    228228    if (externalId != null) externalId = externalId.trim();
    229     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
     229    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
    230230      "GET_DATAFILETYPE_FOR_EXTERNAL_ID");
    231231    /*
     
    435435  {
    436436    org.hibernate.Session session = getDbControl().getHibernateSession();
    437     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     437    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    438438      "GET_FILESETMEMBERS_FOR_DATAFILETYPE", "count(*)");
    439439    /*
     
    483483    Set<ItemProxy> using = super.getUsingItems();
    484484    org.hibernate.Session session = getDbControl().getHibernateSession();
    485     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     485    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    486486      "GET_FILESETMEMBERS_FOR_DATAFILETYPE", "mbr.id");
    487487      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/DerivedBioAssay.java

    r7308 r7372  
    208208   
    209209    // Child derived bioassays
    210     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     210    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    211211      "GET_CHILD_DERIVEDBIOASSAYS_FOR_DERIVEDBIOASSAY", "dba.id");
    212212      /*
     
    244244    if (!used)
    245245    {
    246       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     246      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    247247        "GET_RAWBIOASSAYS_FOR_DERIVEDBIOASSAY", "count(*)");
    248248      /*
     
    257257    if (!used)
    258258    {
    259       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     259      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    260260        "GET_CHILD_DERIVEDBIOASSAYS_FOR_DERIVEDBIOASSAY", "count(*)");
    261261      /*
     
    901901  {
    902902    org.hibernate.Session session = getDbControl().getHibernateSession();
    903     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     903    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    904904      "GET_RAWBIOASSAYS_FOR_DERIVEDBIOASSAY", "count(*)");
    905905    /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Directory.java

    r7016 r7372  
    151151    Map<String, Directory> directoryCache = null;
    152152   
    153     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(
     153    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(
    154154        dc.getHibernateSession(), "GET_SUBDIRECTORY_WITH_NAME");
    155155    /*
     
    297297      else
    298298      {
    299         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(), "GET_USER_FOR_LOGIN");
     299        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(), "GET_USER_FOR_LOGIN");
    300300        query.setString("login", path.getUserLogin());
    301301        userData = HibernateUtil.loadData(UserData.class, query);
     
    312312    }
    313313    if (current == null) throw new ItemNotFoundException("Directory[path="+path+"]");
    314     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_SUBDIRECTORY_WITH_NAME");
     314    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_SUBDIRECTORY_WITH_NAME");
    315315    for (int i = 0; i < path.getDirectoryCount(); i++)
    316316    {
     
    341341  {
    342342    if (subdirectoryName != null) subdirectoryName = subdirectoryName.trim();
    343     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(), "GET_SUBDIRECTORY_WITH_NAME");
     343    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(), "GET_SUBDIRECTORY_WITH_NAME");
    344344    /*
    345345      SELECT dir
     
    560560    long count;
    561561    org.hibernate.Session session = getDbControl().getHibernateSession();
    562     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     562    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    563563      "GET_FILES_IN_DIRECTORY", "count(*)");
    564564    /*
     
    625625   
    626626    // Files
    627     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     627    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    628628      "GET_FILES_IN_DIRECTORY", "f.id");
    629629      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/DiskUsage.java

    r6874 r7372  
    161161        " FROM "+type.getDataClass().getName()+" item"+
    162162        " WHERE item.diskUsage = :diskUsage";
    163       org.hibernate.Query query = HibernateUtil.createQuery(dc.getHibernateSession(), hql);
     163      org.hibernate.query.Query query = HibernateUtil.createQuery(dc.getHibernateSession(), hql);
    164164      query.setEntity("diskUsage", this.getData());
    165165      id = HibernateUtil.loadData(Integer.class, query);
     
    203203        " FROM "+type.getDataClass().getName()+" item"+
    204204        " WHERE item.diskUsage = :diskUsage";
    205       org.hibernate.Query query = HibernateUtil.createQuery(dc.getHibernateSession(), hql);
     205      org.hibernate.query.Query query = HibernateUtil.createQuery(dc.getHibernateSession(), hql);
    206206      query.setEntity("diskUsage", this.getData());
    207207      item = (DiskConsumable)dc.getItem(type.getItemClass(), HibernateUtil.loadData(type.getDataClass(), query));
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/DiskUsageStatistics.java

    r6619 r7372  
    194194    {
    195195      diskUsage = new HashMap<String, Long>();
    196       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getStatelessSession(),
     196      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getStatelessSession(),
    197197        "GET_TOTAL_DISKUSAGE_SUMMARY");
    198198      /*
     
    206206    {
    207207      diskUsage = new HashMap<String, Long>();
    208       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getStatelessSession(),
     208      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getStatelessSession(),
    209209        "GET_DISKUSAGE_SUMMARY_FOR_USER");
    210210      /*
     
    221221    {
    222222      diskUsage = new HashMap<String, Long>();
    223       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getStatelessSession(),
     223      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getStatelessSession(),
    224224        "GET_DISKUSAGE_SUMMARY_FOR_GROUP");
    225225      /*
     
    233233    }
    234234   
    235     private void loadDiskUsage(org.hibernate.Query query)
     235    private void loadDiskUsage(org.hibernate.query.Query query)
    236236    {
    237237      List<Object[]> du = HibernateUtil.loadList(Object[].class, query, null);
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Experiment.java

    r7308 r7372  
    301301      */
    302302      org.hibernate.Session session = getDbControl().getHibernateSession();
    303       org.hibernate.Query query =
     303      org.hibernate.query.Query query =
    304304        HibernateUtil.getPredefinedQuery(session, "UPDATE_BYTES_FOR_EXPERIMENT");
    305305      /*
     
    898898   
    899899    // Check jobs links with raw bioassays
    900     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     900    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    901901      "LOAD_RAWBIOASSAY_JOBS_IN_EXPERIMENT");
    902902    /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/ExtraValueType.java

    r7308 r7372  
    129129    if (externalId != null) externalId = externalId.trim();
    130130    org.hibernate.Session session = dc.getHibernateSession();
    131     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_EXTRAVALUETYPE_FOR_EXTERNAL_ID");
     131    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_EXTRAVALUETYPE_FOR_EXTERNAL_ID");
    132132    query.setString("externalId", externalId);
    133133    ExtraValueType evt = dc.getItem(ExtraValueType.class, HibernateUtil.loadData(ExtraValueTypeData.class, query));
     
    257257  {
    258258    org.hibernate.Session session = getDbControl().getHibernateSession();
    259     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     259    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    260260      "GET_EXTRAVALUES_FOR_EXTRAVALUETYPE", "count(*)");
    261261    /*
     
    279279    Set<ItemProxy> using = super.getUsingItems();
    280280    org.hibernate.Session session = getDbControl().getHibernateSession();
    281     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     281    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    282282      "GET_EXTRAVALUES_FOR_EXTRAVALUETYPE", "ev.id");
    283283      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Extract.java

    r7003 r7372  
    185185    if (!used)
    186186    {
    187       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     187      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    188188        "GET_DERIVEDBIOASSAYS_FOR_EXTRACT", "count(*)");
    189189      /*
     
    198198    if (!used)
    199199    {
    200       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     200      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    201201        "GET_RAWBIOASSAYS_FOR_EXTRACT", "count(*)");
    202202      /*
     
    229229   
    230230    // Physical bioassays
    231     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     231    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    232232      "GET_SOURCEEVENTS_FOR_BIOMATERIAL", "bme.physicalBioAssay.id");
    233233      /*
     
    318318  {
    319319    org.hibernate.Session session = getDbControl().getHibernateSession();
    320     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     320    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    321321      "GET_SOURCEEVENTS_FOR_BIOMATERIAL", "count(*)");
    322322    /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/File.java

    r7309 r7372  
    256256      throw new ItemNotFoundException("File[path="+path+"]");
    257257    }
    258     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(), "GET_FILE_IN_DIRECTORY");
     258    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(), "GET_FILE_IN_DIRECTORY");
    259259    /*
    260260      SELECT f
     
    315315      throw new InvalidUseOfNullException("directory");
    316316    }
    317     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(), "GET_FILE_IN_DIRECTORY");
     317    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(), "GET_FILE_IN_DIRECTORY");
    318318    /*
    319319      SELECT f
     
    358358  {
    359359    if (fileName != null) fileName = fileName.trim();
    360     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(), "GET_FILE_IN_DIRECTORY");
     360    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(), "GET_FILE_IN_DIRECTORY");
    361361    /*
    362362      SELECT f
     
    524524  {
    525525    org.hibernate.Session session = getDbControl().getHibernateSession();
    526     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "FIND_USED_FILES");
     526    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "FIND_USED_FILES");
    527527    /*
    528528      SELECT fad
     
    576576   
    577577    // FileAttachable items
    578     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     578    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    579579      "FIND_USED_FILES");
    580580      /*
     
    12061206      {
    12071207        org.hibernate.Session session = getDbControl().getHibernateSession();
    1208         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_MIME_TYPE_FROM_EXTENSION");
     1208        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_MIME_TYPE_FROM_EXTENSION");
    12091209        /*
    12101210          SELECT mt
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/FileServer.java

    r7332 r7372  
    170170  {
    171171    org.hibernate.Session session = getDbControl().getHibernateSession();
    172     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     172    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    173173        "GET_FILES_FOR_FILESERVER", "count(*)");
    174174    /*
     
    189189    Set<ItemProxy> using = super.getUsingItems();
    190190    org.hibernate.Session session = getDbControl().getHibernateSession();
    191     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     191    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    192192        "GET_FILES_FOR_FILESERVER", "f.id");
    193193    /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/FileSet.java

    r6875 r7372  
    233233        " FROM "+type.getDataClass().getName()+" item"+
    234234        " WHERE item.fileSet = :fileSet";
    235       org.hibernate.Query query = HibernateUtil.createQuery(dc.getHibernateSession(), hql);
     235      org.hibernate.query.Query query = HibernateUtil.createQuery(dc.getHibernateSession(), hql);
    236236      query.setEntity("fileSet", this.getData());
    237237      item = (FileStoreEnabled)dc.getItem(type.getItemClass(), HibernateUtil.loadData(type.getDataClass(), query));
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/FileStoreUtil.java

    r5764 r7372  
    6060  {
    6161    if (item == null || !item.hasFileSet()) return false;
    62     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(
     62    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(
    6363      dc.getHibernateSession(), "GET_FILESETMEMBER_FOR_DATAFILETYPE");
    6464    /*
     
    104104    if (item != null && item.hasFileSet())
    105105    {
    106       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(
     106      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(
    107107        dc.getHibernateSession(), "GET_DATAFILETYPE_FOR_EXTERNAL_ID");
    108108      query.setString("externalId", dataFileType);
     
    146146    if (item != null && item.hasFileSet())
    147147    {
    148       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(
     148      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(
    149149        dc.getHibernateSession(), "GET_DATAFILETYPE_FOR_EXTERNAL_ID");
    150150      query.setString("externalId", dataFileType);
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Group.java

    r7308 r7372  
    140140    {
    141141     
    142       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     142      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    143143        "GET_CHILDGROUPS_IDS_FOR_GROUPS");
    144144      /*
     
    291291    if (action == Transactional.Action.DELETE)
    292292    {
    293       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(
     293      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(
    294294          getDbControl().getHibernateSession(), "SET_GROUP_TO_NULL_ON_DISK_USAGE");
    295295      /*
     
    323323  {
    324324    org.hibernate.Session session = getDbControl().getHibernateSession();
    325     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     325    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    326326      "GET_USERS_FOR_QUOTAGROUP", "count(*)");
    327327    /*
     
    345345    Set<ItemProxy> using = super.getUsingItems();
    346346    org.hibernate.Session session = getDbControl().getHibernateSession();
    347     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     347    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    348348      "GET_USERS_FOR_QUOTAGROUP", "usr.id");
    349349      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Hardware.java

    r7308 r7372  
    289289    if (!used)
    290290    {
    291       org.hibernate.Query q = HibernateUtil.getPredefinedQuery(session,
     291      org.hibernate.query.Query q = HibernateUtil.getPredefinedQuery(session,
    292292        "GET_DERIVEDBIOASSAYS_FOR_HARDWARE", "count(*)");
    293293      /*
     
    301301    if (!used)
    302302    {
    303       org.hibernate.Query q = HibernateUtil.getPredefinedQuery(session,
     303      org.hibernate.query.Query q = HibernateUtil.getPredefinedQuery(session,
    304304        "GET_ARRAYBATCHES_FOR_PRINTROBOT", "count(*)");
    305305      /*
     
    313313    if (!used)
    314314    {
    315       org.hibernate.Query q = HibernateUtil.getPredefinedQuery(session,
     315      org.hibernate.query.Query q = HibernateUtil.getPredefinedQuery(session,
    316316        "GET_BIOMATERIALEVENTS_FOR_HARDWARE", "count(*)");
    317317        /*
     
    325325    if (!used)
    326326    {
    327       org.hibernate.Query q = HibernateUtil.getPredefinedQuery(session,
     327      org.hibernate.query.Query q = HibernateUtil.getPredefinedQuery(session,
    328328        "GET_PLATEEVENTS_FOR_HARDWARE", "count(*)");
    329329        /*
     
    354354   
    355355    // Derived bioassay sets
    356     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     356    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    357357      "GET_DERIVEDBIOASSAYS_FOR_HARDWARE", "dba.id");
    358358      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/HasAnnotationRestriction.java

    r7340 r7372  
    2626import net.sf.basedb.core.query.Query;
    2727
    28 import org.hibernate.SQLQuery;
     28import org.hibernate.query.NativeQuery;
    2929
    3030/**
     
    129129  }
    130130  @Override
    131   void setRestrictionParameters(SQLQuery query)
     131  void setRestrictionParameters(NativeQuery query)
    132132  {}
    133133  @Override
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Install.java

    r7332 r7372  
    10051005      tx = HibernateUtil.newTransaction(session);
    10061006
    1007       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_SCHEMA_VERSION_FOR_APP");
     1007      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_SCHEMA_VERSION_FOR_APP");
    10081008      query.setString("appId", SchemaVersionData.BASE_APP_ID);
    10091009      schemaVersion = HibernateUtil.loadData(SchemaVersionData.class, query);
     
    10511051      if (directory == null && parent != null)
    10521052      {
    1053         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_SUBDIRECTORY_WITH_NAME");
     1053        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_SUBDIRECTORY_WITH_NAME");
    10541054        query.setString("name", name);
    10551055        query.setEntity("parent", parent);
     
    11001100      if (mimeType == null)
    11011101      {
    1102         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_MIME_TYPE_FROM_EXTENSION");
     1102        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_MIME_TYPE_FROM_EXTENSION");
    11031103        query.setString("extension", extension);
    11041104        mimeType = HibernateUtil.loadData(MimeTypeData.class, query);
     
    11551155      if (quotaType == null && systemId == null)
    11561156      {
    1157         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_QUOTA_TYPE_WITH_NAME");
     1157        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_QUOTA_TYPE_WITH_NAME");
    11581158        query.setString("name", name);
    11591159        quotaType = HibernateUtil.loadData(QuotaTypeData.class, query);
     
    12071207      if (quota == null && systemId == null)
    12081208      {
    1209         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_QUOTA_WITH_NAME");
     1209        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_QUOTA_WITH_NAME");
    12101210        query.setString("name", name);
    12111211        quota = HibernateUtil.loadData(QuotaData.class, query);
     
    12621262      if (user == null && systemId == null)
    12631263      {
    1264         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_USER_FOR_LOGIN");
     1264        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_USER_FOR_LOGIN");
    12651265        query.setString("login", login);
    12661266        user = HibernateUtil.loadData(UserData.class, query);
     
    13251325      if (group == null && systemId == null)
    13261326      {
    1327         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_GROUP_WITH_NAME");
     1327        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_GROUP_WITH_NAME");
    13281328        query.setString("name", name);
    13291329        group = HibernateUtil.loadData(GroupData.class, query);
     
    13771377      if (role == null && systemId == null)
    13781378      {
    1379         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_ROLE_WITH_NAME");
     1379        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_ROLE_WITH_NAME");
    13801380        query.setString("name", name);
    13811381        role = HibernateUtil.loadData(RoleData.class, query);
     
    15161516      if (u == null)
    15171517      {
    1518         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     1518        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    15191519            "GET_UNIT_WITH_NAME_FOR_QUANTITY");
    15201520        query.setString("name", name);
     
    15991599      if (sw == null)
    16001600      {
    1601         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_SOFTWARE_WITH_NAME");
     1601        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_SOFTWARE_WITH_NAME");
    16021602        query.setString("name", name);
    16031603        sw = HibernateUtil.loadData(SoftwareData.class, query);
     
    16471647      if (hw == null)
    16481648      {
    1649         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_HARDWARE_WITH_NAME");
     1649        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_HARDWARE_WITH_NAME");
    16501650        query.setString("name", name);
    16511651        hw = HibernateUtil.loadData(HardwareData.class, query);
     
    16991699      if (subtype == null)
    17001700      {
    1701         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_ITEMSUBTYPE_WITH_NAME_AND_ITEMTYPE");
     1701        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_ITEMSUBTYPE_WITH_NAME_AND_ITEMTYPE");
    17021702        query.setString("name", name);
    17031703        query.setInteger("itemType", itemType.getValue());
     
    17781778      if (pt == null)
    17791779      {
    1780         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_BIOPLATETYPE_WITH_NAME");
     1780        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_BIOPLATETYPE_WITH_NAME");
    17811781        query.setString("name", name);
    17821782        pt = HibernateUtil.loadData(BioPlateTypeData.class, query);
     
    18731873      if (pg == null)
    18741874      {
    1875         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_PLATE_GEOMETRY_WITH_SIZE");
     1875        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_PLATE_GEOMETRY_WITH_SIZE");
    18761876        query.setInteger("rows", rows);
    18771877        query.setInteger("columns", columns);
     
    19341934      if (pm == null)
    19351935      {
    1936         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_PLATE_MAPPING_WITH_PROPERTIES");
     1936        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_PLATE_MAPPING_WITH_PROPERTIES");
    19371937        query.setInteger("sourceCount", sourceCount);
    19381938        query.setEntity("sourceGeometry", source);
     
    20372037      if (tag == null)
    20382038      {
    2039         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_TAG_WITH_NAME");
     2039        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_TAG_WITH_NAME");
    20402040        query.setString("name", name);
    20412041        tag = HibernateUtil.loadData(TagData.class, query);
     
    20862086      if (at == null)
    20872087      {
    2088         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_ANNOTATION_TYPE_WITH_NAME");
     2088        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_ANNOTATION_TYPE_WITH_NAME");
    20892089        query.setString("name", name);
    20902090        at = HibernateUtil.loadData(AnnotationTypeData.class, query);
     
    22742274      if (client == null)
    22752275      {
    2276         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_CLIENT_FOR_EXTERNAL_ID");
     2276        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_CLIENT_FOR_EXTERNAL_ID");
    22772277        query.setString("externalId", externalId);
    22782278        client = HibernateUtil.loadData(ClientData.class, query);
     
    23242324      if (news == null)
    23252325      {
    2326         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_NEWS_WITH_NAME");
     2326        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_NEWS_WITH_NAME");
    23272327        query.setString("name", name);
    23282328        news = HibernateUtil.loadData(NewsData.class, query);
     
    23692369      if (pluginType == null)
    23702370      {
    2371         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_PLUGINTYPE_FOR_INTERFACENAME");
     2371        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_PLUGINTYPE_FOR_INTERFACENAME");
    23722372        query.setString("interfaceName", interfaceName);
    23732373        pluginType = HibernateUtil.loadData(PluginTypeData.class, query);
     
    24992499      dc = sessionControl.newDbControl();
    25002500     
    2501       org.hibernate.Query query = null;
     2501      org.hibernate.query.Query query = null;
    25022502      if (update)
    25032503      {
     
    25872587      if (formula == null)
    25882588      {
    2589         org.hibernate.Query query = null;
     2589        org.hibernate.query.Query query = null;
    25902590        if (rawDataType == null)
    25912591        {
     
    26542654      if (platform == null)
    26552655      {
    2656         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     2656        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    26572657          "GET_PLATFORM_FOR_EXTERNAL_ID");
    26582658        query.setString("externalId", externalId);
     
    27382738      if (variant == null)
    27392739      {
    2740         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     2740        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    27412741          "GET_PLATFORMVARIANT_FOR_EXTERNAL_ID");
    27422742        query.setString("externalId", externalId);
     
    28282828      if (fileType == null)
    28292829      {
    2830         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     2830        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    28312831          "GET_DATAFILETYPE_FOR_EXTERNAL_ID");
    28322832        query.setString("externalId", externalId);
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/InternalJobQueue.java

    r7015 r7372  
    322322        "FIND_JOBS_IN_QUEUE" : "FIND_INTERNAL_JOBS_IN_QUEUE";
    323323     
    324       org.hibernate.Query query =
     324      org.hibernate.query.Query query =
    325325        HibernateUtil.getPredefinedQuery(dc.getHibernateSession(), hqlName);
    326326      /*
     
    398398      dc = sc.newDbControl();
    399399     
    400       org.hibernate.Query query =
     400      org.hibernate.query.Query query =
    401401        HibernateUtil.getPredefinedQuery(dc.getHibernateSession(), "FIND_EXTERNAL_JOBS_FOR_STATUS_UPDATE");
    402402      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/ItemKey.java

    r6881 r7372  
    183183      session = HibernateUtil.newSession();
    184184      tx = HibernateUtil.newTransaction(session);
    185       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "FIND_USED_ITEMKEY_IDS");
     185      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "FIND_USED_ITEMKEY_IDS");
    186186      /*
    187187        SELECT DISTINCT sd.itemKey.id
     
    253253  {
    254254    org.hibernate.Session session = getDbControl().getHibernateSession();
    255     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     255    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    256256      "GET_SHAREABLE_ITEMS_FOR_ITEMKEY");
    257257    /*
     
    277277
    278278    // Shareable items
    279     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     279    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    280280      "GET_SHAREABLE_ITEMS_FOR_ITEMKEY");
    281281      /*
     
    403403      //    user/permissions combinations
    404404      int numPermissions = userPermissions == null ? 0 : userPermissions.size();
    405       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_ITEMKEY_IDS_FOR_USERCOUNT");
     405      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_ITEMKEY_IDS_FOR_USERCOUNT");
    406406      /*
    407407        SELECT ik.id FROM ItemKeyData ik
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/ItemSubtype.java

    r7308 r7372  
    427427    Item mainType = getMainItemType();
    428428    org.hibernate.Session session = getDbControl().getHibernateSession();
    429     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     429    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    430430        "GET_SUBTYPABLE_ITEMS_FOR_SUBTYPE_OF_CLASS", "count(*)", mainType.getDataClass().getName());
    431431      /*
     
    478478 
    479479    // Subtypable items
    480     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     480    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    481481        "GET_SUBTYPABLE_ITEMS_FOR_SUBTYPE_OF_CLASS", "sub.id", mainType.getDataClass().getName());
    482482      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Job.java

    r7329 r7372  
    227227    {
    228228      org.hibernate.Session session = getDbControl().getHibernateSession();
    229       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     229      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    230230        "GET_TRANSFORMATIONS_FOR_JOB", "count(*)");
    231231      /*
     
    240240    {
    241241      org.hibernate.Session session = getDbControl().getHibernateSession();
    242       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     242      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    243243        "GET_RAWBIOASSAYS_FOR_JOB", "count(*)");
    244244      /*
     
    253253    {
    254254      org.hibernate.Session session = getDbControl().getHibernateSession();
    255       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     255      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    256256        "GET_ARRAYDESIGNS_FOR_JOB", "count(*)");
    257257      /*
     
    266266    {
    267267      org.hibernate.Session session = getDbControl().getHibernateSession();
    268       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     268      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    269269        "GET_DERIVEDBIOASSAYS_FOR_JOB", "count(*)");
    270270      /*
     
    287287    Set<ItemProxy> using = super.getUsingItems();
    288288    org.hibernate.Session session = getDbControl().getHibernateSession();
    289     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     289    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    290290      "GET_TRANSFORMATIONS_FOR_JOB", "trf.id");
    291291      /*
     
    20022002    private void updateProgress(org.hibernate.Session session, int percent, String statusMessage)
    20032003    {
    2004       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "UPDATE_JOB_STATUS");
     2004      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "UPDATE_JOB_STATUS");
    20052005      query.setInteger("percent", percent);
    20062006      query.setString("statusMessage", statusMessage);
     
    20112011    private void appendProgress(org.hibernate.Session session, String statusMessage)
    20122012    {
    2013       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "APPEND_JOB_STATUS");
     2013      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "APPEND_JOB_STATUS");
    20142014      query.setString("statusMessage", statusMessage);
    20152015      query.setInteger("id", jobId);
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/JobAgent.java

    r6874 r7372  
    134134  {
    135135    if (externalId != null) externalId = externalId.trim();
    136     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
     136    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
    137137      "GET_JOBAGENT_FOR_EXTERNALID");
    138138    /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Keyring.java

    r7294 r7372  
    323323    {
    324324      // Get the groups where the user is a direct member
    325       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_ROLE_IDS_FOR_USER");
     325      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_ROLE_IDS_FOR_USER");
    326326      /*
    327327        SELECT ur.roleId
     
    350350    {
    351351      // Get the groups where the user is a direct member
    352       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_GROUP_IDS_FOR_USER");
     352      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_GROUP_IDS_FOR_USER");
    353353      /*
    354354        SELECT ug.groupId
     
    418418    {
    419419      // Get the projects where the user is the owner
    420       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_PROJECT_IDS_FOR_OWNER");
     420      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_PROJECT_IDS_FOR_OWNER");
    421421      /*
    422422        SELECT p.id
     
    493493       
    494494        // Get direct members of the active project
    495         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_USER_IDS_FOR_PROJECT");
     495        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_USER_IDS_FOR_PROJECT");
    496496        /*
    497497          SELECT up.userId
     
    549549    {
    550550      // Load keys shared directly to the logged in user
    551       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_USERKEYS_FOR_USER");
     551      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_USERKEYS_FOR_USER");
    552552      /*
    553553        SELECT uk
     
    619619    {
    620620      // Load the role keys from the database
    621       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_ROLEKEYS_FOR_USER");
     621      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_ROLEKEYS_FOR_USER");
    622622      /*
    623623        SELECT rk
     
    676676    {
    677677      // Load the pluginpermisson keys for the active plugin
    678       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_KEYS_FOR_PLUGIN");
     678      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_KEYS_FOR_PLUGIN");
    679679      /*
    680680          SELECT pdk
     
    712712    {
    713713      // Load the project keys for the active project
    714       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_PROJECTKEYS_FOR_PROJECT");
     714      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_PROJECTKEYS_FOR_PROJECT");
    715715      /*
    716716        SELECT pk
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Kit.java

    r7308 r7372  
    263263    if (!used)
    264264    {
    265       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     265      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    266266        "GET_BIOMATERIALEVENTS_FOR_KIT", "count(*)");
    267267      /*
     
    275275    if (!used)
    276276    {
    277       org.hibernate.Query q = HibernateUtil.getPredefinedQuery(session,
     277      org.hibernate.query.Query q = HibernateUtil.getPredefinedQuery(session,
    278278        "GET_BIOPLATEEVENTS_FOR_KIT", "count(*)");
    279279        /*
     
    287287    if (!used)
    288288    {
    289       org.hibernate.Query q = HibernateUtil.getPredefinedQuery(session,
     289      org.hibernate.query.Query q = HibernateUtil.getPredefinedQuery(session,
    290290          "GET_DERIVEDBIOASSAYS_FOR_KIT", "count(*)");
    291291          /*
     
    314314   
    315315    // Biomaterial events - biomaterials
    316     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     316    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    317317      "GET_BIOMATERIALEVENTS_FOR_KIT", "bme.bioMaterial");
    318318      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/LogControl.java

    r7189 r7372  
    138138    @return A Query
    139139  */
    140   public org.hibernate.Query createHqlQuery(String hql)
     140  public org.hibernate.query.Query createHqlQuery(String hql)
    141141  {
    142142    return HibernateUtil.createQuery(getSession(), hql);
     
    170170    @return A query
    171171  */
    172   public org.hibernate.Query createSqlQuery(String sql)
     172  public org.hibernate.query.Query createSqlQuery(String sql)
    173173  {
    174174    return HibernateUtil.createSqlQuery(getSession(), sql);
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/MeasuredBioMaterial.java

    r7308 r7372  
    9797  {
    9898    org.hibernate.Session session = getDbControl().getHibernateSession();
    99     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     99    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    100100      "GET_SOURCEEVENTS_FOR_BIOMATERIAL", "count(*)");
    101101    /*
     
    120120    Set<ItemProxy> using = super.getUsingItems();
    121121    org.hibernate.Session session = getDbControl().getHibernateSession();
    122     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     122    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    123123      "GET_SOURCEEVENTS_FOR_BIOMATERIAL", "bme.bioMaterial");
    124124      /*
     
    180180      }
    181181      getCreationEvent().clearSources();
    182       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(getDbControl().getHibernateSession(),
     182      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(getDbControl().getHibernateSession(),
    183183          "CLEAR_ORIGINAL_BIOMATERIAL_ON_BIOWELLS");
    184184      /*
     
    637637    {
    638638      // Load current value from the database
    639       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(), "GET_REMAINING_QUANTITY");
     639      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(), "GET_REMAINING_QUANTITY");
    640640      query.setEntity("bioMaterial", bioMaterial);
    641641      Float remainBefore = HibernateUtil.loadData(Float.class, query);
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Message.java

    r7016 r7372  
    141141    throws BaseException
    142142  {
    143     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
     143    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
    144144      "COUNT_UNREAD_MESSAGES_FOR_USER");
    145145    /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Migration.java

    r7327 r7372  
    7272import net.sf.basedb.util.Values;
    7373
    74 import org.hibernate.Query;
     74import org.hibernate.query.Query;
    7575import org.hibernate.Session;
    7676import org.hibernate.Transaction;
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/MimeType.java

    r7308 r7372  
    109109  {
    110110    org.hibernate.Session session = dc.getHibernateSession();
    111     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_MIME_TYPE_FROM_EXTENSION");
     111    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_MIME_TYPE_FROM_EXTENSION");
    112112    /*
    113113      SELECT mt
     
    151151    String extension = dot >= 0 ? name.substring(dot + 1) : name;
    152152    org.hibernate.Session session = dc.getHibernateSession();
    153     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_MIME_TYPE_FROM_EXTENSION");
     153    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_MIME_TYPE_FROM_EXTENSION");
    154154    /*
    155155      SELECT mt
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/PermissionTemplate.java

    r6881 r7372  
    132132  {
    133133    org.hibernate.Session session = getDbControl().getHibernateSession();
    134     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     134    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    135135      "GET_PROJECTS_FOR_PERMISSION_TEMPLATE", "count(*)");
    136136    /*
     
    156156   
    157157    // Labeled extracts
    158     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     158    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    159159        "GET_PROJECTS_FOR_PERMISSION_TEMPLATE", "prj.id");
    160160    /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/PhysicalBioAssay.java

    r7308 r7372  
    250250    Set<ItemProxy> using = super.getUsingItems();
    251251    org.hibernate.Session session = getDbControl().getHibernateSession();
    252     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     252    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    253253      "GET_ROOT_DERIVEDBIOASSAYS_FOR_PHYSICALBIOASSAY", "dba.id");
    254254      /*
     
    507507  {
    508508    org.hibernate.Session session = getDbControl().getHibernateSession();
    509     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     509    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    510510      "GET_ROOT_DERIVEDBIOASSAYS_FOR_PHYSICALBIOASSAY", "count(*)");
    511511    /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Plate.java

    r7308 r7372  
    204204  {
    205205    org.hibernate.Session session = getDbControl().getHibernateSession();
    206     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     206    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    207207      "GET_CHILDPLATES_FOR_PLATE", "count(*)");
    208208    /*
     
    244244   
    245245    // Plates
    246     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     246    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    247247        "GET_CHILDPLATES_FOR_PLATE", "p.id");
    248248      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/PlateEventType.java

    r7016 r7372  
    222222  {
    223223    org.hibernate.Session session = getDbControl().getHibernateSession();
    224     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     224    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    225225      "GET_PLATEEVENTS_FOR_PLATEEVENTTYPE", "count(*)");
    226226    /*
     
    244244    Set<ItemProxy> using = super.getUsingItems();
    245245    org.hibernate.Session session = getDbControl().getHibernateSession();
    246     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     246    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    247247      "GET_PLATEEVENTS_FOR_PLATEEVENTTYPE", "pe.id");
    248248      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/PlateGeometry.java

    r7308 r7372  
    222222  {
    223223    org.hibernate.Session session = getDbControl().getHibernateSession();
    224     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     224    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    225225      "GET_PLATETYPES_FOR_PLATEGEOMETRY", "count(*)");
    226226    /*
     
    274274   
    275275    // Plate types
    276     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     276    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    277277      "GET_PLATETYPES_FOR_PLATEGEOMETRY", "pt.id");
    278278      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/PlateMapping.java

    r7308 r7372  
    188188  {
    189189    org.hibernate.Session session = getDbControl().getHibernateSession();
    190     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     190    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    191191      "GET_PLATES_FOR_PLATEMAPPING", "count(*)");
    192192    /*
     
    212212    org.hibernate.Session session = getDbControl().getHibernateSession();
    213213    // Plates
    214     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     214    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    215215      "GET_PLATES_FOR_PLATEMAPPING", "p.id");
    216216      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/PlateType.java

    r7308 r7372  
    156156  {
    157157    org.hibernate.Session session = getDbControl().getHibernateSession();
    158     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     158    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    159159      "GET_PLATES_FOR_PLATETYPE", "count(*)");
    160160    /*
     
    178178    Set<ItemProxy> using = super.getUsingItems();
    179179    org.hibernate.Session session = getDbControl().getHibernateSession();
    180     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     180    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    181181      "GET_PLATES_FOR_PLATETYPE", "p.id");
    182182      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Platform.java

    r7016 r7372  
    161161  {
    162162    if (externalId != null) externalId = externalId.trim();
    163     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
     163    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
    164164      "GET_PLATFORM_FOR_EXTERNAL_ID");
    165165    /*
     
    282282  {
    283283    org.hibernate.Session session = getDbControl().getHibernateSession();
    284     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     284    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    285285      "GET_RAWBIOASSAYS_FOR_PLATFORM", "count(*)");
    286286    /*
     
    317317    Set<ItemProxy> using = super.getUsingItems();
    318318    org.hibernate.Session session = getDbControl().getHibernateSession();
    319     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     319    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    320320      "GET_RAWBIOASSAYS_FOR_PLATFORM", "rba.id");
    321321      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/PlatformVariant.java

    r7016 r7372  
    163163  {
    164164    if (externalId != null) externalId = externalId.trim();
    165     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
     165    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
    166166      "GET_PLATFORMVARIANT_FOR_EXTERNAL_ID");
    167167    /*
     
    284284  {
    285285    org.hibernate.Session session = getDbControl().getHibernateSession();
    286     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     286    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    287287      "GET_RAWBIOASSAYS_FOR_VARIANT", "count(*)");
    288288    /*
     
    319319    Set<ItemProxy> using = super.getUsingItems();
    320320    org.hibernate.Session session = getDbControl().getHibernateSession();
    321     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     321    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    322322      "GET_RAWBIOASSAYS_FOR_VARIANT", "rba.id");
    323323      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/PluginConfiguration.java

    r7308 r7372  
    248248  {
    249249    org.hibernate.Session session = getDbControl().getHibernateSession();
    250     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     250    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    251251      "GET_JOBS_FOR_PLUGINCONFIGURATION", "count(*)");
    252252    /*
     
    270270    Set<ItemProxy> using = super.getUsingItems();
    271271    org.hibernate.Session session = getDbControl().getHibernateSession();
    272     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     272    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    273273      "GET_JOBS_FOR_PLUGINCONFIGURATION", "j.id");
    274274      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/PluginDefinition.java

    r7308 r7372  
    188188  {
    189189    if (className != null) className = className.trim();
    190     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
     190    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
    191191      "GET_PLUGINDEFINITION_FOR_CLASSNAME");
    192192    /*
     
    282282   
    283283    org.hibernate.Session session = dc.getHibernateSession();
    284     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "COUNT_PLUGINS_BY_TYPE_FOR_CONTEXT");
     284    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "COUNT_PLUGINS_BY_TYPE_FOR_CONTEXT");
    285285    /*
    286286      SELECT plg.mainType, count(DISTINCT plg.id)
     
    351351    try
    352352    {
    353       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     353      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    354354        "GET_PLUGINDEFINITION_FOR_CLASSNAME");
    355355     
     
    501501  {
    502502    org.hibernate.Session session = getDbControl().getHibernateSession();
    503     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     503    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    504504      "GET_PLUGINCONFIGURATIONS_FOR_PLUGINDEFINITION", "count(*)");
    505505    /*
     
    552552
    553553    // Plugin configurations
    554     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     554    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    555555      "GET_PLUGINCONFIGURATIONS_FOR_PLUGINDEFINITION", "pc.id");
    556556      /*
     
    11671167  public boolean supports(String interfaceName)
    11681168  {
    1169     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(
     1169    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(
    11701170      getDbControl().getHibernateSession(), "GET_PLUGINTYPE_FOR_INTERFACENAME");
    11711171    query.setString("interfaceName", interfaceName);
     
    14381438      interfaceNames.add(in.getName());
    14391439    }
    1440     org.hibernate.Query query = HibernateUtil.createQuery(
     1440    org.hibernate.query.Query query = HibernateUtil.createQuery(
    14411441      getDbControl().getHibernateSession(), "SELECT pt FROM PluginTypeData pt");
    14421442    List<PluginTypeData> types = HibernateUtil.loadList(PluginTypeData.class, query, null);
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/PluginType.java

    r7308 r7372  
    126126  {
    127127    if (interfaceName != null) interfaceName = interfaceName.trim();
    128     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(
     128    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(
    129129      dc.getHibernateSession(), "GET_PLUGINTYPE_FOR_INTERFACENAME");
    130130    query.setParameter("interfaceName", interfaceName);
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Project.java

    r7308 r7372  
    587587    {
    588588      // Load the project keys for the current project
    589       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_PROJECTKEYIDS_FOR_PROJECT");
     589      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_PROJECTKEYIDS_FOR_PROJECT");
    590590      /*
    591591        SELECT pk.keyId
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/ProjectKey.java

    r6881 r7372  
    137137      session = HibernateUtil.newSession();
    138138      tx = HibernateUtil.newTransaction(session);
    139       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "FIND_USED_PROJECTKEY_IDS");
     139      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "FIND_USED_PROJECTKEY_IDS");
    140140      /*
    141141        SELECT DISTINCT sd.projectKey.id
     
    206206  {
    207207    org.hibernate.Session session = getDbControl().getHibernateSession();
    208     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     208    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    209209      "GET_SHAREABLE_ITEMS_FOR_PROJECTKEY");
    210210    /*
     
    230230 
    231231    // Shareable items
    232     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     232    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    233233      "GET_SHAREABLE_ITEMS_FOR_PROJECTKEY");
    234234      /*
     
    316316      // have project/permission combinations
    317317      int numPermissions = projectPermissions.size();
    318       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_PROJECTKEY_IDS_FOR_COUNT");
     318      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_PROJECTKEY_IDS_FOR_COUNT");
    319319      /*
    320320        SELECT pk.keyId FROM ProjectKeys pk
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/ProjectSpecificAnnotationsManager.java

    r7263 r7372  
    8484  private final List<AnnotationInfo> createdInherited;
    8585 
    86   private org.hibernate.Query findProjectSpecific;
     86  private org.hibernate.query.Query findProjectSpecific;
    8787
    8888  ProjectSpecificAnnotationsManager(org.hibernate.Session session)
     
    175175    {
    176176      if (deletedPrimary.size() == 0) deletedPrimary.add(-1);
    177       org.hibernate.Query query = HibernateUtil.getPredefinedSQLQuery(session,
     177      org.hibernate.query.Query query = HibernateUtil.getPredefinedSQLQuery(session,
    178178        "PS_RESET_OVERRIDE_ON_PROJECT_ANNOTATIONS");
    179179      /*
     
    197197    if (createdPrimary.size() > 0)
    198198    {
    199       org.hibernate.Query defaultQuery = HibernateUtil.getPredefinedSQLQuery(session,
     199      org.hibernate.query.Query defaultQuery = HibernateUtil.getPredefinedSQLQuery(session,
    200200        "PS_UPDATE_PROJECT_ANNOTATION_OVERRIDE_REF");
    201201      /*
     
    206206        AND [source] = 0  AND [project_id] <> 0
    207207      */
    208       org.hibernate.Query projectQuery = HibernateUtil.getPredefinedSQLQuery(session,
     208      org.hibernate.query.Query projectQuery = HibernateUtil.getPredefinedSQLQuery(session,
    209209        "PS_FIND_OVERRIDE_ID_FOR_PROJECT_ANNOTATION");
    210210      /*
     
    248248    if (createdInherited.size() > 0)
    249249    {
    250       org.hibernate.Query defaultQuery = HibernateUtil.getPredefinedSQLQuery(session,
     250      org.hibernate.query.Query defaultQuery = HibernateUtil.getPredefinedSQLQuery(session,
    251251        "PS_UPDATE_PROJECT_ANNOTATION_OVERRIDE_REF_INHERITED");
    252252      /*
     
    260260        )
    261261       */
    262       org.hibernate.Query projectQuery = HibernateUtil.getPredefinedSQLQuery(session,
     262      org.hibernate.query.Query projectQuery = HibernateUtil.getPredefinedSQLQuery(session,
    263263        "PS_FIND_OVERRIDE_ID_FOR_PROJECT_ANNOTATION_INHERITED");
    264264      /*
     
    326326
    327327    // Load information about all annotations that should be deleted
    328     org.hibernate.Query loadAnnotationsToDelete = HibernateUtil.getPredefinedSQLQuery(session,
     328    org.hibernate.query.Query loadAnnotationsToDelete = HibernateUtil.getPredefinedSQLQuery(session,
    329329      "PS_LOAD_ANNOTATIONS_IN_NON_EXISTING_PROJECTS");
    330330      /*
     
    356356
    357357    // Delete the "Annotations" entries -- The list of projects is expected to be relatively small
    358     org.hibernate.Query deleteFromAnnotations = HibernateUtil.getPredefinedSQLQuery(session,
     358    org.hibernate.query.Query deleteFromAnnotations = HibernateUtil.getPredefinedSQLQuery(session,
    359359      "PS_DELETE_FROM_ANNOTATIONS_IN_PROJECTS");
    360360      /*
     
    365365
    366366    // Delete from ***Values and ParameterValues tables
    367     org.hibernate.Query deleteFromParameterValues = HibernateUtil.getPredefinedSQLQuery(session,
     367    org.hibernate.query.Query deleteFromParameterValues = HibernateUtil.getPredefinedSQLQuery(session,
    368368      "PS_DELETE_FROM_PARAMETERVALUES");
    369369    /*
     
    383383      {
    384384       
    385         org.hibernate.Query deleteFromValues = HibernateUtil.getPredefinedSQLQuery(session,
     385        org.hibernate.query.Query deleteFromValues = HibernateUtil.getPredefinedSQLQuery(session,
    386386          "PS_DELETE_FROM_VALUES", valueType.getTableName());
    387387        /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Protocol.java

    r7308 r7372  
    351351    if (!used)
    352352    {
    353       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     353      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    354354        "GET_BIOMATERIALEVENTS_FOR_PROTOCOL", "count(*)");
    355355      /*
     
    363363    if (!used)
    364364    {
    365       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     365      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    366366        "GET_PLATEEVENTS_FOR_PROTOCOL", "count(*)");
    367367      /*
     
    375375    if (!used)
    376376    {
    377       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     377      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    378378        "GET_ARRAYBATCHES_FOR_PROTOCOL", "count(*)");
    379379      /*
     
    387387    if (!used)
    388388    {
    389       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     389      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    390390        "GET_DERIVEDBIOASSAY_FOR_PROTOCOL", "count(*)");
    391391      /*
     
    399399    if (!used)
    400400    {
    401       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     401      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    402402        "GET_RAWBIOASSAYS_FOR_PROTOCOL", "count(*)");
    403403      /*
     
    429429   
    430430    // Biomaterial events - biomaterials
    431     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     431    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    432432      "GET_BIOMATERIALEVENTS_FOR_PROTOCOL", "bme.bioMaterial");
    433433      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Quantity.java

    r7346 r7372  
    335335  {
    336336    org.hibernate.Session session = getDbControl().getHibernateSession();
    337     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     337    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    338338      "GET_UNITS_FOR_QUANTITY", "count(*)");
    339339    /*
     
    372372   
    373373    // Units
    374     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     374    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    375375        "GET_UNITS_FOR_QUANTITY", "unt.id");
    376376    /*
     
    572572  UnitData getUnit(org.hibernate.Session session, String symbol)
    573573  {
    574     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(
     574    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(
    575575        session, "GET_UNIT_WITH_SYMBOL_FOR_QUANTITY");
    576576    query.setEntity("quantity", this.getData());
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Quota.java

    r7155 r7372  
    267267    boolean used = false;
    268268    org.hibernate.Session session = getDbControl().getHibernateSession();
    269     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     269    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    270270      "GET_USERS_FOR_QUOTA", "count(*)");
    271271    /*
     
    305305   
    306306    // Users
    307     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     307    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    308308      "GET_USERS_FOR_QUOTA", "u.id");
    309309      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/RawBioAssay.java

    r7308 r7372  
    351351  {
    352352    org.hibernate.Session session = getDbControl().getHibernateSession();
    353     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     353    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    354354      "GET_EXPERIMENTS_FOR_RAWBIOASSAY", "count(*)");
    355355    /*
     
    391391   
    392392    // Experiments
    393     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     393    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    394394      "GET_EXPERIMENTS_FOR_RAWBIOASSAY", "xp.id");
    395395      /*
     
    12401240      int numFeatures = design.getNumDbFeatures();
    12411241      Map<Object, FeatureData> features = new HashMap<Object, FeatureData>(numFeatures);
    1242       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getStatelessSession(), "PRELOAD_FEATURES");
     1242      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getStatelessSession(), "PRELOAD_FEATURES");
    12431243      /*
    12441244        SELECT f
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/RawDataBatcher.java

    r6881 r7372  
    149149    A query to find reporters by the external id.
    150150  */
    151   private org.hibernate.Query findReporter;
     151  private org.hibernate.query.Query findReporter;
    152152
    153153  /**
     
    563563    {
    564564      DbControl dc = getDbControl();
    565       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getStatelessSession(), "COUNT_FEATURES_FOR_ARRAYDESIGN");
     565      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getStatelessSession(), "COUNT_FEATURES_FOR_ARRAYDESIGN");
    566566      /*
    567567        SELECT count(*)
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/RawDataTypes.java

    r6881 r7372  
    113113      }
    114114     
    115       org.hibernate.Query query = HibernateUtil.createQuery(session,
     115      org.hibernate.query.Query query = HibernateUtil.createQuery(session,
    116116        "FROM PlatformData pfd WHERE pfd.fileOnly = true");
    117117      for (PlatformData platform : HibernateUtil.loadList(PlatformData.class, query, null))
     
    268268        tx = HibernateUtil.newTransaction(session);
    269269      }
    270       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     270      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    271271        "GET_PLATFORM_FOR_EXTERNAL_ID");
    272272      query.setString("externalId", id.substring(9));
     
    300300        tx = HibernateUtil.newTransaction(session);
    301301      }
    302       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     302      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    303303        "GET_PLATFORMVARIANT_FOR_EXTERNAL_ID");
    304304      query.setString("externalId", id.substring(8));
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Reporter.java

    r7014 r7372  
    3030import net.sf.basedb.core.query.PermissionRestriction;
    3131
    32 import org.hibernate.SQLQuery;
     32import org.hibernate.query.NativeQuery;
    3333import org.hibernate.metadata.ClassMetadata;
    3434
     
    111111      String sql = getClonedSelectSql(vdb);
    112112      sql += " where " + HibernateUtil.quote("id") + "=:id";
    113       SQLQuery q = HibernateUtil.createSqlQuery(dc.getStatelessSession(), sql.toString());
     113      NativeQuery q = HibernateUtil.createSqlQuery(dc.getStatelessSession(), sql.toString());
    114114      q.setInteger("id", id);
    115115      q.addEntity(ReporterData.class);
     
    150150    }
    151151    org.hibernate.StatelessSession session = dc.getStatelessSession();
    152     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_REPORTER_FOR_EXTERNAL_ID");
     152    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_REPORTER_FOR_EXTERNAL_ID");
    153153    query.setString("externalId", externalId);
    154154   
     
    187187      String sql = getClonedSelectSql(vdb);
    188188      sql += " where " + HibernateUtil.quote("external_id") + "=:id";
    189       SQLQuery q = HibernateUtil.createSqlQuery(dc.getStatelessSession(), sql.toString());
     189      NativeQuery q = HibernateUtil.createSqlQuery(dc.getStatelessSession(), sql.toString());
    190190      q.setString("id", externalId);
    191191      q.addEntity(ReporterData.class);
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/ReporterBatcher.java

    r6127 r7372  
    188188    A query to find reporters by the external id.
    189189  */
    190   private org.hibernate.Query findReporter;
     190  private org.hibernate.query.Query findReporter;
    191191 
    192192  /**
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/ReporterCloneTemplate.java

    r7308 r7372  
    183183  {
    184184    org.hibernate.Session session = getDbControl().getHibernateSession();
    185     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     185    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    186186      "GET_VIRTUALDBS_FOR_REPORTERCLONETEMPLATE", "count(*)");
    187187    /*
     
    208208   
    209209    // Array batches
    210     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     210    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    211211      "GET_VIRTUALDBS_FOR_REPORTERCLONETEMPLATE", "vdb.experiment.id");
    212212      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/ReporterType.java

    r7308 r7372  
    216216  {
    217217    org.hibernate.Session session = getDbControl().getHibernateSession();
    218     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     218    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    219219      "GET_REPORTERS_FOR_REPORTERTYPE", "count(*)");
    220220    /*
     
    238238    Set<ItemProxy> using = super.getUsingItems();
    239239    org.hibernate.Session session = getDbControl().getHibernateSession();
    240     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     240    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    241241      "GET_REPORTERS_FOR_REPORTERTYPE", "rpt.id");
    242242      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Sample.java

    r6993 r7372  
    181181    Set<ItemProxy> using = super.getUsingItems();
    182182    org.hibernate.Session session = getDbControl().getHibernateSession();
    183     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     183    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    184184      "GET_EXTRACTS_FOR_SAMPLE", "e.id");
    185185      /*
     
    274274  {
    275275    org.hibernate.Session session = getDbControl().getHibernateSession();
    276     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     276    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    277277      "GET_EXTRACTS_FOR_SAMPLE", "count(*)");
    278278    /*
     
    296296  {
    297297    org.hibernate.Session session = getDbControl().getHibernateSession();
    298     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     298    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    299299      "GET_SOURCEEVENTS_FOR_BIOMATERIAL", "count(*)");
    300300    /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/ServiceSessionControl.java

    r7150 r7372  
    3737
    3838import org.hibernate.FlushMode;
    39 import org.hibernate.Query;
     39import org.hibernate.query.Query;
    4040import org.hibernate.Session;
    4141import org.hibernate.SessionBuilder;
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/SessionControl.java

    r7294 r7372  
    197197       
    198198        // Find the internal client id for the given external id
    199         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_CLIENT_FOR_EXTERNAL_ID");
     199        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_CLIENT_FOR_EXTERNAL_ID");
    200200        /*
    201201          SELECT cli
     
    441441    else if (login != null)
    442442    {
    443       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_USER_FOR_LOGIN");
     443      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_USER_FOR_LOGIN");
    444444      /*
    445445        SELECT usr
     
    719719     
    720720      // Find the internal client id for the given external id
    721       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_CLIENT_FOR_EXTERNAL_ID");
     721      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_CLIENT_FOR_EXTERNAL_ID");
    722722      /*
    723723        SELECT cli
     
    17881788      session = HibernateUtil.newSession();
    17891789      tx = HibernateUtil.newTransaction(session);
    1790       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "LOAD_CONTEXT_NAMES");
     1790      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "LOAD_CONTEXT_NAMES");
    17911791      /*
    17921792        SELECT ctx.id, ctx.name
     
    18761876      tx = HibernateUtil.newTransaction(session);
    18771877     
    1878       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "LOAD_CONTEXT_BY_NAME");
     1878      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "LOAD_CONTEXT_BY_NAME");
    18791879      /*
    18801880        SELECT ctx
     
    19521952        tx = HibernateUtil.newTransaction(session);
    19531953       
    1954         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     1954        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    19551955          "LOAD_USER_CONTEXTS");
    19561956          /*
     
    20292029        tx = HibernateUtil.newTransaction(session);
    20302030       
    2031         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     2031        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    20322032          "LOAD_USER_CONTEXTS");
    20332033          /*
     
    22022202  private Map<String, SettingInfo> loadClientDefaultSettings(org.hibernate.Session session, int clientId)
    22032203  {
    2204     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "LOAD_CLIENT_DEFAULT_SETTINGS");
     2204    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "LOAD_CLIENT_DEFAULT_SETTINGS");
    22052205    /*
    22062206      SELECT s
     
    22172217  private Map<String, SettingInfo> loadUserDefaultSettings(org.hibernate.Session session, int userId)
    22182218  {
    2219     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "LOAD_USER_DEFAULT_SETTINGS");
     2219    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "LOAD_USER_DEFAULT_SETTINGS");
    22202220    /*
    22212221      SELECT s
     
    22322232  private Map<String, SettingInfo> loadUserClientSettings(org.hibernate.Session session, int userId, int clientId)
    22332233  {
    2234     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "LOAD_USER_CLIENT_SETTINGS");
     2234    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "LOAD_USER_CLIENT_SETTINGS");
    22352235    /*
    22362236      SELECT s
     
    22542254      {
    22552255        ClientData clientData = HibernateUtil.loadData(session, ClientData.class, clientId);
    2256         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "LOAD_USER_CLIENT_SETTINGS");
     2256        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "LOAD_USER_CLIENT_SETTINGS");
    22572257        query.setEntity("user", userData);
    22582258        query.setEntity("client", clientData);
     
    22602260        saveAllCurrentContexts(session, userData, clientData);
    22612261      }
    2262       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "LOAD_USER_DEFAULT_SETTINGS");
     2262      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "LOAD_USER_DEFAULT_SETTINGS");
    22632263      query.setEntity("user", userData);
    22642264      saveSettings(session, query, loginInfo.userDefaultSettings, UserDefaultSettingData.class, userData, null);
     
    22802280  */
    22812281  private <I extends SettingData>
    2282   void saveSettings(org.hibernate.Session session, org.hibernate.Query query, Map<String, SettingInfo> settings, Class<I> dataClass, UserData userData, ClientData clientData)
     2282  void saveSettings(org.hibernate.Session session, org.hibernate.query.Query query, Map<String, SettingInfo> settings, Class<I> dataClass, UserData userData, ClientData clientData)
    22832283    throws BaseException
    22842284  {
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Software.java

    r7308 r7372  
    244244    if (!used)
    245245    {
    246       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     246      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    247247        "GET_DERIVEDBIOASSAYS_FOR_SOFTWARE", "count(*)");
    248248      /*
     
    256256    if (!used)
    257257    {
    258       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     258      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    259259        "GET_RAWBIOASSAYS_FOR_SOFTWARE", "count(*)");
    260260      /*
     
    281281    Set<ItemProxy> using = super.getUsingItems();
    282282    org.hibernate.Session session = getDbControl().getHibernateSession();
    283     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     283    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    284284      "GET_RAWBIOASSAYS_FOR_SOFTWARE", "rba.id");
    285285      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Tag.java

    r7308 r7372  
    196196  {
    197197    org.hibernate.Session session = getDbControl().getHibernateSession();
    198     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     198    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    199199      "GET_EXTRACTS_FOR_TAG", "count(*)");
    200200    /*
     
    221221   
    222222    // Labeled extracts
    223     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     223    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    224224        "GET_EXTRACTS_FOR_TAG", "ext.id");
    225225    /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Trashcan.java

    r7082 r7372  
    428428      {
    429429        // Query for breaking AnyToAnyLinks between items
    430         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
     430        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(dc.getHibernateSession(),
    431431          "DELETE_ALL_ANYTOANY_TO");
    432432        /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Unit.java

    r7016 r7372  
    154154  {
    155155    org.hibernate.Session session = getDbControl().getHibernateSession();
    156     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     156    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    157157      "GET_ANNOTATIONS_FOR_UNIT", "count(*)");
    158158    /*
     
    191191   
    192192    // Annotation types
    193     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     193    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    194194        "GET_ANNOTATIONTYPES_FOR_UNIT", "at.id");
    195195    /*
     
    225225    if (action == Transactional.Action.DELETE)
    226226    {
    227       org.hibernate.Query query = HibernateUtil.getPredefinedSQLQuery(
     227      org.hibernate.query.Query query = HibernateUtil.getPredefinedSQLQuery(
    228228        getDbControl().getHibernateSession(), "SET_UNIT_TO_NULL_ON_PROPERTY_FILTERS");
    229229      /*
     
    547547       
    548548        String tableName = valueType.getTableName();
    549         org.hibernate.Query query = HibernateUtil.getPredefinedSQLQuery(session,
     549        org.hibernate.query.Query query = HibernateUtil.getPredefinedSQLQuery(session,
    550550          "RECALCULATE_ANNOTATIONS_FOR_UNIT", tableName);
    551551        /*
     
    582582     
    583583      // We also need to invalidate the annotations in the snapshot cache
    584       org.hibernate.Query query = HibernateUtil.createQuery(session,
     584      org.hibernate.query.Query query = HibernateUtil.createQuery(session,
    585585        "SELECT a.annotationSet " +
    586586        "FROM AnnotationData a " +
     
    685685  UnitData findOtherUnit(org.hibernate.Session session, String symbol)
    686686  {
    687     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(
     687    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(
    688688        session, "GET_UNIT_WITH_SYMBOL_FOR_UNIT");
    689689    query.setEntity("unit", this.getData());
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Update.java

    r7332 r7372  
    626626      try
    627627      {
    628         org.hibernate.Query query = HibernateUtil.createQuery(session,
     628        org.hibernate.query.Query query = HibernateUtil.createQuery(session,
    629629            "SELECT sv.schemaVersion FROM SchemaVersionData sv");
    630630        schemaVersion = HibernateUtil.loadData(Integer.class, query);
     
    635635      if (schemaVersion > 0)
    636636      {
    637         org.hibernate.Query query = HibernateUtil.createQuery(session,
     637        org.hibernate.query.Query query = HibernateUtil.createQuery(session,
    638638          "SELECT usr.id, usr.login FROM UserData usr WHERE usr.systemId='" + User.ROOT + "'");
    639639        Object[] user = (Object[])query.uniqueResult();
     
    709709    throws BaseException
    710710  {
    711     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_SCHEMA_VERSION_FOR_APP");
     711    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_SCHEMA_VERSION_FOR_APP");
    712712    query.setString("appId", appId);
    713713    SchemaVersionData data = HibernateUtil.loadData(SchemaVersionData.class, query);
     
    725725    throws BaseException
    726726  {
    727     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "SET_SCHEMA_VERSION_FOR_APP");
     727    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "SET_SCHEMA_VERSION_FOR_APP");
    728728    query.setInteger("schemaVersion", schemaVersion);
    729729    query.setInteger("build", build);
     
    810810      {
    811811        // Set destroyed=false on all bioplates
    812         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "SET_DISABLE_LOG_FOR_ANNOTATION_TYPES");
     812        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "SET_DISABLE_LOG_FOR_ANNOTATION_TYPES");
    813813        /*
    814814          UPDATE AnnotationTypeData at
     
    822822      {
    823823        // Set appId=net.sf.basedb.core on the only existing schema version entry
    824         org.hibernate.Query query = HibernateUtil.createQuery(session,
     824        org.hibernate.query.Query query = HibernateUtil.createQuery(session,
    825825          "UPDATE SchemaVersionData sv " +
    826826          "SET sv.appId = :appId WHERE sv.appId IS NULL");
     
    832832      {
    833833        // Set disableInheritance=false on all annotation types
    834         org.hibernate.Query query = HibernateUtil.createQuery(session,
     834        org.hibernate.query.Query query = HibernateUtil.createQuery(session,
    835835          "UPDATE AnnotationTypeData at " +
    836836          "SET at.disableInheritance = false " +
     
    842842      {
    843843        // Set source=0 on all existing "Annotations"
    844         org.hibernate.Query query = HibernateUtil.createQuery(session,
     844        org.hibernate.query.Query query = HibernateUtil.createQuery(session,
    845845          "UPDATE AnnotationData a " +
    846846          "SET a.source = 0 " +
     
    874874        {
    875875          String tableName = entry.getKey();
    876           org.hibernate.Query query;
     876          org.hibernate.query.Query query;
    877877          if (entry.getValue())
    878878          {
     
    895895      {
    896896        // Set projectAnnotations=false on all annotation types
    897         org.hibernate.Query query = HibernateUtil.createQuery(session,
     897        org.hibernate.query.Query query = HibernateUtil.createQuery(session,
    898898          "UPDATE AnnotationTypeData at " +
    899899          "SET at.projectAnnotations = false " +
     
    912912      {
    913913        // Set fingerprintType=MD5 on all file servers with a fingerprint
    914         org.hibernate.Query query = HibernateUtil.createQuery(session,
     914        org.hibernate.query.Query query = HibernateUtil.createQuery(session,
    915915          "UPDATE FileServerData fs " +
    916916          "SET fs.fingerprintType = 'MD5' " +
     
    958958      tx = HibernateUtil.newTransaction(session);
    959959
    960       org.hibernate.Query query = HibernateUtil.createQuery(session,
     960      org.hibernate.query.Query query = HibernateUtil.createQuery(session,
    961961        "SELECT fsm FROM FileSetMemberData fsm");
    962962      List<FileSetMemberData> members = HibernateUtil.loadList(FileSetMemberData.class, query, null);
     
    10481048          // Copy parent physical and derived bioassay information to the
    10491049          // new tables: ParentPhysicalBioAssays and ParentDerivedBioAssays
    1050           org.hibernate.Query query = HibernateUtil.getPredefinedSQLQuery(session, "COPY_PARENT_PHYSICAL_BIOASSAYS");
     1050          org.hibernate.query.Query query = HibernateUtil.getPredefinedSQLQuery(session, "COPY_PARENT_PHYSICAL_BIOASSAYS");
    10511051          /*
    10521052            INSERT INTO ParentPhysicalBioAssays (physicalbioassay_id, derivedbioassay_id)
     
    11691169          " where bm.parent is null or bm.parentType is null";
    11701170     
    1171       org.hibernate.Query query = HibernateUtil.createQuery(session, hql);
     1171      org.hibernate.query.Query query = HibernateUtil.createQuery(session, hql);
    11721172      List<BioMaterialEventData> events = HibernateUtil.loadList(BioMaterialEventData.class, query, null);
    11731173      int i = 0;
     
    12191219     
    12201220      String fixSql = "update [ChangeHistoryDetails] set [change_info] = :ci, [change_type] = :ct where [id] = :id";
    1221       org.hibernate.Query fixQuery = HibernateUtil.createSqlQuery(statelessSession, fixSql);
    1222 
    1223       org.hibernate.Query countQuery = HibernateUtil.createQuery(statelessSession, count);
     1221      org.hibernate.query.Query fixQuery = HibernateUtil.createSqlQuery(statelessSession, fixSql);
     1222
     1223      org.hibernate.query.Query countQuery = HibernateUtil.createQuery(statelessSession, count);
    12241224      long numItems = HibernateUtil.loadData(Long.class, countQuery);
    12251225     
    1226       org.hibernate.Query query = HibernateUtil.createQuery(statelessSession, hql);
     1226      org.hibernate.query.Query query = HibernateUtil.createQuery(statelessSession, hql);
    12271227      Iterator<ChangeHistoryDetailData> changes = HibernateUtil.loadIterator(ChangeHistoryDetailData.class, query, null);
    12281228     
     
    13591359          " select " + combinedListFields + ", false, false from [BioMaterialLists]";
    13601360     
    1361       org.hibernate.Query query = HibernateUtil.createSqlQuery(session, transferSql);
     1361      org.hibernate.query.Query query = HibernateUtil.createSqlQuery(session, transferSql);
    13621362      int numLists = query.executeUpdate();
    13631363   
     
    14171417        " where 0 in elements(lst.members)";
    14181418     
    1419       org.hibernate.Query query = HibernateUtil.createQuery(session, hql);
     1419      org.hibernate.query.Query query = HibernateUtil.createQuery(session, hql);
    14201420      List<ItemListData> lists = HibernateUtil.loadList(ItemListData.class, query, null);
    14211421      for (ItemListData list : lists)
     
    14591459        " inner join [RawBioAssays] [rba] on [rba].[id] = [er].[rawbioassay_id]";
    14601460     
    1461       org.hibernate.Query query = HibernateUtil.createSqlQuery(session, sql);
     1461      org.hibernate.query.Query query = HibernateUtil.createSqlQuery(session, sql);
    14621462      List<Object[]> list = HibernateUtil.loadList(Object[].class, query, null);
    14631463      for (Object[] entry : list)
     
    15201520        "   where [i].[annotationset_id]=[ia].[annotationset_id] and [i].[annotation_id]=[a].[id])";
    15211521     
    1522       org.hibernate.Query query = HibernateUtil.createSqlQuery(session, sql);
     1522      org.hibernate.query.Query query = HibernateUtil.createSqlQuery(session, sql);
    15231523      HibernateUtil.executeUpdate(query);
    15241524   
     
    15671567        " inner join [Annotations] [a] on [a].[id] = [i].[annotation_id]";
    15681568     
    1569       org.hibernate.Query query = HibernateUtil.createSqlQuery(session, sql);
     1569      org.hibernate.query.Query query = HibernateUtil.createSqlQuery(session, sql);
    15701570      List<Object[]> list = HibernateUtil.loadList(Object[].class, query, null);
    15711571     
     
    16381638        " and [xf].[annotationtype_id]=[a].[annotationtype_id]";
    16391639     
    1640       org.hibernate.Query query = HibernateUtil.createSqlQuery(session, sql);
     1640      org.hibernate.query.Query query = HibernateUtil.createSqlQuery(session, sql);
    16411641      List<Object[]> list = new ArrayList<Object[]>(HibernateUtil.loadList(Object[].class, query, null));
    16421642     
     
    17031703      QuantityData temperature = HibernateUtil.loadData(session, QuantityData.class, SystemItems.getId(Quantity.TEMPERATURE));
    17041704     
    1705       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     1705      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    17061706          "GET_UNIT_WITH_NAME_FOR_QUANTITY");
    17071707      query.setString("name", "Fahrenheit");
     
    17481748     
    17491749      // Load all DATE annotation types
    1750       org.hibernate.Query query = HibernateUtil.createQuery(statelessSession,
     1750      org.hibernate.query.Query query = HibernateUtil.createQuery(statelessSession,
    17511751        "SELECT at.name FROM AnnotationTypeData at WHERE at.valueType = " + Type.DATE.getValue());
    17521752      List<String> names = HibernateUtil.loadList(String.class, query, null);
     
    17601760     
    17611761      // This query is used to update the 'old_value' for a single change history entry
    1762       org.hibernate.Query fixQuery = HibernateUtil.createSqlQuery(statelessSession,
     1762      org.hibernate.query.Query fixQuery = HibernateUtil.createSqlQuery(statelessSession,
    17631763        "update [ChangeHistoryDetails] "+
    17641764        "set [old_value] = :value "+
     
    18411841      // Queries for deleting from Annotations+ParameterValues
    18421842      // that doesn't have any corresponding entry in one of the data values tables
    1843       org.hibernate.Query deleteAnnotations = HibernateUtil.createSqlQuery(session,
     1843      org.hibernate.query.Query deleteAnnotations = HibernateUtil.createSqlQuery(session,
    18441844        "delete from [Annotations] [a] where [a].[value_id] in (:ids)");
    1845       org.hibernate.Query deleteInherited = HibernateUtil.createSqlQuery(session,
     1845      org.hibernate.query.Query deleteInherited = HibernateUtil.createSqlQuery(session,
    18461846        "delete from [Annotations] [a] where [a].[inherited_id] in ("+
    18471847        "select [b].[id] from [Annotations] [b] where [b].[value_id] in (:ids))");
    1848       org.hibernate.Query deleteValues = HibernateUtil.createSqlQuery(session,
     1848      org.hibernate.query.Query deleteValues = HibernateUtil.createSqlQuery(session,
    18491849        "delete from [ParameterValues] [p] where [p].[id] in (:ids)");
    18501850     
     
    18541854        // Note that Annotations.value_id is null for inherited annotations
    18551855        // so we must LEFT JOIN the data value table
    1856         org.hibernate.Query query = HibernateUtil.createSqlQuery(session,
     1856        org.hibernate.query.Query query = HibernateUtil.createSqlQuery(session,
    18571857          "select [a].[value_id] from [Annotations] [a] " +
    18581858          "inner join [AnnotationTypes] [at] on [at].[id]=[a].[annotationtype_id] "+
     
    19101910     
    19111911      // Load the entries from ChangeHistoryDetails for each annotation type ordered by entry time
    1912       org.hibernate.Query query = HibernateUtil.createQuery(statelessSession,
     1912      org.hibernate.query.Query query = HibernateUtil.createQuery(statelessSession,
    19131913        "SELECT j FROM JobData j " +
    19141914        "WHERE j.server IS NOT NULL");
    19151915     
    19161916      // This query is used to update the 'server' and 'node' for a single job entry
    1917       org.hibernate.Query fixQuery = HibernateUtil.createSqlQuery(statelessSession,
     1917      org.hibernate.query.Query fixQuery = HibernateUtil.createSqlQuery(statelessSession,
    19181918        "update [Jobs] "+
    19191919        "set [server] = :server, [node] = :node "+
     
    19791979     
    19801980      // Load used quantity for all events
    1981       org.hibernate.Query eventQuery = HibernateUtil.createQuery(session,
     1981      org.hibernate.query.Query eventQuery = HibernateUtil.createQuery(session,
    19821982        "SELECT evt.bioMaterial.id, evt.usedQuantity FROM BioMaterialEventData evt WHERE NOT evt.usedQuantity IS NULL");
    19831983     
    19841984      // Load used quantity for sources to all events
    1985       org.hibernate.Query sourcesQuery = HibernateUtil.createQuery(session,
     1985      org.hibernate.query.Query sourcesQuery = HibernateUtil.createQuery(session,
    19861986        "SELECT src.bioMaterial.id, src.usedQuantity FROM BioMaterialEventSourceData src WHERE NOT src.usedQuantity IS NULL");
    19871987 
     
    20052005     
    20062006      // Update the remaining quantity
    2007       org.hibernate.Query updateQuery = HibernateUtil.createQuery(session,
     2007      org.hibernate.query.Query updateQuery = HibernateUtil.createQuery(session,
    20082008        "UPDATE MeasuredBioMaterialData mbm " +
    20092009        "SET mbm.remainingQuantity = :remain "+
     
    20612061  {
    20622062    org.hibernate.Transaction tx = null;
    2063     org.hibernate.Query query = null;
     2063    org.hibernate.query.Query query = null;
    20642064    try
    20652065    {
     
    21012101  {
    21022102    org.hibernate.Transaction tx = null;
    2103     org.hibernate.Query query = null;
     2103    org.hibernate.query.Query query = null;
    21042104    try
    21052105    {
     
    21612161  {
    21622162    org.hibernate.Transaction tx = null;
    2163     org.hibernate.Query query = null;
     2163    org.hibernate.query.Query query = null;
    21642164    try
    21652165    {
     
    21822182  {
    21832183    org.hibernate.Transaction tx = null;
    2184     org.hibernate.Query query = null;
     2184    org.hibernate.query.Query query = null;
    21852185    try
    21862186    {
     
    22042204  {
    22052205    org.hibernate.Transaction tx = null;
    2206     org.hibernate.Query query = null;
     2206    org.hibernate.query.Query query = null;
    22072207    try
    22082208    {
     
    22282228  {
    22292229    org.hibernate.Transaction tx = null;
    2230     org.hibernate.Query query = null;
     2230    org.hibernate.query.Query query = null;
    22312231    try
    22322232    {
     
    22742274  {
    22752275    org.hibernate.Transaction tx = null;
    2276     org.hibernate.Query query = null;
     2276    org.hibernate.query.Query query = null;
    22772277    try
    22782278    {
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/User.java

    r7308 r7372  
    146146    {
    147147      // Get the users which are members of the same groups
    148       org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_USER_IDS_FOR_GROUPS");
     148      org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_USER_IDS_FOR_GROUPS");
    149149      /*
    150150        SELECT ug.userId
     
    175175  static void addDefultRolesAndGroups(org.hibernate.Session session, UserData user)
    176176  {
    177     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "LOAD_DEFAULT_GROUPS");
     177    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "LOAD_DEFAULT_GROUPS");
    178178    /*
    179179      SELECT grp
     
    224224    if (login != null) login = login.trim();
    225225    org.hibernate.Session session = dc.getHibernateSession();
    226     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_USER_FOR_LOGIN");
     226    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_USER_FOR_LOGIN");
    227227    /*
    228228      SELECT usr
     
    245245    if (externalId != null) externalId = externalId.trim();
    246246    org.hibernate.Session session = dc.getHibernateSession();
    247     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "GET_USER_FOR_EXTERNAL_ID");
     247    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "GET_USER_FOR_EXTERNAL_ID");
    248248    /*
    249249      SELECT usr
     
    408408  {
    409409    org.hibernate.Session session = getDbControl().getHibernateSession();
    410     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     410    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    411411      "GET_OWNABLE_ITEMS_FOR_USER");
    412412    /*
     
    432432 
    433433    // Ownable items
    434     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     434    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    435435      "GET_OWNABLE_ITEMS_FOR_USER");
    436436      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/VirtualDb.java

    r6874 r7372  
    283283       
    284284        // Increase the number of cubes
    285         org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, "UPDATE_DATACUBENO_FOR_VIRTUALDB");
     285        org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session, "UPDATE_DATACUBENO_FOR_VIRTUALDB");
    286286        /*
    287287          UPDATE VirtualDbData vdb
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/Well.java

    r7126 r7372  
    200200  {
    201201    org.hibernate.Session session = getDbControl().getHibernateSession();
    202     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     202    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    203203      "GET_FEATURES_FOR_WELL", "count(*)");
    204204    /*
     
    238238   
    239239    // Child wells
    240     org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     240    org.hibernate.query.Query query = HibernateUtil.getPredefinedQuery(session,
    241241      "GET_CHILDWELLS_FOR_WELL", "w.id");
    242242      /*
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/log/TransactionDetails.java

    r6080 r7372  
    2424import java.util.Date;
    2525
    26 import org.hibernate.Query;
     26import org.hibernate.query.Query;
    2727
    2828import net.sf.basedb.core.LogControl;
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/log/db/AnnotationLogger.java

    r7131 r7372  
    2525
    2626import org.hibernate.Hibernate;
    27 import org.hibernate.Query;
     27import org.hibernate.query.Query;
    2828
    2929import net.sf.basedb.core.Annotation;
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/log/db/AnnotationSetLogger.java

    r6875 r7372  
    2424import java.util.List;
    2525
    26 import org.hibernate.Query;
     26import org.hibernate.query.Query;
    2727
    2828import net.sf.basedb.core.Item;
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/log/db/AnyToAnyLogger.java

    r6875 r7372  
    2424import java.util.List;
    2525
    26 import org.hibernate.Query;
     26import org.hibernate.query.Query;
    2727
    2828import net.sf.basedb.core.Item;
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/log/db/FileSetMemberLogger.java

    r6875 r7372  
    2525
    2626import org.hibernate.Hibernate;
    27 import org.hibernate.Query;
     27import org.hibernate.query.Query;
    2828
    2929import net.sf.basedb.core.Item;
  • branches/hibernate-5.2/src/core/net/sf/basedb/core/log/db/PlateEventLogger.java

    r6497 r7372  
    2323
    2424import org.hibernate.Hibernate;
    25 import org.hibernate.Query;
     25import org.hibernate.query.Query;
    2626
    2727import net.sf.basedb.core.Item;
Note: See TracChangeset for help on using the changeset viewer.