Package org.paquitosoft.lml.model.exception

Examples of org.paquitosoft.lml.model.exception.ReflectionException


        List<Field> pkFields = ModelUtilities.getEntityIdentifierFields(entityType);
        String idColumnName = "";
        if (pkFields.size() == 1) {
            idColumnName = ModelUtilities.getColumnName(pkFields.get(0));
        } else {
            throw new ReflectionException("IdentifierDAOImpl::getFirsAvailableIdentifier -> Cannot generate coumpund keys");
        }
        sb.append(idColumnName);
        sb.append(" FROM ");
        sb.append(ModelUtilities.getTableName(entityType));
        sb.append(" ORDER BY ");
View Full Code Here


                    }
                    f.set(entity, persistedEntities);
                }
            }
        } catch (IllegalAccessException e) {
            throw new ReflectionException("PersistAction::execute::persistAssociatedAttributes", e);
        } catch (IllegalArgumentException e) {
            throw new ReflectionException("PersistAction::execute::persistAssociatedAttributes", e);
        }
       
    }
View Full Code Here

                    break;
                }
            }

        } catch (IllegalAccessException e) {
            throw new ReflectionException("Error while looking for an attribute by its column name.", e);
        }
       
    }
View Full Code Here

        } catch (SQLException e) {
            logger.log(Level.SEVERE, "SQL Exception while inserting: " + e.getMessage(), e);
            throw new InternalErrorException("Database Exception while inserting.... (" + entity + ")", e);
        } catch (IllegalAccessException e) {
            logger.log(Level.SEVERE, "Reflection exception while inserting (" + entity + "): " + e.getMessage(), e);
            throw new ReflectionException(e);
        } finally {
                closeResouces(stm, null);
        }
    
        result = entity; // The entity with its new identifier
View Full Code Here

        } catch (SQLException e) {
            logger.log(Level.SEVERE, "SQL Exception while inserting: " + e.getMessage(), e);
            throw new InternalErrorException("Database Exception....", e);
        } catch (IllegalAccessException e) {
            logger.log(Level.SEVERE, "Reflection exception while inserting: " + e.getMessage(), e);
            throw new ReflectionException("DefaultDAO::read\n", e);
        } catch (IllegalArgumentException e) {
            logger.log(Level.SEVERE, "Reflection exception while inserting: " + e.getMessage(), e);
            throw new ReflectionException("DefaultDAO::read\n", e);
        } finally {
            closeResouces(stm, rs);
        }

        return entity;
View Full Code Here

        } catch (SQLException e) {
            logger.log(Level.SEVERE, "SQL Exception while inserting: " + e.getMessage(), e);
            throw new InternalErrorException("Database Exception....", e);
        } catch (IllegalAccessException e) {
            logger.log(Level.SEVERE, "Reflection exception while inserting: " + e.getMessage(), e);
            throw new ReflectionException("DefaultDAO::remove\n", e);
        } finally {
                closeResouces(stm, null);
        }
       
    }
View Full Code Here

        } catch (SQLException e) {
            logger.log(Level.SEVERE, "SQL Exception while inserting: " + e.getMessage(), e);
            throw new InternalErrorException("Database Exception....", e);
        } catch (IllegalAccessException e) {
            logger.log(Level.SEVERE, "Reflection exception while inserting: " + e.getMessage(), e);
            throw new ReflectionException("DefaultDAO::update\n", e);
        } finally {
                closeResouces(stm, null);
        }

        return entity;
View Full Code Here

        } catch (SQLException e) {
            logger.log(Level.SEVERE, "SQL Exception while finding: " + e.getMessage(), e);
            throw new InternalErrorException(e);
        } catch (IllegalAccessException e) {
            logger.log(Level.SEVERE, "Reflection exception while inserting: " + e.getMessage(), e);
            throw new ReflectionException("DefaultDAO::findJoinEntities \n", e);
        } finally {
            closeResouces(stm, rs);
        }

        return result;
View Full Code Here

                        }
                        f.set(result, associated);

                    } else {
                        // TODO Crear una excepcion especifica para darle significado a este suceso
                        throw new ReflectionException("ERROR: Compound key for associated entity.");
                    }

                } else {
                    // If it is a common type we use the column name from the annotation or
                    // the name of the field if that has not been set
                    try {
                        // This is done because of finder queries where we don't want all entity fields
                        rs.findColumn(columnName);                       
                    } catch (SQLException e) {
                        readField = false;
                        if (!partialEntity) {
                            throw e;
                        }
                    }
                    if (readField) {
                        f.set(result, getValueFromQuery(f.getType(), rs, columnName));
                    }
                }
            }

        } catch (Exception e) {
            logger.log(Level.SEVERE, "Method: getFieldValue()", e);
            throw new ReflectionException(e);
        }
       
        return result;
    }
View Full Code Here

                    if (entityClass.getField(mName.toString()).isAnnotationPresent(PersistentAttribute.class)) {
                        result.add(ownMethods[i]);
                    }
                } catch (Exception e) {
                    logger.log(Level.SEVERE, "Method: getAllPersistentEntityAccessors()", e);
                    throw new ReflectionException(e);
                }
                                               
            }
        }       
       
View Full Code Here

TOP

Related Classes of org.paquitosoft.lml.model.exception.ReflectionException

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.