Examples of HibernateIdentityObjectRelationshipName


Examples of org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName

      HibernateIdentityObjectRelationship relationship = null;

      if (name != null)
      {

         HibernateIdentityObjectRelationshipName relationshipName =
            (HibernateIdentityObjectRelationshipName)getHibernateSession(ctx).
               createCriteria(HibernateIdentityObjectRelationshipName.class).add(Restrictions.eq("name", name)).
               uniqueResult();

         if (relationshipName == null)
View Full Code Here

Examples of org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName

            .setParameter("toIO", toIO)
            .setParameter("typeName", type.getName());
      }
      else
      {
         HibernateIdentityObjectRelationshipName relationshipName =
            (HibernateIdentityObjectRelationshipName)getHibernateSession(ctx)
               .createCriteria(HibernateIdentityObjectRelationshipName.class).add(Restrictions.eq("name", name))
               .uniqueResult();

         if (relationshipName == null)
View Full Code Here

Examples of org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName

      HibernateRealm realm = getRealm(em, ctx);

      try
      {
         HibernateIdentityObjectRelationshipName hiorn = (HibernateIdentityObjectRelationshipName)em.createCriteria(HibernateIdentityObjectRelationshipName.class)
            .add(Restrictions.eq("name", name)).add(Restrictions.eq("realm", realm)).uniqueResult();

         if (hiorn != null)
         {
            throw new IdentityException("Relationship name already exists");
         }

         hiorn = new HibernateIdentityObjectRelationshipName(name, realm);
         getHibernateSession(ctx).persist(hiorn);

      }
      catch (Exception e)
      {
View Full Code Here

Examples of org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName

      Session em = getHibernateSession(ctx);


      try
      {
         HibernateIdentityObjectRelationshipName hiorn = (HibernateIdentityObjectRelationshipName)em.createCriteria(HibernateIdentityObjectRelationshipName.class)
            .add(Restrictions.eq("name", name)).add(Restrictions.eq("realm", getRealm(em, ctx))).uniqueResult();

         if (hiorn == null)
         {
            throw new IdentityException("Relationship name doesn't exist");
View Full Code Here

Examples of org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName

      Session em = getHibernateSession(ctx);


      try
      {
         HibernateIdentityObjectRelationshipName hiorn = (HibernateIdentityObjectRelationshipName)em.createCriteria(HibernateIdentityObjectRelationshipName.class)
            .add(Restrictions.eq("name", name)).add(Restrictions.eq("realm", getRealm(em, ctx))).uniqueResult();

         if (hiorn == null)
         {
            throw new IdentityException("Relationship name doesn't exist");
         }

         return new HashMap<String, String>(hiorn.getProperties());

      }
      catch (Exception e)
      {
         throw new IdentityException("Cannot get relationship name properties: " + name, e);
View Full Code Here

Examples of org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName

      Session em = getHibernateSession(ctx);


      try
      {
         HibernateIdentityObjectRelationshipName hiorn = (HibernateIdentityObjectRelationshipName)em.createCriteria(HibernateIdentityObjectRelationshipName.class)
            .add(Restrictions.eq("name", name)).add(Restrictions.eq("realm", getRealm(em, ctx))).uniqueResult();

         if (hiorn == null)
         {
            throw new IdentityException("Relationship name doesn't exist");
         }

         hiorn.getProperties().putAll(properties);

      }
      catch (Exception e)
      {
         throw new IdentityException("Cannot set relationship name properties: " + name, e);
View Full Code Here

Examples of org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName

      Session em = getHibernateSession(ctx);


      try
      {
         HibernateIdentityObjectRelationshipName hiorn = (HibernateIdentityObjectRelationshipName)em.createCriteria(HibernateIdentityObjectRelationshipName.class)
            .add(Restrictions.eq("name", name)).add(Restrictions.eq("realm", getRealm(em, ctx))).uniqueResult();

         if (hiorn == null)
         {
            throw new IdentityException("Relationship name doesn't exist");
         }

         for (String property : properties)
         {
            hiorn.getProperties().remove(property);
         }

      }
      catch (Exception e)
      {
View Full Code Here

Examples of org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName

            .setParameter("toIO", toIO)
            .setParameter("typeName", type.getName());
      }
      else
      {
         HibernateIdentityObjectRelationshipName relationshipName =
            (HibernateIdentityObjectRelationshipName)getHibernateSession(ctx)
               .createCriteria(HibernateIdentityObjectRelationshipName.class).add(Restrictions.eq("name", relationship.getName()))
               .uniqueResult();

         if (relationshipName == null)
View Full Code Here

Examples of org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName

            .setParameter("toIO", toIO)
            .setParameter("typeName", type.getName());
      }
      else
      {
         HibernateIdentityObjectRelationshipName relationshipName =
            (HibernateIdentityObjectRelationshipName)getHibernateSession(ctx)
               .createCriteria(HibernateIdentityObjectRelationshipName.class).add(Restrictions.eq("name", relationship.getName()))
               .uniqueResult();

         if (relationshipName == null)
View Full Code Here

Examples of org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName

            .setParameter("toIO", toIO)
            .setParameter("typeName", type.getName());
      }
      else
      {
         HibernateIdentityObjectRelationshipName relationshipName =
            (HibernateIdentityObjectRelationshipName)getHibernateSession(ctx)
               .createCriteria(HibernateIdentityObjectRelationshipName.class).add(Restrictions.eq("name", relationship.getName()))
               .uniqueResult();

         if (relationshipName == null)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.