01: package simpleorm.core;
02:
03: import simpleorm.properties.*;
04: import java.sql.ResultSet;
05:
06: /** Represents Boolean field meta data as "T" and "F" chars.
07: * @author Martin Snyder. */
08:
09: public class SFieldBooleanCharTF extends SFieldBooleanChar {
10: public SFieldBooleanCharTF(SRecordMeta meta, String columnName,
11: SPropertyValue[] pvals) {
12: super (meta, columnName, pvals);
13: putProperty(SCon.SBYTE_SIZE, new Integer(1)); // for Create Table only.
14: TRUE_VALUE = "T";
15: FALSE_VALUE = "F";
16: }
17:
18: public SFieldBooleanCharTF(SRecordMeta meta, String columnName) {
19: this (meta, columnName, new SPropertyValue[0]);
20: }
21:
22: public SFieldBooleanCharTF(SRecordMeta meta, String columnName,
23: SPropertyValue pval) {
24: this (meta, columnName, new SPropertyValue[] { pval });
25: }
26:
27: public SFieldBooleanCharTF(SRecordMeta meta, String columnName,
28: SPropertyValue pval1, SPropertyValue pval2) {
29: this (meta, columnName, new SPropertyValue[] { pval1, pval2 });
30: }
31:
32: /** Abstract specializer. Clone this key field to be a foreign key
33: to <code>rmeta</code> of the same type.*/
34: SFieldMeta makeForeignKey(SRecordMeta rmeta, String prefix,
35: SPropertyValue[] pvals) {
36: return new SFieldBooleanCharTF(rmeta, (prefix == null ? ""
37: : prefix)
38: + getString(SCon.SCOLUMN_NAME), pvals);
39: }
40: }
|