Package org.hibernate.ogm.model.spi

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


  public static Map<String, Object> tupleToMap(Tuple tuple) {
    if (tuple == null) {
      return null;
    }
    Map<String, Object> snapshot;
    TupleSnapshot snapshotInstance = tuple.getSnapshot();
    if ( snapshotInstance.isEmpty() ) {
      //new assoc tuples are made of EmptyTupleSnapshot
      snapshot = Collections.emptyMap();
    }
    else {
      //loaded assoc tuples are made of MapTupleSnapshot
View Full Code Here


  @Override
  public Map<String, Object> extractEntityTuple(SessionFactory sessionFactory, EntityKey key) {
    Map<String, Object> tuple = new HashMap<String, Object>();
    GridDialect dialect = getDialect( sessionFactory );
    TupleSnapshot snapshot = dialect.getTuple( key, GridDialectOperationContexts.emptyTupleContext() ).getSnapshot();
    for ( String column : snapshot.getColumnNames() ) {
      tuple.put( column, snapshot.get( column ) );
    }
    return tuple;
  }
View Full Code Here

TOP

Related Classes of org.hibernate.ogm.model.spi.TupleSnapshot

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.