Package ch.semafor.gendas.model

Examples of ch.semafor.gendas.model.Modification


  public Object load(final Element element, final Long revision,
      final Object bean, final Class clazz) throws CoreException {
    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


      final Object bean, final Class clazz) throws CoreException {
    long revision;
    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
    // logger.debug("creating Element  ({}){} id {}  element id  {}  assigned",
    // element.getElementType().getName(),
    // clazz.getCanonicalName(), getId(bean).toString(),
View Full Code Here

 
  @Transactional(readOnly=true)
  public Long getLastRevision(final Long id){ // NOPMD by wildi on 9/21/10 6:35 AM
    try{
      final Element e = elementDao.get(id); // NOPMD by wildi on 9/21/10 6:35 AM
      final Modification h = e.getLastHistory(); // NOPMD by wildi on 9/21/10 6:37 AM
      return h.getRevision(); // NOPMD by wildi on 9/21/10 6:27 AM
    }
    catch(CoreException e){
      //ToDO, PMD:AvoidPrintStackTrace
      e.printStackTrace();
    }
View Full Code Here

   */
  private long getRevision( final Element element, final Date timestamp ) throws CoreException{
    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

  public Long getLastRevision(final Long id) { // NOPMD by wildi on 9/21/10
                          // 6:35 AM
    try {
      final Element e = elementDao.get(id); // NOPMD by wildi on 9/21/10
                          // 6:35 AM
      final Modification h = e.getLastModification(); // NOPMD by wildi on
                            // 9/21/10 6:37 AM
      return h.getRevision(); // NOPMD by wildi on 9/21/10 6:27 AM
    } catch (CoreException e) {
      // ToDO, PMD:AvoidPrintStackTrace
      e.printStackTrace();
    }
    return null;
View Full Code Here

TOP

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

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.