Package ch.semafor.gendas.model

Examples of ch.semafor.gendas.model.CoreException


    List<PropertyType> l = null; // NOPMD by wim on 9/20/10 9:14 AM
    final Query q = getEntityManager().createQuery( "from PropertyType where name = :name"); // NOPMD by wim on 9/20/10 9:14 AM
    q.setParameter( "name", name );
    l = q.getResultList();
     if( l == null || l.isEmpty() ){
       throw new CoreException("PropertyType '" + name + "' not found");
     }      
    return l.get(0);
  }
View Full Code Here


   * */
  private ElementType getElementType(final String typeName)
      throws CoreException {
    final ElementType elType = elementTypeDao.findByName(typeName);
    if (elType == null) {
      throw new CoreException("ElementType " + typeName + " not found");
    }
    return elType;
  }
View Full Code Here

            method.invoke(bean, new Object[] { e[i] });
          }
        }
      }
    } catch (IllegalAccessException ex) {
      throw new CoreException("IllegalAccessException");
    } catch (InvocationTargetException ex) {
      throw new CoreException("InvovationTargetException");
    }
  }
View Full Code Here

                    for (int i = 0; i < vlist.getValues().size(); i++) {
                      l.add((vlist.getValues().get(i)).getObject());
                    }
                  }
                } catch (IllegalArgumentException e) {
                  throw new CoreException("IllegalArgumentException");
                } catch (IllegalAccessException e) {
                  throw new CoreException("IllegalAccesstException");
                } catch (InvocationTargetException e) {
                  throw new CoreException("InvocationTargetException");
                }
              }
            }
          }
        }
View Full Code Here

    if (revision == null) {
      return loadElement(element, null, bean, clazz); // NOPMD by wim on 9/20/10 3:51 PM
    }
    final Modification hist = element.getHistory(revision);
    if (hist == null) {
      throw new CoreException("No History with Revision #" + revision
          + " found");
    }
    return loadElement(element, hist.getTimestamp(), bean, clazz);
  }
View Full Code Here

    if (timestamp == null) {
      revision = Modification.MaxRevision;
    } else {
      final Modification hist = element.getHistory(timestamp);
      if (hist == null) {
        throw new CoreException("No History with Timestamp "
            + timestamp.toString() + " found");
      }
      revision = hist.getRevision();
    }
    // ToDo: check conversion
View Full Code Here

   * */
  private ElementType getElementType(final String typeName)
      throws CoreException {
    final ElementType elType = elementTypeDao.findByName(typeName);
    if (elType == null) {
      throw new CoreException("ElementType " + typeName + " not found");
    }
    return elType;
  }
View Full Code Here

            method.invoke(bean, new Object[] { e[i] });
          }
        }
      }
    } catch (IllegalAccessException ex) {
      throw new CoreException("IllegalAccessException");
    } catch (InvocationTargetException ex) {
      throw new CoreException("InvovationTargetException");
    } catch (DatatypeConfigurationException e) {
      throw new CoreException("DataTypeInvocationException");
  }
  }
View Full Code Here

                    for (int i = 0; i < vlist.getValues().size(); i++) {
                      l.add((vlist.getValues().get(i)).getObject());
                    }
                  }
                } catch (IllegalArgumentException e) {
                  throw new CoreException("IllegalArgumentException");
                } catch (IllegalAccessException e) {
                  throw new CoreException("IllegalAccesstException");
                } catch (InvocationTargetException e) {
                  throw new CoreException("InvocationTargetException");
                }
              }
            }
          }
        }
View Full Code Here

    if (timestamp == null) {
      return Modification.MaxRevision;
      }
    final Modification hist = element.getModification(timestamp);
    if (hist == null) {
      throw new CoreException("No modification with Timestamp "
          + timestamp.toString() + " found");
    }
    return hist.getRevision();
  }
View Full Code Here

TOP

Related Classes of ch.semafor.gendas.model.CoreException

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.