}
protected void addExpandoColumn(long companyId, String modelClassName, String expandoColumnName,
int expandoColumnType, boolean indexable) throws PortalException, SystemException {
ExpandoTable expandoTable = null;
try {
expandoTable = ExpandoTableLocalServiceUtil.getDefaultTable(companyId, modelClassName);
}
catch (NoSuchTableException e) {
expandoTable = ExpandoTableLocalServiceUtil.addDefaultTable(companyId, modelClassName);
logger.debug("Added expando table for modelClassName=[{0}]", modelClassName);
}
ExpandoColumn expandoColumn = null;
expandoColumn = ExpandoColumnLocalServiceUtil.getColumn(expandoTable.getTableId(), expandoColumnName);
if (expandoColumn != null) {
logger.debug("Expando column=[{0}] exists for modelClassName=[{1}]", expandoColumnName, modelClassName);
}
else {
expandoColumn = ExpandoColumnLocalServiceUtil.addColumn(expandoTable.getTableId(), expandoColumnName,
expandoColumnType);
logger.debug("Added expando column=[{0}] to modelClassName=[{1}]", expandoColumnName, modelClassName);
}
if (indexable) {