Package org.hibernate.ogm.grid

Examples of org.hibernate.ogm.grid.AssociationKey


      }
      else {
        throw new AssertionFailure( "Cannot detect associated entity metadata: collectionPersister and propertyType are both null" );
      }

      associationKey = new AssociationKey( associationKeyMetadata, columnValues, collectionRole, ownerEntityKey, associationKind );
    }

    return associationKey;
  }
View Full Code Here


   * Load a collection and create it if it is not found
   */
  public Association getAssociation() {
    if ( association == null ) {
      // Compute bi-directionality first
      AssociationKey key = getAssociationKey();
      if ( isBidirectional == Boolean.FALSE ) {
        //fake association to prevent unidirectional associations to keep record of the inverse side
        association = new Association();
      }
      else {
View Full Code Here

  //action methods

  private AssociationKey getCollectionMetadataKey() {
    if ( collectionMetadataKey == null ) {
      final Object[] columnValues = getKeyColumnValues();
      collectionMetadataKey = new AssociationKey( tableName, keyColumnNames, columnValues );
      // We have a collection on the main side
      if (collectionPersister != null) {
        EntityKey entityKey;
        // we are explicitly looking to update the non owning side
        if ( inverse ) {
View Full Code Here

   * Load a collection and create it if it is not found
   */
  public Association getCollectionMetadata() {
    if ( collectionMetadata == null ) {
      // Compute bi-directionality first
      AssociationKey key = getCollectionMetadataKey();
      if ( isBidirectional == Boolean.FALSE ){
        //fake association to prevent unidirectional associations to keep record of the inverse side
        collectionMetadata = new Association( new MapAssociationSnapshot( Collections.EMPTY_MAP ) );
      }
      else {
View Full Code Here

    AssociationKeyMetadata associationKeyMetadata = new AssociationKeyMetadata( tableName, columnNames );

    // the engine never accesses deserialized key instances so it's ok to leave the additional attributes
    // null; we should still consider extract these attributes to avoid potential confusion
    return new AssociationKey( associationKeyMetadata, values, null, null, null );
  }
View Full Code Here

    AssociationKeyMetadata associationKeyMetadata = new AssociationKeyMetadata( tableName, columnNames, null );

    // the engine never accesses deserialized key instances so it's ok to leave the additional attributes
    // null; we should still consider extract these attributes to avoid potential confusion
    return new AssociationKey( associationKeyMetadata, values, null, null, null );
  }
View Full Code Here

  }

  private AssociationKey getCollectionMetadataKey() {
    if ( collectionMetadataKey == null ) {
      final Object[] columnValues = getKeyColumnValues();
      collectionMetadataKey = new AssociationKey( tableName, keyColumnNames, columnValues );
    }
    return collectionMetadataKey;
  }
View Full Code Here

      }
      else {
        throw new AssertionFailure( "Cannot detect associated entity metadata: collectionPersister and propertyType are both null" );
      }

      associationKey = new AssociationKey( associationKeyMetadata, columnValues, collectionRole, ownerEntityKey, associationKind );
    }

    return associationKey;
  }
View Full Code Here

   * Load a collection and create it if it is not found
   */
  public Association getAssociation() {
    if ( association == null ) {
      // Compute bi-directionality first
      AssociationKey key = getAssociationKey();
      if ( isBidirectional == Boolean.FALSE ) {
        //fake association to prevent unidirectional associations to keep record of the inverse side
        association = new Association();
      }
      else {
View Full Code Here

      }
      else {
        throw new AssertionFailure( "Cannot detect associated entity metadata: collectionPersister and propertyType are both null" );
      }

      associationKey = new AssociationKey( associationKeyMetadata, columnValues, collectionRole, ownerEntityKey, associationKind );
    }

    return associationKey;
  }
View Full Code Here

TOP

Related Classes of org.hibernate.ogm.grid.AssociationKey

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.