<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fieldtypemodel PUBLIC "-//OFBiz//DTD Field Type Model//EN" "http://www.ofbiz.org/dtds/fieldtypemodel.dtd">

<!--
/**
 *  Title: Entity Generator Definitions for the General Data Model
 *  Description: None
 *  Copyright (c) 2002 The Open For Business Project - www.ofbiz.org
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a 
 *  copy of this software and associated documentation files (the "Software"), 
 *  to deal in the Software without restriction, including without limitation 
 *  the rights to use, copy, modify, merge, publish, distribute, sublicense, 
 *  and/or sell copies of the Software, and to permit persons to whom the 
 *  Software is furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included 
 *  in all copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
 *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
 *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
 *  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
 *  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT 
 *  OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 
 *  THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 *@author     David E. Jones
 *@created    June 5, 2001
 *@version    1.0
 */
-->

<!--- NOTE: this fieldtype file should be used with Oracle 10g drivers, even if the drivers are being used with Oracle9i database. -->
<fieldtypemodel>
  <!-- ===================== field-type-def ==================== -->
   <!-- General Types --> 
    <field-type-def type="blob" sql-type="LONG RAW" java-type="java.lang.Object"></field-type-def>
    <field-type-def type="byte-array" sql-type="BLOB" java-type="byte[]"></field-type-def>
    
    <field-type-def type="date-time" sql-type="DATE" java-type="java.sql.Timestamp"></field-type-def>
    <field-type-def type="date" sql-type="DATE" java-type="java.sql.Date"></field-type-def>
    <field-type-def type="time" sql-type="DATE" java-type="java.sql.Time"></field-type-def>
    
    <field-type-def type="currency-amount" sql-type="NUMBER(18,2)" java-type="Double"><validate name="isSignedDouble" /></field-type-def>
    <field-type-def type="floating-point" sql-type="NUMBER(18,6)" java-type="Double"><validate name="isSignedDouble" /></field-type-def>
    <field-type-def type="numeric" sql-type="NUMBER(18,0)" java-type="Long"><validate name="isSignedLong" /></field-type-def>
    <field-type-def type="integer" sql-type="NUMBER(9,0)" java-type="Integer"><validate name="isSignedLong" /></field-type-def>

    <field-type-def type="id" sql-type="VARCHAR2(20)" java-type="String"></field-type-def>
    <field-type-def type="id-long" sql-type="VARCHAR2(60)" java-type="String"></field-type-def>
    <field-type-def type="id-vlong" sql-type="VARCHAR2(255)" java-type="String"></field-type-def>

    <field-type-def type="indicator" sql-type="CHAR(1)" java-type="String"></field-type-def>
    <field-type-def type="very-short" sql-type="VARCHAR2(10 CHAR)" java-type="String"></field-type-def>
    <field-type-def type="short-varchar" sql-type="VARCHAR2(60 CHAR)" java-type="String"></field-type-def>
    <field-type-def type="long-varchar" sql-type="VARCHAR2(255 CHAR)" java-type="String"></field-type-def>
    <field-type-def type="very-long" sql-type="VARCHAR2(4000)" java-type="String"></field-type-def>
    <field-type-def type="extremely-long" sql-type="CLOB" java-type="String"></field-type-def>
   
    <field-type-def type="comment" sql-type="VARCHAR2(255 CHAR)" java-type="String"></field-type-def>
    <field-type-def type="description" sql-type="VARCHAR2(255 CHAR)" java-type="String"></field-type-def>
    <field-type-def type="name" sql-type="VARCHAR2(60 CHAR)" java-type="String"></field-type-def>
    <field-type-def type="value" sql-type="VARCHAR2(255 CHAR)" java-type="String"></field-type-def>

   <!-- Specialized Types -->
    <field-type-def type="credit-card-number" sql-type="VARCHAR2(40 CHAR)" java-type="String"><validate name="isAnyCard" /></field-type-def>
    <field-type-def type="credit-card-date" sql-type="VARCHAR2(20 CHAR)" java-type="String"><validate name="isDateAfterToday" /></field-type-def>
    <field-type-def type="email" sql-type="VARCHAR2(255 CHAR)" java-type="String"><validate name="isEmail" /></field-type-def>
    <field-type-def type="url" sql-type="VARCHAR2(255 CHAR)" java-type="String"></field-type-def>
    <field-type-def type="id-ne" sql-type="VARCHAR2(20 CHAR)" java-type="String"><validate name="isNotEmpty" /></field-type-def>
    <field-type-def type="id-long-ne" sql-type="VARCHAR2(60 CHAR)" java-type="String"><validate name="isNotEmpty" /></field-type-def>
    <field-type-def type="id-vlong-ne" sql-type="VARCHAR2(255 CHAR)" java-type="String"><validate name="isNotEmpty" /></field-type-def>
    <field-type-def type="tel-number" sql-type="VARCHAR2(60 CHAR)" java-type="String"><validate name="isInternationalPhoneNumber" /></field-type-def>

    <!-- Special types for the QUARTZ tables -->
    <field-type-def type="quartz-char-8" sql-type="VARCHAR2(8)" java-type="String"></field-type-def>
    <field-type-def type="quartz-char-16" sql-type="VARCHAR2(16)" java-type="String"></field-type-def>
    <field-type-def type="quartz-char-40" sql-type="VARCHAR2(40)" java-type="String"></field-type-def>
    <field-type-def type="quartz-char-80" sql-type="VARCHAR2(80)" java-type="String"></field-type-def>
    <field-type-def type="quartz-char-95" sql-type="VARCHAR2(95)" java-type="String"></field-type-def>
    <field-type-def type="quartz-char-120" sql-type="VARCHAR2(120)" java-type="String"></field-type-def>
    <field-type-def type="quartz-char-200" sql-type="VARCHAR2(200)" java-type="String"></field-type-def>
    <field-type-def type="quartz-char-250" sql-type="VARCHAR2(250)" java-type="String"></field-type-def>
    <field-type-def type="quartz-char-512" sql-type="VARCHAR2(512)" java-type="String"></field-type-def>
    <field-type-def type="quartz-boolean" sql-type="VARCHAR2(1)" java-type="Boolean"></field-type-def>
    <field-type-def type="quartz-data" sql-type="BLOB" java-type="byte[]"></field-type-def>
    <field-type-def type="quartz-long-int" sql-type="NUMBER(18)" java-type="Long"></field-type-def>
    <field-type-def type="quartz-int" sql-type="NUMBER(7)" java-type="Integer"></field-type-def>
    <field-type-def type="quartz-small-int" sql-type="NUMBER(2)" java-type="Integer"></field-type-def>
    <field-type-def type="quartz-numeric" sql-type="NUMBER(13,4)" java-type="Long"></field-type-def>

</fieldtypemodel>
