Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 2588 invoked from network); 17 Jan 2008 22:28:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Jan 2008 22:28:49 -0000 Received: (qmail 65042 invoked by uid 500); 17 Jan 2008 22:28:39 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 64789 invoked by uid 500); 17 Jan 2008 22:28:38 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 64778 invoked by uid 99); 17 Jan 2008 22:28:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jan 2008 14:28:38 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [84.238.0.4] (HELO mail.bolignet-aarhus.dk) (84.238.0.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jan 2008 22:28:26 +0000 Received: from [84.238.43.189] (ip-43-189.bnaa.dk [84.238.43.189]) by mail.bolignet-aarhus.dk (Bolignet-Aarhus MailService) with SMTP id XXT92615 for ; Thu, 17 Jan 2008 23:28:15 +0100 Message-ID: <478FD62C.9020305@daimi.au.dk> Date: Thu, 17 Jan 2008 23:26:52 +0100 From: Martin Tilsted User-Agent: Thunderbird 1.5.0.12 (X11/20071019) MIME-Version: 1.0 To: torque-user@db.apache.org Subject: Get type of fields in auto generated classse Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Is there a way to make a method, that given a field name, and any auto generated object, can return the type of that field? Something like boolean isFieldAnInteger(BaseObject obj,String fieldName) { // What here. (And is BaseObject the correct class to use, if you want to accept something that can be any torque auto generated class?) } At first I thought I could do Class c=obj. getByName(field).getClass(); But that don't work if obj is a newly created object, becasue getByName will return null. Martin --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org