001    // Copyright (c) 2001 Hursh Jain (http://www.mollypages.org) 
002    // The Molly framework is freely distributable under the terms of an
003    // MIT-style license. For details, see the molly pages web site at:
004    // http://www.mollypages.org/. Use, modify, have fun !
005    
006    package fc.jdbc.dbo.generated;
007    
008    /*
009     * Auto generated on: Tue Oct 25 11:46:54 EDT 2016
010     * JDBC url: [jdbc:postgresql://127.0.0.1/test]
011     * WARNING: Manual edits will be lost if/when this file is regenerated.
012     */
013    import java.io.*;
014    import java.math.*;
015    import java.sql.*;
016    import java.util.*;
017    
018    import fc.io.*;
019    import fc.jdbc.*;
020    import fc.jdbc.dbo.*;
021    import fc.util.*;
022    import fc.web.forms.*;
023    
024    /**
025    Represents a row in the  alltypes table. 
026    */
027    public class alltypes extends fc.jdbc.dbo.DBO
028    {
029    /* Default constructor */
030    public alltypes()
031      {
032      this.__isNew  = true;
033      }
034    
035    /*--------------------- Columns ------------------------*/
036     private int            id;              /** serial (INTEGER); PK=yes; Nullable=false; AutoInc=true; MaxSize=10 */ 
037     private short          smallint_val;    /** int2 (SMALLINT); Nullable=true; AutoInc=false; MaxSize=5 */           
038     private int            int_val;         /** int4 (INTEGER); Nullable=false; AutoInc=false; MaxSize=10 */          
039     private long           bigint_val;      /** int8 (BIGINT); Nullable=true; AutoInc=false; MaxSize=19 */            
040     private float          float_val;       /** float4 (REAL); Nullable=true; AutoInc=false; MaxSize=8 */             
041     private double         double_val;      /** float8 (DOUBLE); Nullable=true; AutoInc=false; MaxSize=17 */          
042     private BigDecimal     numeric_val;     /** numeric (NUMERIC); Nullable=true; AutoInc=false; MaxSize=5 */         
043     private String         char_val;        /** bpchar (CHAR); Nullable=true; AutoInc=false; MaxSize=10 */            
044     private String         varchar_val;     /** varchar (VARCHAR); Nullable=true; AutoInc=false; MaxSize=10 */        
045     private String         longvarchar_val; /** text (VARCHAR); Nullable=true; AutoInc=false; MaxSize=2147483647 */   
046     private java.sql.Date  date_val;        /** date (DATE); Nullable=true; AutoInc=false; MaxSize=13 */              
047     private Time           time_val;        /** time (TIME); Nullable=true; AutoInc=false; MaxSize=15 */              
048     private Timestamp      timestamp_val;   /** timestamp (TIMESTAMP); Nullable=true; AutoInc=false; MaxSize=29 */    
049     private Boolean        bit_val;         /** bit (BIT); Nullable=true; AutoInc=false; MaxSize=1 */                 
050     private java.sql.Array array_val;       /** _varchar (ARRAY); Nullable=true; AutoInc=false; MaxSize=10 */         
051     private Boolean        boolean_val;     /** bool (BIT); Nullable=true; AutoInc=false; MaxSize=1 */                
052     private byte[]         varbinary_val;   /** bytea (BINARY); Nullable=true; AutoInc=false; MaxSize=2147483647 */   
053    /*------------------------------------------------------*/
054    /*
055    Original PK saved here for updates. If a row is retrieved from the database and
056    the PK value is changed, and then if the object is saved, we need the orignal PK
057    value to find the row in the db for our update to work.
058    */
059    int __orig_id;
060    
061        boolean __force_update  = false;
062    private Map   __extra_data;     
063    private boolean __isNew     = false;
064    private boolean __isModified  = false;
065    
066    private   boolean __isModified_id = false;
067    protected boolean __isNullInDB_id = false;
068    /**returns <tt>true</tt> if id has changed since it was created/loaded, <tt>false</tt> otherwise*/
069    public boolean isModified_id() { return this.__isModified_id; }
070    /**returns <tt>true</tt> if id was null in the database*/
071    public boolean isNullInDB_id() { return this.__isNullInDB_id; }
072    
073    private   boolean __isModified_smallint_val = false;
074    /* this primitive type is nullable, this tracks whether we should save it as null to the database*/
075    private   boolean __isModified_smallint_val_setnull = false;
076    protected boolean __isNullInDB_smallint_val = false;
077    /**returns <tt>true</tt> if smallint_val has changed since it was created/loaded, <tt>false</tt> otherwise*/
078    public boolean isModified_smallint_val() { return this.__isModified_smallint_val; }
079    /**returns <true> is primitive type smallint_val has been set to null via the setNull mechanism*/
080    public boolean isModifiedSetNull_smallint_val() { return this.__isModified_smallint_val_setnull; }
081    /**returns <tt>true</tt> if smallint_val was null in the database*/
082    public boolean isNullInDB_smallint_val() { return this.__isNullInDB_smallint_val; }
083    
084    private   boolean __isModified_int_val = false;
085    protected boolean __isNullInDB_int_val = false;
086    /**returns <tt>true</tt> if int_val has changed since it was created/loaded, <tt>false</tt> otherwise*/
087    public boolean isModified_int_val() { return this.__isModified_int_val; }
088    /**returns <tt>true</tt> if int_val was null in the database*/
089    public boolean isNullInDB_int_val() { return this.__isNullInDB_int_val; }
090    
091    private   boolean __isModified_bigint_val = false;
092    /* this primitive type is nullable, this tracks whether we should save it as null to the database*/
093    private   boolean __isModified_bigint_val_setnull = false;
094    protected boolean __isNullInDB_bigint_val = false;
095    /**returns <tt>true</tt> if bigint_val has changed since it was created/loaded, <tt>false</tt> otherwise*/
096    public boolean isModified_bigint_val() { return this.__isModified_bigint_val; }
097    /**returns <true> is primitive type bigint_val has been set to null via the setNull mechanism*/
098    public boolean isModifiedSetNull_bigint_val() { return this.__isModified_bigint_val_setnull; }
099    /**returns <tt>true</tt> if bigint_val was null in the database*/
100    public boolean isNullInDB_bigint_val() { return this.__isNullInDB_bigint_val; }
101    
102    private   boolean __isModified_float_val = false;
103    /* this primitive type is nullable, this tracks whether we should save it as null to the database*/
104    private   boolean __isModified_float_val_setnull = false;
105    protected boolean __isNullInDB_float_val = false;
106    /**returns <tt>true</tt> if float_val has changed since it was created/loaded, <tt>false</tt> otherwise*/
107    public boolean isModified_float_val() { return this.__isModified_float_val; }
108    /**returns <true> is primitive type float_val has been set to null via the setNull mechanism*/
109    public boolean isModifiedSetNull_float_val() { return this.__isModified_float_val_setnull; }
110    /**returns <tt>true</tt> if float_val was null in the database*/
111    public boolean isNullInDB_float_val() { return this.__isNullInDB_float_val; }
112    
113    private   boolean __isModified_double_val = false;
114    /* this primitive type is nullable, this tracks whether we should save it as null to the database*/
115    private   boolean __isModified_double_val_setnull = false;
116    protected boolean __isNullInDB_double_val = false;
117    /**returns <tt>true</tt> if double_val has changed since it was created/loaded, <tt>false</tt> otherwise*/
118    public boolean isModified_double_val() { return this.__isModified_double_val; }
119    /**returns <true> is primitive type double_val has been set to null via the setNull mechanism*/
120    public boolean isModifiedSetNull_double_val() { return this.__isModified_double_val_setnull; }
121    /**returns <tt>true</tt> if double_val was null in the database*/
122    public boolean isNullInDB_double_val() { return this.__isNullInDB_double_val; }
123    
124    private   boolean __isModified_numeric_val = false;
125    protected boolean __isNullInDB_numeric_val = false;
126    /**returns <tt>true</tt> if numeric_val has changed since it was created/loaded, <tt>false</tt> otherwise*/
127    public boolean isModified_numeric_val() { return this.__isModified_numeric_val; }
128    /**returns <tt>true</tt> if numeric_val was null in the database*/
129    public boolean isNullInDB_numeric_val() { return this.__isNullInDB_numeric_val; }
130    
131    private   boolean __isModified_char_val = false;
132    protected boolean __isNullInDB_char_val = false;
133    /**returns <tt>true</tt> if char_val has changed since it was created/loaded, <tt>false</tt> otherwise*/
134    public boolean isModified_char_val() { return this.__isModified_char_val; }
135    /**returns <tt>true</tt> if char_val was null in the database*/
136    public boolean isNullInDB_char_val() { return this.__isNullInDB_char_val; }
137    
138    private   boolean __isModified_varchar_val = false;
139    protected boolean __isNullInDB_varchar_val = false;
140    /**returns <tt>true</tt> if varchar_val has changed since it was created/loaded, <tt>false</tt> otherwise*/
141    public boolean isModified_varchar_val() { return this.__isModified_varchar_val; }
142    /**returns <tt>true</tt> if varchar_val was null in the database*/
143    public boolean isNullInDB_varchar_val() { return this.__isNullInDB_varchar_val; }
144    
145    private   boolean __isModified_longvarchar_val = false;
146    protected boolean __isNullInDB_longvarchar_val = false;
147    /**returns <tt>true</tt> if longvarchar_val has changed since it was created/loaded, <tt>false</tt> otherwise*/
148    public boolean isModified_longvarchar_val() { return this.__isModified_longvarchar_val; }
149    /**returns <tt>true</tt> if longvarchar_val was null in the database*/
150    public boolean isNullInDB_longvarchar_val() { return this.__isNullInDB_longvarchar_val; }
151    
152    private   boolean __isModified_date_val = false;
153    protected boolean __isNullInDB_date_val = false;
154    /**returns <tt>true</tt> if date_val has changed since it was created/loaded, <tt>false</tt> otherwise*/
155    public boolean isModified_date_val() { return this.__isModified_date_val; }
156    /**returns <tt>true</tt> if date_val was null in the database*/
157    public boolean isNullInDB_date_val() { return this.__isNullInDB_date_val; }
158    
159    private   boolean __isModified_time_val = false;
160    protected boolean __isNullInDB_time_val = false;
161    /**returns <tt>true</tt> if time_val has changed since it was created/loaded, <tt>false</tt> otherwise*/
162    public boolean isModified_time_val() { return this.__isModified_time_val; }
163    /**returns <tt>true</tt> if time_val was null in the database*/
164    public boolean isNullInDB_time_val() { return this.__isNullInDB_time_val; }
165    
166    private   boolean __isModified_timestamp_val = false;
167    protected boolean __isNullInDB_timestamp_val = false;
168    /**returns <tt>true</tt> if timestamp_val has changed since it was created/loaded, <tt>false</tt> otherwise*/
169    public boolean isModified_timestamp_val() { return this.__isModified_timestamp_val; }
170    /**returns <tt>true</tt> if timestamp_val was null in the database*/
171    public boolean isNullInDB_timestamp_val() { return this.__isNullInDB_timestamp_val; }
172    
173    private   boolean __isModified_bit_val = false;
174    protected boolean __isNullInDB_bit_val = false;
175    /**returns <tt>true</tt> if bit_val has changed since it was created/loaded, <tt>false</tt> otherwise*/
176    public boolean isModified_bit_val() { return this.__isModified_bit_val; }
177    /**returns <tt>true</tt> if bit_val was null in the database*/
178    public boolean isNullInDB_bit_val() { return this.__isNullInDB_bit_val; }
179    
180    private   boolean __isModified_array_val = false;
181    protected boolean __isNullInDB_array_val = false;
182    /**returns <tt>true</tt> if array_val has changed since it was created/loaded, <tt>false</tt> otherwise*/
183    public boolean isModified_array_val() { return this.__isModified_array_val; }
184    /**returns <tt>true</tt> if array_val was null in the database*/
185    public boolean isNullInDB_array_val() { return this.__isNullInDB_array_val; }
186    
187    private   boolean __isModified_boolean_val = false;
188    protected boolean __isNullInDB_boolean_val = false;
189    /**returns <tt>true</tt> if boolean_val has changed since it was created/loaded, <tt>false</tt> otherwise*/
190    public boolean isModified_boolean_val() { return this.__isModified_boolean_val; }
191    /**returns <tt>true</tt> if boolean_val was null in the database*/
192    public boolean isNullInDB_boolean_val() { return this.__isNullInDB_boolean_val; }
193    
194    private   boolean __isModified_varbinary_val = false;
195    protected boolean __isNullInDB_varbinary_val = false;
196    /**returns <tt>true</tt> if varbinary_val has changed since it was created/loaded, <tt>false</tt> otherwise*/
197    public boolean isModified_varbinary_val() { return this.__isModified_varbinary_val; }
198    /**returns <tt>true</tt> if varbinary_val was null in the database*/
199    public boolean isNullInDB_varbinary_val() { return this.__isNullInDB_varbinary_val; }
200    
201    
202    /** returns <tt>true</tt> if this object is newly created and has <b>not</b> been loaded from the database, <tt>false</tt> otherwise */
203    public boolean isNew() 
204      {
205      return this.__isNew;
206      }
207    
208    /** Specify <tt>true</tt> to set this object's status as newly created (and not read from a database) */
209    protected void setNew(boolean val) 
210      {
211      this.__isNew = val;
212      }
213    
214    /** returns <tt>true</tt> if this object's data (for any field) has changed since it was created/loaded, <tt>false</tt> otherwise */
215    public boolean isModified() 
216      {
217      return this.__isModified;
218      }
219    
220    /** Resets the modified status of this object to not-modified
221    this is useful when loading an object via a prepared statement
222    (by using various setXXX methods when we do so, we inadvertently
223    set the modified status of each field to true)
224    */
225    void resetModified() 
226      {
227      this.__isModified = false;
228      this.__isModified_id = false;
229      this.__isModified_smallint_val = false;
230      this.__isModified_smallint_val_setnull = false;
231      this.__isModified_int_val = false;
232      this.__isModified_bigint_val = false;
233      this.__isModified_bigint_val_setnull = false;
234      this.__isModified_float_val = false;
235      this.__isModified_float_val_setnull = false;
236      this.__isModified_double_val = false;
237      this.__isModified_double_val_setnull = false;
238      this.__isModified_numeric_val = false;
239      this.__isModified_char_val = false;
240      this.__isModified_varchar_val = false;
241      this.__isModified_longvarchar_val = false;
242      this.__isModified_date_val = false;
243      this.__isModified_time_val = false;
244      this.__isModified_timestamp_val = false;
245      this.__isModified_bit_val = false;
246      this.__isModified_array_val = false;
247      this.__isModified_boolean_val = false;
248      this.__isModified_varbinary_val = false;
249      }
250    
251    /**
252    Allows putting arbitrary object-specific data into this object.
253    This is useful to store additional query-specific columns when performing
254    arbitrary queries. For example: 
255    <blockquote><pre>
256    String query = "select <font color=blue>1+1 as my_sum, 
257        now() as my_time</font>, alltypesMgr.columns() 
258        from alltypes";
259    PreparedStatement ps = con.prepareStatment(query);
260    ResultSet rs = ps.executeQuery();
261    List list = new ArrayList();
262    while (rs.next()) {
263      <font color=green>alltypes</font> obj = alltypesMgr.getFromRS(rs);
264      obj.<font color=blue>putExtraData("my_sum"</font>, rs.getInt("my_sum"));
265      obj.<font color=blue>putExtraData("my_time"</font>, rs.getDate("my_time"));
266      }
267    //use the list later on...each <font color=green>alltypes </font>object in the list will 
268    //have the extra data..
269    </pre></blockquote>
270    */
271    public void putExtraData(Object key, Object value) 
272      {
273      synchronized (this) {
274        if (__extra_data == null) {
275          __extra_data = new HashMap();
276          }
277        }
278      __extra_data.put(key, value);
279      }
280    
281    /**
282    Allows retrieving arbitrary object-specific data from this object.
283    This data should have been put via the {@link #putExtraData putExtraData} 
284    method prior to invoking this method
285    */
286    public Object getExtraData(Object key) 
287      {
288      synchronized (this) {
289        if (__extra_data == null) {
290          return null;
291          }
292        }
293      return __extra_data.get(key);
294      }
295    
296    public String toString() 
297      {
298      final String nl = fc.io.IOUtil.LINE_SEP;
299      StringBuffer buf = new StringBuffer(256);
300      buf.append("Class Name: [alltypes]");
301      buf.append(" [isDiscarded=").append(this.isDiscarded()).append("]");
302      buf.append(" [isNew=").append(this.isNew()).append("]");
303      buf.append(" [isModified=").append(this.isModified()).append("]");
304      buf.append(nl);
305      buf.append("Note: IsNullInDB only meaningful for existing rows (i.e., isNew=false)");
306      buf.append(nl);
307    
308      ByteArrayOutputStream out = new ByteArrayOutputStream(768);
309      TablePrinter.PrintConfig config = new TablePrinter.PrintConfig();
310      config.setPrintBorders(false);
311      config.setCellSpacing(1);
312      config.setCellPadding(0);
313      config.setAutoFit(true);
314      TablePrinter p = new TablePrinter(7, new PrintStream(out), config);
315      p.startTable();
316    
317      p.startRow();
318      p.printCell("PK");
319      p.printCell("FK");
320      p.printCell("Field");
321      p.printCell("Value");
322      p.printCell("isModified");
323      p.printCell("isNullinDB");
324      p.printCell("isSerial/AutoInc");
325      p.endRow();
326    
327      p.startRow();
328      p.printCell("x");
329      p.printCell("-");
330      p.printCell("id");
331      p.printCell(String.valueOf(this.id));
332      p.printCell((this.__isModified_id) ?"x":"-");
333      p.printCell((this.__isNullInDB_id) ?"x":"-");
334      p.printCell("x");
335      p.endRow();
336    
337      p.startRow();
338      p.printCell("-");
339      p.printCell("-");
340      p.printCell("smallint_val");
341      p.printCell(String.valueOf(this.smallint_val));
342      p.printCell((this.__isModified_smallint_val) ?"x":"-");
343      p.printCell((this.__isNullInDB_smallint_val) ?"x":"-");
344      p.printCell("-");
345      p.endRow();
346    
347      p.startRow();
348      p.printCell("-");
349      p.printCell("-");
350      p.printCell("int_val");
351      p.printCell(String.valueOf(this.int_val));
352      p.printCell((this.__isModified_int_val) ?"x":"-");
353      p.printCell((this.__isNullInDB_int_val) ?"x":"-");
354      p.printCell("-");
355      p.endRow();
356    
357      p.startRow();
358      p.printCell("-");
359      p.printCell("-");
360      p.printCell("bigint_val");
361      p.printCell(String.valueOf(this.bigint_val));
362      p.printCell((this.__isModified_bigint_val) ?"x":"-");
363      p.printCell((this.__isNullInDB_bigint_val) ?"x":"-");
364      p.printCell("-");
365      p.endRow();
366    
367      p.startRow();
368      p.printCell("-");
369      p.printCell("-");
370      p.printCell("float_val");
371      p.printCell(String.valueOf(this.float_val));
372      p.printCell((this.__isModified_float_val) ?"x":"-");
373      p.printCell((this.__isNullInDB_float_val) ?"x":"-");
374      p.printCell("-");
375      p.endRow();
376    
377      p.startRow();
378      p.printCell("-");
379      p.printCell("-");
380      p.printCell("double_val");
381      p.printCell(String.valueOf(this.double_val));
382      p.printCell((this.__isModified_double_val) ?"x":"-");
383      p.printCell((this.__isNullInDB_double_val) ?"x":"-");
384      p.printCell("-");
385      p.endRow();
386    
387      p.startRow();
388      p.printCell("-");
389      p.printCell("-");
390      p.printCell("numeric_val");
391      p.printCell(String.valueOf(this.numeric_val));
392      p.printCell((this.__isModified_numeric_val) ?"x":"-");
393      p.printCell((this.__isNullInDB_numeric_val) ?"x":"-");
394      p.printCell("-");
395      p.endRow();
396    
397      p.startRow();
398      p.printCell("-");
399      p.printCell("-");
400      p.printCell("char_val");
401      p.printCell(String.valueOf(this.char_val));
402      p.printCell((this.__isModified_char_val) ?"x":"-");
403      p.printCell((this.__isNullInDB_char_val) ?"x":"-");
404      p.printCell("-");
405      p.endRow();
406    
407      p.startRow();
408      p.printCell("-");
409      p.printCell("-");
410      p.printCell("varchar_val");
411      p.printCell(String.valueOf(this.varchar_val));
412      p.printCell((this.__isModified_varchar_val) ?"x":"-");
413      p.printCell((this.__isNullInDB_varchar_val) ?"x":"-");
414      p.printCell("-");
415      p.endRow();
416    
417      p.startRow();
418      p.printCell("-");
419      p.printCell("-");
420      p.printCell("longvarchar_val");
421      p.printCell(String.valueOf(this.longvarchar_val));
422      p.printCell((this.__isModified_longvarchar_val) ?"x":"-");
423      p.printCell((this.__isNullInDB_longvarchar_val) ?"x":"-");
424      p.printCell("-");
425      p.endRow();
426    
427      p.startRow();
428      p.printCell("-");
429      p.printCell("-");
430      p.printCell("date_val");
431      p.printCell(String.valueOf(this.date_val));
432      p.printCell((this.__isModified_date_val) ?"x":"-");
433      p.printCell((this.__isNullInDB_date_val) ?"x":"-");
434      p.printCell("-");
435      p.endRow();
436    
437      p.startRow();
438      p.printCell("-");
439      p.printCell("-");
440      p.printCell("time_val");
441      p.printCell(String.valueOf(this.time_val));
442      p.printCell((this.__isModified_time_val) ?"x":"-");
443      p.printCell((this.__isNullInDB_time_val) ?"x":"-");
444      p.printCell("-");
445      p.endRow();
446    
447      p.startRow();
448      p.printCell("-");
449      p.printCell("-");
450      p.printCell("timestamp_val");
451      p.printCell(String.valueOf(this.timestamp_val));
452      p.printCell((this.__isModified_timestamp_val) ?"x":"-");
453      p.printCell((this.__isNullInDB_timestamp_val) ?"x":"-");
454      p.printCell("-");
455      p.endRow();
456    
457      p.startRow();
458      p.printCell("-");
459      p.printCell("-");
460      p.printCell("bit_val");
461      p.printCell(String.valueOf(this.bit_val));
462      p.printCell((this.__isModified_bit_val) ?"x":"-");
463      p.printCell((this.__isNullInDB_bit_val) ?"x":"-");
464      p.printCell("-");
465      p.endRow();
466    
467      p.startRow();
468      p.printCell("-");
469      p.printCell("-");
470      p.printCell("array_val");
471      p.printCell(String.valueOf(this.array_val));
472      p.printCell((this.__isModified_array_val) ?"x":"-");
473      p.printCell((this.__isNullInDB_array_val) ?"x":"-");
474      p.printCell("-");
475      p.endRow();
476    
477      p.startRow();
478      p.printCell("-");
479      p.printCell("-");
480      p.printCell("boolean_val");
481      p.printCell(String.valueOf(this.boolean_val));
482      p.printCell((this.__isModified_boolean_val) ?"x":"-");
483      p.printCell((this.__isNullInDB_boolean_val) ?"x":"-");
484      p.printCell("-");
485      p.endRow();
486    
487      p.startRow();
488      p.printCell("-");
489      p.printCell("-");
490      p.printCell("varbinary_val");
491      p.printCell(String.valueOf(this.varbinary_val));
492      p.printCell((this.__isModified_varbinary_val) ?"x":"-");
493      p.printCell((this.__isNullInDB_varbinary_val) ?"x":"-");
494      p.printCell("-");
495      p.endRow();
496    
497      p.endTable();
498      buf.append(out.toString());
499      return buf.toString();
500      }
501    
502    /**
503    Returns a map of all fields-&gt;values (as Strings) contained in this
504    object. This is useful when sending auto converting the object to JSON, etc.
505    */
506    public Map allFieldsMap() 
507      {
508      final HashMap m = new HashMap();
509      m.put("id", String.valueOf(this.id));
510      m.put("smallint_val", 
511        ( __isModified_smallint_val ? 
512          ( __isModified_smallint_val_setnull ? null : String.valueOf(this.smallint_val) ) : 
513          ( __isNullInDB_smallint_val ? null : String.valueOf(this.smallint_val))));
514      m.put("int_val", String.valueOf(this.int_val));
515      m.put("bigint_val", 
516        ( __isModified_bigint_val ? 
517          ( __isModified_bigint_val_setnull ? null : String.valueOf(this.bigint_val) ) : 
518          ( __isNullInDB_bigint_val ? null : String.valueOf(this.bigint_val))));
519      m.put("float_val", 
520        ( __isModified_float_val ? 
521          ( __isModified_float_val_setnull ? null : String.valueOf(this.float_val) ) : 
522          ( __isNullInDB_float_val ? null : String.valueOf(this.float_val))));
523      m.put("double_val", 
524        ( __isModified_double_val ? 
525          ( __isModified_double_val_setnull ? null : String.valueOf(this.double_val) ) : 
526          ( __isNullInDB_double_val ? null : String.valueOf(this.double_val))));
527      m.put("numeric_val", (numeric_val == null ? null : String.valueOf(this.numeric_val)));
528      m.put("char_val", (char_val == null ? null : String.valueOf(this.char_val)));
529      m.put("varchar_val", (varchar_val == null ? null : String.valueOf(this.varchar_val)));
530      m.put("longvarchar_val", (longvarchar_val == null ? null : String.valueOf(this.longvarchar_val)));
531      m.put("date_val", (date_val == null ? null : String.valueOf(this.date_val)));
532      m.put("time_val", (time_val == null ? null : String.valueOf(this.time_val)));
533      m.put("timestamp_val", (timestamp_val == null ? null : String.valueOf(this.timestamp_val)));
534      m.put("bit_val", (bit_val == null ? null : String.valueOf(this.bit_val)));
535      m.put("array_val", (array_val == null ? null : String.valueOf(this.array_val)));
536      m.put("boolean_val", (boolean_val == null ? null : String.valueOf(this.boolean_val)));
537      m.put("varbinary_val", (varbinary_val == null ? null : String.valueOf(this.varbinary_val)));
538      return m;
539      }
540    
541    /* ============== Gets and Sets ============== */
542    
543    /** serial (INTEGER); PK=yes; Nullable=false; AutoInc=true; MaxSize=10 */
544    public int get_id()  { 
545      return id;
546      }
547    
548    /** serial (INTEGER); PK=yes; Nullable=false; AutoInc=true; MaxSize=10 */
549    /* Generating set for set_id with non public access since it's an auto-increment column */
550     alltypes set_id(int id)  {
551      this.id = id;
552      this.__isModified_id = true;
553      this.__isModified = true;
554      return this;
555      }
556    
557    /** int2 (SMALLINT); Nullable=true; AutoInc=false; MaxSize=5 */
558    public short get_smallint_val()  { 
559      return smallint_val;
560      }
561    
562    /** int2 (SMALLINT); Nullable=true; AutoInc=false; MaxSize=5 */
563    public alltypes set_smallint_val(short smallint_val)  {
564      this.smallint_val = smallint_val;
565      this.__isModified_smallint_val = true;
566      this.__isModified = true;
567      return this;
568      }
569    public alltypes setNull_smallint_val()
570      {
571      this.__isModified_smallint_val = true;
572      this.__isModified_smallint_val_setnull = true;
573      this.__isModified = true;
574      return this;
575      }
576    
577    /** int4 (INTEGER); Nullable=false; AutoInc=false; MaxSize=10 */
578    public int get_int_val()  { 
579      return int_val;
580      }
581    
582    /** int4 (INTEGER); Nullable=false; AutoInc=false; MaxSize=10 */
583    public alltypes set_int_val(int int_val)  {
584      this.int_val = int_val;
585      this.__isModified_int_val = true;
586      this.__isModified = true;
587      return this;
588      }
589    
590    /** int8 (BIGINT); Nullable=true; AutoInc=false; MaxSize=19 */
591    public long get_bigint_val()  { 
592      return bigint_val;
593      }
594    
595    /** int8 (BIGINT); Nullable=true; AutoInc=false; MaxSize=19 */
596    public alltypes set_bigint_val(long bigint_val) {
597      this.bigint_val = bigint_val;
598      this.__isModified_bigint_val = true;
599      this.__isModified = true;
600      return this;
601      }
602    public alltypes setNull_bigint_val()
603      {
604      this.__isModified_bigint_val = true;
605      this.__isModified_bigint_val_setnull = true;
606      this.__isModified = true;
607      return this;
608      }
609    
610    /** float4 (REAL); Nullable=true; AutoInc=false; MaxSize=8 */
611    public float get_float_val()  { 
612      return float_val;
613      }
614    
615    /** float4 (REAL); Nullable=true; AutoInc=false; MaxSize=8 */
616    public alltypes set_float_val(float float_val)  {
617      this.float_val = float_val;
618      this.__isModified_float_val = true;
619      this.__isModified = true;
620      return this;
621      }
622    public alltypes setNull_float_val()
623      {
624      this.__isModified_float_val = true;
625      this.__isModified_float_val_setnull = true;
626      this.__isModified = true;
627      return this;
628      }
629    
630    /** float8 (DOUBLE); Nullable=true; AutoInc=false; MaxSize=17 */
631    public double get_double_val()  { 
632      return double_val;
633      }
634    
635    /** float8 (DOUBLE); Nullable=true; AutoInc=false; MaxSize=17 */
636    public alltypes set_double_val(double double_val) {
637      this.double_val = double_val;
638      this.__isModified_double_val = true;
639      this.__isModified = true;
640      return this;
641      }
642    public alltypes setNull_double_val()
643      {
644      this.__isModified_double_val = true;
645      this.__isModified_double_val_setnull = true;
646      this.__isModified = true;
647      return this;
648      }
649    
650    /** numeric (NUMERIC); Nullable=true; AutoInc=false; MaxSize=5 */
651    public BigDecimal get_numeric_val()  { 
652      return numeric_val;
653      }
654    
655    /** numeric (NUMERIC); Nullable=true; AutoInc=false; MaxSize=5 */
656    public alltypes set_numeric_val(BigDecimal numeric_val) {
657      this.numeric_val = numeric_val;
658      this.__isModified_numeric_val = true;
659      this.__isModified = true;
660      return this;
661      }
662    
663    /** bpchar (CHAR); Nullable=true; AutoInc=false; MaxSize=10 */
664    public String get_char_val()  { 
665      return char_val;
666      }
667    
668    /** bpchar (CHAR); Nullable=true; AutoInc=false; MaxSize=10 */
669    public alltypes set_char_val(String char_val) {
670      this.char_val = char_val;
671      this.__isModified_char_val = true;
672      this.__isModified = true;
673      return this;
674      }
675    
676    /** varchar (VARCHAR); Nullable=true; AutoInc=false; MaxSize=10 */
677    public String get_varchar_val()  { 
678      return varchar_val;
679      }
680    
681    /** varchar (VARCHAR); Nullable=true; AutoInc=false; MaxSize=10 */
682    public alltypes set_varchar_val(String varchar_val) {
683      this.varchar_val = varchar_val;
684      this.__isModified_varchar_val = true;
685      this.__isModified = true;
686      return this;
687      }
688    
689    /** text (VARCHAR); Nullable=true; AutoInc=false; MaxSize=2147483647 */
690    public String get_longvarchar_val()  { 
691      return longvarchar_val;
692      }
693    
694    /** text (VARCHAR); Nullable=true; AutoInc=false; MaxSize=2147483647 */
695    public alltypes set_longvarchar_val(String longvarchar_val) {
696      this.longvarchar_val = longvarchar_val;
697      this.__isModified_longvarchar_val = true;
698      this.__isModified = true;
699      return this;
700      }
701    
702    /** date (DATE); Nullable=true; AutoInc=false; MaxSize=13 */
703    public java.sql.Date get_date_val()  { 
704      return date_val;
705      }
706    
707    /** date (DATE); Nullable=true; AutoInc=false; MaxSize=13 */
708    public alltypes set_date_val(java.sql.Date date_val)  {
709      this.date_val = date_val;
710      this.__isModified_date_val = true;
711      this.__isModified = true;
712      return this;
713      }
714    
715    /** time (TIME); Nullable=true; AutoInc=false; MaxSize=15 */
716    public Time get_time_val()  { 
717      return time_val;
718      }
719    
720    /** time (TIME); Nullable=true; AutoInc=false; MaxSize=15 */
721    public alltypes set_time_val(Time time_val) {
722      this.time_val = time_val;
723      this.__isModified_time_val = true;
724      this.__isModified = true;
725      return this;
726      }
727    
728    /** timestamp (TIMESTAMP); Nullable=true; AutoInc=false; MaxSize=29 */
729    public Timestamp get_timestamp_val()  { 
730      return timestamp_val;
731      }
732    
733    /** timestamp (TIMESTAMP); Nullable=true; AutoInc=false; MaxSize=29 */
734    public alltypes set_timestamp_val(Timestamp timestamp_val)  {
735      this.timestamp_val = timestamp_val;
736      this.__isModified_timestamp_val = true;
737      this.__isModified = true;
738      return this;
739      }
740    
741    /** bit (BIT); Nullable=true; AutoInc=false; MaxSize=1 */
742    public Boolean get_bit_val()  { 
743      return bit_val;
744      }
745    
746    /** bit (BIT); Nullable=true; AutoInc=false; MaxSize=1 */
747    public alltypes set_bit_val(Boolean bit_val)  {
748      this.bit_val = bit_val;
749      this.__isModified_bit_val = true;
750      this.__isModified = true;
751      return this;
752      }
753    
754    /** _varchar (ARRAY); Nullable=true; AutoInc=false; MaxSize=10 */
755    public java.sql.Array get_array_val()  { 
756      return array_val;
757      }
758    
759    /** _varchar (ARRAY); Nullable=true; AutoInc=false; MaxSize=10 */
760    public alltypes set_array_val(java.sql.Array array_val) {
761      this.array_val = array_val;
762      this.__isModified_array_val = true;
763      this.__isModified = true;
764      return this;
765      }
766    
767    /** bool (BIT); Nullable=true; AutoInc=false; MaxSize=1 */
768    public Boolean get_boolean_val()  { 
769      return boolean_val;
770      }
771    
772    /** bool (BIT); Nullable=true; AutoInc=false; MaxSize=1 */
773    public alltypes set_boolean_val(Boolean boolean_val)  {
774      this.boolean_val = boolean_val;
775      this.__isModified_boolean_val = true;
776      this.__isModified = true;
777      return this;
778      }
779    
780    /** bytea (BINARY); Nullable=true; AutoInc=false; MaxSize=2147483647 */
781    public byte[] get_varbinary_val()  { 
782      return varbinary_val;
783      }
784    
785    /** bytea (BINARY); Nullable=true; AutoInc=false; MaxSize=2147483647 */
786    public alltypes set_varbinary_val(byte[] varbinary_val) {
787      this.varbinary_val = varbinary_val;
788      this.__isModified_varbinary_val = true;
789      this.__isModified = true;
790      return this;
791      }
792    
793    /* =========== Increments / Decrements =========== */
794    
795    /** Increments int_val by 1 */
796    public alltypes inc_int_val() {
797      this.int_val = this.int_val + 1;
798      this.__isModified_int_val = true;
799      this.__isModified = true;
800      return this;
801      }
802    
803    /** Increments int_val by the specified amount */
804    public alltypes inc_int_val(int amount) {
805      this.int_val = this.int_val + amount;
806      this.__isModified_int_val = true;
807      this.__isModified = true;
808      return this;
809      }
810    
811    /** Increments int_val by the specified amount, upto but not above the upper bound (bound is inclusive) */
812    public alltypes inc_int_val(int amount, int upper_bound) {
813      this.int_val = Math.min(this.int_val + amount, upper_bound);
814      this.__isModified_int_val = true;
815      this.__isModified = true;
816      return this;
817      }
818    
819    /** Decrements int_val by 1 */
820    public alltypes dec_int_val() {
821      this.int_val = this.int_val - 1;
822      this.__isModified_int_val = true;
823      this.__isModified = true;
824      return this;
825      }
826    
827    /** Decrements int_val by the specified amount */
828    public alltypes dec_int_val(int amount) {
829      this.int_val = this.int_val - amount;
830      this.__isModified_int_val = true;
831      this.__isModified = true;
832      return this;
833      }
834    
835    /** Decrements int_val by the specified amount, upto but not below the lower bound (bound is inclusive) */
836    public alltypes dec_int_val(int amount, int lower_bound) {
837      this.int_val = Math.max(this.int_val - amount, lower_bound);
838      this.__isModified_int_val = true;
839      this.__isModified = true;
840      return this;
841      }
842    
843    /** Increments bigint_val by 1 */
844    public alltypes inc_bigint_val() {
845      this.bigint_val = this.bigint_val + 1;
846      this.__isModified_bigint_val = true;
847      this.__isModified = true;
848      return this;
849      }
850    
851    /** Increments bigint_val by the specified amount */
852    public alltypes inc_bigint_val(long amount) {
853      this.bigint_val = this.bigint_val + amount;
854      this.__isModified_bigint_val = true;
855      this.__isModified = true;
856      return this;
857      }
858    
859    /** Increments bigint_val by the specified amount, upto but not above the upper bound (bound is inclusive) */
860    public alltypes inc_bigint_val(long amount, int upper_bound) {
861      this.bigint_val = Math.min(this.bigint_val + amount, upper_bound);
862      this.__isModified_bigint_val = true;
863      this.__isModified = true;
864      return this;
865      }
866    
867    /** Decrements bigint_val by 1 */
868    public alltypes dec_bigint_val() {
869      this.bigint_val = this.bigint_val - 1;
870      this.__isModified_bigint_val = true;
871      this.__isModified = true;
872      return this;
873      }
874    
875    /** Decrements bigint_val by the specified amount */
876    public alltypes dec_bigint_val(long amount) {
877      this.bigint_val = this.bigint_val - amount;
878      this.__isModified_bigint_val = true;
879      this.__isModified = true;
880      return this;
881      }
882    
883    /** Decrements bigint_val by the specified amount, upto but not below the lower bound (bound is inclusive) */
884    public alltypes dec_bigint_val(long amount, int lower_bound) {
885      this.bigint_val = Math.max(this.bigint_val - amount, lower_bound);
886      this.__isModified_bigint_val = true;
887      this.__isModified = true;
888      return this;
889      }
890    }