Skip to content
Snippets Groups Projects
Select Git revision
  • e632e27a0fba2bb789ba055f3e06f90cab0082e6
  • master default protected
  • gh-pages
  • build-process-upgrade-merge
  • eb-apollo-generate_names
  • BT5_travis
  • hello_github
  • v18.1.0
  • v18.0.3
  • v18.0.2
  • v18.0.1
  • v18.0.0
  • v18.0.0-RC1
  • v17.0.1
  • v17.0.0
  • v16.0.17
  • v16.0.0
  • v15.0.0
  • v14.0.0
  • v13.2.0
20 results

PubDbXRef.xml

Blame
  • user avatar
    tjc authored
    git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@10761 ee4ac58c-ac51-4696-9907-e4b3aa274f04
    91b774e8
    History
    PubDbXRef.xml 1.40 KiB
    <?xml version="1.0" encoding="UTF-8" ?> 
     
    <!DOCTYPE sqlMap 
        PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" 
        "http://ibatis.apache.org/dtd/sql-map-2.dtd"> 
     
    
    <sqlMap namespace="PubDbXRef"> 
    
        <typeAlias alias="PubDbXRef"
            type="org.gmod.schema.pub.PubDbXRef"/>
    
      <resultMap id="select-pubdbxref" class="PubDbXRef">
        <result property="pub.pubId"   column="pub_id" />
        <result property="dbXRef.accession"   column="accession" />
        <result property="dbXRef.version"     column="version" />
        <result property="dbXRef.description" column="dbx_description" />
        <result property="dbXRef.db.name"     column="name" />
        <result property="dbXRef.db.description" column="description" />
        <result property="dbXRef.db.urlPrefix" column="urlprefix" />
        <result property="dbXRef.db.url" column="url" />
      </resultMap>
      
      <!-- SQL -->
     
      <select id="getPubDbXRef" resultMap="select-pubdbxref">
       select pub_id, pub_dbxref.dbxref_id, 
           accession, version, dbx.description AS dbx_description, 
           db.name, db.description, db.urlprefix, db.url FROM pub_dbxref 
           LEFT JOIN dbxref dbx ON pub_dbxref.dbxref_id=dbx.dbxref_id 
           LEFT JOIN db ON db.db_id=dbx.db_id 
      </select>
        
      <!-- WRITE BACK -->
      <insert id="insertPubDbXRef" parameterClass="PubDbXRef">
        INSERT INTO pub_dbxref ( pub_id, dbxref_id ) 
        VALUES ( $pub.pubId$, $dbXRef.dbXRefId$ )
      </insert> 
    </sqlMap>