Package org.apache.metamodel

Examples of org.apache.metamodel.MetaModelException


        if (e instanceof SQLException) {
            return JdbcUtils.wrapException((SQLException) e, message);
        } else if (e instanceof RuntimeException) {
            return (RuntimeException) e;
        } else {
            return new MetaModelException(message, e);
        }
    }
View Full Code Here


      _connection = DriverManager.getConnection(url, "SA", "");
      _connection.setReadOnly(true);
      _dataContextDelegate = new JdbcDataContext(_connection,
          TableType.DEFAULT_TABLE_TYPES, null);
    } catch (Exception e) {
      throw new MetaModelException(e);
    }
  }
View Full Code Here

                    column.setColumnNumber(columnNumber);
                    columnNumber++;
                    addColumn(column);
                }
            } catch (Exception e) {
                throw new MetaModelException("Could not resolve table ", e);
            }
        }
        return columnsInternal;
    }
View Full Code Here

    } else if (klass.equals(BigDecimal.class)) {
      return Bytes
          .toBytes(value instanceof BigDecimal ? (BigDecimal) value
              : new BigDecimal(value.toString()));
    } else {
      throw new MetaModelException(
          "Could not find a suitable Type to assign value for give type "
              + klass.getName());
    }
  }
View Full Code Here

        || klass.isAssignableFrom(Short.class)) {
      return Bytes.toShort(b);
    } else if (klass.equals(BigDecimal.class)) {
      return Bytes.toBigDecimal(b);
    } else {
      throw new MetaModelException("Could Not find a suitable Type for "
          + klass.getName());
    }
  }
View Full Code Here

            _rowNumber++;
            _row = new SingleLineCsvRow(this, line, _columnsInTable, _failOnInconsistentRowLength, _rowNumber);
            return true;
        } catch (IOException e) {
            close();
            throw new MetaModelException("IOException occurred while reading next line of CSV resource", e);
        }
    }
View Full Code Here

            SAXParserFactory saxFactory = SAXParserFactory.newInstance();
            SAXParser saxParser = saxFactory.newSAXParser();
            XMLReader sheetParser = saxParser.getXMLReader();
            return sheetParser;
        } catch (Exception e) {
            throw new MetaModelException(e);
        }
    }
View Full Code Here

        final int countMatches = jdbcCompiledQuery.getParameters().size();

        final int valueArrayLength = values.length;

        if (countMatches != valueArrayLength) {
            throw new MetaModelException("Number of parameters in query and number of values does not match.");
        }

        final JdbcCompiledQueryLease lease = jdbcCompiledQuery.borrowLease();
        final DataSet dataSet;
        try {
View Full Code Here

            return new HBaseAdmin(config);
        } catch (Exception e) {
            if (e instanceof RuntimeException) {
                throw (RuntimeException) e;
            }
            throw new MetaModelException(e);
        }
    }
View Full Code Here

                schema.addTable(new HBaseTable(tableDef, schema, _admin, _configuration.getDefaultRowKeyType()));
            }

            return schema;
        } catch (Exception e) {
            throw new MetaModelException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.metamodel.MetaModelException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.