Package org.hibernate.ogm.datastore.spi

Examples of org.hibernate.ogm.datastore.spi.Tuple


  }

  @Override
  public Tuple get(RowKey column) {
    DBObject row = this.map.get( column );
    return row == null ? null : new Tuple( new MongoDBTupleSnapshot( row, column ) );
  }
View Full Code Here


    FineGrainedAtomicMap<String, Object> atomicMap = AtomicMapLookup.getFineGrainedAtomicMap( cache, key, false );
    if ( atomicMap == null ) {
      return null;
    }
    else {
      return new Tuple( new InfinispanTupleSnapshot( atomicMap ) );
    }
  }
View Full Code Here

  public Tuple createTuple(EntityKey key) {
    //TODO we don't verify that it does not yet exist assuming that this has been done before by the calling code
    //should we improve?
    Cache<EntityKey, Map<String, Object>> cache = provider.getCache( ENTITY_STORE );
    FineGrainedAtomicMap<String,Object> atomicMap =  AtomicMapLookup.getFineGrainedAtomicMap( cache, key, true );
    return new Tuple( new InfinispanTupleSnapshot( atomicMap ) );
  }
View Full Code Here

    AtomicMapLookup.removeAtomicMap( cache, key );
  }

  @Override
  public Tuple createTupleAssociation(AssociationKey associationKey, RowKey rowKey) {
    return new Tuple( EmptyTupleSnapshot.SINGLETON );
  }
View Full Code Here

    FineGrainedAtomicMap<String, Object> atomicMap = AtomicMapLookup.getFineGrainedAtomicMap( cache, key, false );
    if ( atomicMap == null ) {
      return null;
    }
    else {
      return new Tuple( new InfinispanTupleSnapshot( atomicMap ) );
    }
  }
View Full Code Here

  public Tuple createTuple(EntityKey key, TupleContext tupleContext) {
    //TODO we don't verify that it does not yet exist assuming that this has been done before by the calling code
    //should we improve?
    Cache<EntityKey, Map<String, Object>> cache = provider.getCache( ENTITY_STORE );
    FineGrainedAtomicMap<String,Object> atomicMap =  AtomicMapLookup.getFineGrainedAtomicMap( cache, key, true );
    return new Tuple( new InfinispanTupleSnapshot( atomicMap ) );
  }
View Full Code Here

    AtomicMapLookup.removeAtomicMap( cache, key );
  }

  @Override
  public Tuple createTupleAssociation(AssociationKey associationKey, RowKey rowKey) {
    return new Tuple();
  }
View Full Code Here

  @Override
  public Tuple getTuple(EntityKey key, TupleContext tupleContext) {
    DBObject found = this.getObject( key, tupleContext );
    if ( found != null ) {
      return new Tuple( new MongoDBTupleSnapshot( found, key, UPDATE ) );
    }
    else if ( isInTheQueue( key, tupleContext ) ) {
      // The key has not been inserted in the db but it is in the queue
      return new Tuple( new MongoDBTupleSnapshot( prepareIdObject( key ), key, INSERT ) );
    }
    else {
      return null;
    }
  }
View Full Code Here

  }

  @Override
  public Tuple createTuple(EntityKey key, TupleContext tupleContext) {
    DBObject toSave = this.prepareIdObject( key );
    return new Tuple( new MongoDBTupleSnapshot( toSave, key, SnapshotType.INSERT ) );
  }
View Full Code Here

    }
  }

  @Override
  public Tuple createTupleAssociation(AssociationKey associationKey, RowKey rowKey) {
    return new Tuple();
  }
View Full Code Here

TOP

Related Classes of org.hibernate.ogm.datastore.spi.Tuple

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.