配置文件路径 /opentaps-***/framework/entity/fieldtype
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!-- This file has been modified by Open Source Strategies, Inc. -->
<fieldtypemodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/fieldtypemodel.xsd">
<!-- ===================== field-type-def ==================== -->
<!-- General Types -->
<field-type-def type="blob" sql-type="LONGBLOB" java-type="java.sql.Blob"></field-type-def>
<field-type-def type="date-time" sql-type="DATETIME" 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="TIME" java-type="java.sql.Time"></field-type-def>
<field-type-def type="currency-amount" sql-type="DECIMAL(18,2)" java-type="java.math.BigDecimal"><validate method="isSignedDouble"/></field-type-def>
<field-type-def type="currency-precise" sql-type="DECIMAL(18,3)" java-type="java.math.BigDecimal"><validate method="isSignedDouble"/></field-type-def>
<field-type-def type="fixed-point" sql-type="DECIMAL(18,6)" java-type="java.math.BigDecimal"><validate method="isSignedDouble"/></field-type-def>
<field-type-def type="floating-point" sql-type="DECIMAL(18,6)" java-type="Double"><validate method="isSignedDouble"/></field-type-def>
<field-type-def type="numeric" sql-type="DECIMAL(20,0)" java-type="Long"><validate method="isSignedLong"/></field-type-def>
<field-type-def type="id" sql-type="VARCHAR(20)" java-type="String"></field-type-def>
<field-type-def type="id-long" sql-type="VARCHAR(60)" java-type="String"></field-type-def>
<field-type-def type="id-vlong" sql-type="VARCHAR(250)" 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="VARCHAR(10)" java-type="String"></field-type-def>
<field-type-def type="short-varchar" sql-type="VARCHAR(60)" java-type="String"></field-type-def>
<field-type-def type="long-varchar" sql-type="VARCHAR(255)" java-type="String"></field-type-def>
<field-type-def type="very-long" sql-type="LONGTEXT" java-type="String"></field-type-def>
<field-type-def type="comment" sql-type="VARCHAR(255)" java-type="String"></field-type-def>
<field-type-def type="description" sql-type="VARCHAR(255)" java-type="String"></field-type-def>
<field-type-def type="name" sql-type="VARCHAR(100)" java-type="String"></field-type-def>
<field-type-def type="value" sql-type="VARCHAR(255)" java-type="String"></field-type-def>
<!-- Specialized Types -->
<field-type-def type="credit-card-number" sql-type="VARCHAR(255)" java-type="String"><validate method="isAnyCard"/></field-type-def>
<field-type-def type="credit-card-date" sql-type="VARCHAR(20)" java-type="String"><validate method="isDateAfterToday"/></field-type-def>
<field-type-def type="email" sql-type="VARCHAR(255)" java-type="String"><validate method="isEmail"/></field-type-def>
<field-type-def type="url" sql-type="VARCHAR(255)" java-type="String"></field-type-def>
<field-type-def type="id-ne" sql-type="VARCHAR(20)" java-type="String"><validate method="isNotEmpty"/></field-type-def>
<field-type-def type="id-long-ne" sql-type="VARCHAR(60)" java-type="String"><validate method="isNotEmpty"/></field-type-def>
<field-type-def type="id-vlong-ne" sql-type="VARCHAR(250)" java-type="String"><validate method="isNotEmpty"/></field-type-def>
<field-type-def type="tel-number" sql-type="VARCHAR(60)" java-type="String"><validate method="isInternationalPhoneNumber"/></field-type-def>
<!-- Pentaho Data Integration (aka Kettle) SQL Types -->
<field-type-def type="surrogate-key" sql-type="BIGINT" java-type="Long"><validate method="isSignedLong" /></field-type-def>
<field-type-def type="version" sql-type="INT" java-type="Long"><validate method="isSignedLong" /></field-type-def>
<field-type-def type="fact-amount" sql-type="DECIMAL(17,2)" java-type="java.math.BigDecimal"><validate method="isSignedDouble" /></field-type-def>
</fieldtypemodel>
<validate method="***" />指定检查数据类型的方法, 在org.ofbiz.base.util.UtilValidate类中