org.dbtools.xml.schema.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dbtools-gen Show documentation
Show all versions of dbtools-gen Show documentation
DBTools ORM Class Generator.
<?xml version="1.0" encoding="UTF-8" ?> <dbSchema xmlns='https://github.com/jeffdcamp/dbtools-gen' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='https://github.com/jeffdcamp/dbtools-gen dbschema.xsd'> <database name="main"> <!-- recommended: use fieldsDefaultNotNull="true" to make all table fields default notNull --> <table name="INDIVIDUAL_TYPE" className="IndividualType" enumerations="HEAD,SPOUSE,CHILD" readOnly="true"> <field name="_id" jdbcDataType="BIGINT" increment="true" primaryKey="true" notNull="true"/> <field name="NAME" jdbcDataType="VARCHAR" size="255" notNull="true" unique="true"/> </table> <table name="INDIVIDUAL" fieldsDefaultNotNull="true"> <field name="_id" jdbcDataType="BIGINT" increment="true" primaryKey="true" notNull="true"/> <field name="INDIVIDUAL_TYPE_ID" jdbcDataType="INTEGER" varName="individualType" foreignKeyTable="INDIVIDUAL_TYPE" foreignKeyField="_id" foreignKeyType="ENUM" enumerationDefault="HEAD"/> <!--<field name="INDIVIDUAL_TYPE" jdbcDataType="INTEGER" enumerationClass="IndividualType" enumerationDefault="HEAD"/>--> <!-- recommended: replace above field with this field AND your own custom enum class --> <field name="NAME" jdbcDataType="VARCHAR" size="255" notNull="true"/> <field name="DEFAULT_DEVICE" jdbcDataType="VARCHAR" size="255" notNull="false" defaultValue="android"/> <!-- text with a default value --> <field name="SAMPLE_DATE_TIME" jdbcDataType="DATETIME"/> <!-- text --> <field name="BIRTH_DATE" jdbcDataType="DATE"/> <!-- text --> <!--<field name="ALARM_TIME" jdbcDataType="TIME"/> --> <!-- text JSR-310 only--> <field name="LAST_MODIFIED" jdbcDataType="TIMESTAMP"/> <!-- long --> <field name="NUMBER" jdbcDataType="INTEGER"/> <field name="PHONE" jdbcDataType="VARCHAR" size="255"/> <field name="EMAIL" jdbcDataType="VARCHAR" size="255"/> <field name="DATA" jdbcDataType="BLOB"/> <field name="AMOUNT1" jdbcDataType="FLOAT"/> <field name="AMOUNT2" jdbcDataType="DOUBLE"/> <field name="ENABLED" jdbcDataType="BOOLEAN"/> <field name="SPOUSE_INDIVIDUAL_ID" jdbcDataType="BIGINT"/> </table> <view name="INDIVIDUAL_VIEW"> <field name="id" jdbcDataType="BIGINT"/> <field name="NAME" jdbcDataType="VARCHAR" size="255" notNull="true"/> </view> <query name="INDIVIDUAL_QUERY"> <field name="id" jdbcDataType="BIGINT"/> <field name="NAME" jdbcDataType="VARCHAR" size="255" notNull="true"/> <!--<field name="LOCATION_TYPE" jdbcDataType="INTEGER" enumerationClass="LocationType" enumerationDefault="HOME"/>--> <!-- recommended: use a custom enum class (see Individual.INDIVIDUAL_TYPE)--> </query> </database> </dbSchema>