Changeset 4057 for trunk/src


Ignore:
Timestamp:
Dec 13, 2007, 1:45:00 PM (15 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #771: Make annotations for Bioassays available in bioassay table within a BioassaySet?

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/CellValue.java

    r3675 r4057  
    2323*/
    2424package net.sf.basedb.clients.web.taglib.table;
    25 
    26 import java.util.List;
    2725
    2826import javax.servlet.jsp.JspException;
     
    9795  */
    9896  private Object value = null;
    99   private List<?> list = null;
     97  private Iterable<?> list = null;
    10098  private String separator = "; ";
    10199
     
    113111  }
    114112 
    115   public void setList(List<?> list)
     113  public void setList(Iterable<?> list)
    116114  {
    117115    this.list = list;
    118116  }
    119117 
    120   public List<?> getList()
     118  public Iterable<?> getList()
    121119  {
    122120    return list;
     
    151149      theSeparator = separator;
    152150    }
    153     if (list != null && list.size() > 0)
     151    if (list != null)
    154152    {
    155153      for (Object o : list)
  • trunk/src/core/net/sf/basedb/core/AnnotationRestriction.java

    r3857 r4057  
    191191       
    192192        sqlQuery = HibernateUtil.createSqlQuery(session, sql);
    193         sqlQuery.addScalar("annotationset_id", org.hibernate.Hibernate.INTEGER);
     193        sqlQuery.addScalar("sid", org.hibernate.Hibernate.INTEGER);
    194194        if (debugSqlEnabled) logSql.debug("Executing annotation query: " + sql);
    195195        List<Integer> ids = HibernateUtil.loadList(Integer.class, sqlQuery, sc);
  • trunk/src/core/net/sf/basedb/core/PropertyFilter.java

    r3679 r4057  
    189189    property before proceeding.
    190190    <p>
    191     If the property starts with a # it is a filter on annotations. The rest of
     191    If the property starts with a # or ## it is a filter on annotations. The rest of
    192192    the property is the ID of the annotation type, and we use a
    193     {@link AnnotationSimpleRestriction} object for the restriction.
     193    {@link AnnotationSimpleRestriction} object for the restriction. If there
     194    is only one # in the prefix only direct annotations are searched, if there
     195    are two ##, inherited annotations are also searched.
    194196    <p>
    195197    If the property starts with a @ the property is a collection of values and
     
    227229    {
    228230      // Property is id of annotation type: #id
    229       int annotationTypeId = (Integer)Type.INT.parseString(property.substring(1));
     231      // If prefixed with two ## inherited annotations should be searched
     232      boolean searchInherited = property.startsWith("##");
     233      int annotationTypeId = (Integer)Type.INT.parseString(property.substring(searchInherited ? 2 : 1));
    230234      restriction = new AnnotationSimpleRestriction(alias, annotationTypeId, getValueType(),
    231         getOperator(), getValueAsObject(), false);
     235        getOperator(), getValueAsObject(), searchInherited);
    232236    }
    233237    else
Note: See TracChangeset for help on using the changeset viewer.