Examples of Association


Examples of org.hibernate.ogm.model.spi.Association

  }

  private void removeNavigationalInformationFromInverseSide(int propertyIndex, AssociationKeyMetadata associationKeyMetadata, Object[] oldColumnValue) {
    AssociationPersister associationPersister = createAssociationPersister( propertyIndex, associationKeyMetadata, oldColumnValue );

    Association association = associationPersister.getAssociationOrNull();

    if ( association != null ) {
      RowKey rowKey = getInverseRowKey( associationKeyMetadata, oldColumnValue );
      association.remove( rowKey );
      associationPersister.flushToDatastore();
    }
  }
View Full Code Here

Examples of org.hibernate.ogm.model.spi.Association

  @Override
  public Association getAssociation(AssociationKey key, AssociationContext associationContext) {
    Cache<AssociationKey, Map<RowKey, Map<String, Object>>> cache = provider.getCache( ASSOCIATION_CACHE );
    Map<RowKey, Map<String, Object>> atomicMap = AtomicMapLookup.getFineGrainedAtomicMap( cache, key, false );
    return atomicMap == null ? null : new Association( new MapAssociationSnapshot( atomicMap ) );
  }
View Full Code Here

Examples of org.hibernate.ogm.model.spi.Association

  public Association createAssociation(AssociationKey key, AssociationContext associationContext) {
    //TODO we don't verify that it does not yet exist assuming that this ahs been done before by the calling code
    //should we improve?
    Cache<AssociationKey, Map<RowKey, Map<String, Object>>> cache = provider.getCache( ASSOCIATION_CACHE );
    Map<RowKey, Map<String, Object>> atomicMap = AtomicMapLookup.getFineGrainedAtomicMap( cache, key, true );
    return new Association( new MapAssociationSnapshot( atomicMap ) );
  }
View Full Code Here

Examples of org.hibernate.ogm.model.spi.Association

  }

  @Override
  public Association getAssociation(AssociationKey key, AssociationContext associationContext) {
    Map<RowKey, Map<String, Object>> associationMap = provider.getAssociation( key );
    return associationMap == null ? null : new Association( new MapAssociationSnapshot( associationMap ) );
  }
View Full Code Here

Examples of org.hibernate.ogm.model.spi.Association

  @Override
  public Association createAssociation(AssociationKey key, AssociationContext associationContext) {
    Map<RowKey, Map<String, Object>> associationMap = new HashMap<RowKey, Map<String,Object>>();
    provider.putAssociation( key, associationMap );
    return new Association( new MapAssociationSnapshot( associationMap ) );
  }
View Full Code Here

Examples of org.hibernate.ogm.model.spi.Association

        .associationKeyMetadata( associationKeyMetadata )
        .session( session )
        .associationTypeContext( associationTypeContext )
        .hostingEntity( session.getPersistenceContext().getEntity( new org.hibernate.engine.spi.EntityKey( (Serializable) uniqueKey, inversePersister ) ) );

    final Association ids = associationPersister.getAssociationOrNull();

    if (ids == null || ids.size() == 0 ) {
      return null;
    }
    else if (ids.size() == 1) {
      //EntityLoader#loadByUniqueKey uses a null object and LockMode.NONE
      //there is only one element in the list, so get the first
      Tuple tuple = ids.get( ids.getKeys().iterator().next() );
      final Serializable id = (Serializable) getGridIdentifierType().nullSafeGet( tuple, getIdentifierColumnNames(), session, null );
      return load( id, null, LockMode.NONE, session );
    }
    else {
      throw new AssertionFailure(
View Full Code Here

Examples of org.hoteia.qalingo.core.service.openid.Association

        openIdService.setRealm(urlService.buildDomainePathUrl(requestData));
        String openIdCallBackURL = urlService.buildOpenIdCallBackUrl(requestData);
        openIdService.setReturnTo(urlService.buildAbsoluteUrl(requestData, openIdCallBackURL));
         
        Endpoint endpoint = openIdService.lookupEndpoint(OpenProvider.YAHOO.getPropertyKey().toLowerCase());
              Association association = openIdService.lookupAssociation(endpoint);
              request.getSession().setAttribute(Utils.ATTR_MAC, association.getRawMacKey());
              request.getSession().setAttribute(Utils.ATTR_ALIAS, endpoint.getAlias());
              String url = openIdService.getAuthenticationUrl(endpoint, association);
              response.sendRedirect(url);
         
      } catch (Exception e) {
View Full Code Here

Examples of org.jbpm.bpmn2.core.Association

    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
        ProcessInstance processInstance = ksession.startProcess("Evaluation");
        Definitions def = (Definitions) processInstance.getProcess().getMetaData().get("Definitions");
        assertNotNull(def.getAssociations());
        assertTrue(def.getAssociations().size() == 1);
        Association assoc = def.getAssociations().get(0);
        assertEquals("_1234", assoc.getId());
        assertEquals("_1", assoc.getSourceRef());
        assertEquals("_2", assoc.getTargetRef());
    }
View Full Code Here

Examples of org.jbpm.bpmn2.core.Association

 
  public Object start(final String uri, final String localName,
      final Attributes attrs, final ExtensibleXmlParser parser)
      throws SAXException {
    parser.startElementBuilder(localName, attrs);
    Association association = new Association();
    association.setId(attrs.getValue("id"));
    association.setSourceRef(attrs.getValue("sourceRef"));
    association.setTargetRef(attrs.getValue("targetRef"));
   
    Process parent = (Process) parser.getParent();
    Definitions definitions = (Definitions)
      parent.getMetaData().get("Definitions");
   
View Full Code Here

Examples of org.jdesktop.jdic.filetypes.Association

    }

    private void unregister(File showFile) {
        try {
            if (shouldUnregister) {
                Association assoc = getFileAccociation(FileExtensionFilter.getExtension(showFile));
                if (assoc != null) {
                    assocService.unregisterSystemAssociation(assoc);
                }
            }
        } catch (AssociationNotRegisteredException e) {
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.