Package org.myphotodiary.model

Examples of org.myphotodiary.model.Attribute


      }
    }

    //  Update attributes list if any new attribute created by user
    for (String newAttrName: newAttributeNameList) {
      Attribute newAttribute = new Attribute(newAttrName);
      dirAttributeList.add(newAttribute);
      allAttributes.add(newAttribute);
    }
  }
View Full Code Here


        imageAttributeList.add(attribute);
      }
    }
    //  Update attributes list if any new attribute created by user
    for (String newAttrName: newAttributeNameList) {
      Attribute newAttribute = new Attribute(newAttrName);
      imageAttributeList.add(newAttribute);
      allAttributes.add(newAttribute);
    }
  }
View Full Code Here

    EntityManager em = ModelFactory.getEntityManager();
    EntityTransaction tx = null;
    try {
      tx = em.getTransaction();
      tx.begin();
      Attribute attribute = new Attribute();
      attribute.setName(name);
      em.persist(attribute);
      tx.commit();
    } catch (Exception ex) {
      getServletContext().log("Cannot persist new attribute: " + name, ex);
      tx.rollback();
View Full Code Here

    EntityManager em = ModelFactory.getEntityManager();
    EntityTransaction tx = null;
    try {
      tx = em.getTransaction();
      tx.begin();
      Attribute attribute = em.createQuery(
          "select attribute from Attribute attribute where attribute.name = ?1", Attribute.class).setParameter(1, name)
          .getSingleResult();
      em.remove(attribute);
      tx.commit();
    } catch (Exception ex) {
View Full Code Here

    EntityManager em = ModelFactory.getEntityManager();
    EntityTransaction tx = null;
    try {
      tx = em.getTransaction();
      tx.begin();
      Attribute attribute = new Attribute();
      attribute.setName(name);
      em.persist(attribute);
      tx.commit();
    } catch (Exception ex) {
      getServletContext().log("Cannot persist new attribute: " + name, ex);
      response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
View Full Code Here

    EntityManager em = ModelFactory.getEntityManager();
    EntityTransaction tx = null;
    try {
      tx = em.getTransaction();
      tx.begin();
      Attribute attribute = em.createQuery(
          "select attribute from Attribute attribute where attribute.name = ?1", Attribute.class).setParameter(1, name)
          .getSingleResult();
      em.remove(attribute);
      tx.commit();
    } catch (Exception ex) {
View Full Code Here

      }
    }

    //  Update attributes list if any new attribute created by user
    for (String newAttrName: newAttributeNameList) {
      Attribute newAttribute = new Attribute(newAttrName);
      dirAttributeList.add(newAttribute);
      allAttributes.add(newAttribute);
    }
  }
View Full Code Here

      }
    }

    //  Update attributes list if any new attribute created by user
    for (String newAttrName: newAttributeNameList) {
      Attribute newAttribute = new Attribute(newAttrName);
      dirAttributeList.add(newAttribute);
      allAttributes.add(newAttribute);
    }
  }
View Full Code Here

   
    //  Update attributes list if any new attribute created by user
    if (imgData.getNewAttribute() != null) {
      String newAttr = imgData.getNewAttribute().trim();
      if (!("".equals(newAttr)) && !selectedAttributeNameList.contains(newAttr)) {
        Attribute newAttribute = new Attribute(newAttr);
        imageAttributeList.add(newAttribute);
      }
    }
   
    // Complete attributes list with parent attributes if any
View Full Code Here

      }
    }

    //  Update attributes list if any new attribute created by user
    for (String newAttrName: newAttributeNameList) {
      Attribute newAttribute = new Attribute(newAttrName);
      dirAttributeList.add(newAttribute);
      allAttributes.add(newAttribute);
    }
  }
View Full Code Here

TOP

Related Classes of org.myphotodiary.model.Attribute

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.