0001: /**
0002: * GENERATED CODE: DO NOT MODIFY IT UNDER ANY CIRCUMSTANCES!!!
0003: */package com.odal.petstore.persistence.gen.pos;
0004:
0005: import com.completex.objective.components.persistency.key.impl.DefaultNaturalKeyFactory;
0006: import java.util.Date;
0007: import java.util.HashMap;
0008: import java.util.Map;
0009: import java.io.InputStream;
0010: import java.math.BigDecimal;
0011: import java.math.BigInteger;
0012: import java.sql.Clob;
0013: import java.sql.Blob;
0014: import com.completex.objective.components.persistency.*;
0015: import com.completex.objective.components.persistency.key.impl.DefaultNaturalKeyFactory;
0016:
0017: import java.util.Date;
0018: import java.math.BigDecimal;
0019:
0020: public class OrderPO extends PersistentObject implements
0021: java.io.Externalizable {
0022: //
0023: // Complex object related:
0024: //
0025:
0026: //
0027: private static Map registeredMasters;
0028: private static Object lock = new Object();
0029:
0030: protected Object classLock() {
0031: return lock;
0032: }
0033:
0034: protected void instantiateRegisteredMasters() {
0035: if (registeredMasters == null) {
0036: synchronized (lock) {
0037: if (registeredMasters == null) {
0038: registeredMasters = new HashMap();
0039: }
0040: }
0041: }
0042: }
0043:
0044: protected Map registeredMasters() {
0045: return registeredMasters;
0046: }
0047:
0048: //
0049: //
0050: //
0051:
0052: public static final String TABLE_ORDER = "ORDERS";
0053:
0054: public OrderPO() {
0055: super (new Record(table));
0056: }
0057:
0058: public OrderPO(long orderId) {
0059: this ();
0060: setOrderId(orderId);
0061: }
0062:
0063: public static final String COL_ORDER_ID = "ORDER_ID";
0064: public static final String TCOL_ORDER_ID = "ORDERS.ORDER_ID";
0065: public static final int ICOL_ORDER_ID = 0;
0066: public static final int JDBC_TYPE_ORDER_ID = 4;
0067:
0068: public static final String COL_USER_ID = "USER_ID";
0069: public static final String TCOL_USER_ID = "ORDERS.USER_ID";
0070: public static final int ICOL_USER_ID = 1;
0071: public static final int JDBC_TYPE_USER_ID = 12;
0072:
0073: public static final String COL_ORDER_DATE = "ORDER_DATE";
0074: public static final String TCOL_ORDER_DATE = "ORDERS.ORDER_DATE";
0075: public static final int ICOL_ORDER_DATE = 2;
0076: public static final int JDBC_TYPE_ORDER_DATE = 91;
0077:
0078: public static final String COL_SHIP_ADDRESS1 = "SHIP_ADDR1";
0079: public static final String TCOL_SHIP_ADDRESS1 = "ORDERS.SHIP_ADDR1";
0080: public static final int ICOL_SHIP_ADDRESS1 = 3;
0081: public static final int JDBC_TYPE_SHIP_ADDRESS1 = 12;
0082:
0083: public static final String COL_SHIP_ADDRESS2 = "SHIP_ADDR2";
0084: public static final String TCOL_SHIP_ADDRESS2 = "ORDERS.SHIP_ADDR2";
0085: public static final int ICOL_SHIP_ADDRESS2 = 4;
0086: public static final int JDBC_TYPE_SHIP_ADDRESS2 = 12;
0087:
0088: public static final String COL_SHIP_CITY = "SHIP_CITY";
0089: public static final String TCOL_SHIP_CITY = "ORDERS.SHIP_CITY";
0090: public static final int ICOL_SHIP_CITY = 5;
0091: public static final int JDBC_TYPE_SHIP_CITY = 12;
0092:
0093: public static final String COL_SHIP_STATE = "SHIP_STATE";
0094: public static final String TCOL_SHIP_STATE = "ORDERS.SHIP_STATE";
0095: public static final int ICOL_SHIP_STATE = 6;
0096: public static final int JDBC_TYPE_SHIP_STATE = 12;
0097:
0098: public static final String COL_SHIP_ZIP = "SHIP_ZIP";
0099: public static final String TCOL_SHIP_ZIP = "ORDERS.SHIP_ZIP";
0100: public static final int ICOL_SHIP_ZIP = 7;
0101: public static final int JDBC_TYPE_SHIP_ZIP = 12;
0102:
0103: public static final String COL_SHIP_COUNTRY = "SHIP_COUNTRY";
0104: public static final String TCOL_SHIP_COUNTRY = "ORDERS.SHIP_COUNTRY";
0105: public static final int ICOL_SHIP_COUNTRY = 8;
0106: public static final int JDBC_TYPE_SHIP_COUNTRY = 12;
0107:
0108: public static final String COL_BILL_ADDRESS1 = "BILL_ADDR1";
0109: public static final String TCOL_BILL_ADDRESS1 = "ORDERS.BILL_ADDR1";
0110: public static final int ICOL_BILL_ADDRESS1 = 9;
0111: public static final int JDBC_TYPE_BILL_ADDRESS1 = 12;
0112:
0113: public static final String COL_BILL_ADDRESS2 = "BILL_ADDR2";
0114: public static final String TCOL_BILL_ADDRESS2 = "ORDERS.BILL_ADDR2";
0115: public static final int ICOL_BILL_ADDRESS2 = 10;
0116: public static final int JDBC_TYPE_BILL_ADDRESS2 = 12;
0117:
0118: public static final String COL_BILL_CITY = "BILL_CITY";
0119: public static final String TCOL_BILL_CITY = "ORDERS.BILL_CITY";
0120: public static final int ICOL_BILL_CITY = 11;
0121: public static final int JDBC_TYPE_BILL_CITY = 12;
0122:
0123: public static final String COL_BILL_STATE = "BILL_STATE";
0124: public static final String TCOL_BILL_STATE = "ORDERS.BILL_STATE";
0125: public static final int ICOL_BILL_STATE = 12;
0126: public static final int JDBC_TYPE_BILL_STATE = 12;
0127:
0128: public static final String COL_BILL_ZIP = "BILL_ZIP";
0129: public static final String TCOL_BILL_ZIP = "ORDERS.BILL_ZIP";
0130: public static final int ICOL_BILL_ZIP = 13;
0131: public static final int JDBC_TYPE_BILL_ZIP = 12;
0132:
0133: public static final String COL_BILL_COUNTRY = "BILL_COUNTRY";
0134: public static final String TCOL_BILL_COUNTRY = "ORDERS.BILL_COUNTRY";
0135: public static final int ICOL_BILL_COUNTRY = 14;
0136: public static final int JDBC_TYPE_BILL_COUNTRY = 12;
0137:
0138: public static final String COL_COURIER = "COURIER";
0139: public static final String TCOL_COURIER = "ORDERS.COURIER";
0140: public static final int ICOL_COURIER = 15;
0141: public static final int JDBC_TYPE_COURIER = 12;
0142:
0143: public static final String COL_TOTAL_PRICE = "TOTAL_PRICE";
0144: public static final String TCOL_TOTAL_PRICE = "ORDERS.TOTAL_PRICE";
0145: public static final int ICOL_TOTAL_PRICE = 16;
0146: public static final int JDBC_TYPE_TOTAL_PRICE = 3;
0147:
0148: public static final String COL_BILL_TO_FIRST_NAME = "BILL_TO_FIRST_NAME";
0149: public static final String TCOL_BILL_TO_FIRST_NAME = "ORDERS.BILL_TO_FIRST_NAME";
0150: public static final int ICOL_BILL_TO_FIRST_NAME = 17;
0151: public static final int JDBC_TYPE_BILL_TO_FIRST_NAME = 12;
0152:
0153: public static final String COL_BILL_TO_LAST_NAME = "BILL_TO_LAST_NAME";
0154: public static final String TCOL_BILL_TO_LAST_NAME = "ORDERS.BILL_TO_LAST_NAME";
0155: public static final int ICOL_BILL_TO_LAST_NAME = 18;
0156: public static final int JDBC_TYPE_BILL_TO_LAST_NAME = 12;
0157:
0158: public static final String COL_SHIP_TO_FIRST_NAME = "SHIP_TO_FIRST_NAME";
0159: public static final String TCOL_SHIP_TO_FIRST_NAME = "ORDERS.SHIP_TO_FIRST_NAME";
0160: public static final int ICOL_SHIP_TO_FIRST_NAME = 19;
0161: public static final int JDBC_TYPE_SHIP_TO_FIRST_NAME = 12;
0162:
0163: public static final String COL_SHIP_TO_LAST_NAME = "SHIP_TO_LAST_NAME";
0164: public static final String TCOL_SHIP_TO_LAST_NAME = "ORDERS.SHIP_TO_LAST_NAME";
0165: public static final int ICOL_SHIP_TO_LAST_NAME = 20;
0166: public static final int JDBC_TYPE_SHIP_TO_LAST_NAME = 12;
0167:
0168: public static final String COL_CREDIT_CARD = "CREDIT_CARD";
0169: public static final String TCOL_CREDIT_CARD = "ORDERS.CREDIT_CARD";
0170: public static final int ICOL_CREDIT_CARD = 21;
0171: public static final int JDBC_TYPE_CREDIT_CARD = 12;
0172:
0173: public static final String COL_EXPIRY_DATE = "EXPR_DATE";
0174: public static final String TCOL_EXPIRY_DATE = "ORDERS.EXPR_DATE";
0175: public static final int ICOL_EXPIRY_DATE = 22;
0176: public static final int JDBC_TYPE_EXPIRY_DATE = 12;
0177:
0178: public static final String COL_CARD_TYPE = "CARD_TYPE";
0179: public static final String TCOL_CARD_TYPE = "ORDERS.CARD_TYPE";
0180: public static final int ICOL_CARD_TYPE = 23;
0181: public static final int JDBC_TYPE_CARD_TYPE = 12;
0182:
0183: public static final String COL_LOCALE = "LOCALE";
0184: public static final String TCOL_LOCALE = "ORDERS.LOCALE";
0185: public static final int ICOL_LOCALE = 24;
0186: public static final int JDBC_TYPE_LOCALE = 12;
0187:
0188: private static final MetaTable table = new MetaTable("ORDERS",
0189: "ORDER", 25, 1);
0190:
0191: static {
0192: table.setStaticFinal(true);
0193: //
0194: // Meta Foreign Keys:
0195: //
0196: //
0197: // Meta Natural Key:
0198: //
0199: // naturalKey has no context
0200:
0201: //
0202: // Meta Columns:
0203: //
0204:
0205: final MetaColumn metaOrderId = new MetaColumn(ICOL_ORDER_ID,
0206: "ORDER_ID", "ORDER_ID", table);
0207: metaOrderId.setPrimaryKey(true);
0208: metaOrderId.setRequired(true);
0209: metaOrderId.setOptimisticLock(false);
0210: metaOrderId.setType(ColumnType.LONG_PRIMITIVE);
0211: metaOrderId.setColumnSize(0);
0212: metaOrderId.setRemarks("");
0213: metaOrderId.setDecimalDigits(0);
0214: metaOrderId.setAutoGenerated(true);
0215: metaOrderId.setAutoIncrement(false);
0216: metaOrderId.setJdbcType(4);
0217: metaOrderId
0218: .setKeyGenerator(new com.completex.objective.components.persistency.key.impl.OdalSimpleSequenceKeyGenerator());
0219: {
0220: HashMap staticAttributes = new HashMap();
0221: staticAttributes.put("name", "ordernum");
0222: metaOrderId.setGeneratorStaticAttributes(staticAttributes);
0223: }
0224: metaOrderId.initializeKeyGenerator();
0225: table.addToPrimaryKey(new Integer(ICOL_ORDER_ID));
0226: table.addColumn(metaOrderId);
0227:
0228: final MetaColumn metaUserId = new MetaColumn(ICOL_USER_ID,
0229: "USER_ID", "USER_ID", table);
0230: metaUserId.setPrimaryKey(false);
0231: metaUserId.setRequired(true);
0232: metaUserId.setOptimisticLock(false);
0233: metaUserId.setType(ColumnType.STRING);
0234: metaUserId.setColumnSize(80);
0235: metaUserId.setRemarks("");
0236: metaUserId.setDecimalDigits(0);
0237: metaUserId.setAutoGenerated(false);
0238: metaUserId.setAutoIncrement(false);
0239: metaUserId.setJdbcType(12);
0240: table.addColumn(metaUserId);
0241:
0242: final MetaColumn metaOrderDate = new MetaColumn(
0243: ICOL_ORDER_DATE, "ORDER_DATE", "ORDER_DATE", table);
0244: metaOrderDate.setPrimaryKey(false);
0245: metaOrderDate.setRequired(true);
0246: metaOrderDate.setOptimisticLock(false);
0247: metaOrderDate.setType(ColumnType.DATE);
0248: metaOrderDate.setColumnSize(0);
0249: metaOrderDate.setRemarks("");
0250: metaOrderDate.setDecimalDigits(0);
0251: metaOrderDate.setAutoGenerated(false);
0252: metaOrderDate.setAutoIncrement(false);
0253: metaOrderDate.setJdbcType(91);
0254: table.addColumn(metaOrderDate);
0255:
0256: final MetaColumn metaShipAddress1 = new MetaColumn(
0257: ICOL_SHIP_ADDRESS1, "SHIP_ADDR1", "SHIP_ADDRESS1",
0258: table);
0259: metaShipAddress1.setPrimaryKey(false);
0260: metaShipAddress1.setRequired(true);
0261: metaShipAddress1.setOptimisticLock(false);
0262: metaShipAddress1.setType(ColumnType.STRING);
0263: metaShipAddress1.setColumnSize(80);
0264: metaShipAddress1.setRemarks("");
0265: metaShipAddress1.setDecimalDigits(0);
0266: metaShipAddress1.setAutoGenerated(false);
0267: metaShipAddress1.setAutoIncrement(false);
0268: metaShipAddress1.setJdbcType(12);
0269: table.addColumn(metaShipAddress1);
0270:
0271: final MetaColumn metaShipAddress2 = new MetaColumn(
0272: ICOL_SHIP_ADDRESS2, "SHIP_ADDR2", "SHIP_ADDRESS2",
0273: table);
0274: metaShipAddress2.setPrimaryKey(false);
0275: metaShipAddress2.setRequired(false);
0276: metaShipAddress2.setOptimisticLock(false);
0277: metaShipAddress2.setType(ColumnType.STRING);
0278: metaShipAddress2.setColumnSize(80);
0279: metaShipAddress2.setRemarks("");
0280: metaShipAddress2.setDecimalDigits(0);
0281: metaShipAddress2.setAutoGenerated(false);
0282: metaShipAddress2.setAutoIncrement(false);
0283: metaShipAddress2.setJdbcType(12);
0284: table.addColumn(metaShipAddress2);
0285:
0286: final MetaColumn metaShipCity = new MetaColumn(ICOL_SHIP_CITY,
0287: "SHIP_CITY", "SHIP_CITY", table);
0288: metaShipCity.setPrimaryKey(false);
0289: metaShipCity.setRequired(true);
0290: metaShipCity.setOptimisticLock(false);
0291: metaShipCity.setType(ColumnType.STRING);
0292: metaShipCity.setColumnSize(80);
0293: metaShipCity.setRemarks("");
0294: metaShipCity.setDecimalDigits(0);
0295: metaShipCity.setAutoGenerated(false);
0296: metaShipCity.setAutoIncrement(false);
0297: metaShipCity.setJdbcType(12);
0298: table.addColumn(metaShipCity);
0299:
0300: final MetaColumn metaShipState = new MetaColumn(
0301: ICOL_SHIP_STATE, "SHIP_STATE", "SHIP_STATE", table);
0302: metaShipState.setPrimaryKey(false);
0303: metaShipState.setRequired(true);
0304: metaShipState.setOptimisticLock(false);
0305: metaShipState.setType(ColumnType.STRING);
0306: metaShipState.setColumnSize(80);
0307: metaShipState.setRemarks("");
0308: metaShipState.setDecimalDigits(0);
0309: metaShipState.setAutoGenerated(false);
0310: metaShipState.setAutoIncrement(false);
0311: metaShipState.setJdbcType(12);
0312: table.addColumn(metaShipState);
0313:
0314: final MetaColumn metaShipZip = new MetaColumn(ICOL_SHIP_ZIP,
0315: "SHIP_ZIP", "SHIP_ZIP", table);
0316: metaShipZip.setPrimaryKey(false);
0317: metaShipZip.setRequired(true);
0318: metaShipZip.setOptimisticLock(false);
0319: metaShipZip.setType(ColumnType.STRING);
0320: metaShipZip.setColumnSize(20);
0321: metaShipZip.setRemarks("");
0322: metaShipZip.setDecimalDigits(0);
0323: metaShipZip.setAutoGenerated(false);
0324: metaShipZip.setAutoIncrement(false);
0325: metaShipZip.setJdbcType(12);
0326: table.addColumn(metaShipZip);
0327:
0328: final MetaColumn metaShipCountry = new MetaColumn(
0329: ICOL_SHIP_COUNTRY, "SHIP_COUNTRY", "SHIP_COUNTRY",
0330: table);
0331: metaShipCountry.setPrimaryKey(false);
0332: metaShipCountry.setRequired(true);
0333: metaShipCountry.setOptimisticLock(false);
0334: metaShipCountry.setType(ColumnType.STRING);
0335: metaShipCountry.setColumnSize(20);
0336: metaShipCountry.setRemarks("");
0337: metaShipCountry.setDecimalDigits(0);
0338: metaShipCountry.setAutoGenerated(false);
0339: metaShipCountry.setAutoIncrement(false);
0340: metaShipCountry.setJdbcType(12);
0341: table.addColumn(metaShipCountry);
0342:
0343: final MetaColumn metaBillAddress1 = new MetaColumn(
0344: ICOL_BILL_ADDRESS1, "BILL_ADDR1", "BILL_ADDRESS1",
0345: table);
0346: metaBillAddress1.setPrimaryKey(false);
0347: metaBillAddress1.setRequired(true);
0348: metaBillAddress1.setOptimisticLock(false);
0349: metaBillAddress1.setType(ColumnType.STRING);
0350: metaBillAddress1.setColumnSize(80);
0351: metaBillAddress1.setRemarks("");
0352: metaBillAddress1.setDecimalDigits(0);
0353: metaBillAddress1.setAutoGenerated(false);
0354: metaBillAddress1.setAutoIncrement(false);
0355: metaBillAddress1.setJdbcType(12);
0356: table.addColumn(metaBillAddress1);
0357:
0358: final MetaColumn metaBillAddress2 = new MetaColumn(
0359: ICOL_BILL_ADDRESS2, "BILL_ADDR2", "BILL_ADDRESS2",
0360: table);
0361: metaBillAddress2.setPrimaryKey(false);
0362: metaBillAddress2.setRequired(false);
0363: metaBillAddress2.setOptimisticLock(false);
0364: metaBillAddress2.setType(ColumnType.STRING);
0365: metaBillAddress2.setColumnSize(80);
0366: metaBillAddress2.setRemarks("");
0367: metaBillAddress2.setDecimalDigits(0);
0368: metaBillAddress2.setAutoGenerated(false);
0369: metaBillAddress2.setAutoIncrement(false);
0370: metaBillAddress2.setJdbcType(12);
0371: table.addColumn(metaBillAddress2);
0372:
0373: final MetaColumn metaBillCity = new MetaColumn(ICOL_BILL_CITY,
0374: "BILL_CITY", "BILL_CITY", table);
0375: metaBillCity.setPrimaryKey(false);
0376: metaBillCity.setRequired(true);
0377: metaBillCity.setOptimisticLock(false);
0378: metaBillCity.setType(ColumnType.STRING);
0379: metaBillCity.setColumnSize(80);
0380: metaBillCity.setRemarks("");
0381: metaBillCity.setDecimalDigits(0);
0382: metaBillCity.setAutoGenerated(false);
0383: metaBillCity.setAutoIncrement(false);
0384: metaBillCity.setJdbcType(12);
0385: table.addColumn(metaBillCity);
0386:
0387: final MetaColumn metaBillState = new MetaColumn(
0388: ICOL_BILL_STATE, "BILL_STATE", "BILL_STATE", table);
0389: metaBillState.setPrimaryKey(false);
0390: metaBillState.setRequired(true);
0391: metaBillState.setOptimisticLock(false);
0392: metaBillState.setType(ColumnType.STRING);
0393: metaBillState.setColumnSize(80);
0394: metaBillState.setRemarks("");
0395: metaBillState.setDecimalDigits(0);
0396: metaBillState.setAutoGenerated(false);
0397: metaBillState.setAutoIncrement(false);
0398: metaBillState.setJdbcType(12);
0399: table.addColumn(metaBillState);
0400:
0401: final MetaColumn metaBillZip = new MetaColumn(ICOL_BILL_ZIP,
0402: "BILL_ZIP", "BILL_ZIP", table);
0403: metaBillZip.setPrimaryKey(false);
0404: metaBillZip.setRequired(true);
0405: metaBillZip.setOptimisticLock(false);
0406: metaBillZip.setType(ColumnType.STRING);
0407: metaBillZip.setColumnSize(20);
0408: metaBillZip.setRemarks("");
0409: metaBillZip.setDecimalDigits(0);
0410: metaBillZip.setAutoGenerated(false);
0411: metaBillZip.setAutoIncrement(false);
0412: metaBillZip.setJdbcType(12);
0413: table.addColumn(metaBillZip);
0414:
0415: final MetaColumn metaBillCountry = new MetaColumn(
0416: ICOL_BILL_COUNTRY, "BILL_COUNTRY", "BILL_COUNTRY",
0417: table);
0418: metaBillCountry.setPrimaryKey(false);
0419: metaBillCountry.setRequired(true);
0420: metaBillCountry.setOptimisticLock(false);
0421: metaBillCountry.setType(ColumnType.STRING);
0422: metaBillCountry.setColumnSize(20);
0423: metaBillCountry.setRemarks("");
0424: metaBillCountry.setDecimalDigits(0);
0425: metaBillCountry.setAutoGenerated(false);
0426: metaBillCountry.setAutoIncrement(false);
0427: metaBillCountry.setJdbcType(12);
0428: table.addColumn(metaBillCountry);
0429:
0430: final MetaColumn metaCourier = new MetaColumn(ICOL_COURIER,
0431: "COURIER", "COURIER", table);
0432: metaCourier.setPrimaryKey(false);
0433: metaCourier.setRequired(true);
0434: metaCourier.setOptimisticLock(false);
0435: metaCourier.setType(ColumnType.STRING);
0436: metaCourier.setColumnSize(80);
0437: metaCourier.setRemarks("");
0438: metaCourier.setDecimalDigits(0);
0439: metaCourier.setAutoGenerated(false);
0440: metaCourier.setAutoIncrement(false);
0441: metaCourier.setJdbcType(12);
0442: table.addColumn(metaCourier);
0443:
0444: final MetaColumn metaTotalPrice = new MetaColumn(
0445: ICOL_TOTAL_PRICE, "TOTAL_PRICE", "TOTAL_PRICE", table);
0446: metaTotalPrice.setPrimaryKey(false);
0447: metaTotalPrice.setRequired(true);
0448: metaTotalPrice.setOptimisticLock(false);
0449: metaTotalPrice.setType(ColumnType.BIGDECIMAL);
0450: metaTotalPrice.setColumnSize(10);
0451: metaTotalPrice.setRemarks("");
0452: metaTotalPrice.setDecimalDigits(2);
0453: metaTotalPrice.setAutoGenerated(false);
0454: metaTotalPrice.setAutoIncrement(false);
0455: metaTotalPrice.setJdbcType(3);
0456: table.addColumn(metaTotalPrice);
0457:
0458: final MetaColumn metaBillToFirstName = new MetaColumn(
0459: ICOL_BILL_TO_FIRST_NAME, "BILL_TO_FIRST_NAME",
0460: "BILL_TO_FIRST_NAME", table);
0461: metaBillToFirstName.setPrimaryKey(false);
0462: metaBillToFirstName.setRequired(true);
0463: metaBillToFirstName.setOptimisticLock(false);
0464: metaBillToFirstName.setType(ColumnType.STRING);
0465: metaBillToFirstName.setColumnSize(80);
0466: metaBillToFirstName.setRemarks("");
0467: metaBillToFirstName.setDecimalDigits(0);
0468: metaBillToFirstName.setAutoGenerated(false);
0469: metaBillToFirstName.setAutoIncrement(false);
0470: metaBillToFirstName.setJdbcType(12);
0471: table.addColumn(metaBillToFirstName);
0472:
0473: final MetaColumn metaBillToLastName = new MetaColumn(
0474: ICOL_BILL_TO_LAST_NAME, "BILL_TO_LAST_NAME",
0475: "BILL_TO_LAST_NAME", table);
0476: metaBillToLastName.setPrimaryKey(false);
0477: metaBillToLastName.setRequired(true);
0478: metaBillToLastName.setOptimisticLock(false);
0479: metaBillToLastName.setType(ColumnType.STRING);
0480: metaBillToLastName.setColumnSize(80);
0481: metaBillToLastName.setRemarks("");
0482: metaBillToLastName.setDecimalDigits(0);
0483: metaBillToLastName.setAutoGenerated(false);
0484: metaBillToLastName.setAutoIncrement(false);
0485: metaBillToLastName.setJdbcType(12);
0486: table.addColumn(metaBillToLastName);
0487:
0488: final MetaColumn metaShipToFirstName = new MetaColumn(
0489: ICOL_SHIP_TO_FIRST_NAME, "SHIP_TO_FIRST_NAME",
0490: "SHIP_TO_FIRST_NAME", table);
0491: metaShipToFirstName.setPrimaryKey(false);
0492: metaShipToFirstName.setRequired(true);
0493: metaShipToFirstName.setOptimisticLock(false);
0494: metaShipToFirstName.setType(ColumnType.STRING);
0495: metaShipToFirstName.setColumnSize(80);
0496: metaShipToFirstName.setRemarks("");
0497: metaShipToFirstName.setDecimalDigits(0);
0498: metaShipToFirstName.setAutoGenerated(false);
0499: metaShipToFirstName.setAutoIncrement(false);
0500: metaShipToFirstName.setJdbcType(12);
0501: table.addColumn(metaShipToFirstName);
0502:
0503: final MetaColumn metaShipToLastName = new MetaColumn(
0504: ICOL_SHIP_TO_LAST_NAME, "SHIP_TO_LAST_NAME",
0505: "SHIP_TO_LAST_NAME", table);
0506: metaShipToLastName.setPrimaryKey(false);
0507: metaShipToLastName.setRequired(true);
0508: metaShipToLastName.setOptimisticLock(false);
0509: metaShipToLastName.setType(ColumnType.STRING);
0510: metaShipToLastName.setColumnSize(80);
0511: metaShipToLastName.setRemarks("");
0512: metaShipToLastName.setDecimalDigits(0);
0513: metaShipToLastName.setAutoGenerated(false);
0514: metaShipToLastName.setAutoIncrement(false);
0515: metaShipToLastName.setJdbcType(12);
0516: table.addColumn(metaShipToLastName);
0517:
0518: final MetaColumn metaCreditCard = new MetaColumn(
0519: ICOL_CREDIT_CARD, "CREDIT_CARD", "CREDIT_CARD", table);
0520: metaCreditCard.setPrimaryKey(false);
0521: metaCreditCard.setRequired(true);
0522: metaCreditCard.setOptimisticLock(false);
0523: metaCreditCard.setType(ColumnType.STRING);
0524: metaCreditCard.setColumnSize(80);
0525: metaCreditCard.setRemarks("");
0526: metaCreditCard.setDecimalDigits(0);
0527: metaCreditCard.setAutoGenerated(false);
0528: metaCreditCard.setAutoIncrement(false);
0529: metaCreditCard.setJdbcType(12);
0530: table.addColumn(metaCreditCard);
0531:
0532: final MetaColumn metaExpiryDate = new MetaColumn(
0533: ICOL_EXPIRY_DATE, "EXPR_DATE", "EXPIRY_DATE", table);
0534: metaExpiryDate.setPrimaryKey(false);
0535: metaExpiryDate.setRequired(true);
0536: metaExpiryDate.setOptimisticLock(false);
0537: metaExpiryDate.setType(ColumnType.STRING);
0538: metaExpiryDate.setColumnSize(7);
0539: metaExpiryDate.setRemarks("");
0540: metaExpiryDate.setDecimalDigits(0);
0541: metaExpiryDate.setAutoGenerated(false);
0542: metaExpiryDate.setAutoIncrement(false);
0543: metaExpiryDate.setJdbcType(12);
0544: table.addColumn(metaExpiryDate);
0545:
0546: final MetaColumn metaCardType = new MetaColumn(ICOL_CARD_TYPE,
0547: "CARD_TYPE", "CARD_TYPE", table);
0548: metaCardType.setPrimaryKey(false);
0549: metaCardType.setRequired(true);
0550: metaCardType.setOptimisticLock(false);
0551: metaCardType.setType(ColumnType.STRING);
0552: metaCardType.setColumnSize(80);
0553: metaCardType.setRemarks("");
0554: metaCardType.setDecimalDigits(0);
0555: metaCardType.setAutoGenerated(false);
0556: metaCardType.setAutoIncrement(false);
0557: metaCardType.setJdbcType(12);
0558: table.addColumn(metaCardType);
0559:
0560: final MetaColumn metaLocale = new MetaColumn(ICOL_LOCALE,
0561: "LOCALE", "LOCALE", table);
0562: metaLocale.setPrimaryKey(false);
0563: metaLocale.setRequired(true);
0564: metaLocale.setOptimisticLock(false);
0565: metaLocale.setType(ColumnType.STRING);
0566: metaLocale.setColumnSize(80);
0567: metaLocale.setRemarks("");
0568: metaLocale.setDecimalDigits(0);
0569: metaLocale.setAutoGenerated(false);
0570: metaLocale.setAutoIncrement(false);
0571: metaLocale.setJdbcType(12);
0572: table.addColumn(metaLocale);
0573:
0574: }
0575:
0576: private long orderId;
0577: private String userId;
0578: private Date orderDate;
0579: private String shipAddress1;
0580: private String shipAddress2;
0581: private String shipCity;
0582: private String shipState;
0583: private String shipZip;
0584: private String shipCountry;
0585: private String billAddress1;
0586: private String billAddress2;
0587: private String billCity;
0588: private String billState;
0589: private String billZip;
0590: private String billCountry;
0591: private String courier;
0592: private BigDecimal totalPrice;
0593: private String billToFirstName;
0594: private String billToLastName;
0595: private String shipToFirstName;
0596: private String shipToLastName;
0597: private String creditCard;
0598: private String expiryDate;
0599: private String cardType;
0600: private String locale;
0601:
0602: //
0603: // orderId:
0604: //
0605: public long getOrderId() {
0606: return this .orderId;
0607: }
0608:
0609: public void setOrderId(long orderId) {
0610: if (record2().setObject(ICOL_ORDER_ID, long2Number(orderId))) {
0611: this .orderId = orderId;
0612: }
0613: }
0614:
0615: public boolean izNullOrderId() {
0616: return record2().getObject(ICOL_ORDER_ID) == null;
0617: }
0618:
0619: public void setNullOrderId() {
0620: if (record2().setObject(ICOL_ORDER_ID, null)) {
0621: this .orderId = Number2long(null);
0622: }
0623: }
0624:
0625: //
0626: // userId:
0627: //
0628: public String getUserId() {
0629: return this .userId;
0630: }
0631:
0632: public void setUserId(String userId) {
0633: if (record2().setObject(ICOL_USER_ID, userId)) {
0634: this .userId = userId;
0635: }
0636: }
0637:
0638: public boolean izNullUserId() {
0639: return record2().getObject(ICOL_USER_ID) == null;
0640: }
0641:
0642: public void setNullUserId() {
0643: if (record2().setObject(ICOL_USER_ID, null)) {
0644: this .userId = null;
0645: }
0646: }
0647:
0648: //
0649: // orderDate:
0650: //
0651: public Date getOrderDate() {
0652: return this .orderDate;
0653: }
0654:
0655: public void setOrderDate(Date orderDate) {
0656: if (record2().setObject(ICOL_ORDER_DATE, orderDate)) {
0657: this .orderDate = orderDate;
0658: }
0659: }
0660:
0661: public boolean izNullOrderDate() {
0662: return record2().getObject(ICOL_ORDER_DATE) == null;
0663: }
0664:
0665: public void setNullOrderDate() {
0666: if (record2().setObject(ICOL_ORDER_DATE, null)) {
0667: this .orderDate = null;
0668: }
0669: }
0670:
0671: //
0672: // shipAddress1:
0673: //
0674: public String getShipAddress1() {
0675: return this .shipAddress1;
0676: }
0677:
0678: public void setShipAddress1(String shipAddress1) {
0679: if (record2().setObject(ICOL_SHIP_ADDRESS1, shipAddress1)) {
0680: this .shipAddress1 = shipAddress1;
0681: }
0682: }
0683:
0684: public boolean izNullShipAddress1() {
0685: return record2().getObject(ICOL_SHIP_ADDRESS1) == null;
0686: }
0687:
0688: public void setNullShipAddress1() {
0689: if (record2().setObject(ICOL_SHIP_ADDRESS1, null)) {
0690: this .shipAddress1 = null;
0691: }
0692: }
0693:
0694: //
0695: // shipAddress2:
0696: //
0697: public String getShipAddress2() {
0698: return this .shipAddress2;
0699: }
0700:
0701: public void setShipAddress2(String shipAddress2) {
0702: if (record2().setObject(ICOL_SHIP_ADDRESS2, shipAddress2)) {
0703: this .shipAddress2 = shipAddress2;
0704: }
0705: }
0706:
0707: public boolean izNullShipAddress2() {
0708: return record2().getObject(ICOL_SHIP_ADDRESS2) == null;
0709: }
0710:
0711: public void setNullShipAddress2() {
0712: if (record2().setObject(ICOL_SHIP_ADDRESS2, null)) {
0713: this .shipAddress2 = null;
0714: }
0715: }
0716:
0717: //
0718: // shipCity:
0719: //
0720: public String getShipCity() {
0721: return this .shipCity;
0722: }
0723:
0724: public void setShipCity(String shipCity) {
0725: if (record2().setObject(ICOL_SHIP_CITY, shipCity)) {
0726: this .shipCity = shipCity;
0727: }
0728: }
0729:
0730: public boolean izNullShipCity() {
0731: return record2().getObject(ICOL_SHIP_CITY) == null;
0732: }
0733:
0734: public void setNullShipCity() {
0735: if (record2().setObject(ICOL_SHIP_CITY, null)) {
0736: this .shipCity = null;
0737: }
0738: }
0739:
0740: //
0741: // shipState:
0742: //
0743: public String getShipState() {
0744: return this .shipState;
0745: }
0746:
0747: public void setShipState(String shipState) {
0748: if (record2().setObject(ICOL_SHIP_STATE, shipState)) {
0749: this .shipState = shipState;
0750: }
0751: }
0752:
0753: public boolean izNullShipState() {
0754: return record2().getObject(ICOL_SHIP_STATE) == null;
0755: }
0756:
0757: public void setNullShipState() {
0758: if (record2().setObject(ICOL_SHIP_STATE, null)) {
0759: this .shipState = null;
0760: }
0761: }
0762:
0763: //
0764: // shipZip:
0765: //
0766: public String getShipZip() {
0767: return this .shipZip;
0768: }
0769:
0770: public void setShipZip(String shipZip) {
0771: if (record2().setObject(ICOL_SHIP_ZIP, shipZip)) {
0772: this .shipZip = shipZip;
0773: }
0774: }
0775:
0776: public boolean izNullShipZip() {
0777: return record2().getObject(ICOL_SHIP_ZIP) == null;
0778: }
0779:
0780: public void setNullShipZip() {
0781: if (record2().setObject(ICOL_SHIP_ZIP, null)) {
0782: this .shipZip = null;
0783: }
0784: }
0785:
0786: //
0787: // shipCountry:
0788: //
0789: public String getShipCountry() {
0790: return this .shipCountry;
0791: }
0792:
0793: public void setShipCountry(String shipCountry) {
0794: if (record2().setObject(ICOL_SHIP_COUNTRY, shipCountry)) {
0795: this .shipCountry = shipCountry;
0796: }
0797: }
0798:
0799: public boolean izNullShipCountry() {
0800: return record2().getObject(ICOL_SHIP_COUNTRY) == null;
0801: }
0802:
0803: public void setNullShipCountry() {
0804: if (record2().setObject(ICOL_SHIP_COUNTRY, null)) {
0805: this .shipCountry = null;
0806: }
0807: }
0808:
0809: //
0810: // billAddress1:
0811: //
0812: public String getBillAddress1() {
0813: return this .billAddress1;
0814: }
0815:
0816: public void setBillAddress1(String billAddress1) {
0817: if (record2().setObject(ICOL_BILL_ADDRESS1, billAddress1)) {
0818: this .billAddress1 = billAddress1;
0819: }
0820: }
0821:
0822: public boolean izNullBillAddress1() {
0823: return record2().getObject(ICOL_BILL_ADDRESS1) == null;
0824: }
0825:
0826: public void setNullBillAddress1() {
0827: if (record2().setObject(ICOL_BILL_ADDRESS1, null)) {
0828: this .billAddress1 = null;
0829: }
0830: }
0831:
0832: //
0833: // billAddress2:
0834: //
0835: public String getBillAddress2() {
0836: return this .billAddress2;
0837: }
0838:
0839: public void setBillAddress2(String billAddress2) {
0840: if (record2().setObject(ICOL_BILL_ADDRESS2, billAddress2)) {
0841: this .billAddress2 = billAddress2;
0842: }
0843: }
0844:
0845: public boolean izNullBillAddress2() {
0846: return record2().getObject(ICOL_BILL_ADDRESS2) == null;
0847: }
0848:
0849: public void setNullBillAddress2() {
0850: if (record2().setObject(ICOL_BILL_ADDRESS2, null)) {
0851: this .billAddress2 = null;
0852: }
0853: }
0854:
0855: //
0856: // billCity:
0857: //
0858: public String getBillCity() {
0859: return this .billCity;
0860: }
0861:
0862: public void setBillCity(String billCity) {
0863: if (record2().setObject(ICOL_BILL_CITY, billCity)) {
0864: this .billCity = billCity;
0865: }
0866: }
0867:
0868: public boolean izNullBillCity() {
0869: return record2().getObject(ICOL_BILL_CITY) == null;
0870: }
0871:
0872: public void setNullBillCity() {
0873: if (record2().setObject(ICOL_BILL_CITY, null)) {
0874: this .billCity = null;
0875: }
0876: }
0877:
0878: //
0879: // billState:
0880: //
0881: public String getBillState() {
0882: return this .billState;
0883: }
0884:
0885: public void setBillState(String billState) {
0886: if (record2().setObject(ICOL_BILL_STATE, billState)) {
0887: this .billState = billState;
0888: }
0889: }
0890:
0891: public boolean izNullBillState() {
0892: return record2().getObject(ICOL_BILL_STATE) == null;
0893: }
0894:
0895: public void setNullBillState() {
0896: if (record2().setObject(ICOL_BILL_STATE, null)) {
0897: this .billState = null;
0898: }
0899: }
0900:
0901: //
0902: // billZip:
0903: //
0904: public String getBillZip() {
0905: return this .billZip;
0906: }
0907:
0908: public void setBillZip(String billZip) {
0909: if (record2().setObject(ICOL_BILL_ZIP, billZip)) {
0910: this .billZip = billZip;
0911: }
0912: }
0913:
0914: public boolean izNullBillZip() {
0915: return record2().getObject(ICOL_BILL_ZIP) == null;
0916: }
0917:
0918: public void setNullBillZip() {
0919: if (record2().setObject(ICOL_BILL_ZIP, null)) {
0920: this .billZip = null;
0921: }
0922: }
0923:
0924: //
0925: // billCountry:
0926: //
0927: public String getBillCountry() {
0928: return this .billCountry;
0929: }
0930:
0931: public void setBillCountry(String billCountry) {
0932: if (record2().setObject(ICOL_BILL_COUNTRY, billCountry)) {
0933: this .billCountry = billCountry;
0934: }
0935: }
0936:
0937: public boolean izNullBillCountry() {
0938: return record2().getObject(ICOL_BILL_COUNTRY) == null;
0939: }
0940:
0941: public void setNullBillCountry() {
0942: if (record2().setObject(ICOL_BILL_COUNTRY, null)) {
0943: this .billCountry = null;
0944: }
0945: }
0946:
0947: //
0948: // courier:
0949: //
0950: public String getCourier() {
0951: return this .courier;
0952: }
0953:
0954: public void setCourier(String courier) {
0955: if (record2().setObject(ICOL_COURIER, courier)) {
0956: this .courier = courier;
0957: }
0958: }
0959:
0960: public boolean izNullCourier() {
0961: return record2().getObject(ICOL_COURIER) == null;
0962: }
0963:
0964: public void setNullCourier() {
0965: if (record2().setObject(ICOL_COURIER, null)) {
0966: this .courier = null;
0967: }
0968: }
0969:
0970: //
0971: // totalPrice:
0972: //
0973: public BigDecimal getTotalPrice() {
0974: return this .totalPrice;
0975: }
0976:
0977: public void setTotalPrice(BigDecimal totalPrice) {
0978: if (record2().setObject(ICOL_TOTAL_PRICE, totalPrice)) {
0979: this .totalPrice = totalPrice;
0980: }
0981: }
0982:
0983: public boolean izNullTotalPrice() {
0984: return record2().getObject(ICOL_TOTAL_PRICE) == null;
0985: }
0986:
0987: public void setNullTotalPrice() {
0988: if (record2().setObject(ICOL_TOTAL_PRICE, null)) {
0989: this .totalPrice = null;
0990: }
0991: }
0992:
0993: //
0994: // billToFirstName:
0995: //
0996: public String getBillToFirstName() {
0997: return this .billToFirstName;
0998: }
0999:
1000: public void setBillToFirstName(String billToFirstName) {
1001: if (record2().setObject(ICOL_BILL_TO_FIRST_NAME,
1002: billToFirstName)) {
1003: this .billToFirstName = billToFirstName;
1004: }
1005: }
1006:
1007: public boolean izNullBillToFirstName() {
1008: return record2().getObject(ICOL_BILL_TO_FIRST_NAME) == null;
1009: }
1010:
1011: public void setNullBillToFirstName() {
1012: if (record2().setObject(ICOL_BILL_TO_FIRST_NAME, null)) {
1013: this .billToFirstName = null;
1014: }
1015: }
1016:
1017: //
1018: // billToLastName:
1019: //
1020: public String getBillToLastName() {
1021: return this .billToLastName;
1022: }
1023:
1024: public void setBillToLastName(String billToLastName) {
1025: if (record2().setObject(ICOL_BILL_TO_LAST_NAME, billToLastName)) {
1026: this .billToLastName = billToLastName;
1027: }
1028: }
1029:
1030: public boolean izNullBillToLastName() {
1031: return record2().getObject(ICOL_BILL_TO_LAST_NAME) == null;
1032: }
1033:
1034: public void setNullBillToLastName() {
1035: if (record2().setObject(ICOL_BILL_TO_LAST_NAME, null)) {
1036: this .billToLastName = null;
1037: }
1038: }
1039:
1040: //
1041: // shipToFirstName:
1042: //
1043: public String getShipToFirstName() {
1044: return this .shipToFirstName;
1045: }
1046:
1047: public void setShipToFirstName(String shipToFirstName) {
1048: if (record2().setObject(ICOL_SHIP_TO_FIRST_NAME,
1049: shipToFirstName)) {
1050: this .shipToFirstName = shipToFirstName;
1051: }
1052: }
1053:
1054: public boolean izNullShipToFirstName() {
1055: return record2().getObject(ICOL_SHIP_TO_FIRST_NAME) == null;
1056: }
1057:
1058: public void setNullShipToFirstName() {
1059: if (record2().setObject(ICOL_SHIP_TO_FIRST_NAME, null)) {
1060: this .shipToFirstName = null;
1061: }
1062: }
1063:
1064: //
1065: // shipToLastName:
1066: //
1067: public String getShipToLastName() {
1068: return this .shipToLastName;
1069: }
1070:
1071: public void setShipToLastName(String shipToLastName) {
1072: if (record2().setObject(ICOL_SHIP_TO_LAST_NAME, shipToLastName)) {
1073: this .shipToLastName = shipToLastName;
1074: }
1075: }
1076:
1077: public boolean izNullShipToLastName() {
1078: return record2().getObject(ICOL_SHIP_TO_LAST_NAME) == null;
1079: }
1080:
1081: public void setNullShipToLastName() {
1082: if (record2().setObject(ICOL_SHIP_TO_LAST_NAME, null)) {
1083: this .shipToLastName = null;
1084: }
1085: }
1086:
1087: //
1088: // creditCard:
1089: //
1090: public String getCreditCard() {
1091: return this .creditCard;
1092: }
1093:
1094: public void setCreditCard(String creditCard) {
1095: if (record2().setObject(ICOL_CREDIT_CARD, creditCard)) {
1096: this .creditCard = creditCard;
1097: }
1098: }
1099:
1100: public boolean izNullCreditCard() {
1101: return record2().getObject(ICOL_CREDIT_CARD) == null;
1102: }
1103:
1104: public void setNullCreditCard() {
1105: if (record2().setObject(ICOL_CREDIT_CARD, null)) {
1106: this .creditCard = null;
1107: }
1108: }
1109:
1110: //
1111: // expiryDate:
1112: //
1113: public String getExpiryDate() {
1114: return this .expiryDate;
1115: }
1116:
1117: public void setExpiryDate(String expiryDate) {
1118: if (record2().setObject(ICOL_EXPIRY_DATE, expiryDate)) {
1119: this .expiryDate = expiryDate;
1120: }
1121: }
1122:
1123: public boolean izNullExpiryDate() {
1124: return record2().getObject(ICOL_EXPIRY_DATE) == null;
1125: }
1126:
1127: public void setNullExpiryDate() {
1128: if (record2().setObject(ICOL_EXPIRY_DATE, null)) {
1129: this .expiryDate = null;
1130: }
1131: }
1132:
1133: //
1134: // cardType:
1135: //
1136: public String getCardType() {
1137: return this .cardType;
1138: }
1139:
1140: public void setCardType(String cardType) {
1141: if (record2().setObject(ICOL_CARD_TYPE, cardType)) {
1142: this .cardType = cardType;
1143: }
1144: }
1145:
1146: public boolean izNullCardType() {
1147: return record2().getObject(ICOL_CARD_TYPE) == null;
1148: }
1149:
1150: public void setNullCardType() {
1151: if (record2().setObject(ICOL_CARD_TYPE, null)) {
1152: this .cardType = null;
1153: }
1154: }
1155:
1156: //
1157: // locale:
1158: //
1159: public String getLocale() {
1160: return this .locale;
1161: }
1162:
1163: public void setLocale(String locale) {
1164: if (record2().setObject(ICOL_LOCALE, locale)) {
1165: this .locale = locale;
1166: }
1167: }
1168:
1169: public boolean izNullLocale() {
1170: return record2().getObject(ICOL_LOCALE) == null;
1171: }
1172:
1173: public void setNullLocale() {
1174: if (record2().setObject(ICOL_LOCALE, null)) {
1175: this .locale = null;
1176: }
1177: }
1178:
1179: public void toBeanFields() {
1180: toBeanFields(this );
1181: }
1182:
1183: public void toBeanFields(PersistentObject from) {
1184: orderId = Number2long((Number) from.record2().getObject(
1185: ICOL_ORDER_ID));
1186: userId = (String) from.record2().getObject(ICOL_USER_ID);
1187: orderDate = (Date) from.record2().getObject(ICOL_ORDER_DATE);
1188: shipAddress1 = (String) from.record2().getObject(
1189: ICOL_SHIP_ADDRESS1);
1190: shipAddress2 = (String) from.record2().getObject(
1191: ICOL_SHIP_ADDRESS2);
1192: shipCity = (String) from.record2().getObject(ICOL_SHIP_CITY);
1193: shipState = (String) from.record2().getObject(ICOL_SHIP_STATE);
1194: shipZip = (String) from.record2().getObject(ICOL_SHIP_ZIP);
1195: shipCountry = (String) from.record2().getObject(
1196: ICOL_SHIP_COUNTRY);
1197: billAddress1 = (String) from.record2().getObject(
1198: ICOL_BILL_ADDRESS1);
1199: billAddress2 = (String) from.record2().getObject(
1200: ICOL_BILL_ADDRESS2);
1201: billCity = (String) from.record2().getObject(ICOL_BILL_CITY);
1202: billState = (String) from.record2().getObject(ICOL_BILL_STATE);
1203: billZip = (String) from.record2().getObject(ICOL_BILL_ZIP);
1204: billCountry = (String) from.record2().getObject(
1205: ICOL_BILL_COUNTRY);
1206: courier = (String) from.record2().getObject(ICOL_COURIER);
1207: totalPrice = (BigDecimal) from.record2().getObject(
1208: ICOL_TOTAL_PRICE);
1209: billToFirstName = (String) from.record2().getObject(
1210: ICOL_BILL_TO_FIRST_NAME);
1211: billToLastName = (String) from.record2().getObject(
1212: ICOL_BILL_TO_LAST_NAME);
1213: shipToFirstName = (String) from.record2().getObject(
1214: ICOL_SHIP_TO_FIRST_NAME);
1215: shipToLastName = (String) from.record2().getObject(
1216: ICOL_SHIP_TO_LAST_NAME);
1217: creditCard = (String) from.record2()
1218: .getObject(ICOL_CREDIT_CARD);
1219: expiryDate = (String) from.record2()
1220: .getObject(ICOL_EXPIRY_DATE);
1221: cardType = (String) from.record2().getObject(ICOL_CARD_TYPE);
1222: locale = (String) from.record2().getObject(ICOL_LOCALE);
1223: super .toBeanFields(from);
1224: }
1225:
1226: public void fromBeanFields(PersistentObject persistentObject) {
1227: OrderPO from = (OrderPO) persistentObject;
1228: record2().getEntry(ICOL_ORDER_ID).setUnmarkedValue(
1229: from.long2Number(orderId), from.long2Number(orderId));
1230: record2().getEntry(ICOL_USER_ID).setUnmarkedValue(from.userId,
1231: from.userId);
1232: record2().getEntry(ICOL_ORDER_DATE).setUnmarkedValue(
1233: from.orderDate, from.orderDate);
1234: record2().getEntry(ICOL_SHIP_ADDRESS1).setUnmarkedValue(
1235: from.shipAddress1, from.shipAddress1);
1236: record2().getEntry(ICOL_SHIP_ADDRESS2).setUnmarkedValue(
1237: from.shipAddress2, from.shipAddress2);
1238: record2().getEntry(ICOL_SHIP_CITY).setUnmarkedValue(
1239: from.shipCity, from.shipCity);
1240: record2().getEntry(ICOL_SHIP_STATE).setUnmarkedValue(
1241: from.shipState, from.shipState);
1242: record2().getEntry(ICOL_SHIP_ZIP).setUnmarkedValue(
1243: from.shipZip, from.shipZip);
1244: record2().getEntry(ICOL_SHIP_COUNTRY).setUnmarkedValue(
1245: from.shipCountry, from.shipCountry);
1246: record2().getEntry(ICOL_BILL_ADDRESS1).setUnmarkedValue(
1247: from.billAddress1, from.billAddress1);
1248: record2().getEntry(ICOL_BILL_ADDRESS2).setUnmarkedValue(
1249: from.billAddress2, from.billAddress2);
1250: record2().getEntry(ICOL_BILL_CITY).setUnmarkedValue(
1251: from.billCity, from.billCity);
1252: record2().getEntry(ICOL_BILL_STATE).setUnmarkedValue(
1253: from.billState, from.billState);
1254: record2().getEntry(ICOL_BILL_ZIP).setUnmarkedValue(
1255: from.billZip, from.billZip);
1256: record2().getEntry(ICOL_BILL_COUNTRY).setUnmarkedValue(
1257: from.billCountry, from.billCountry);
1258: record2().getEntry(ICOL_COURIER).setUnmarkedValue(from.courier,
1259: from.courier);
1260: record2().getEntry(ICOL_TOTAL_PRICE).setUnmarkedValue(
1261: from.totalPrice, from.totalPrice);
1262: record2().getEntry(ICOL_BILL_TO_FIRST_NAME).setUnmarkedValue(
1263: from.billToFirstName, from.billToFirstName);
1264: record2().getEntry(ICOL_BILL_TO_LAST_NAME).setUnmarkedValue(
1265: from.billToLastName, from.billToLastName);
1266: record2().getEntry(ICOL_SHIP_TO_FIRST_NAME).setUnmarkedValue(
1267: from.shipToFirstName, from.shipToFirstName);
1268: record2().getEntry(ICOL_SHIP_TO_LAST_NAME).setUnmarkedValue(
1269: from.shipToLastName, from.shipToLastName);
1270: record2().getEntry(ICOL_CREDIT_CARD).setUnmarkedValue(
1271: from.creditCard, from.creditCard);
1272: record2().getEntry(ICOL_EXPIRY_DATE).setUnmarkedValue(
1273: from.expiryDate, from.expiryDate);
1274: record2().getEntry(ICOL_CARD_TYPE).setUnmarkedValue(
1275: from.cardType, from.cardType);
1276: record2().getEntry(ICOL_LOCALE).setUnmarkedValue(from.locale,
1277: from.locale);
1278: super .fromBeanFieldsDataSaved(persistentObject);
1279: }
1280:
1281: public String toString() {
1282:
1283: StringBuffer buffer = new StringBuffer();
1284: buffer.append("{ " + "class = ").append(
1285: this .getClass().getName()).append(" " + "table = ")
1286: .append(TABLE_ORDER).append(" columns = {");
1287:
1288: if (record() != null) {
1289: buffer.append(COL_ORDER_ID).append(" = ").append(
1290: record().getObject(ICOL_ORDER_ID)).append(" ");
1291: buffer.append(COL_USER_ID).append(" = ").append(
1292: record().getObject(ICOL_USER_ID)).append(" ");
1293: buffer.append(COL_ORDER_DATE).append(" = ").append(
1294: record().getObject(ICOL_ORDER_DATE)).append(" ");
1295: buffer.append(COL_SHIP_ADDRESS1).append(" = ").append(
1296: record().getObject(ICOL_SHIP_ADDRESS1)).append(" ");
1297: buffer.append(COL_SHIP_ADDRESS2).append(" = ").append(
1298: record().getObject(ICOL_SHIP_ADDRESS2)).append(" ");
1299: buffer.append(COL_SHIP_CITY).append(" = ").append(
1300: record().getObject(ICOL_SHIP_CITY)).append(" ");
1301: buffer.append(COL_SHIP_STATE).append(" = ").append(
1302: record().getObject(ICOL_SHIP_STATE)).append(" ");
1303: buffer.append(COL_SHIP_ZIP).append(" = ").append(
1304: record().getObject(ICOL_SHIP_ZIP)).append(" ");
1305: buffer.append(COL_SHIP_COUNTRY).append(" = ").append(
1306: record().getObject(ICOL_SHIP_COUNTRY)).append(" ");
1307: buffer.append(COL_BILL_ADDRESS1).append(" = ").append(
1308: record().getObject(ICOL_BILL_ADDRESS1)).append(" ");
1309: buffer.append(COL_BILL_ADDRESS2).append(" = ").append(
1310: record().getObject(ICOL_BILL_ADDRESS2)).append(" ");
1311: buffer.append(COL_BILL_CITY).append(" = ").append(
1312: record().getObject(ICOL_BILL_CITY)).append(" ");
1313: buffer.append(COL_BILL_STATE).append(" = ").append(
1314: record().getObject(ICOL_BILL_STATE)).append(" ");
1315: buffer.append(COL_BILL_ZIP).append(" = ").append(
1316: record().getObject(ICOL_BILL_ZIP)).append(" ");
1317: buffer.append(COL_BILL_COUNTRY).append(" = ").append(
1318: record().getObject(ICOL_BILL_COUNTRY)).append(" ");
1319: buffer.append(COL_COURIER).append(" = ").append(
1320: record().getObject(ICOL_COURIER)).append(" ");
1321: buffer.append(COL_TOTAL_PRICE).append(" = ").append(
1322: record().getObject(ICOL_TOTAL_PRICE)).append(" ");
1323: buffer.append(COL_BILL_TO_FIRST_NAME).append(" = ").append(
1324: record().getObject(ICOL_BILL_TO_FIRST_NAME))
1325: .append(" ");
1326: buffer.append(COL_BILL_TO_LAST_NAME).append(" = ").append(
1327: record().getObject(ICOL_BILL_TO_LAST_NAME)).append(
1328: " ");
1329: buffer.append(COL_SHIP_TO_FIRST_NAME).append(" = ").append(
1330: record().getObject(ICOL_SHIP_TO_FIRST_NAME))
1331: .append(" ");
1332: buffer.append(COL_SHIP_TO_LAST_NAME).append(" = ").append(
1333: record().getObject(ICOL_SHIP_TO_LAST_NAME)).append(
1334: " ");
1335: buffer.append(COL_CREDIT_CARD).append(" = ").append(
1336: record().getObject(ICOL_CREDIT_CARD)).append(" ");
1337: buffer.append(COL_EXPIRY_DATE).append(" = ").append(
1338: record().getObject(ICOL_EXPIRY_DATE)).append(" ");
1339: buffer.append(COL_CARD_TYPE).append(" = ").append(
1340: record().getObject(ICOL_CARD_TYPE)).append(" ");
1341: buffer.append(COL_LOCALE).append(" = ").append(
1342: record().getObject(ICOL_LOCALE)).append(" ");
1343: } else {
1344: buffer.append(COL_ORDER_ID).append(" = ").append(orderId)
1345: .append(" ");
1346: buffer.append(COL_USER_ID).append(" = ").append(userId)
1347: .append(" ");
1348: buffer.append(COL_ORDER_DATE).append(" = ").append(
1349: orderDate).append(" ");
1350: buffer.append(COL_SHIP_ADDRESS1).append(" = ").append(
1351: shipAddress1).append(" ");
1352: buffer.append(COL_SHIP_ADDRESS2).append(" = ").append(
1353: shipAddress2).append(" ");
1354: buffer.append(COL_SHIP_CITY).append(" = ").append(shipCity)
1355: .append(" ");
1356: buffer.append(COL_SHIP_STATE).append(" = ").append(
1357: shipState).append(" ");
1358: buffer.append(COL_SHIP_ZIP).append(" = ").append(shipZip)
1359: .append(" ");
1360: buffer.append(COL_SHIP_COUNTRY).append(" = ").append(
1361: shipCountry).append(" ");
1362: buffer.append(COL_BILL_ADDRESS1).append(" = ").append(
1363: billAddress1).append(" ");
1364: buffer.append(COL_BILL_ADDRESS2).append(" = ").append(
1365: billAddress2).append(" ");
1366: buffer.append(COL_BILL_CITY).append(" = ").append(billCity)
1367: .append(" ");
1368: buffer.append(COL_BILL_STATE).append(" = ").append(
1369: billState).append(" ");
1370: buffer.append(COL_BILL_ZIP).append(" = ").append(billZip)
1371: .append(" ");
1372: buffer.append(COL_BILL_COUNTRY).append(" = ").append(
1373: billCountry).append(" ");
1374: buffer.append(COL_COURIER).append(" = ").append(courier)
1375: .append(" ");
1376: buffer.append(COL_TOTAL_PRICE).append(" = ").append(
1377: totalPrice).append(" ");
1378: buffer.append(COL_BILL_TO_FIRST_NAME).append(" = ").append(
1379: billToFirstName).append(" ");
1380: buffer.append(COL_BILL_TO_LAST_NAME).append(" = ").append(
1381: billToLastName).append(" ");
1382: buffer.append(COL_SHIP_TO_FIRST_NAME).append(" = ").append(
1383: shipToFirstName).append(" ");
1384: buffer.append(COL_SHIP_TO_LAST_NAME).append(" = ").append(
1385: shipToLastName).append(" ");
1386: buffer.append(COL_CREDIT_CARD).append(" = ").append(
1387: creditCard).append(" ");
1388: buffer.append(COL_EXPIRY_DATE).append(" = ").append(
1389: expiryDate).append(" ");
1390: buffer.append(COL_CARD_TYPE).append(" = ").append(cardType)
1391: .append(" ");
1392: buffer.append(COL_LOCALE).append(" = ").append(locale)
1393: .append(" ");
1394: }
1395: buffer.append("}}");
1396: return buffer.toString();
1397: }
1398:
1399: // naturalKey has no context
1400:
1401: /**
1402: * Equals by Basic Peristent object fields (without children objects)
1403: */
1404: public boolean equalsBasic(Object value) {
1405: if (this == value)
1406: return true;
1407: if (value == null || getClass() != value.getClass())
1408: return false;
1409:
1410: OrderPO that = (OrderPO) value;
1411:
1412: if (orderId != that.orderId)
1413: return false;
1414: if (userId != null ? !userId.equals(that.userId)
1415: : that.userId != null)
1416: return false;
1417: if (orderDate != null ? !orderDate.equals(that.orderDate)
1418: : that.orderDate != null)
1419: return false;
1420: if (shipAddress1 != null ? !shipAddress1
1421: .equals(that.shipAddress1) : that.shipAddress1 != null)
1422: return false;
1423: if (shipAddress2 != null ? !shipAddress2
1424: .equals(that.shipAddress2) : that.shipAddress2 != null)
1425: return false;
1426: if (shipCity != null ? !shipCity.equals(that.shipCity)
1427: : that.shipCity != null)
1428: return false;
1429: if (shipState != null ? !shipState.equals(that.shipState)
1430: : that.shipState != null)
1431: return false;
1432: if (shipZip != null ? !shipZip.equals(that.shipZip)
1433: : that.shipZip != null)
1434: return false;
1435: if (shipCountry != null ? !shipCountry.equals(that.shipCountry)
1436: : that.shipCountry != null)
1437: return false;
1438: if (billAddress1 != null ? !billAddress1
1439: .equals(that.billAddress1) : that.billAddress1 != null)
1440: return false;
1441: if (billAddress2 != null ? !billAddress2
1442: .equals(that.billAddress2) : that.billAddress2 != null)
1443: return false;
1444: if (billCity != null ? !billCity.equals(that.billCity)
1445: : that.billCity != null)
1446: return false;
1447: if (billState != null ? !billState.equals(that.billState)
1448: : that.billState != null)
1449: return false;
1450: if (billZip != null ? !billZip.equals(that.billZip)
1451: : that.billZip != null)
1452: return false;
1453: if (billCountry != null ? !billCountry.equals(that.billCountry)
1454: : that.billCountry != null)
1455: return false;
1456: if (courier != null ? !courier.equals(that.courier)
1457: : that.courier != null)
1458: return false;
1459: if (totalPrice != null ? !totalPrice.equals(that.totalPrice)
1460: : that.totalPrice != null)
1461: return false;
1462: if (billToFirstName != null ? !billToFirstName
1463: .equals(that.billToFirstName)
1464: : that.billToFirstName != null)
1465: return false;
1466: if (billToLastName != null ? !billToLastName
1467: .equals(that.billToLastName)
1468: : that.billToLastName != null)
1469: return false;
1470: if (shipToFirstName != null ? !shipToFirstName
1471: .equals(that.shipToFirstName)
1472: : that.shipToFirstName != null)
1473: return false;
1474: if (shipToLastName != null ? !shipToLastName
1475: .equals(that.shipToLastName)
1476: : that.shipToLastName != null)
1477: return false;
1478: if (creditCard != null ? !creditCard.equals(that.creditCard)
1479: : that.creditCard != null)
1480: return false;
1481: if (expiryDate != null ? !expiryDate.equals(that.expiryDate)
1482: : that.expiryDate != null)
1483: return false;
1484: if (cardType != null ? !cardType.equals(that.cardType)
1485: : that.cardType != null)
1486: return false;
1487: if (locale != null ? !locale.equals(that.locale)
1488: : that.locale != null)
1489: return false;
1490: return true;
1491: }
1492:
1493: /**
1494: * hashCode by Basic Peristent object fields (without children objects)
1495: */
1496: public int hashCodeBasic() {
1497: int result;
1498: long temp;
1499: result = (int) (orderId ^ (orderId >>> 32));
1500: result = 29 * result + (userId != null ? userId.hashCode() : 0);
1501: result = 29 * result
1502: + (orderDate != null ? orderDate.hashCode() : 0);
1503: result = 29 * result
1504: + (shipAddress1 != null ? shipAddress1.hashCode() : 0);
1505: result = 29 * result
1506: + (shipAddress2 != null ? shipAddress2.hashCode() : 0);
1507: result = 29 * result
1508: + (shipCity != null ? shipCity.hashCode() : 0);
1509: result = 29 * result
1510: + (shipState != null ? shipState.hashCode() : 0);
1511: result = 29 * result
1512: + (shipZip != null ? shipZip.hashCode() : 0);
1513: result = 29 * result
1514: + (shipCountry != null ? shipCountry.hashCode() : 0);
1515: result = 29 * result
1516: + (billAddress1 != null ? billAddress1.hashCode() : 0);
1517: result = 29 * result
1518: + (billAddress2 != null ? billAddress2.hashCode() : 0);
1519: result = 29 * result
1520: + (billCity != null ? billCity.hashCode() : 0);
1521: result = 29 * result
1522: + (billState != null ? billState.hashCode() : 0);
1523: result = 29 * result
1524: + (billZip != null ? billZip.hashCode() : 0);
1525: result = 29 * result
1526: + (billCountry != null ? billCountry.hashCode() : 0);
1527: result = 29 * result
1528: + (courier != null ? courier.hashCode() : 0);
1529: result = 29 * result
1530: + (totalPrice != null ? totalPrice.hashCode() : 0);
1531: result = 29
1532: * result
1533: + (billToFirstName != null ? billToFirstName.hashCode()
1534: : 0);
1535: result = 29
1536: * result
1537: + (billToLastName != null ? billToLastName.hashCode()
1538: : 0);
1539: result = 29
1540: * result
1541: + (shipToFirstName != null ? shipToFirstName.hashCode()
1542: : 0);
1543: result = 29
1544: * result
1545: + (shipToLastName != null ? shipToLastName.hashCode()
1546: : 0);
1547: result = 29 * result
1548: + (creditCard != null ? creditCard.hashCode() : 0);
1549: result = 29 * result
1550: + (expiryDate != null ? expiryDate.hashCode() : 0);
1551: result = 29 * result
1552: + (cardType != null ? cardType.hashCode() : 0);
1553: result = 29 * result + (locale != null ? locale.hashCode() : 0);
1554:
1555: return result;
1556: }
1557: }
|