Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 82033 invoked from network); 6 Apr 2007 13:21:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Apr 2007 13:21:41 -0000 Received: (qmail 86518 invoked by uid 500); 6 Apr 2007 13:21:45 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 86505 invoked by uid 500); 6 Apr 2007 13:21:45 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 86494 invoked by uid 99); 6 Apr 2007 13:21:45 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2007 06:21:45 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [67.153.246.93] (HELO magnolia.ociweb.com) (67.153.246.93) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2007 06:21:38 -0700 Received: from localhost (magnolia.ociweb.com [10.200.1.5]) by magnolia.ociweb.com (Postfix) with ESMTP id A3D8D54FAD8; Fri, 6 Apr 2007 08:21:17 -0500 (CDT) Received: from magnolia.ociweb.com ([10.200.1.5]) by localhost (magnolia [10.200.1.5]) (amavisd-new, port 10024) with ESMTP id 30921-01; Fri, 6 Apr 2007 08:21:15 -0500 (CDT) Received: from [192.168.1.104] (unknown [206.80.77.71]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by magnolia.ociweb.com (Postfix) with ESMTP id 84EC952F34E; Fri, 6 Apr 2007 08:21:15 -0500 (CDT) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: multipart/alternative; boundary=Apple-Mail-52--10005711 Message-Id: <4C896B22-FC2B-4DAC-8392-0693EAC9847A@ociweb.com> Cc: "Rich R. Reese" From: Mark Volkmann Subject: Re: Abator-generated model classes and primitive types Date: Fri, 6 Apr 2007 08:21:29 -0500 To: user-java@ibatis.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ociweb.com X-Spam-Level: X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, hits=-2.6 tagged_above=-3.0 required=2.0 tests=AWL, BAYES_00, HTML_40_50, HTML_MESSAGE --Apple-Mail-52--10005711 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Apr 6, 2007, at 8:16 AM, Jeff Butler wrote: > It's a great big object oriented world out there :) Also... > primitives can't be null but database columns can be null. Ah ... that's a great reason to not use primitives! Also, with Java 5 autoboxing client code can still use primitives so it's not a big deal. > Abator's default behavior is to use objects, but you can force a > primitive with a if you want to. Thanks for the explanation! > Jeff Butler > > On 4/6/07, Mark Volkmann wrote: > It seems that by default Abator-generated model classes use type > wrappers instead of primitive types for fields that correspond to > database table columns. For example, a table with a column of type > int will have a corresponding model object field of type Integer. Why > aren't primitive types used? Can Abator be configured to use > primitive types? > --Apple-Mail-52--10005711 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1
On Apr 6, 2007, at = 8:16 AM, Jeff Butler wrote:

It's = a great big object oriented world out there :)=A0 Also... primitives = can't be null but database columns can be = null.

Ah ... that's a great reason to = not use primitives! Also, with Java 5 autoboxing client code can still = use primitives so it's not a big deal.

=A0Abator's default behavior is to use objects, but = you can force a primitive=A0with a <columnOverride> if you want = to.

Thanks for the = explanation!

=A0Jeff = Butler
=A0
On 4/6/07, = Mark Volkmann <mark@ociweb.com> wrote: =
It seems that by default = Abator-generated model classes use type
wrappers instead of primitive = types for fields that correspond to
database table columns. For = example, a table with a column of type
int will have a corresponding = model object field of type Integer. Why
aren't primitive types used? = Can Abator be configured to use
primitive = types?=A0


= --Apple-Mail-52--10005711--