<?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="Sequence">

  <typeAlias alias="sequence" type="com.ibatis.jpetstore.domain.Sequence"/>

  <select id="getSequence" resultClass="sequence" parameterClass="sequence">
    SELECT name, nextid
    FROM SEQUENCE
    WHERE NAME = #name#
  </select>

  <update id="updateSequence" parameterClass="sequence">
    UPDATE SEQUENCE
    SET NEXTID = #nextId#
    WHERE NAME = #name#
  </update>

</sqlMap>
