Changeset 5063


Ignore:
Timestamp:
Aug 19, 2009, 1:31:03 PM (13 years ago)
Author:
Nicklas Nordborg
Message:

References #108: Logging the change history of an item

  • Added special loggers for data files (FileSetMember?) and plate events
Location:
trunk/src/core
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/common-queries.xml

    r5054 r5063  
    35653565    </description>
    35663566  </query>
     3567  <query id="DBLOG_GET_DATAFILETYPE_NAME" type="HQL">
     3568    <sql>
     3569      SELECT dft.name
     3570      FROM DataFileTypeData dft
     3571      WHERE dft.id = :dataFileTypeId
     3572    </sql>
     3573    <description>
     3574      An HQL query that loads the name of a data file type
     3575      given the ID.
     3576    </description>
     3577  </query>
     3578  <query id="DBLOG_GET_FILESET_ITEMTYPE" type="HQL">
     3579    <sql>
     3580      SELECT fs.itemType
     3581      FROM FileSetData fs
     3582      WHERE fs.id = :fileSetId
     3583    </sql>
     3584    <description>
     3585      An HQL query that loads the item type value a file set
     3586      set with a given ID belongs to.
     3587    </description>
     3588  </query>
     3589  <query id="DBLOG_GET_ITEMID_WITH_FILESET" type="HQL">
     3590    <sql>
     3591      SELECT i.id
     3592      FROM {1} i
     3593      WHERE i.fileSet = :fileSetId
     3594    </sql>
     3595    <description>
     3596      An HQL query that loads the ID of the item that
     3597      is associated with a given file set.
     3598    </description>
     3599  </query>
     3600  <query id="DBLOG_GET_PLATEEVENTTYPE_NAME" type="HQL">
     3601    <sql>
     3602      SELECT pet.name
     3603      FROM PlateEventTypeData pet
     3604      WHERE pet.id = :plateEventTypeId
     3605    </sql>
     3606    <description>
     3607      An HQL query that loads the name of a plate event type
     3608      given the ID.
     3609    </description>
     3610  </query>
    35673611
    35683612</predefined-queries>
  • trunk/src/core/net/sf/basedb/core/data/FileSetMemberData.java

    r4517 r5063  
    3636public class FileSetMemberData
    3737  extends BasicData
     38  implements LoggableData
    3839{
    3940
  • trunk/src/core/net/sf/basedb/core/data/PlateEventData.java

    r4889 r5063  
    3737public class PlateEventData
    3838  extends BasicData
     39  implements LoggableData
    3940{
    4041
  • trunk/src/core/net/sf/basedb/core/log/db/DbLogManagerFactory.java

    r5054 r5063  
    2929import net.sf.basedb.core.data.AnnotationData;
    3030import net.sf.basedb.core.data.BioMaterialEventData;
     31import net.sf.basedb.core.data.FileSetMemberData;
    3132import net.sf.basedb.core.data.LoggableData;
     33import net.sf.basedb.core.data.PlateEventData;
    3234import net.sf.basedb.core.log.EntityLogger;
    3335import net.sf.basedb.core.log.LogManager;
     
    5860    setSpecialLogger(BioMaterialEventData.class, new BioMaterialEventLogger(detailedProperties));
    5961    setSpecialLogger(AnnotationData.class, new AnnotationLogger());
     62    setSpecialLogger(FileSetMemberData.class, new FileSetMemberLogger());
     63    setSpecialLogger(PlateEventData.class, new PlateEventLogger(detailedProperties));
    6064  }
    6165
Note: See TracChangeset for help on using the changeset viewer.