Package com.impetus.kundera

Examples of com.impetus.kundera.KunderaException


            }
        }
        catch (Exception e)
        {
            log.error("Error while extracting entity object from json, caused by {}.", e);
            throw new KunderaException(e);
        }
    }
View Full Code Here


                cqlClient.persist(metadata, entity, client, rlHolders, getTtlValues().get(metadata.getTableName()));
            }
            catch (InvalidRequestException e)
            {
                log.error("Error during persist while executing query {}, Caused by: .", insert_Query, e);
                throw new KunderaException(e);
            }
            catch (TException e)
            {
                log.error("Error during persist while executing query {}, Caused by: .", insert_Query, e);
                throw new KunderaException(e);
            }
            catch (UnsupportedEncodingException e)
            {
                log.error("Error during persist while executing query {}, Caused by: .", insert_Query, e);
                throw new KunderaException(e);
            }
        }
        else
        {
            Collection<ThriftRow> tfRows = null;
            try
            {
                String columnFamily = metadata.getTableName();
                tfRows = dataHandler.toThriftRow(entity, id, metadata, columnFamily, getTtlValues().get(columnFamily));
            }
            catch (Exception e)
            {
                log.error("Error during persist, Caused by: .", e);
                throw new KunderaException(e);
            }
            for (ThriftRow tf : tfRows)
            {

                if (tf.getColumnFamilyName().equals(metadata.getTableName()))
View Full Code Here

        if (connection != null)
        {
            return ((IPooledConnection) connection).getAPI();
        }

        throw new KunderaException("Invalid configuration!, no available pooled connection found for:"
                + this.getClass().getSimpleName());
    }
View Full Code Here

                    }
                }
                catch (IllegalStateException e)
                {
                    log.error("Error while returning entities for {}, Caused by: .", m.getEntityClazz(), e);
                    throw new KunderaException(e);
                }
                catch (Exception e)
                {
                    log.error("Error while returning entities for {}, Caused by: .", m.getEntityClazz(), e);
                    throw new KunderaException(e);
                }
            }
        }
        return entities;
    }
View Full Code Here

                return generatedId;
            }
            catch (IllegalArgumentException iae)
            {
                log.error("Unknown data type for ids : " + m.getIdAttribute().getJavaType());
                throw new KunderaException("Unknown data type for ids : " + m.getIdAttribute().getJavaType(), iae);
            }
        }
        throw new IllegalArgumentException(GenerationType.class.getSimpleName() + "." + GenerationType.AUTO
                + " Strategy not supported by this client :" + client.getClass().getName());
    }
View Full Code Here

                return generatedId;
            }
            catch (IllegalArgumentException iae)
            {
                log.error("Unknown integral data type for ids : " + m.getIdAttribute().getJavaType());
                throw new KunderaException("Unknown integral data type for ids : " + m.getIdAttribute().getJavaType(),
                        iae);
            }
        }
        throw new IllegalArgumentException(GenerationType.class.getSimpleName() + "." + GenerationType.SEQUENCE
                + " Strategy not supported by this client :" + client.getClass().getName());
View Full Code Here

                return generatedId;
            }
            catch (IllegalArgumentException iae)
            {
                log.error("Unknown integral data type for ids : " + m.getIdAttribute().getJavaType());
                throw new KunderaException("Unknown integral data type for ids : " + m.getIdAttribute().getJavaType(),
                        iae);
            }
        }
        throw new IllegalArgumentException(GenerationType.class.getSimpleName() + "." + GenerationType.TABLE
                + " Strategy not supported by this client :" + client.getClass().getName());
View Full Code Here

     */
    public static EntityMetadata getEntityMetadata(final KunderaMetadata kunderaMetadata, Class entityClass)
    {
        if (entityClass == null)
        {
            throw new KunderaException("Invalid class provided " + entityClass);
        }
        List<String> persistenceUnits = kunderaMetadata.getApplicationMetadata().getMappedPersistenceUnit(entityClass);

        // persistence units will only have more than 1 persistence unit in case
        // of RDBMS.
View Full Code Here

                    ConsistencyLevel.ONE);
        }
        catch (InvalidRequestException e)
        {
            log.error("Error while executing cql query {}, Caused by: .", cqlQuery, e);
            throw new KunderaException(e);
        }
        catch (UnavailableException e)
        {
            log.error("Error while executing cql query {}, Caused by: .", cqlQuery, e);
            throw new KunderaException(e);
        }
        catch (TimedOutException e)
        {
            log.error("Error while executing cql query {}, Caused by: .", cqlQuery, e);
            throw new KunderaException(e);
        }
        catch (SchemaDisagreementException e)
        {
            log.error("Error while executing cql query {}, Caused by: .", cqlQuery, e);
            throw new KunderaException(e);
        }
        catch (TException e)
        {
            log.error("Error while executing cql query {}, Caused by: .", cqlQuery, e);
            throw new KunderaException(e);
        }
        catch (UnsupportedEncodingException e)
        {
            log.error("Error while executing cql query {}, Caused by: .", cqlQuery, e);
            throw new KunderaException(e);
        }
    }
View Full Code Here

            }
            catch (Exception ex)
            {
                logger.error("Error while initialzing timestamp generator class {}, caused by {}.",
                        timestampGeneratorClass, ex);
                throw new KunderaException(ex);
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.impetus.kundera.KunderaException

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.