001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.upgrade.v7_0_0.util;
016    
017    import java.sql.Types;
018    
019    import java.util.HashMap;
020    import java.util.Map;
021    
022    /**
023     * @author        Brian Wing Shun Chan
024     * @generated
025     */
026    public class AddressTable {
027    
028            public static final String TABLE_NAME = "Address";
029    
030            public static final Object[][] TABLE_COLUMNS = {
031                    {"mvccVersion", Types.BIGINT},
032                    {"uuid_", Types.VARCHAR},
033                    {"addressId", Types.BIGINT},
034                    {"companyId", Types.BIGINT},
035                    {"userId", Types.BIGINT},
036                    {"userName", Types.VARCHAR},
037                    {"createDate", Types.TIMESTAMP},
038                    {"modifiedDate", Types.TIMESTAMP},
039                    {"classNameId", Types.BIGINT},
040                    {"classPK", Types.BIGINT},
041                    {"street1", Types.VARCHAR},
042                    {"street2", Types.VARCHAR},
043                    {"street3", Types.VARCHAR},
044                    {"city", Types.VARCHAR},
045                    {"zip", Types.VARCHAR},
046                    {"regionId", Types.BIGINT},
047                    {"countryId", Types.BIGINT},
048                    {"typeId", Types.BIGINT},
049                    {"mailing", Types.BOOLEAN},
050                    {"primary_", Types.BOOLEAN}
051            };
052    
053            public static final Map<String, Integer> TABLE_COLUMNS_MAP = new HashMap<String, Integer>();
054    
055    static {
056    TABLE_COLUMNS_MAP.put("mvccVersion", Types.BIGINT);
057    
058    TABLE_COLUMNS_MAP.put("uuid_", Types.VARCHAR);
059    
060    TABLE_COLUMNS_MAP.put("addressId", Types.BIGINT);
061    
062    TABLE_COLUMNS_MAP.put("companyId", Types.BIGINT);
063    
064    TABLE_COLUMNS_MAP.put("userId", Types.BIGINT);
065    
066    TABLE_COLUMNS_MAP.put("userName", Types.VARCHAR);
067    
068    TABLE_COLUMNS_MAP.put("createDate", Types.TIMESTAMP);
069    
070    TABLE_COLUMNS_MAP.put("modifiedDate", Types.TIMESTAMP);
071    
072    TABLE_COLUMNS_MAP.put("classNameId", Types.BIGINT);
073    
074    TABLE_COLUMNS_MAP.put("classPK", Types.BIGINT);
075    
076    TABLE_COLUMNS_MAP.put("street1", Types.VARCHAR);
077    
078    TABLE_COLUMNS_MAP.put("street2", Types.VARCHAR);
079    
080    TABLE_COLUMNS_MAP.put("street3", Types.VARCHAR);
081    
082    TABLE_COLUMNS_MAP.put("city", Types.VARCHAR);
083    
084    TABLE_COLUMNS_MAP.put("zip", Types.VARCHAR);
085    
086    TABLE_COLUMNS_MAP.put("regionId", Types.BIGINT);
087    
088    TABLE_COLUMNS_MAP.put("countryId", Types.BIGINT);
089    
090    TABLE_COLUMNS_MAP.put("typeId", Types.BIGINT);
091    
092    TABLE_COLUMNS_MAP.put("mailing", Types.BOOLEAN);
093    
094    TABLE_COLUMNS_MAP.put("primary_", Types.BOOLEAN);
095    
096    }
097            public static final String TABLE_SQL_CREATE = "create table Address (mvccVersion LONG default 0,uuid_ VARCHAR(75) null,addressId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,classNameId LONG,classPK LONG,street1 VARCHAR(75) null,street2 VARCHAR(75) null,street3 VARCHAR(75) null,city VARCHAR(75) null,zip VARCHAR(75) null,regionId LONG,countryId LONG,typeId LONG,mailing BOOLEAN,primary_ BOOLEAN)";
098    
099            public static final String TABLE_SQL_DROP = "drop table Address";
100    
101            public static final String[] TABLE_SQL_ADD_INDEXES = {
102                    "create index IX_923BD178 on Address (companyId, classNameId, classPK, mailing)",
103                    "create index IX_9226DBB4 on Address (companyId, classNameId, classPK, primary_)",
104                    "create index IX_5BC8B0D4 on Address (userId)",
105                    "create index IX_8FCB620E on Address (uuid_[$COLUMN_LENGTH:75$], companyId)"
106            };
107    
108    }