Examples of AssociationStorageStrategy


Examples of org.hibernate.ogm.datastore.mongodb.impl.AssociationStorageStrategy

    DBCollection collection;
    DBObject query;
    MongoDBAssociationSnapshot assocSnapshot = (MongoDBAssociationSnapshot) association.getSnapshot();
    String associationField;

    AssociationStorageStrategy storageStrategy = getAssociationStorageStrategy( key, associationContext );

    // We need to execute the previous operations first or it won't be able to find the key that should have
    // been created
    executeBatch( associationContext.getOperationsQueue() );
    if ( storageStrategy.isEmbeddedInEntity() ) {
      collection = this.getCollection( key.getEntityKey() );
      query = this.prepareIdObject( key.getEntityKey() );
      associationField = key.getCollectionRole();
    }
    else {
View Full Code Here

Examples of org.hibernate.ogm.datastore.mongodb.impl.AssociationStorageStrategy

    }
  }

  @Override
  public void removeAssociation(AssociationKey key, AssociationContext associationContext) {
    AssociationStorageStrategy storageStrategy = getAssociationStorageStrategy( key, associationContext );

    if ( storageStrategy.isEmbeddedInEntity() ) {
      DBObject entity = this.prepareIdObject( key.getEntityKey() );
      if ( entity != null ) {
        BasicDBObject updater = new BasicDBObject();
        this.addSubQuery( "$unset", updater, key.getCollectionRole(), ONE );
        this.getCollection( key.getEntityKey() ).update( entity, updater, true, false );
View Full Code Here

Examples of org.hibernate.ogm.datastore.mongodb.impl.AssociationStorageStrategy

    }
  }

  @Override
  public boolean isStoredInEntityStructure(AssociationKey associationKey, AssociationContext associationContext) {
    AssociationStorageStrategy storageStrategy = getAssociationStorageStrategy( associationKey, associationContext );
    return storageStrategy.isEmbeddedInEntity();
  }
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.