report-codegen.xml 2.02 KB
<?xml version="1.0" encoding="UTF-8"?>
<entities>
  <entity name="business-report" table="businessReport" alias="b">
    <member name="id" field="id" value-type="int" length="10" nullable="false" key="true" auto-increment="true" />
    <member name="type" field="type" value-type="int" length="3" nullable="false" />
    <member name="name" field="name" value-type="String" length="20" nullable="false" />
    <member name="ip" field="ip" value-type="String" length="20" nullable="false" />
    <member name="product-line" field="productLine" value-type="String" length="50" nullable="false" />
    <member name="period" field="period" value-type="Date" nullable="false" />
    <member name="content" field="content" value-type="byte[]" length="2147483647" />
    <member name="creation-date" field="creation_date" value-type="Date" nullable="false" />
    <var name="key-id" value-type="int" key-member="id" />
    <primary-key name="PRIMARY" members="id" />
    <index name="IX_Period" members="period ASC" />
    <readsets>
      <readset name="FULL" all="true" />
    </readsets>
    <updatesets>
      <updateset name="FULL" all="true" />
    </updatesets>
    <query-defs>
      <query name="find-by-PK" type="SELECT">
        <param name="key-id" />
        <statement><![CDATA[SELECT <FIELDS/>
        FROM <TABLE/>
        WHERE <FIELD name='id'/> = ${key-id}]]></statement>
      </query>
      <query name="insert" type="INSERT">
        <statement><![CDATA[INSERT INTO <TABLE/>(<FIELDS/>)
        VALUES(<VALUES/>)]]></statement>
      </query>
      <query name="update-by-PK" type="UPDATE">
        <param name="key-id" />
        <statement><![CDATA[UPDATE <TABLE/>
        SET <FIELDS/>
        WHERE <FIELD name='id'/> = ${key-id}]]></statement>
      </query>
      <query name="delete-by-PK" type="DELETE">
        <param name="key-id" />
        <statement><![CDATA[DELETE FROM <TABLE/>
        WHERE <FIELD name='id'/> = ${key-id}]]></statement>
      </query>
    </query-defs>
  </entity>
</entities>